-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmach.py
executable file
·76 lines (66 loc) · 2.63 KB
/
mach.py
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
75
76
#!/usr/bin/env python3
from modules.arguments import load_arguments
from modules.calculation import calculate_chgs
from modules.comparison import comparison
from modules.parameterization import parameterize
from modules.parameterization_meta import parameterization_meta
from modules.set_of_molecules import set_of_mols_info
from numba import jit
from numpy import random
from warnings import filterwarnings
filterwarnings("ignore")
@jit(nopython=True, cache=True)
def numba_seed(seed):
random.seed(seed)
if __name__ == '__main__':
args = load_arguments()
if args.random_seed != 0:
random.seed(args.random_seed)
numba_seed(args.random_seed)
if args.mode == "set_of_molecules_info":
set_of_mols_info(args.sdf_file,
args.ats_types_pattern)
elif args.mode == "calculation":
calculate_chgs(args.sdf_file,
args.chg_method,
args.params_file,
args.data_dir)
elif args.mode == "parameterization":
parameterize(args.sdf_file,
args.ref_chgs_file,
args.chg_method,
args.params_file,
args.ats_types_pattern,
args.percent_par,
args.optimization_method,
args.num_of_samples,
args.num_of_candidates,
args.subset,
args.min_subset,
args.maxiter,
args.random_seed,
args.data_dir,
args.cross_validation)
elif args.mode == "comparison":
comparison(args.sdf_file,
args.ref_chgs_file,
args.emp_chgs_file,
args.ats_types_pattern,
args.data_dir)
elif args.mode == "parameterization_meta":
parameterization_meta(args.sdf_file,
args.ref_chgs_file,
args.chg_method,
args.params_file,
args.ats_types_pattern,
args.percent_par,
args.optimization_method,
args.num_of_samples,
args.num_of_candidates,
args.subset,
args.min_subset,
args.RAM,
args.walltime,
args.random_seed,
args.data_dir,
args.cross_validation)