Loading...
Searching...
No Matches
seams_config.hpp
Go to the documentation of this file.
1#ifndef SEAMS_CONFIG_HPP_
2#define SEAMS_CONFIG_HPP_
3
4#include <ostream>
5#include <string>
6#include <string_view>
7
8#include <site.hpp>
9
19
20namespace site {
22const char *refuseIceScore(Family f);
23const char *familyName(Family f);
24Family parseFamily(std::string_view name);
25} // namespace site
26
27namespace seams::cfg {
28
29struct Runtime {
30 int frame = 1;
31 int last = 0;
32 int jobs = 1;
33 int type = 0;
34 double cutoff = 3.5;
35 int k = 4;
36 std::string graph = "seeded";
38 double resident = 0.80;
39 double cell = 3.0;
40 int tpp = 0;
41 int block = 0;
42 bool offload = false;
43 std::string fennel;
44 std::string luaPath;
45 std::string source;
46};
47
49std::string pathFromArgv(int argc, char **argv);
50
53void applyFile(const std::string &path, bool required);
54
56Runtime load(std::string_view explicitFile = {});
57
61
62void dump(const Runtime &cfg, std::ostream &os);
63
64} // namespace seams::cfg
65
66#endif
void applyFile(const std::string &path, bool required)
Apply a dotenv file: set KEY=VAL only when KEY is not already in the environment.
std::string pathFromArgv(int argc, char **argv)
Scan argv for –config PATH / –config=PATH.
void dump(const Runtime &cfg, std::ostream &os)
void exportEnviron(const Runtime &cfg)
Write Runtime fields into the environment so libraries that only call getenv (linkcell,...
Runtime load(std::string_view explicitFile={})
Load file (if any) then read the environment into a Runtime.
bool iceScoreAllowed(Family f)
const char * familyName(Family f)
const char * refuseIceScore(Family f)
Family parseFamily(std::string_view name)
Family
Definition site.hpp:40
Per-atom site chemistry, separate from CHILL ice labels.