Skip to content

Commit

Permalink
make windows mask avaliable for NAMD
Browse files Browse the repository at this point in the history
  • Loading branch information
adw62 committed Aug 8, 2022
1 parent a684530 commit 4696c58
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
4 changes: 2 additions & 2 deletions TIES_MD/TIES.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ def run(self):
pool.join()
pool.terminate()

total_sampling = (((self.sampling_per_window +
self.equili_per_window) * self.num_windows * self.reps_per_exec) / len(self.devices)) / unit.nanosecond
total_sampling = (((self.sampling_per_window + self.equili_per_window)
* self.num_windows * self.reps_per_exec) / len(self.devices)) / unit.nanosecond

speed = total_sampling / total_simulation_time
speed *= 86400 # seconds in a day
Expand Down
18 changes: 8 additions & 10 deletions TIES_MD/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ def main(argv=None):
exp_name = 'complex'
print(msg.format('Experiment name', exp_name))

if args['--windows_mask']:
mask = args['--windows_mask']
mask = mask.split(',')
mask = [int(x) for x in mask]
else:
mask = None

# Read config file
args_dict = read_config(config_file)

Expand Down Expand Up @@ -97,17 +104,8 @@ def main(argv=None):
rep_id = None
print(msg.format('node id string', 'None'))

if args['--windows_mask']:
if not_openmm:
raise ValueError(not_openmm_msg.format('--windows_mask'))
mask = args['--windows_mask']
mask = mask.split(',')
mask = [int(x) for x in mask]
else:
mask = None

# removed this as an option there is no need to expose it for now
periodic=True
periodic = True

TIES(input_folder, exp_name, run_type, devices, rep_id, mask, periodic, **args_dict)

9 changes: 4 additions & 5 deletions TIES_MD/doc/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ values are as follows::
`setup` will prep the output directories and `class` will halt the program after the construction of the TIES class,
this can be used in testing or advanced analysis.

[--windows_mask=None]
Comma separated list of integers. These specify what alchemical windows the current instance of TIES OpenMM should
run. By default all windows will be run.

# Below are OpenMM specific options, these are silently ignored for NAMD runs.

[--devices=0]
Expand All @@ -146,11 +150,6 @@ values are as follows::
An int which will be used to generate the names of output files. Should be used if many independent replicas of the
same simulation are run on different nodes to ensure output is writen to unique location.

[--windows_mask=None]
Comma separated list of integers. These specify what alchemical windows the current instance of TIES OpenMM should
run. By default all windows will be run.


Simulation Preparation
----------------------

Expand Down

0 comments on commit 4696c58

Please sign in to comment.