-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRun.py
More file actions
74 lines (66 loc) · 1.94 KB
/
Run.py
File metadata and controls
74 lines (66 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import argparse
import os
import Cycle
from Molecule import HiveMolecule
def main():
parser = argparse.ArgumentParser(
description="Optimize a molecule using Hive.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter
)
parser.add_argument(
"input",
type=str,
choices=['molfile', 'smiles'],
help="Type of molecule input (.mol or smiles)",
)
parser.add_argument(
"molecule",
type=str,
help="Molecule to be optimized (SMILES or .mol file path)",
)
parser.add_argument(
"--n_confs",
type=int,
default=6,
help="required number of conformations in enseble ",
)
parser.add_argument(
"--global_iterations",
type=int,
default=20,
help="Number of ABC iterations of global conformation search",
)
parser.add_argument(
"--local_iterations",
type=int,
default=20,
help="Number of ABC iterations of local conformation search",
)
parser.add_argument(
"--global_exists",
action='store_true',
help="Provide the local search in respect to user's global conformation",
)
parser.add_argument(
"--MP2",
action='store_true',
help="flag that enables optimization at the MP2 level of theory",
)
parser.add_argument(
"--basis",
default='sto-3g',
help="choose basis available in PySCF package",
)
parser.add_argument(
"--iters",
default=100,
help="Number of iterations of final optimization",
)
args = parser.parse_args()
print(args)
print(f"Molecule to be optimized: {args.molecule}")
mol = HiveMolecule(args.input, args.molecule)
ensemble = Cycle.full_cycle(mol, args.global_iterations, args.local_iterations, args.global_exists, args.n_confs, args.MP2, args.basis, args.iters)
return ensemble
if __name__ == "__main__":
main()