You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates to pyproject.toml, also looked into issue #37 - moved logic around and removed the executable in the bin directory and moved it into the main_mcc.py file
Copy file name to clipboardExpand all lines: CodeEntropy/main_mcc.py
+173-5Lines changed: 173 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,179 @@
6
6
fromCodeEntropyimportEntropyFunctionsasEF
7
7
fromCodeEntropyimportMDAUniverseHelperasMDAHelper
8
8
9
-
defmain(arg_dict):
9
+
importargparse
10
+
fromdatetimeimportdatetime
11
+
12
+
defmain():
10
13
"""
11
14
Main function for calculating the entropy of a system using the multiscale cell correlation method.
12
-
13
-
Parameters
14
-
----------
15
-
arg_dict : the input arguments
16
15
"""
17
16
17
+
try:
18
+
parser=argparse.ArgumentParser(description="""
19
+
CodeEntropy-POSEIDON is a tool to compute entropy using the multiscale-cell-correlation (MCC) theory and force/torque covariance methods with the ablity to compute solvent entropy.
20
+
Version:
21
+
0.3.1;
22
+
23
+
Authors:
24
+
Arghya Chakravorty (arghya90),
25
+
Jas Kalayan (jkalayan),
26
+
Donald Chang,
27
+
Sarah Fegan
28
+
Ioana Papa;
29
+
30
+
Output:
31
+
*.csv = results from different calculateion,
32
+
*.pkl - Pickled reduced universe for further analysis,
33
+
*.out - detailed output such as matrix and spectra""")
34
+
35
+
36
+
parser.add_argument('-f', '--top_traj_file',
37
+
required=True,
38
+
dest="filePath",
39
+
action='store',
40
+
nargs='+',
41
+
help="Path to Structure/topology file (AMBER PRMTOP, GROMACS TPR which contains topology and dihedral information) followed by Trajectory file(s) (AMBER NETCDF or GROMACS TRR) you will need to output the coordinates and forces to the same file. Required.")
42
+
parser.add_argument('-l', '--selectString',
43
+
action='store',
44
+
dest="selectionString",
45
+
type=str,
46
+
default='all',
47
+
help='Selection string for CodeEntropy such as protein or resid, refer to MDAnalysis.select_atoms for more information.')
48
+
parser.add_argument('-b', '--begin',
49
+
action="store",
50
+
dest="start",
51
+
help="Start analysing the trajectory from this frame index. Defaults to 0",
52
+
default=0,
53
+
type=int)
54
+
parser.add_argument('-e', '--end',
55
+
action="store",
56
+
dest="end",
57
+
help="Stop analysing the trajectory at this frame index. Defaults to -1 (end of trajectory file)",
58
+
default=-1,
59
+
type=int)
60
+
parser.add_argument('-d', '--step',
61
+
action="store",
62
+
dest="step",
63
+
help="interval between two consecutive frames to be read index. Defaults to 1",
64
+
default=1,
65
+
type=int)
66
+
parser.add_argument("-n","--bin_width",
67
+
action="store",
68
+
dest="bin_width",
69
+
default=30,
70
+
type=int,
71
+
help="Bin width in degrees for making the histogram of the dihedral angles for the conformational entropy. Default: 30")
72
+
parser.add_argument('-k', '--tempra',
73
+
action="store",
74
+
dest="temp",
75
+
help="Temperature for entropy calculation (K). Default to 298.0 K",
76
+
default=298.0,
77
+
type=float)
78
+
parser.add_argument("-v","--verbose",
79
+
action="store",
80
+
dest="verbose",
81
+
default=False,
82
+
type=bool,
83
+
help="True/False flag for noisy or quiet output. Default: False")
84
+
parser.add_argument('-t', '--thread',
85
+
action="store",
86
+
dest="thread",
87
+
help="How many multiprocess to use. Default 1 for single core execution.",
88
+
default=1,
89
+
type=int)
90
+
parser.add_argument("-o","--out",
91
+
action="store",
92
+
dest="outFile",
93
+
default="outfile.out",
94
+
help="Name of the file where the output will be written. Default: outfile.out")
95
+
parser.add_argument("-r","--resout",
96
+
action="store",
97
+
dest="resOutFile",
98
+
default="res_outfile.out",
99
+
help="Name of the file where the residue entropy output will be written. Default: res_outfile.out")
100
+
parser.add_argument("-m", "--mout",
101
+
action="store",
102
+
dest="moutFile",
103
+
default=None,
104
+
help="Name of the file where certain matrices will be written (default: None).")
105
+
106
+
parser.add_argument('-c', '--cutShell',
107
+
action='store',
108
+
dest="cutShell",
109
+
default=None,
110
+
type=float,
111
+
help='include cutoff shell analysis, add cutoff distance in angstrom Default None will ust the RAD Algorithm')
112
+
parser.add_argument('-p', '--pureAtomNum',
113
+
action='store',
114
+
dest="puteAtomNum",
115
+
default=1,
116
+
type=int,
117
+
help='Reference molecule resid for system of pure liquid. Default to 1')
118
+
parser.add_argument('-x', '--excludedResnames',
119
+
dest="excludedResnames",
120
+
action='store',
121
+
nargs='+',
122
+
default=None,
123
+
help='exclude a list of molecule names from nearest non-like analysis. Default: None. Multiples are gathered into list.')
124
+
parser.add_argument('-w', '--water',
125
+
dest="waterResnames",
126
+
action='store',
127
+
default='WAT',
128
+
nargs='+',
129
+
help='resname for water molecules. Default: WAT. Multiples are gathered into list.')
130
+
parser.add_argument('-s', '--solvent',
131
+
dest="solventResnames",
132
+
action='store',
133
+
nargs='+',
134
+
default=None,
135
+
help='include resname of solvent molecules (case-sensitive) Default: None. Multiples are gathered into list.')
136
+
parser.add_argument("--solContact",
137
+
action="store_true",
138
+
dest="doSolContact",
139
+
default=False,
140
+
help="Do solute contact calculation")
141
+
142
+
args=parser.parse_args()
143
+
exceptargparse.ArgumentError:
144
+
print('Command line arguments are ill-defined, please check the arguments')
0 commit comments