diff --git a/TIES_MD/TIES.py b/TIES_MD/TIES.py index 0a3d302..4915795 100644 --- a/TIES_MD/TIES.py +++ b/TIES_MD/TIES.py @@ -52,7 +52,7 @@ class TIES(object): :param exp_name: str, for the names of experiment i.e. complex -> complex.pdb/complex.prmtop :param run_type: str, flag to say if we should run dynamics or not :param devices: list, list of ints for which cuda devices to use - :param node_id: float, id denoting what replica of this simulation this execution of TIES_MD should run + :param rep_id: float, id denoting what replica of this simulation this execution of TIES_MD should run :param windows_mask: list containing ints for start and end range of windows to be run :param periodic: boolean determines if the simulation will be periodic :param lam: Lambda class, allow passing of custom lambda schedule @@ -60,10 +60,11 @@ class TIES(object): :param **kwargs: dict, containing setting from config file ''' - def __init__(self, cwd, exp_name, run_type='class', devices=None, node_id=None, windows_mask=None, periodic=True, - lam=None, platform='CUDA', **kwargs): + def __init__(self, cwd, exp_name='complex', run_type='class', devices=None, rep_id=None, windows_mask=None, + periodic=True, lam=None, platform='CUDA', **kwargs): nice_print('TIES') - if run_type == 'class' and kwargs is None: + + if run_type == 'class' and kwargs == {}: kwargs = read_config(os.path.join(cwd, 'TIES.cfg')) print('If you use this software please cite:') print('Wade, A.D., et al. 2022. Alchemical Free Energy Estimators and Molecular Dynamics Engines:' @@ -77,9 +78,7 @@ def __init__(self, cwd, exp_name, run_type='class', devices=None, node_id=None, #check all the config file args we need are present args_list = ['engine', 'temperature', 'pressure', 'sampling_per_window', 'equili_per_window', 'methods', 'total_reps', 'split_run', 'elec_edges', 'ster_edges', 'global_lambdas', 'constraint_file', - 'constraint_column', 'input_type', 'box_type'] - - optional_args = ['cell_basis_vec1', 'cell_basis_vec2', 'cell_basis_vec3', 'edge_length'] + 'constraint_column', 'input_type', 'cell_basis_vec1', 'cell_basis_vec2', 'cell_basis_vec3'] # check we have all required arguments for argument in args_list: @@ -88,14 +87,14 @@ def __init__(self, cwd, exp_name, run_type='class', devices=None, node_id=None, # check we have no unexpected arguments for argument in kwargs.keys(): - if argument not in args_list+optional_args: + if argument not in args_list: raise ValueError('Argument {} not supported for this engine or at all.' ' Please remove from the TIES.cfg.'.format(argument)) - self.all_args = args_list+optional_args - + self.all_args = args_list #engine must be delt with first to set namd_version which other options may need. - api_sensitive = ['engine', 'split_run', 'elec_edges', 'ster_edges', 'global_lambdas', 'box_type'] + api_sensitive = ['engine', 'split_run', 'elec_edges', 'ster_edges', 'global_lambdas', + 'cell_basis_vec1', 'cell_basis_vec2', 'cell_basis_vec3'] #Iterate over our args_dict to set attributes of class to values in dict print('Read arguments from file:') @@ -108,11 +107,6 @@ def __init__(self, cwd, exp_name, run_type='class', devices=None, node_id=None, setattr(self, full_k, v) print('') - #set any nonexistant optional args to None - for option in optional_args: - if option not in kwargs.keys(): - setattr(self, option, None) - #set any attr the api needs self._split_run = bool(int(self._split_run)) if self._split_run: @@ -144,6 +138,7 @@ def __init__(self, cwd, exp_name, run_type='class', devices=None, node_id=None, self.run_type = run_type self.methods = self.methods.split(',') + self.basis_vectors = [[], [], []] self.total_reps = int(self.total_reps) self.reps_per_exec = int(self.reps_per_exec) @@ -168,14 +163,15 @@ def __init__(self, cwd, exp_name, run_type='class', devices=None, node_id=None, self.platform = platform self.cwd = cwd - self.node_id = node_id + self.rep_id = rep_id self.periodic = periodic #run through api logic for prop in api_sensitive: setattr(self, prop, self.__getattribute__('_'+prop)) - self.sub_header, self.sub_run_line = None, None + self.pre_run_line, self.run_line = None, None + self.sub_run_line, self.sub_header = None, None # build schedule for lambdas do this last so passed lam can overwrite if desired print('Lambda schedule:') @@ -209,51 +205,76 @@ def __init__(self, cwd, exp_name, run_type='class', devices=None, node_id=None, nice_print('END') @property - def box_type(self): + def cell_basis_vec1(self): + """ + What is the 1st basis vector of the simulation cell + + :return: list of floats for x, y, z components of vector + """ + return self._cell_basis_vec1 + + @cell_basis_vec1.setter + def cell_basis_vec1(self, value): + ''' + Setter for cell_basis_vec1 + :param value: list for x, y, z of box, updates basis_vectors + + :return: None + ''' + if isinstance(value, str): + self._cell_basis_vec1 = [float(x) for x in value.split(',')] + else: + assert len(value) == 3 + self._cell_basis_vec1 = [x for x in value] + self.basis_vectors[0] = Vec3(*self._cell_basis_vec1) * unit.angstrom + + @property + def cell_basis_vec2(self): """ - What type of simulation box is being used (cube, truncatedOctahedron, rhombicDodecahedron or na for manual) + What is the 2nd basis vector of the simulation cell - :return: string for box type. + :return: list of floats for x, y, z components of vector """ - return self._box_type + return self._cell_basis_vec2 - @box_type.setter - def box_type(self, value): + @cell_basis_vec2.setter + def cell_basis_vec2(self, value): ''' - Setting function for box type, will build manual box from cell basis vectors if user passes box type na - :param value: str, for what box type we want + Setter for cell_basis_vec2 + :param value: list for x, y, z of box, updates basis_vectors :return: None ''' - self._box_type = value - if self._box_type == 'na': - vecs = ['cell_basis_vec1', 'cell_basis_vec2', 'cell_basis_vec3'] - for vec in vecs: - if self.__getattribute__(vec) is None: - raise ValueError( - 'If box type is unspecified as na in TIES.cfg the box vectors must be manually specified.' - ' Please add options {} {} {} to TIES.cfg'.format(*vecs)) - self.cell_basis_vec1 = [float(x) for x in self.cell_basis_vec1.split(',')] - self.cell_basis_vec2 = [float(x) for x in self.cell_basis_vec2.split(',')] - self.cell_basis_vec3 = [float(x) for x in self.cell_basis_vec3.split(',')] - - self.basis_vectors = [Vec3(*self.cell_basis_vec1) * unit.angstrom, - Vec3(*self.cell_basis_vec2) * unit.angstrom, - Vec3(*self.cell_basis_vec3) * unit.angstrom] + if isinstance(value, str): + self._cell_basis_vec2 = [float(x) for x in value.split(',')] + else: + assert len(value) == 3 + self._cell_basis_vec2 = [x for x in value] + self.basis_vectors[1] = Vec3(*self._cell_basis_vec2) * unit.angstrom + @property + def cell_basis_vec3(self): + """ + What is the 3rd basis vector of the simulation cell + + :return: list of floats for x, y, z components of vector + """ + return self._cell_basis_vec3 + + @cell_basis_vec3.setter + def cell_basis_vec3(self, value): + ''' + Setter for cell_basis_vec3 + :param value: list for x, y, z of box, updates basis_vectors + + :return: None + ''' + if isinstance(value, str): + self._cell_basis_vec3 = [float(x) for x in value.split(',')] else: - print('Getting box vectors for {} box. Ignoring cell basis vectors'.format(self.box_type)) - if self.edge_length is None: - raise ValueError('Must provide edge_length option in TIES.cfg to compute box vectors. If custom box vectors' - ' are desired set box_type = na in TIES.cfg.') - self.edge_length = self.edge_length.split('*unit.') - self.edge_length = unit.Quantity(float(self.edge_length[0]), getattr(unit, self.edge_length[1])) - self.edge_length = self.edge_length.in_units_of(unit.angstrom) / unit.angstrom - self.basis_vectors = get_box_vectors(self.box_type, self.edge_length) - - self.cell_basis_vec1 = [float(x) for x in self.basis_vectors[0] / unit.angstrom] - self.cell_basis_vec2 = [float(x) for x in self.basis_vectors[1] / unit.angstrom] - self.cell_basis_vec3 = [float(x) for x in self.basis_vectors[2] / unit.angstrom] + assert len(value) == 3 + self._cell_basis_vec3 = [x for x in value] + self.basis_vectors[2] = Vec3(*self._cell_basis_vec3) * unit.angstrom @property def engine(self): @@ -386,6 +407,8 @@ def split_run(self, value): if self._split_run: self.reps_per_exec = 1 else: + if self.rep_id is not None: + raise ValueError('Split run is off but rep_id has a set value of {}. Unset rep_id'.format(self.rep_id)) self.reps_per_exec = self.total_reps def update_cfg(self): @@ -417,8 +440,6 @@ def update_cfg(self): cons_file='na' if self.constraint_file is None else self.constraint_file, constraint_column='na' if self.constraint_column is None else self.constraint_column, input_type=self.input_type, - box_type='na' if self.box_type is None else self.box_type, - edge_length='na' if self.edge_length is None else self.edge_length, **solv_oct_box) with open(os.path.join(self.cwd, 'TIES.cfg'), 'w') as f: f.write(ties_script) @@ -430,12 +451,14 @@ def setup(self): :return: None ''' - sub_header, sub_run_line = get_header_and_run(self.engine, self.namd_version, self.split_run, - self.num_windows, self.total_reps, self.exp_name, self.devices) + sub_header, sub_run_line = get_header_and_run(self.engine, self.namd_version, self.split_run,self.num_windows, + self.total_reps, self.exp_name, self.devices) if self.sub_header is None: self.sub_header = sub_header - if self.sub_run_line is None: + if self.run_line is None and self.pre_run_line is None: self.sub_run_line = sub_run_line + else: + self.sub_run_line = str(self.pre_run_line) + str(self.run_line) if self.engine == 'namd': folders = ['equilibration', 'simulation'] @@ -511,7 +534,7 @@ def get_options(self): :return: None ''' - other_user_options = ['sub_header', 'sub_run_line'] + other_user_options = ['sub_header', 'pre_run_line', 'run_line'] for arg in self.all_args+other_user_options: print('{}: {}'.format(arg, self.__getattribute__(arg))) @@ -522,8 +545,8 @@ def run(self): :return: None ''' if self.split_run: - if self.node_id is None: - raise ValueError('For a split run set --node_id on the command line, or pass node_id as an ' + if self.rep_id is None: + raise ValueError('For a split run set --rep_id on the command line, or pass rep_id as an ' 'argument to the TIES() class.') system = AlchSys(self.cwd, self.exp_name, self.temperature, self.pressure, self.constraint_file, @@ -531,7 +554,7 @@ def run(self): self.periodic, self.platform) if self.split_run: - system_ids = [System_ID(self.devices[0], self.node_id)] + system_ids = [System_ID(self.devices[0], self.rep_id)] else: system_ids = [System_ID(self.devices[i % len(self.devices)], i) for i in range(self.total_reps)] @@ -539,7 +562,7 @@ def run(self): for rep in system_ids: for lam in self.lam.str_lams: lam_dir = 'LAMBDA_{}'.format(lam) - path = os.path.join(self.cwd, lam_dir, 'rep{}'.format(rep.node_id)) + path = os.path.join(self.cwd, lam_dir, 'rep{}'.format(rep.rep_id)) if not os.path.exists(path): raise ValueError('Output dir {} missing.'.format(path)) @@ -1073,7 +1096,7 @@ def get_header_and_run(engine, namd_version, split_run, num_windows, reps, exp_n #BSUB -e eLIGPAIR.%J""".format(int(np.ceil(num_jobs/gpus_per_node))) sub_run_line = 'jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 TIES_MD --config_file=$ties_dir/TIES.cfg' \ ' --exp_name={} --windows_mask=$lambda,$(expr $lambda + 1)' \ - ' --node_id=$i > $ties_dir/$lambda_$i.out&'.format(exp_name) + ' --rep_id=$i > $ties_dir/$lambda_$i.out&'.format(exp_name) else: #summit specific gpus_per_node = 6 diff --git a/TIES_MD/alch.py b/TIES_MD/alch.py index 2d2dc4e..13238db 100644 --- a/TIES_MD/alch.py +++ b/TIES_MD/alch.py @@ -608,12 +608,12 @@ class System_ID(object): what number repeat this simulation is out of some total number of repeats. :param device_id: int, for OpenMM GPU device id - :param node_id: str, id number denoting which replica this is + :param rep_id: str, id number denoting which replica this is ''' - def __init__(self, device_id, node_id): + def __init__(self, device_id, rep_id): self.device_id = str(device_id) - self.node_id = str(node_id) + self.rep_id = str(rep_id) def minimization(NVT, constraint): @@ -787,7 +787,7 @@ def simulate_system(ids, alch_sys, Lam, mask, cwd, niter, equili_steps, steps_pe beta = 1.0 / (unit.BOLTZMANN_CONSTANT_kB * alch_sys.temp) print('Running simulation on device {}'.format(ids.device_id)) - print('Running replica {} of windows {}'.format(ids.node_id, list(range(mask[0], mask[1])))) + print('Running replica {} of windows {}'.format(ids.rep_id, list(range(mask[0], mask[1])))) nlambda = len(Lam.schedule[0]) nstates = len(Lam.schedule[mask[0]:mask[1]]) @@ -850,7 +850,7 @@ def simulate_system(ids, alch_sys, Lam, mask, cwd, niter, equili_steps, steps_pe #If velocities are randmozied is this still equilibriated? NPT['sim'].context.setVelocitiesToTemperature(alch_sys.temp) else: - equili_file = os.path.join(cwd, 'LAMBDA_{}'.format(Lam.str_lams[i+mask[0]]), 'rep{}'.format(ids.node_id), + equili_file = os.path.join(cwd, 'LAMBDA_{}'.format(Lam.str_lams[i+mask[0]]), 'rep{}'.format(ids.rep_id), 'equilibration', 'state') equili_state_f = equili_file+'_NPT.xml' @@ -867,7 +867,7 @@ def simulate_system(ids, alch_sys, Lam, mask, cwd, niter, equili_steps, steps_pe NPT['sim'].loadState(equili_state_f) #add reporter to simulation - log = os.path.join(cwd, 'LAMBDA_{}'.format(Lam.str_lams[i+mask[0]]), 'rep{}'.format(ids.node_id), 'simulation', + log = os.path.join(cwd, 'LAMBDA_{}'.format(Lam.str_lams[i+mask[0]]), 'rep{}'.format(ids.rep_id), 'simulation', 'log') add_simulation_reporters(NPT['sim'], total_sim_NPT, save=log) @@ -875,7 +875,7 @@ def simulate_system(ids, alch_sys, Lam, mask, cwd, niter, equili_steps, steps_pe for iteration in range(niter): print('Propagating iteration {}/{} in window {}/{} for replica {}'.format(iteration + 1, niter, i+mask[0]+1, - all_states, ids.node_id)) + all_states, ids.rep_id)) # propogate system in current state NPT['sim'].step(steps_per_iter) @@ -904,13 +904,13 @@ def simulate_system(ids, alch_sys, Lam, mask, cwd, niter, equili_steps, steps_pe print('Saving results') for i, j in enumerate(Lam.str_lams[mask[0]: mask[1]]): if 'TI' in alch_sys.methods: - file = os.path.join(cwd, 'LAMBDA_{}'.format(j), 'rep{}'.format(ids.node_id), 'results', + file = os.path.join(cwd, 'LAMBDA_{}'.format(j), 'rep{}'.format(ids.rep_id), 'results', 'TI.npy') #print('Saving {} result to disk'.format(file)) np.save(file, grads[i, :, :]) if 'FEP' in alch_sys.methods: - file = os.path.join(cwd, 'LAMBDA_{}'.format(j), 'rep{}'.format(ids.node_id), 'results', + file = os.path.join(cwd, 'LAMBDA_{}'.format(j), 'rep{}'.format(ids.rep_id), 'results', 'FEP.npy') #print('Saving {} result to disk'.format(file)) np.save(file, u_kln[i, :, :]) diff --git a/TIES_MD/cli.py b/TIES_MD/cli.py index c0d1f48..bf3970b 100644 --- a/TIES_MD/cli.py +++ b/TIES_MD/cli.py @@ -31,7 +31,7 @@ TIES_MD Command line input should be used as follows... Usage: -TIES_MD [--devices=LIST] [--run_type=STRING] [--config_file=STRING] [--node_id=INT] [--windows_mask=LIST] [--exp_name=STR]... +TIES_MD [--devices=LIST] [--run_type=STRING] [--config_file=STRING] [--rep_id=INT] [--windows_mask=LIST] [--exp_name=STR]... """ def main(argv=None): @@ -88,13 +88,13 @@ def main(argv=None): else: devices = None - if args['--node_id']: + if args['--rep_id']: if not_openmm: - raise ValueError(not_openmm_msg.format('--node_id')) - node_id = args['--node_id'] - node_id = int(node_id) + raise ValueError(not_openmm_msg.format('--rep_id')) + rep_id = args['--rep_id'] + rep_id = int(rep_id) else: - node_id = None + rep_id = None print(msg.format('node id string', 'None')) if args['--windows_mask']: @@ -109,5 +109,5 @@ def main(argv=None): # removed this as an option there is no need to expose it for now periodic=True - TIES(input_folder, exp_name, run_type, devices, node_id, mask, periodic, **args_dict) + TIES(input_folder, exp_name, run_type, devices, rep_id, mask, periodic, **args_dict) diff --git a/TIES_MD/doc/source/HPC_submissions.rst b/TIES_MD/doc/source/HPC_submissions.rst index 5550b9d..9f9e3e2 100644 --- a/TIES_MD/doc/source/HPC_submissions.rst +++ b/TIES_MD/doc/source/HPC_submissions.rst @@ -4,7 +4,7 @@ HPC Submission scripts Here we provide some example submission scripts for various HPC systems. ``TIES MD`` will attempt to automatically write sensible submission scripts for ``NAMD2`` targeting `ARCHER 2 `_ and for ``OpenMM`` targeting `Summit `_. In general the user can make there own script for whichever HPC or cluster they prefer. To aid with writing general -scripts ``TIES MD`` exposes 2 options in the :ref:`API` called ``sub_header`` and ``sub_run_line``. The strings passed +scripts ``TIES MD`` exposes 3 options in the :ref:`API` called ``sub_header``, ``pre_run_line`` and ``run_line``. The strings passed with these options will be injected into a general template for a ``NAMD2`` or ``OpenMM`` submission. All generated submission scripts are written to the base ``TIES MD`` directory as sub.sh. An example of this is provided in here :ref:`Running`. @@ -91,12 +91,12 @@ Here we provide an example of ``TIES MD`` running with ``OpenMM`` on `Summit $ties_dir/0.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --node_id="0" > $ties_dir/1.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --node_id="0" > $ties_dir/2.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --node_id="0" > $ties_dir/3.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --node_id="0" > $ties_dir/4.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --node_id="0" > $ties_dir/5.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --rep_id=0 > $ties_dir/0.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --rep_id=0 > $ties_dir/1.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --rep_id=0 > $ties_dir/2.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --rep_id=0 > $ties_dir/3.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --rep_id=0 > $ties_dir/4.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --rep_id=0 > $ties_dir/5.out& wait NAMD 3 diff --git a/TIES_MD/doc/source/binding_free_energies.rst b/TIES_MD/doc/source/binding_free_energies.rst index 120453d..7725f25 100644 --- a/TIES_MD/doc/source/binding_free_energies.rst +++ b/TIES_MD/doc/source/binding_free_energies.rst @@ -35,9 +35,7 @@ hybrid ligands but also setup binding free energy calculations for the TIES prot simulations as follows:: #ties20 imports - from ties import Pair, Ligand - from ties import Config - from ties.protein import Protein + from ties import Pair, Config, Ligand, Protein #Setting for system building config = Config() @@ -68,7 +66,7 @@ simulations as follows:: #now declare protein config.protein = 'receptor.pdb' config.protein_ff = 'leaprc.protein.ff14SB' - protein = Protein(config.protein, config) + protein = Protein(config) #re-prepare simulation input, now protein is declared and passed as argument com simulation is built hybrid.prepare_inputs(protein=protein) @@ -86,12 +84,12 @@ At this point we have prepped a simulation of one thermodynamic cycle with two l set these legs up in the directories ``ties/ties-ligandA-ligandB/(lig/com)`` and these map to the ``system/ligand/thermodynamic_leg/`` directory structure that was discussed in the :ref:`Tutorial` section. In ``ties/ties-ligandA-ligandB/(lig/com)`` there will be the ``build`` directory and ``TIES.cfg`` files as also seen in -the :ref:`Tutorial`. The settings in ``TIES.cfg`` will be good for a default simulation but in general we may wish to +the :ref:`Tutorial`. The automatic settings in ``TIES.cfg`` will be good for a default simulation but in general we may wish to change these quickly and or write submission scripts for these simulations. To do this we can use the ``TIES_MD`` API as follows:: #tiesMD imports - from TIES_MD import TIES, cli + from TIES_MD import TIES import os #iterate over both legs of BFE calculation @@ -100,11 +98,10 @@ follows:: ties_dir = os.path.join(os.getcwd(), 'ties', 'ties-ligandA-ligandB', thermo_leg) #read the default TIES.cfg to initialize - args_dict = cli.read_config(os.path.join(ties_dir, 'TIES.cfg')) - md = TIES.TIES(cwd=ties_dir, exp_name='complex', **args_dict) + md = TIES(ties_dir) #change some settings in TIES.cfg - md.reps_per_exec = 1 + md.split_run = 1 md.total_reps = 6 #inspect all the options we can configure and change @@ -120,41 +117,20 @@ follows:: #BSUB -o oLIGPAIR.%J #BSUB -e eLIGPAIR.%J""" - #run line in submission scripts can also be changed - md.sub_run_line = 'jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i > $ties_dir/$lambda$i.out&' + #Setting HPC specific elements of run line (example here is Summit) + md.pre_run_line = 'jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ' + + #Setting ties_md part of run line + md.run_line = 'ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i' #setup the new simulation with changed options (also writes submission script) md.setup() - #must make sure the TIES.cfg on disk is updated with new settings. - md.update_cfg() - -This changes the TIES.cfg options ``reps_per_exec`` to 1 and ``total_reps`` to 6. To see all configurable options the user +This changes the TIES.cfg options ``split_run`` to 1 (True) and ``total_reps`` to 6. To see all configurable options the user can run ``md.get_options()`` as shown above. To generate a general submission script we are modifying the -``sub_header`` and ``sub_run_line`` internal options and these set what ``TIES_MD`` writes into the submission script. The -settings above yield the following script:: - - #!/bin/bash - #Example script for Summit OpenMM - #BSUB -P CHM155_001 - #BSUB -W 120 - #BSUB -nnodes 13 - #BSUB -alloc_flags "gpudefault smt1" - #BSUB -J LIGPAIR - #BSUB -o oLIGPAIR.%J - #BSUB -e eLIGPAIR.%J - - export ties_dir="ties/ties-ligandA-ligandB/lig" - cd $ties_dir - - for lambda in 0 1 2 3 4 5 6 7 8 9 10 11 12; do - for i in {0..5}; do - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i > $ties_dir/$lambda$i.out& - done - done - wait - -These scripts can be summited to the HPC scheduler, once they finish the last step to get a :math:`{ΔΔ G}` is analysis. +``sub_header``, ``pre_run_line`` and ``run_line`` internal options and these set what ``TIES_MD`` writes into the +submission script, for more details see :ref:`API`. These scripts can be summited to the HPC scheduler, once they +finish the last step to get a :math:`{ΔΔ G}` is analysis. BFE Analysis ------------ diff --git a/TIES_MD/doc/source/parallelization.rst b/TIES_MD/doc/source/parallelization.rst index 4e650ac..0c98a1c 100644 --- a/TIES_MD/doc/source/parallelization.rst +++ b/TIES_MD/doc/source/parallelization.rst @@ -27,15 +27,13 @@ If we wanted to parallelize 3 repeats over 3 GPUs on one node we would run:: Each ``CUDA`` device will then run 8 windows of the 1 replica. Equally ths could be spit into to separate runs of ``TIES MD`` masked to only see one device:: - ties_md --exp_name=sys_solv --devices=0 --node_id=0 - ties_md --exp_name=sys_solv --devices=1 --node_id=1 - ties_md --exp_name=sys_solv --devices=3 --node_id=1 + ties_md --exp_name=sys_solv --devices=0 --rep_id=0& + ties_md --exp_name=sys_solv --devices=1 --rep_id=1& + ties_md --exp_name=sys_solv --devices=2 --rep_id=2& -To run in this configuration the options ``total_reps=3`` and ``reps_per_exec=1`` are set in TIES.cfg to tell ``TIES MD`` that -there are a total of 3 replicas being run and that each execution of ``TIES MD`` should run only one. Also note we have set -``--node_id`` to some different values for otherwise identical run lines and this ensures these parallel runs write output -to unique locations. ``--node_id`` only needs to be set when identical replicas of a simulation are run in separate executions -of ``TIES MD``. +To run in this configuration the options ``total_reps=3`` and ``split_run=1`` are set in TIES.cfg to tell ``TIES MD`` that +there are a total of 3 replicas being run and that each execution of ``TIES MD`` should run only one. ``--rep_id`` +determines which replica each instance will run. ``--rep_id`` only needs to be set when using ``split_run=1``. If we need further parallelization over alchemical windows we can use the command line option ``--windows_mask`` this option takes a ``Python`` range (start inclusive and end exclusive) of the windows which that instance of @@ -50,27 +48,27 @@ this option takes a ``Python`` range (start inclusive and end exclusive) of the ties_md --exp_name=sys_solv --windows_mask=6,7 --devices=6& ties_md --exp_name=sys_solv --windows_mask=7,8 --devices=7& -Again using the configuration options ``total_reps=3`` and ``reps_per_exec=1`` the above runs 1 replica of each alchemical +Now sing the configuration options ``total_reps=3`` and ``split_run=0`` the above runs 3 replica of each alchemical window on a different GPU. For maximum parallelism we combine parallelizing over replicas and alchemical windows. For clarity we now consider the same example as above but now with 6 alchemical windows, 2 replica simulations and one simulation per GPU, so in -TIES.cfg ``global_lambdas=0.0, 0.1, 0.4, 0.6, 0.9, 1.0``, ``total_reps=2`` and ``reps_per_exec=1``. To scale over multiple node +TIES.cfg ``global_lambdas=0.0, 0.1, 0.4, 0.6, 0.9, 1.0``, ``total_reps=2`` and ``split_run=1``. To scale over multiple node we could use the resource allocator of the HPC for example `jsrun `_ on `Summit `_. would allow us to run with 2 replicas of 6 windows as follows:: - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --node_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --rep_id=1& Note here we do not set ``--devices`` as the masking of GPUs is handled by the resource allocator, this is not the general case. If a resource allocator is not available an alternative method to run multiple simulations across nodes is to use a message passing interface @@ -82,9 +80,9 @@ TIES-NAMD --------- The parallelization of TIES in ``NAMD2`` follows the same ideas as ``OpenMM`` above. We want to run independent simulations -for all alchemical window and replica simulations. To achieve parallelization over replica simulations there are two options. -If in TIES.cfg ``total_reps==reps_per_exec`` the submission script that ``TIES_MD`` writes will use the ``NAMD`` option -``+replicas X`` this makes each ``NAMD`` run ``X`` replicas and the run lines in sub.sh will look something like:: +for all alchemical window and replica simulations. If in TIES.cfg ``split_run=0`` the submission script that +``TIES_MD`` writes will use the ``NAMD`` option ``+replicas X`` this makes each ``NAMD`` run ``X`` replicas and the +run lines in sub.sh will look something like:: for stage in {0..3}; do for lambda in 0.00 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.95 1.0; do @@ -94,7 +92,7 @@ If in TIES.cfg ``total_reps==reps_per_exec`` the submission script that ``TIES_M wait done -Alternatively if ``total_reps=!reps_per_exec`` with ``reps_per_exec=1`` the run lines will look like:: +Alternatively if ``split_run=1`` the run lines will look like:: for stage in {0..3}; do for lambda in 0.00 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.95 1.0; do @@ -112,6 +110,6 @@ we have tested up to ``+replicas 135`` on `ARCHER 2 examples the parallelism over alchemical windows is achieved in the loop over lambda. Using ``NAMD3`` parallelization can be achieved like so (:ref:`NAMD 3`). ``NAMD`` in general has extensive options to provision -hardware and achieve parallelism, what have outlined here is not exhaustive and we would suggest consulting the `documentation `_ -for more a more comprehensive information. +hardware and achieve parallelism, what have outlined here is not exhaustive and we would suggest consulting +the `documentation `_ for more a more comprehensive information. diff --git a/TIES_MD/doc/source/tutorial.rst b/TIES_MD/doc/source/tutorial.rst index 90f3a0d..067a124 100644 --- a/TIES_MD/doc/source/tutorial.rst +++ b/TIES_MD/doc/source/tutorial.rst @@ -4,7 +4,7 @@ Tutorial Getting started --------------- -``TIES MD`` is a package which is intended to be used on the command line and submitted to a HPC system. In this document +``TIES MD`` is a package for the preparation, running and analysis of binding free energy calculations. In this document we will outline what commands should be run to calculate binding free energies. To start with any free energy calculations we must first outline what are the expected input files to the ``TIES MD`` program. @@ -13,22 +13,25 @@ In this tutorial we will refer to example systems which can be found in the git clone https://github.com/UCL-CCS/TIES_MD.git -and navigating to ``TIES_MD/TIES_MD/examples/`` +and found by navigating to ``TIES_MD/TIES_MD/examples/`` Input ------ ``TIES MD`` expects a number of input files, these are two essential files, e.g. ``complex.pdb`` and ``complex.prmtop``. These files contain information about the position, topology and parameters for the system. Currently we only support -the ``AMBER`` based format ``prmtop`` but provide a utility to `build `_ them online. ``complex.pdb`` also -contains the alchemical indexes denoting which atoms will appear and disappear during the simulation. There is also -an optional input file, ``constraints.pdb``, and this contains indexes denoting which atoms, if any, are constrained -during the pre-production simulation. This input should all be placed in a directory named build located -where the user wishes to run the simulation. Examples of these files can be found `here `_. +the ``AMBER`` based format ``prmtop``. ``complex.pdb`` also contains the alchemical indexes denoting which atoms will +appear and disappear during the simulation. There is also an optional input file, ``constraints.pdb``, and this +contains indexes denoting which atoms, if any, are constrained during the pre-production simulation. This input should +all be placed in a directory named build located where the user wishes to run the simulation. Examples of these files +can be found `here `_. + Please use a directory structure like ``study/system/ligand/thermodynamic_leg/build`` this will allow the analysis scripts to understand the structure and perform analysis automatically. ``study``, ``system``, ``ligand`` and ``thermodynamic_leg`` can be renamed to anything but the name of the ``build`` directory is fixed. If input for novel ligand transformations is desired the -`TIES20 `_ program can be used to generate all required inputs. +`TIES20 `_ program can be used to generate all required inputs. ``TIES 20`` can be +used via our online `service `_ or locally and details of how to use this will be provided +later in these documents. The only non standard input to ``TIES MD`` is a configuration file (``TIES.cfg``) which specifies options which the user my wish to occasionally change. This file must be placed alongside the build directory. Here we provide an example of such a file:: @@ -61,8 +64,8 @@ occasionally change. This file must be placed alongside the build directory. Her #How many total replicas of each window are run (we recommend at least 5). total_reps = 5 - #How many replicas should this evocation of TIES_MD run, used for parallelisation - reps_per_exec = 5 + #Boolean for if we will split all replicas into separate runs. (1 for maximum parallelism) + split_run = 0 #Where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing. elec_edges = 0.5, 1.0 @@ -79,13 +82,7 @@ occasionally change. This file must be placed alongside the build directory. Her #Which column in pdb are constraints provided valid options are occupancy/beta_factor. (beta_factor is standard) constraint_column = beta_factor - #What type of simulation cell is used valid options are cube, truncatedOctahedron, rhombicDodecahedron or na for manual. - box_type = na - - #The edge length used to compute the cube or truncatedOctahedron or rhombicDodecahedron box vectors - edge_length = 10*unit.nanometer - - #If box_type is na the manually specify box vectors of this simulation, unit Angstrom. + #Manually specify box vectors of this simulation, unit Angstrom. cell_basis_vec1 = 50, 0.0, 0.0 cell_basis_vec2 = 0.0, 50, 0.0 cell_basis_vec3 = 0.0, 0.0, 50 @@ -93,9 +90,9 @@ occasionally change. This file must be placed alongside the build directory. Her #What input type is provided, only AMBER supported. input_type = AMBER -``total_reps`` and ``reps_per_exec`` are options which can be used to achieve simple parallelism of the simulations. +``total_reps`` and ``split_run`` are options which can be used to achieve simple parallelism of the simulations. For example if you wished to run a total of 5 simulations on 5 GPUs in parallel one could use the settings -``total_reps = 5`` and ``reps_per_exec = 1``. See the :ref:`Parallelization` section for more details of how to +``total_reps = 5`` and ``split_run = 1``. See the :ref:`Parallelization` section for more details of how to achieve this. The following image shows ``TIES_MD`` applied to one alchemical transformation. @@ -113,11 +110,10 @@ energy functions of the system and for more information these settings please se Note the option ``constraint_column`` which determines if the constraint indexes will be read from the temperature factor or occupancy column of the constraints PDB. The alchemical indexes are always be read from the temperature factor column -in the main PDB ``complex.pdb``. The ``edge_length`` option can be found in the ``leap.log`` file created during system -preparation preformed by the users or ``TIES20``. ``TIES20`` will populate a TIES.cfg automatically with the correct box size. +in the main PDB ``complex.pdb``. ``TIES20`` will populate a TIES.cfg automatically with the correct box size. Typically a constraint file may be used during preproduction of simulations involving proteins but possibly not a small -drug like molecule in only solvent. It will be show later in the Binding Free Energy Calculations section when and +drug like molecule in only solvent. It will be shown later in the :ref:`Binding Free Energy Tutorial` section when and why we use a constraints file. Command Line @@ -146,7 +142,7 @@ values are as follows:: A comma separated list of integers which tells TIES OpenMM which GPUs to run on. If multiple GPUs are specified then TIES OpenMM will parallelize requested replicas over the available GPUs. - [--node_id=0] + [--rep_id=0] 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. @@ -154,9 +150,6 @@ values are as follows:: 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. - [--periodic=1] - A value of 1 sets the simulation box as periodic a value of 0 sets the simulation box as non-periodic. - Simulation Preparation ---------------------- @@ -199,7 +192,7 @@ to ``1``, there is therefore 6x1 = 6 total simulations to perform. If a HPC subm ties_md --exp_name=sys_solv --windows_mask=4,5 --devices=4& ties_md --exp_name=sys_solv --windows_mask=5,6 --devices=5& -There are a lot of options for how these ``OpenMM`` calcualtions can be structured and parallelized with ``TIES_MD`` see our +There are a lot of options for how these ``OpenMM`` calculations can be structured and parallelized with ``TIES_MD`` see our :ref:`Parallelization` page for more information on this. For a ``NAMD`` calculation if the submission script requested 6 CPU nodes each with 128 cores the run lines in the submission script might look like:: diff --git a/TIES_MD/eng_scripts/cfg_scripts/TIES.cfg b/TIES_MD/eng_scripts/cfg_scripts/TIES.cfg index b7cf53b..ad0d2ec 100644 --- a/TIES_MD/eng_scripts/cfg_scripts/TIES.cfg +++ b/TIES_MD/eng_scripts/cfg_scripts/TIES.cfg @@ -46,11 +46,6 @@ constraint_column = {constraint_column} #AMBER only supported input. input_type = {input_type} -#If cell basis vectors are given then below options are ignored -#What type of simulation cell is used valid options are cube, truncatedOctahedron, rhombicDodecahedron or na for manual. -box_type = {box_type} -edge_length = {edge_length} - #simulation cell cell_basis_vec1 = {cbv1}, {cbv2}, {cbv3} cell_basis_vec2 = {cbv4}, {cbv5}, {cbv6} diff --git a/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap0.npy b/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap0.npy index 699a061..1c05e12 100644 Binary files a/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap0.npy and b/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap0.npy differ diff --git a/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap1.npy b/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap1.npy index c8af17f..1ed6c95 100644 Binary files a/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap1.npy and b/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap1.npy differ diff --git a/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap2.npy b/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap2.npy index b00a87d..914f6ba 100644 Binary files a/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap2.npy and b/TIES_MD/examples/analysis/OpenMM/FEP/ethane/zero_sum/leg1/overlap2.npy differ diff --git a/TIES_MD/examples/analysis/OpenMM/TI/ethane/zero_sum/leg1/dUdlam.png b/TIES_MD/examples/analysis/OpenMM/TI/ethane/zero_sum/leg1/dUdlam.png index 5e17772..9f15bc7 100644 Binary files a/TIES_MD/examples/analysis/OpenMM/TI/ethane/zero_sum/leg1/dUdlam.png and b/TIES_MD/examples/analysis/OpenMM/TI/ethane/zero_sum/leg1/dUdlam.png differ diff --git a/TIES_MD/examples/ethane/zero_sum/leg1/TIES.cfg b/TIES_MD/examples/ethane/zero_sum/leg1/TIES.cfg index c1fe13f..738a39c 100644 --- a/TIES_MD/examples/ethane/zero_sum/leg1/TIES.cfg +++ b/TIES_MD/examples/ethane/zero_sum/leg1/TIES.cfg @@ -25,8 +25,8 @@ methods = FEP,TI #How many total replicas of each window are run (we recommend at least 5). total_reps = 3 -#How many replicas should each instance of TIES_MD run -reps_per_exec = 3 +#bool, if we will split all replicas into separate runs +split_run = 0 #Where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing. elec_edges = 0.5,1.0 diff --git a/TIES_MD/examples/ethane_namd/zero_sum/leg1/TIES.cfg b/TIES_MD/examples/ethane_namd/zero_sum/leg1/TIES.cfg index a5f45a1..a1ad54f 100644 --- a/TIES_MD/examples/ethane_namd/zero_sum/leg1/TIES.cfg +++ b/TIES_MD/examples/ethane_namd/zero_sum/leg1/TIES.cfg @@ -25,8 +25,8 @@ methods = TI #How many total replicas of each window are run (we recommend at least 5). total_reps = 2 -#How many replicas should each instance of TIES_MD run -reps_per_exec = 1 +#bool, if we will split all replicas into separate runs +split_run = 0 #Where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing. elec_edges = 0.45, 1.0 diff --git a/TIES_MD/examples/hydration/l1-l2/leg1/TIES.cfg b/TIES_MD/examples/hydration/l1-l2/leg1/TIES.cfg index 33a4daa..d10af4b 100644 --- a/TIES_MD/examples/hydration/l1-l2/leg1/TIES.cfg +++ b/TIES_MD/examples/hydration/l1-l2/leg1/TIES.cfg @@ -25,8 +25,8 @@ methods = FEP, TI #How many total replicas of each window are run (we recommend at least 5). total_reps = 1 -#How many replicas should each instance of TIES_MD run -reps_per_exec = 1 +#bool, if we will split all replicas into separate runs +split_run = 0 #Where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing. elec_edges = 0.5, 1.0 diff --git a/TIES_MD/examples/ligand_protein/ties-l2-l1/com/TIES.cfg b/TIES_MD/examples/ligand_protein/ties-l2-l1/com/TIES.cfg index 942b6ee..4c36bb2 100644 --- a/TIES_MD/examples/ligand_protein/ties-l2-l1/com/TIES.cfg +++ b/TIES_MD/examples/ligand_protein/ties-l2-l1/com/TIES.cfg @@ -25,8 +25,8 @@ methods = FEP, TI #How many total replicas of each window are run (we recommend at least 5). total_reps = 1 -#How many replicas should each instance of TIES_MD run -reps_per_exec = 1 +#bool, if we will split all replicas into separate runs +split_run = 0 #Where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing. elec_edges = 0.5, 1.0 diff --git a/TIES_MD/examples/result.dat b/TIES_MD/examples/result.dat index 2d7b64d..a738c64 100644 --- a/TIES_MD/examples/result.dat +++ b/TIES_MD/examples/result.dat @@ -1 +1 @@ -{'OpenMM_FEP': {'ethane': {'zero_sum': [0.0066543761920464265, 0.024134991408633517]}}, 'OpenMM_TI': {'ethane': {'zero_sum': [0.027367754486809615, 0.05992671201405186]}}} +{'OpenMM_FEP': {'ethane': {'zero_sum': [0.00603386354750524, 0.02403031204797301]}}, 'OpenMM_TI': {'ethane': {'zero_sum': [0.02788597784813418, 0.05971823858786783]}}} diff --git a/TIES_MD/tests/test_TIES.py b/TIES_MD/tests/test_TIES.py index 8a7832a..ce19494 100644 --- a/TIES_MD/tests/test_TIES.py +++ b/TIES_MD/tests/test_TIES.py @@ -23,7 +23,6 @@ def test_initilization(self): 'global_lambdas': '0.0,0.5,1.0', 'constraint_file': 'cons.pdb', 'constraint_column': 'beta_factor', - 'box_type': 'na', 'input_type': 'AMBER', 'cell_basis_vec1': '46.644591,0.0,0.0', 'cell_basis_vec2': '0.0,46.888166,0.0', @@ -31,8 +30,8 @@ def test_initilization(self): test_msg = '{} was not initialized correctly.' - test_init = TIES(cwd='./', run_type='class', exp_name='sol', devices=[0], node_id='test', - windows_mask=[0,2], periodic=True, lam=None, **args_dict) + test_init = TIES(cwd='./', run_type='class', exp_name='sol', devices=[0], rep_id=None, + windows_mask=[0, 2], periodic=True, lam=None, **args_dict) self.assertEqual(test_init.sampling_per_window, unit.Quantity(2, unit.picoseconds), test_msg.format('Sampling per window')) diff --git a/TIES_MD/tests/test_alch.py b/TIES_MD/tests/test_alch.py index 6895c49..503d82a 100644 --- a/TIES_MD/tests/test_alch.py +++ b/TIES_MD/tests/test_alch.py @@ -250,8 +250,8 @@ def test_run_sim(self): system = AlchSys(cwd, exp_name, temp, pressure, None, args_dict['constraint_column'], args_dict['methods'], basis_vec, input_type='AMBER', absolute=False, periodic=True, platform=GLOBAL_PALT) - node_id = 0 - ids = System_ID(device_id='0', node_id=node_id) + rep_id = 0 + ids = System_ID(device_id='0', rep_id=rep_id) Lam = Lambdas([0.5, 1], [0.0, 0.5], [x/5 for x in range(0, 6)]) mask = [0, 2] @@ -262,7 +262,7 @@ def test_run_sim(self): #build some output dirs for d in ['results', 'simulation', 'equilibration']: for l in ['0.00', '0.20']: - path = os.path.join(cwd, 'LAMBDA_{}/rep{}/{}'.format(l, node_id, d)) + path = os.path.join(cwd, 'LAMBDA_{}/rep{}/{}'.format(l, rep_id, d)) Path(path).mkdir(parents=True, exist_ok=True) simulate_system(ids, system, Lam, mask, cwd, niter, equili_steps, steps_per_iter) @@ -273,7 +273,7 @@ def test_run_sim(self): #look for output for l in ['0.00', '0.20']: for ans, method in zip(expected_shapes, ['TI', 'FEP']): - path = os.path.join(cwd, 'LAMBDA_{}/rep{}/results/{}.npy'.format(l, node_id, method)) + path = os.path.join(cwd, 'LAMBDA_{}/rep{}/results/{}.npy'.format(l, rep_id, method)) array = np.load(path) self.assertEqual(array.shape, ans, 'Failed to generate results of expected shape') diff --git a/TIES_MD/ties_analysis/ties_analysis.py b/TIES_MD/ties_analysis/ties_analysis.py index 7ea1ace..75d69f2 100644 --- a/TIES_MD/ties_analysis/ties_analysis.py +++ b/TIES_MD/ties_analysis/ties_analysis.py @@ -108,6 +108,7 @@ def run(self): with open('./result.dat', 'w') as f: print(result, file=f) + nice_print('END') def nice_print(string): @@ -152,7 +153,6 @@ def make_exp(verbose=True): with open('exp.dat', 'w') as fp: json.dump(exp_dat, fp) - nice_print('END') def main(): ''' diff --git a/docs/API.html b/docs/API.html new file mode 100644 index 0000000..6a18d9d --- /dev/null +++ b/docs/API.html @@ -0,0 +1,226 @@ + + + + + + + TIES MD API — TIES_MD 1.0 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

TIES MD API

+

TIES MD can be used on the command line but for greater automation we also provide an API that exposes some options that +may be routinely changed during setup.

+
+

API

+

Here we detail all the options in the API and what should be passed. The options that were previously on the command line +can be passed into the TIES class like so:

+
from TIES_MD import TIES
+md = TIES(cwd='./', windows_mask=[0,1], rep_id=0, exp_name='sys_solv')
+
+
+

Once the TIES class is constructed the options that were previously in TIES.cfg can now be set as attributes of the TIES +class like so:

+
# openmm.unit is needed to set values with units
+from openmm import unit
+
+#string for the molecular dynamics engine (openmm/namd2.14/namd3)
+md.engine = 'openmm'
+
+#Target temperature for the thermostat
+md.temperature = 300.0*unit.kelvin
+
+#Target pressure for barostat
+md.pressure = 1.0*unit.atmosphere
+
+#How much production sampling to run per alchemical window (4ns recommended)
+md.sampling_per_window = 0.04*unit.nanosecond
+
+#How much equilibration to run per alchemical window (2ns recommended)
+md.equili_per_window = 0.002*unit.nanosecond
+
+#List for which estimators to use.
+md.methods = ['FEP', 'TI']
+
+#How many total replicas of each window are run (we recommend at least 5).
+md.total_reps = 3
+
+#Boolean for if we will split all replicas into separate runs. (True for maximum parallelism)
+md.split_run = False
+
+#List for where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing.
+md.elec_edges = [0.5, 1.0]
+
+#List for where in lambda schedule (0->1) should the Lennard_Jones potentials begin, stop appearing.
+md.ster_edges = [0.0, 0.5]
+
+#List for the value the global controlling parameter takes in each window.
+md.global_lambdas = [0.00, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 1.00]
+
+#String for name of the pdb file with constraints in the build directory, i.e. 'cons.pdb'
+md.constraint_file = None
+
+#String for column in pdb are constraints provided valid options are 'occupancy'/'beta_factor'.
+md.constraint_column = None
+
+#String for what input type is provided, only AMBER supported.
+md.input_type = 'AMBER'
+
+#list of x, y, z floats for box vectors of this simulation, unit Angstrom.
+md.cell_basis_vec1 = [34.55, 0.0, 0.0]
+md.cell_basis_vec2 = [-11.516722937414105, 32.574214501232206, 0.0]
+md.cell_basis_vec3 = [-11.516722937414105, -16.287105279373797, 28.21009840448772]
+
+
+

Finally there are three additional options that don’t appear in TIES.cfg which are:

+
#A header to a the submission script that will be written for this job.
+md.sub_header = """#Example script for Summit OpenMM
+#BSUB -P CHM155_001
+#BSUB -W 120
+#BSUB -nnodes 13
+#BSUB -alloc_flags "gpudefault smt1"
+#BSUB -J LIGPAIR
+#BSUB -o oLIGPAIR.%J
+#BSUB -e eLIGPAIR.%J"""
+
+#The prefix for the run line of this job.
+md.pre_run_line = 'jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 '
+
+#the ties_md run line of this job.
+md.run_line = 'ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i'
+
+
+

The use of these three setting will produce a submission script which looks like:

+
#!/bin/bash
+#Example script for Summit OpenMM
+#BSUB -P CHM155_001
+#BSUB -W 120
+#BSUB -nnodes 13
+#BSUB -alloc_flags "gpudefault smt1"
+#BSUB -J LIGPAIR
+#BSUB -o oLIGPAIR.%J
+#BSUB -e eLIGPAIR.%J
+
+export ties_dir="ties/ties-ligandA-ligandB/lig"
+cd $ties_dir
+
+for lambda in 0 1 2 3 4 5 6 7 8 9 10 11 12; do
+  for i in {0..5}; do
+        jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i&
+    done
+    done
+wait
+
+
+

If sub_header, pre_run_line and run_line are not set TIES_MD will make a best guess for a submission script. +Ideally only small modification should be need to run using the best guess scripts. Any tweaks that are applied to get the +scripts working can then be passed into sub_header, pre_run_line and run_line for future system setups. For +general idea on how to make submission scripts see HPC Submission scripts.

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/HPC_submissions.html b/docs/HPC_submissions.html index 70abdbf..4789406 100644 --- a/docs/HPC_submissions.html +++ b/docs/HPC_submissions.html @@ -42,6 +42,7 @@
  • Installation
  • Tutorial
  • +
  • TIES MD API
  • Binding Free Energy Tutorial
  • Parallelization
  • HPC Submission scripts
      @@ -86,7 +87,7 @@

      HPC Submission scriptsHere we provide some example submission scripts for various HPC systems. TIES MD will attempt to automatically write sensible submission scripts for NAMD2 targeting ARCHER 2 and for OpenMM targeting Summit. In general the user can make there own script for whichever HPC or cluster they prefer. To aid with writing general -scripts TIES MD exposes 2 options in the API called sub_header and sub_run_line. The strings passed +scripts TIES MD exposes 3 options in the API called sub_header, pre_run_line and run_line. The strings passed with these options will be injected into a general template for a NAMD2 or OpenMM submission. All generated submission scripts are written to the base TIES MD directory as sub.sh. An example of this is provided in here Running.

      @@ -169,12 +170,12 @@

      OpenMM diff --git a/docs/TIES_MD.eng_scripts.cfg_scripts.html b/docs/TIES_MD.eng_scripts.cfg_scripts.html index 8a0df34..39595de 100644 --- a/docs/TIES_MD.eng_scripts.cfg_scripts.html +++ b/docs/TIES_MD.eng_scripts.cfg_scripts.html @@ -42,6 +42,7 @@
      • Installation
      • Tutorial
      • +
      • TIES MD API
      • Binding Free Energy Tutorial
      • Parallelization
      • HPC Submission scripts
      • diff --git a/docs/TIES_MD.eng_scripts.html b/docs/TIES_MD.eng_scripts.html index 87ee7ff..501711d 100644 --- a/docs/TIES_MD.eng_scripts.html +++ b/docs/TIES_MD.eng_scripts.html @@ -42,6 +42,7 @@
        • Installation
        • Tutorial
        • +
        • TIES MD API
        • Binding Free Energy Tutorial
        • Parallelization
        • HPC Submission scripts
        • diff --git a/docs/TIES_MD.eng_scripts.namd_sub.html b/docs/TIES_MD.eng_scripts.namd_sub.html index b713335..fe269a4 100644 --- a/docs/TIES_MD.eng_scripts.namd_sub.html +++ b/docs/TIES_MD.eng_scripts.namd_sub.html @@ -42,6 +42,7 @@
          • Installation
          • Tutorial
          • +
          • TIES MD API
          • Binding Free Energy Tutorial
          • Parallelization
          • HPC Submission scripts
          • diff --git a/docs/TIES_MD.eng_scripts.namd_sub_split.html b/docs/TIES_MD.eng_scripts.namd_sub_split.html index 79cba6b..65d1f31 100644 --- a/docs/TIES_MD.eng_scripts.namd_sub_split.html +++ b/docs/TIES_MD.eng_scripts.namd_sub_split.html @@ -42,6 +42,7 @@
            • Installation
            • Tutorial
            • +
            • TIES MD API
            • Binding Free Energy Tutorial
            • Parallelization
            • HPC Submission scripts
            • diff --git a/docs/TIES_MD.eng_scripts.openmm_sub.html b/docs/TIES_MD.eng_scripts.openmm_sub.html new file mode 100644 index 0000000..4332ec4 --- /dev/null +++ b/docs/TIES_MD.eng_scripts.openmm_sub.html @@ -0,0 +1,138 @@ + + + + + + + TIES_MD.eng_scripts.openmm_sub package — TIES_MD 1.0 documentation + + + + + + + + + + + + + + + + + +
              + + +
              + +
              +
              +
              + +
              +
              +
              +
              + +
              +

              TIES_MD.eng_scripts.openmm_sub package

              +
              +

              Module contents

              +
              +
              + + +
              +
              + +
              +
              +
              +
              + + + + \ No newline at end of file diff --git a/docs/TIES_MD.eng_scripts.openmm_sub_split.html b/docs/TIES_MD.eng_scripts.openmm_sub_split.html index 7bff74b..3fb9c1f 100644 --- a/docs/TIES_MD.eng_scripts.openmm_sub_split.html +++ b/docs/TIES_MD.eng_scripts.openmm_sub_split.html @@ -42,6 +42,7 @@
              • Installation
              • Tutorial
              • +
              • TIES MD API
              • Binding Free Energy Tutorial
              • Parallelization
              • HPC Submission scripts
              • diff --git a/docs/TIES_MD.html b/docs/TIES_MD.html index 887f81e..2ea2540 100644 --- a/docs/TIES_MD.html +++ b/docs/TIES_MD.html @@ -42,6 +42,7 @@
                • Installation
                • Tutorial
                • +
                • TIES MD API
                • Binding Free Energy Tutorial
                • Parallelization
                • HPC Submission scripts
                • @@ -167,7 +168,7 @@

                  Submodules

                  TIES_MD.TIES module

                  -class TIES_MD.TIES.TIES(cwd, exp_name, run_type='class', devices=None, node_id=None, windows_mask=None, periodic=True, lam=None, platform='CUDA', **kwargs)
                  +class TIES_MD.TIES.TIES(cwd, exp_name='complex', run_type='class', devices=None, rep_id=None, windows_mask=None, periodic=True, lam=None, platform='CUDA', **kwargs)

                  Bases: object

                  Class to control TIES protocol, initializes variables and calls functions to start simulation or write input scripts

                  @@ -177,7 +178,7 @@

                  Submodules +
                  +build_results_dirs(folders)
                  +

                  Helper function to build output directories. +:param folders: List of strings for what folders to build.

                  +
                  +
                  Returns
                  +

                  None

                  +
                  +
                  +

                  +
                  -
                  -property box_type
                  -

                  What type of simulation box is being used (cube, truncatedOctahedron, rhombicDodecahedron or na for manual)

                  +
                  +property cell_basis_vec1
                  +

                  What is the 1st basis vector of the simulation cell

                  Returns
                  -

                  string for box type.

                  +

                  list of floats for x, y, z components of vector

                  -
                  -
                  -build_results_dirs(folders)
                  -

                  Helper function to build output directories. -:param folders: List of strings for what folders to build.

                  +
                  +
                  +property cell_basis_vec2
                  +

                  What is the 2nd basis vector of the simulation cell

                  Returns
                  -

                  None

                  +

                  list of floats for x, y, z components of vector

                  +
                  +
                  +
                  + +
                  +
                  +property cell_basis_vec3
                  +

                  What is the 3rd basis vector of the simulation cell

                  +
                  +
                  Returns
                  +

                  list of floats for x, y, z components of vector

                  @@ -685,7 +708,7 @@

                  Submodules
                  -class TIES_MD.alch.System_ID(device_id, node_id)
                  +class TIES_MD.alch.System_ID(device_id, rep_id)

                  Bases: object

                  Class as a ID for a simulation providing information for what GPU this simulation should run on and what number repeat this simulation is out of some total number of repeats.

                  @@ -693,7 +716,7 @@

                  SubmodulesParameters
                  • device_id – int, for OpenMM GPU device id

                  • -
                  • node_id – str, id number denoting which replica this is

                  • +
                  • rep_id – str, id number denoting which replica this is

                  diff --git a/docs/TIES_MD.openmmtools.html b/docs/TIES_MD.openmmtools.html index e577b29..ce69db7 100644 --- a/docs/TIES_MD.openmmtools.html +++ b/docs/TIES_MD.openmmtools.html @@ -42,6 +42,7 @@
                  +
                  TIES_MD.ties_analysis.ties_analysis.nice_print(string)
                  diff --git a/docs/TIES_MD.ties_analysis.methods.html b/docs/TIES_MD.ties_analysis.methods.html index 1c490b6..9a7de5a 100644 --- a/docs/TIES_MD.ties_analysis.methods.html +++ b/docs/TIES_MD.ties_analysis.methods.html @@ -41,6 +41,7 @@
                  • Installation
                  • Tutorial
                  • +
                  • TIES MD API
                  • Binding Free Energy Tutorial
                  • Parallelization
                  • HPC Submission scripts
                  • diff --git a/docs/_sources/API.rst.txt b/docs/_sources/API.rst.txt new file mode 100644 index 0000000..76c1696 --- /dev/null +++ b/docs/_sources/API.rst.txt @@ -0,0 +1,114 @@ +TIES MD API +=========== + +``TIES MD`` can be used on the command line but for greater automation we also provide an API that exposes some options that +may be routinely changed during setup. + +API +--- + +Here we detail all the options in the API and what should be passed. The options that were previously on the command line +can be passed into the TIES class like so:: + + from TIES_MD import TIES + md = TIES(cwd='./', windows_mask=[0,1], rep_id=0, exp_name='sys_solv') + +Once the TIES class is constructed the options that were previously in TIES.cfg can now be set as attributes of the TIES +class like so:: + + # openmm.unit is needed to set values with units + from openmm import unit + + #string for the molecular dynamics engine (openmm/namd2.14/namd3) + md.engine = 'openmm' + + #Target temperature for the thermostat + md.temperature = 300.0*unit.kelvin + + #Target pressure for barostat + md.pressure = 1.0*unit.atmosphere + + #How much production sampling to run per alchemical window (4ns recommended) + md.sampling_per_window = 0.04*unit.nanosecond + + #How much equilibration to run per alchemical window (2ns recommended) + md.equili_per_window = 0.002*unit.nanosecond + + #List for which estimators to use. + md.methods = ['FEP', 'TI'] + + #How many total replicas of each window are run (we recommend at least 5). + md.total_reps = 3 + + #Boolean for if we will split all replicas into separate runs. (True for maximum parallelism) + md.split_run = False + + #List for where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing. + md.elec_edges = [0.5, 1.0] + + #List for where in lambda schedule (0->1) should the Lennard_Jones potentials begin, stop appearing. + md.ster_edges = [0.0, 0.5] + + #List for the value the global controlling parameter takes in each window. + md.global_lambdas = [0.00, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95, 1.00] + + #String for name of the pdb file with constraints in the build directory, i.e. 'cons.pdb' + md.constraint_file = None + + #String for column in pdb are constraints provided valid options are 'occupancy'/'beta_factor'. + md.constraint_column = None + + #String for what input type is provided, only AMBER supported. + md.input_type = 'AMBER' + + #list of x, y, z floats for box vectors of this simulation, unit Angstrom. + md.cell_basis_vec1 = [34.55, 0.0, 0.0] + md.cell_basis_vec2 = [-11.516722937414105, 32.574214501232206, 0.0] + md.cell_basis_vec3 = [-11.516722937414105, -16.287105279373797, 28.21009840448772] + + +Finally there are three additional options that don't appear in TIES.cfg which are:: + + #A header to a the submission script that will be written for this job. + md.sub_header = """#Example script for Summit OpenMM + #BSUB -P CHM155_001 + #BSUB -W 120 + #BSUB -nnodes 13 + #BSUB -alloc_flags "gpudefault smt1" + #BSUB -J LIGPAIR + #BSUB -o oLIGPAIR.%J + #BSUB -e eLIGPAIR.%J""" + + #The prefix for the run line of this job. + md.pre_run_line = 'jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ' + + #the ties_md run line of this job. + md.run_line = 'ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i' + +The use of these three setting will produce a submission script which looks like:: + + #!/bin/bash + #Example script for Summit OpenMM + #BSUB -P CHM155_001 + #BSUB -W 120 + #BSUB -nnodes 13 + #BSUB -alloc_flags "gpudefault smt1" + #BSUB -J LIGPAIR + #BSUB -o oLIGPAIR.%J + #BSUB -e eLIGPAIR.%J + + export ties_dir="ties/ties-ligandA-ligandB/lig" + cd $ties_dir + + for lambda in 0 1 2 3 4 5 6 7 8 9 10 11 12; do + for i in {0..5}; do + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i& + done + done + wait + +If ``sub_header``, ``pre_run_line`` and ``run_line`` are not set ``TIES_MD`` will make a best guess for a submission script. +Ideally only small modification should be need to run using the best guess scripts. Any tweaks that are applied to get the +scripts working can then be passed into ``sub_header``, ``pre_run_line`` and ``run_line`` for future system setups. For +general idea on how to make submission scripts see :ref:`HPC Submission scripts`. + diff --git a/docs/_sources/HPC_submissions.rst.txt b/docs/_sources/HPC_submissions.rst.txt index 5550b9d..9f9e3e2 100644 --- a/docs/_sources/HPC_submissions.rst.txt +++ b/docs/_sources/HPC_submissions.rst.txt @@ -4,7 +4,7 @@ HPC Submission scripts Here we provide some example submission scripts for various HPC systems. ``TIES MD`` will attempt to automatically write sensible submission scripts for ``NAMD2`` targeting `ARCHER 2 `_ and for ``OpenMM`` targeting `Summit `_. In general the user can make there own script for whichever HPC or cluster they prefer. To aid with writing general -scripts ``TIES MD`` exposes 2 options in the :ref:`API` called ``sub_header`` and ``sub_run_line``. The strings passed +scripts ``TIES MD`` exposes 3 options in the :ref:`API` called ``sub_header``, ``pre_run_line`` and ``run_line``. The strings passed with these options will be injected into a general template for a ``NAMD2`` or ``OpenMM`` submission. All generated submission scripts are written to the base ``TIES MD`` directory as sub.sh. An example of this is provided in here :ref:`Running`. @@ -91,12 +91,12 @@ Here we provide an example of ``TIES MD`` running with ``OpenMM`` on `Summit $ties_dir/0.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --node_id="0" > $ties_dir/1.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --node_id="0" > $ties_dir/2.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --node_id="0" > $ties_dir/3.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --node_id="0" > $ties_dir/4.out& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --node_id="0" > $ties_dir/5.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --rep_id=0 > $ties_dir/0.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --rep_id=0 > $ties_dir/1.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --rep_id=0 > $ties_dir/2.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --rep_id=0 > $ties_dir/3.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --rep_id=0 > $ties_dir/4.out& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --rep_id=0 > $ties_dir/5.out& wait NAMD 3 diff --git a/docs/_sources/TIES_MD.eng_scripts.openmm_sub.rst.txt b/docs/_sources/TIES_MD.eng_scripts.openmm_sub.rst.txt new file mode 100644 index 0000000..ebb9e7e --- /dev/null +++ b/docs/_sources/TIES_MD.eng_scripts.openmm_sub.rst.txt @@ -0,0 +1,10 @@ +TIES\_MD.eng\_scripts.openmm\_sub package +========================================= + +Module contents +--------------- + +.. automodule:: TIES_MD.eng_scripts.openmm_sub + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/_sources/binding_free_energies.rst.txt b/docs/_sources/binding_free_energies.rst.txt index 120453d..7725f25 100644 --- a/docs/_sources/binding_free_energies.rst.txt +++ b/docs/_sources/binding_free_energies.rst.txt @@ -35,9 +35,7 @@ hybrid ligands but also setup binding free energy calculations for the TIES prot simulations as follows:: #ties20 imports - from ties import Pair, Ligand - from ties import Config - from ties.protein import Protein + from ties import Pair, Config, Ligand, Protein #Setting for system building config = Config() @@ -68,7 +66,7 @@ simulations as follows:: #now declare protein config.protein = 'receptor.pdb' config.protein_ff = 'leaprc.protein.ff14SB' - protein = Protein(config.protein, config) + protein = Protein(config) #re-prepare simulation input, now protein is declared and passed as argument com simulation is built hybrid.prepare_inputs(protein=protein) @@ -86,12 +84,12 @@ At this point we have prepped a simulation of one thermodynamic cycle with two l set these legs up in the directories ``ties/ties-ligandA-ligandB/(lig/com)`` and these map to the ``system/ligand/thermodynamic_leg/`` directory structure that was discussed in the :ref:`Tutorial` section. In ``ties/ties-ligandA-ligandB/(lig/com)`` there will be the ``build`` directory and ``TIES.cfg`` files as also seen in -the :ref:`Tutorial`. The settings in ``TIES.cfg`` will be good for a default simulation but in general we may wish to +the :ref:`Tutorial`. The automatic settings in ``TIES.cfg`` will be good for a default simulation but in general we may wish to change these quickly and or write submission scripts for these simulations. To do this we can use the ``TIES_MD`` API as follows:: #tiesMD imports - from TIES_MD import TIES, cli + from TIES_MD import TIES import os #iterate over both legs of BFE calculation @@ -100,11 +98,10 @@ follows:: ties_dir = os.path.join(os.getcwd(), 'ties', 'ties-ligandA-ligandB', thermo_leg) #read the default TIES.cfg to initialize - args_dict = cli.read_config(os.path.join(ties_dir, 'TIES.cfg')) - md = TIES.TIES(cwd=ties_dir, exp_name='complex', **args_dict) + md = TIES(ties_dir) #change some settings in TIES.cfg - md.reps_per_exec = 1 + md.split_run = 1 md.total_reps = 6 #inspect all the options we can configure and change @@ -120,41 +117,20 @@ follows:: #BSUB -o oLIGPAIR.%J #BSUB -e eLIGPAIR.%J""" - #run line in submission scripts can also be changed - md.sub_run_line = 'jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i > $ties_dir/$lambda$i.out&' + #Setting HPC specific elements of run line (example here is Summit) + md.pre_run_line = 'jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ' + + #Setting ties_md part of run line + md.run_line = 'ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i' #setup the new simulation with changed options (also writes submission script) md.setup() - #must make sure the TIES.cfg on disk is updated with new settings. - md.update_cfg() - -This changes the TIES.cfg options ``reps_per_exec`` to 1 and ``total_reps`` to 6. To see all configurable options the user +This changes the TIES.cfg options ``split_run`` to 1 (True) and ``total_reps`` to 6. To see all configurable options the user can run ``md.get_options()`` as shown above. To generate a general submission script we are modifying the -``sub_header`` and ``sub_run_line`` internal options and these set what ``TIES_MD`` writes into the submission script. The -settings above yield the following script:: - - #!/bin/bash - #Example script for Summit OpenMM - #BSUB -P CHM155_001 - #BSUB -W 120 - #BSUB -nnodes 13 - #BSUB -alloc_flags "gpudefault smt1" - #BSUB -J LIGPAIR - #BSUB -o oLIGPAIR.%J - #BSUB -e eLIGPAIR.%J - - export ties_dir="ties/ties-ligandA-ligandB/lig" - cd $ties_dir - - for lambda in 0 1 2 3 4 5 6 7 8 9 10 11 12; do - for i in {0..5}; do - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --windows_mask=$lambda,$(expr $lambda + 1) --node_id=$i > $ties_dir/$lambda$i.out& - done - done - wait - -These scripts can be summited to the HPC scheduler, once they finish the last step to get a :math:`{ΔΔ G}` is analysis. +``sub_header``, ``pre_run_line`` and ``run_line`` internal options and these set what ``TIES_MD`` writes into the +submission script, for more details see :ref:`API`. These scripts can be summited to the HPC scheduler, once they +finish the last step to get a :math:`{ΔΔ G}` is analysis. BFE Analysis ------------ diff --git a/docs/_sources/parallelization.rst.txt b/docs/_sources/parallelization.rst.txt index 4e650ac..0c98a1c 100644 --- a/docs/_sources/parallelization.rst.txt +++ b/docs/_sources/parallelization.rst.txt @@ -27,15 +27,13 @@ If we wanted to parallelize 3 repeats over 3 GPUs on one node we would run:: Each ``CUDA`` device will then run 8 windows of the 1 replica. Equally ths could be spit into to separate runs of ``TIES MD`` masked to only see one device:: - ties_md --exp_name=sys_solv --devices=0 --node_id=0 - ties_md --exp_name=sys_solv --devices=1 --node_id=1 - ties_md --exp_name=sys_solv --devices=3 --node_id=1 + ties_md --exp_name=sys_solv --devices=0 --rep_id=0& + ties_md --exp_name=sys_solv --devices=1 --rep_id=1& + ties_md --exp_name=sys_solv --devices=2 --rep_id=2& -To run in this configuration the options ``total_reps=3`` and ``reps_per_exec=1`` are set in TIES.cfg to tell ``TIES MD`` that -there are a total of 3 replicas being run and that each execution of ``TIES MD`` should run only one. Also note we have set -``--node_id`` to some different values for otherwise identical run lines and this ensures these parallel runs write output -to unique locations. ``--node_id`` only needs to be set when identical replicas of a simulation are run in separate executions -of ``TIES MD``. +To run in this configuration the options ``total_reps=3`` and ``split_run=1`` are set in TIES.cfg to tell ``TIES MD`` that +there are a total of 3 replicas being run and that each execution of ``TIES MD`` should run only one. ``--rep_id`` +determines which replica each instance will run. ``--rep_id`` only needs to be set when using ``split_run=1``. If we need further parallelization over alchemical windows we can use the command line option ``--windows_mask`` this option takes a ``Python`` range (start inclusive and end exclusive) of the windows which that instance of @@ -50,27 +48,27 @@ this option takes a ``Python`` range (start inclusive and end exclusive) of the ties_md --exp_name=sys_solv --windows_mask=6,7 --devices=6& ties_md --exp_name=sys_solv --windows_mask=7,8 --devices=7& -Again using the configuration options ``total_reps=3`` and ``reps_per_exec=1`` the above runs 1 replica of each alchemical +Now sing the configuration options ``total_reps=3`` and ``split_run=0`` the above runs 3 replica of each alchemical window on a different GPU. For maximum parallelism we combine parallelizing over replicas and alchemical windows. For clarity we now consider the same example as above but now with 6 alchemical windows, 2 replica simulations and one simulation per GPU, so in -TIES.cfg ``global_lambdas=0.0, 0.1, 0.4, 0.6, 0.9, 1.0``, ``total_reps=2`` and ``reps_per_exec=1``. To scale over multiple node +TIES.cfg ``global_lambdas=0.0, 0.1, 0.4, 0.6, 0.9, 1.0``, ``total_reps=2`` and ``split_run=1``. To scale over multiple node we could use the resource allocator of the HPC for example `jsrun `_ on `Summit `_. would allow us to run with 2 replicas of 6 windows as follows:: - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --node_id=0& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --node_id=1& - jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --node_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --rep_id=0& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --rep_id=1& + jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --rep_id=1& Note here we do not set ``--devices`` as the masking of GPUs is handled by the resource allocator, this is not the general case. If a resource allocator is not available an alternative method to run multiple simulations across nodes is to use a message passing interface @@ -82,9 +80,9 @@ TIES-NAMD --------- The parallelization of TIES in ``NAMD2`` follows the same ideas as ``OpenMM`` above. We want to run independent simulations -for all alchemical window and replica simulations. To achieve parallelization over replica simulations there are two options. -If in TIES.cfg ``total_reps==reps_per_exec`` the submission script that ``TIES_MD`` writes will use the ``NAMD`` option -``+replicas X`` this makes each ``NAMD`` run ``X`` replicas and the run lines in sub.sh will look something like:: +for all alchemical window and replica simulations. If in TIES.cfg ``split_run=0`` the submission script that +``TIES_MD`` writes will use the ``NAMD`` option ``+replicas X`` this makes each ``NAMD`` run ``X`` replicas and the +run lines in sub.sh will look something like:: for stage in {0..3}; do for lambda in 0.00 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.95 1.0; do @@ -94,7 +92,7 @@ If in TIES.cfg ``total_reps==reps_per_exec`` the submission script that ``TIES_M wait done -Alternatively if ``total_reps=!reps_per_exec`` with ``reps_per_exec=1`` the run lines will look like:: +Alternatively if ``split_run=1`` the run lines will look like:: for stage in {0..3}; do for lambda in 0.00 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.95 1.0; do @@ -112,6 +110,6 @@ we have tested up to ``+replicas 135`` on `ARCHER 2 examples the parallelism over alchemical windows is achieved in the loop over lambda. Using ``NAMD3`` parallelization can be achieved like so (:ref:`NAMD 3`). ``NAMD`` in general has extensive options to provision -hardware and achieve parallelism, what have outlined here is not exhaustive and we would suggest consulting the `documentation `_ -for more a more comprehensive information. +hardware and achieve parallelism, what have outlined here is not exhaustive and we would suggest consulting +the `documentation `_ for more a more comprehensive information. diff --git a/docs/_sources/tutorial.rst.txt b/docs/_sources/tutorial.rst.txt index 90f3a0d..067a124 100644 --- a/docs/_sources/tutorial.rst.txt +++ b/docs/_sources/tutorial.rst.txt @@ -4,7 +4,7 @@ Tutorial Getting started --------------- -``TIES MD`` is a package which is intended to be used on the command line and submitted to a HPC system. In this document +``TIES MD`` is a package for the preparation, running and analysis of binding free energy calculations. In this document we will outline what commands should be run to calculate binding free energies. To start with any free energy calculations we must first outline what are the expected input files to the ``TIES MD`` program. @@ -13,22 +13,25 @@ In this tutorial we will refer to example systems which can be found in the git clone https://github.com/UCL-CCS/TIES_MD.git -and navigating to ``TIES_MD/TIES_MD/examples/`` +and found by navigating to ``TIES_MD/TIES_MD/examples/`` Input ------ ``TIES MD`` expects a number of input files, these are two essential files, e.g. ``complex.pdb`` and ``complex.prmtop``. These files contain information about the position, topology and parameters for the system. Currently we only support -the ``AMBER`` based format ``prmtop`` but provide a utility to `build `_ them online. ``complex.pdb`` also -contains the alchemical indexes denoting which atoms will appear and disappear during the simulation. There is also -an optional input file, ``constraints.pdb``, and this contains indexes denoting which atoms, if any, are constrained -during the pre-production simulation. This input should all be placed in a directory named build located -where the user wishes to run the simulation. Examples of these files can be found `here `_. +the ``AMBER`` based format ``prmtop``. ``complex.pdb`` also contains the alchemical indexes denoting which atoms will +appear and disappear during the simulation. There is also an optional input file, ``constraints.pdb``, and this +contains indexes denoting which atoms, if any, are constrained during the pre-production simulation. This input should +all be placed in a directory named build located where the user wishes to run the simulation. Examples of these files +can be found `here `_. + Please use a directory structure like ``study/system/ligand/thermodynamic_leg/build`` this will allow the analysis scripts to understand the structure and perform analysis automatically. ``study``, ``system``, ``ligand`` and ``thermodynamic_leg`` can be renamed to anything but the name of the ``build`` directory is fixed. If input for novel ligand transformations is desired the -`TIES20 `_ program can be used to generate all required inputs. +`TIES20 `_ program can be used to generate all required inputs. ``TIES 20`` can be +used via our online `service `_ or locally and details of how to use this will be provided +later in these documents. The only non standard input to ``TIES MD`` is a configuration file (``TIES.cfg``) which specifies options which the user my wish to occasionally change. This file must be placed alongside the build directory. Here we provide an example of such a file:: @@ -61,8 +64,8 @@ occasionally change. This file must be placed alongside the build directory. Her #How many total replicas of each window are run (we recommend at least 5). total_reps = 5 - #How many replicas should this evocation of TIES_MD run, used for parallelisation - reps_per_exec = 5 + #Boolean for if we will split all replicas into separate runs. (1 for maximum parallelism) + split_run = 0 #Where in lambda schedule (0->1) should the electrostatic potentials begin, stop appearing. elec_edges = 0.5, 1.0 @@ -79,13 +82,7 @@ occasionally change. This file must be placed alongside the build directory. Her #Which column in pdb are constraints provided valid options are occupancy/beta_factor. (beta_factor is standard) constraint_column = beta_factor - #What type of simulation cell is used valid options are cube, truncatedOctahedron, rhombicDodecahedron or na for manual. - box_type = na - - #The edge length used to compute the cube or truncatedOctahedron or rhombicDodecahedron box vectors - edge_length = 10*unit.nanometer - - #If box_type is na the manually specify box vectors of this simulation, unit Angstrom. + #Manually specify box vectors of this simulation, unit Angstrom. cell_basis_vec1 = 50, 0.0, 0.0 cell_basis_vec2 = 0.0, 50, 0.0 cell_basis_vec3 = 0.0, 0.0, 50 @@ -93,9 +90,9 @@ occasionally change. This file must be placed alongside the build directory. Her #What input type is provided, only AMBER supported. input_type = AMBER -``total_reps`` and ``reps_per_exec`` are options which can be used to achieve simple parallelism of the simulations. +``total_reps`` and ``split_run`` are options which can be used to achieve simple parallelism of the simulations. For example if you wished to run a total of 5 simulations on 5 GPUs in parallel one could use the settings -``total_reps = 5`` and ``reps_per_exec = 1``. See the :ref:`Parallelization` section for more details of how to +``total_reps = 5`` and ``split_run = 1``. See the :ref:`Parallelization` section for more details of how to achieve this. The following image shows ``TIES_MD`` applied to one alchemical transformation. @@ -113,11 +110,10 @@ energy functions of the system and for more information these settings please se Note the option ``constraint_column`` which determines if the constraint indexes will be read from the temperature factor or occupancy column of the constraints PDB. The alchemical indexes are always be read from the temperature factor column -in the main PDB ``complex.pdb``. The ``edge_length`` option can be found in the ``leap.log`` file created during system -preparation preformed by the users or ``TIES20``. ``TIES20`` will populate a TIES.cfg automatically with the correct box size. +in the main PDB ``complex.pdb``. ``TIES20`` will populate a TIES.cfg automatically with the correct box size. Typically a constraint file may be used during preproduction of simulations involving proteins but possibly not a small -drug like molecule in only solvent. It will be show later in the Binding Free Energy Calculations section when and +drug like molecule in only solvent. It will be shown later in the :ref:`Binding Free Energy Tutorial` section when and why we use a constraints file. Command Line @@ -146,7 +142,7 @@ values are as follows:: A comma separated list of integers which tells TIES OpenMM which GPUs to run on. If multiple GPUs are specified then TIES OpenMM will parallelize requested replicas over the available GPUs. - [--node_id=0] + [--rep_id=0] 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. @@ -154,9 +150,6 @@ values are as follows:: 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. - [--periodic=1] - A value of 1 sets the simulation box as periodic a value of 0 sets the simulation box as non-periodic. - Simulation Preparation ---------------------- @@ -199,7 +192,7 @@ to ``1``, there is therefore 6x1 = 6 total simulations to perform. If a HPC subm ties_md --exp_name=sys_solv --windows_mask=4,5 --devices=4& ties_md --exp_name=sys_solv --windows_mask=5,6 --devices=5& -There are a lot of options for how these ``OpenMM`` calcualtions can be structured and parallelized with ``TIES_MD`` see our +There are a lot of options for how these ``OpenMM`` calculations can be structured and parallelized with ``TIES_MD`` see our :ref:`Parallelization` page for more information on this. For a ``NAMD`` calculation if the submission script requested 6 CPU nodes each with 128 cores the run lines in the submission script might look like:: diff --git a/docs/_static/pygments.css b/docs/_static/pygments.css index 582d5c3..08bec68 100644 --- a/docs/_static/pygments.css +++ b/docs/_static/pygments.css @@ -5,22 +5,22 @@ td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5 span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #f8f8f8; } -.highlight .c { color: #408080; font-style: italic } /* Comment */ +.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ .highlight .err { border: 1px solid #FF0000 } /* Error */ .highlight .k { color: #008000; font-weight: bold } /* Keyword */ .highlight .o { color: #666666 } /* Operator */ -.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ -.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #BC7A00 } /* Comment.Preproc */ -.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ -.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ +.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #9C6500 } /* Comment.Preproc */ +.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ .highlight .gd { color: #A00000 } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gr { color: #E40000 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #888888 } /* Generic.Output */ +.highlight .gi { color: #008400 } /* Generic.Inserted */ +.highlight .go { color: #717171 } /* Generic.Output */ .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ @@ -33,15 +33,15 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .kt { color: #B00040 } /* Keyword.Type */ .highlight .m { color: #666666 } /* Literal.Number */ .highlight .s { color: #BA2121 } /* Literal.String */ -.highlight .na { color: #7D9029 } /* Name.Attribute */ +.highlight .na { color: #687822 } /* Name.Attribute */ .highlight .nb { color: #008000 } /* Name.Builtin */ .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ .highlight .no { color: #880000 } /* Name.Constant */ .highlight .nd { color: #AA22FF } /* Name.Decorator */ -.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ -.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0000FF } /* Name.Function */ -.highlight .nl { color: #A0A000 } /* Name.Label */ +.highlight .nl { color: #767600 } /* Name.Label */ .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #19177C } /* Name.Variable */ @@ -58,11 +58,11 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ -.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ -.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ .highlight .sx { color: #008000 } /* Literal.String.Other */ -.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ +.highlight .sr { color: #A45A77 } /* Literal.String.Regex */ .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ .highlight .ss { color: #19177C } /* Literal.String.Symbol */ .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ diff --git a/docs/binding_free_energies.html b/docs/binding_free_energies.html index 12aba98..51b01b2 100644 --- a/docs/binding_free_energies.html +++ b/docs/binding_free_energies.html @@ -21,7 +21,7 @@ - + @@ -43,6 +43,7 @@

      BFE Analysis

      @@ -255,7 +232,7 @@

      BFE Analysis - + diff --git a/docs/genindex.html b/docs/genindex.html index d5a9719..0ae9873 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -39,6 +39,7 @@
      • Installation
      • Tutorial
      • +
      • TIES MD API
      • Binding Free Energy Tutorial
      • Parallelization
      • HPC Submission scripts
      • @@ -131,12 +132,10 @@

        A

        B

        @@ -145,16 +144,22 @@

        B

        C

        + -
        +
      • make_exp() (in module TIES_MD.ties_analysis.ties_analysis) +
      • MBAR_Analysis (class in TIES_MD.ties_analysis.methods.FEP)
      • minimization() (in module TIES_MD.alch) diff --git a/docs/index.html b/docs/index.html index ad3cad4..57bf765 100644 --- a/docs/index.html +++ b/docs/index.html @@ -41,6 +41,7 @@
      • +
      • TIES MD API +
      • Binding Free Energy Tutorial
        • General BFE background
        • Setup
        • diff --git a/docs/install.html b/docs/install.html index b26be80..9e3936b 100644 --- a/docs/install.html +++ b/docs/install.html @@ -46,6 +46,7 @@
      • Tutorial
      • +
      • TIES MD API
      • Binding Free Energy Tutorial
      • Parallelization
      • HPC Submission scripts
      • diff --git a/docs/modules.html b/docs/modules.html index 5d4d732..d434e68 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -42,6 +42,7 @@
        • Installation
        • Tutorial
        • +
        • TIES MD API
        • Binding Free Energy Tutorial
        • Parallelization
        • HPC Submission scripts
        • diff --git a/docs/objects.inv b/docs/objects.inv index 53012bc..ac3bfca 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/parallelization.html b/docs/parallelization.html index 0cb521a..8f6fc6d 100644 --- a/docs/parallelization.html +++ b/docs/parallelization.html @@ -42,6 +42,7 @@
          • Installation
          • Tutorial
          • +
          • TIES MD API
          • Binding Free Energy Tutorial
          • Parallelization
            • TIES-OpenMM
            • @@ -105,16 +106,14 @@

              TIES-OpenMMCUDA device will then run 8 windows of the 1 replica. Equally ths could be spit into to separate runs of TIES MD masked to only see one device:

              -
              -

              Again using the configuration options total_reps=3 and reps_per_exec=1 the above runs 1 replica of each alchemical +

              Now sing the configuration options total_reps=3 and split_run=0 the above runs 3 replica of each alchemical window on a different GPU.

              For maximum parallelism we combine parallelizing over replicas and alchemical windows. For clarity we now consider the same example as above but now with 6 alchemical windows, 2 replica simulations and one simulation per GPU, so in -TIES.cfg global_lambdas=0.0, 0.1, 0.4, 0.6, 0.9, 1.0, total_reps=2 and reps_per_exec=1. To scale over multiple node +TIES.cfg global_lambdas=0.0, 0.1, 0.4, 0.6, 0.9, 1.0, total_reps=2 and split_run=1. To scale over multiple node we could use the resource allocator of the HPC for example jsrun on Summit. would allow us to run with 2 replicas of 6 windows as follows:

              -
              jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --node_id=0&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --node_id=0&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --node_id=0&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --node_id=0&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --node_id=0&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --node_id=0&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --node_id=1&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --node_id=1&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --node_id=1&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --node_id=1&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --node_id=1&
              -jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --node_id=1&
              +
              jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --rep_id=0&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --rep_id=0&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --rep_id=0&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --rep_id=0&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --rep_id=0&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --rep_id=0&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=0,1 --rep_id=1&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=1,2 --rep_id=1&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=2,3 --rep_id=1&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=3,4 --rep_id=1&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=4,5 --rep_id=1&
              +jsrun --smpiargs="off" -n 1 -a 1 -c 1 -g 1 -b packed:1 ties_md --config_file=$ties_dir/TIES.cfg --exp_name='sys_solv' --windows_mask=5,6 --rep_id=1&
               

              Note here we do not set --devices as the masking of GPUs is handled by the resource allocator, this is not the general case. @@ -158,9 +157,9 @@

              TIES-OpenMM

              TIES-NAMD

              The parallelization of TIES in NAMD2 follows the same ideas as OpenMM above. We want to run independent simulations -for all alchemical window and replica simulations. To achieve parallelization over replica simulations there are two options. -If in TIES.cfg total_reps==reps_per_exec the submission script that TIES_MD writes will use the NAMD option -+replicas X this makes each NAMD run X replicas and the run lines in sub.sh will look something like:

              +for all alchemical window and replica simulations. If in TIES.cfg split_run=0 the submission script that +TIES_MD writes will use the NAMD option +replicas X this makes each NAMD run X replicas and the +run lines in sub.sh will look something like:

              for stage in {0..3}; do
               for lambda in 0.00 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.95 1.0; do
                       srun -N $nodes_per_namd -n $cpus_per_namd namd2 +replicas 5 --tclmain run$stage-replicas.conf $lambda&
              @@ -170,7 +169,7 @@ 

              TIES-NAMDtotal_reps=!reps_per_exec with reps_per_exec=1 the run lines will look like:

              +

              Alternatively if split_run=1 the run lines will look like:

              for stage in {0..3}; do
               for lambda in 0.00 0.05 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0.95 1.0; do
               for i in {{0..4}}; do
              @@ -187,8 +186,8 @@ 

              TIES-NAMD+replicas 135 on ARCHER 2 with no crashes. In the two above examples the parallelism over alchemical windows is achieved in the loop over lambda.

              Using NAMD3 parallelization can be achieved like so (NAMD 3). NAMD in general has extensive options to provision -hardware and achieve parallelism, what have outlined here is not exhaustive and we would suggest consulting the documentation -for more a more comprehensive information.

              +hardware and achieve parallelism, what have outlined here is not exhaustive and we would suggest consulting +the documentation for more a more comprehensive information.

              diff --git a/docs/py-modindex.html b/docs/py-modindex.html index dee2596..a70dd1f 100644 --- a/docs/py-modindex.html +++ b/docs/py-modindex.html @@ -42,6 +42,7 @@
              • Installation
              • Tutorial
              • +
              • TIES MD API
              • Binding Free Energy Tutorial
              • Parallelization
              • HPC Submission scripts
              • diff --git a/docs/search.html b/docs/search.html index 1567a60..d80b6e8 100644 --- a/docs/search.html +++ b/docs/search.html @@ -42,6 +42,7 @@
                • Installation
                • Tutorial
                • +
                • TIES MD API
                • Binding Free Energy Tutorial
                • Parallelization
                • HPC Submission scripts
                • diff --git a/docs/searchindex.js b/docs/searchindex.js index 5e43be8..29f4ddc 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["HPC_submissions", "TIES_MD", "TIES_MD.eng_scripts", "TIES_MD.eng_scripts.cfg_scripts", "TIES_MD.eng_scripts.namd_sub", "TIES_MD.eng_scripts.namd_sub_split", "TIES_MD.eng_scripts.openmm_sub", "TIES_MD.eng_scripts.openmm_sub_split", "TIES_MD.openmmtools", "TIES_MD.ties_analysis", "TIES_MD.ties_analysis.engines", "TIES_MD.ties_analysis.methods", "binding_free_energies", "index", "install", "modules", "parallelization", "theory", "tutorial"], "filenames": ["HPC_submissions.rst", "TIES_MD.rst", "TIES_MD.eng_scripts.rst", "TIES_MD.eng_scripts.cfg_scripts.rst", "TIES_MD.eng_scripts.namd_sub.rst", "TIES_MD.eng_scripts.namd_sub_split.rst", "TIES_MD.eng_scripts.openmm_sub.rst", "TIES_MD.eng_scripts.openmm_sub_split.rst", "TIES_MD.openmmtools.rst", "TIES_MD.ties_analysis.rst", "TIES_MD.ties_analysis.engines.rst", "TIES_MD.ties_analysis.methods.rst", "binding_free_energies.rst", "index.rst", "install.rst", "modules.rst", "parallelization.rst", "theory.rst", "tutorial.rst"], "titles": ["HPC Submission scripts", "TIES_MD package", "TIES_MD.eng_scripts package", "TIES_MD.eng_scripts.cfg_scripts package", "TIES_MD.eng_scripts.namd_sub package", "TIES_MD.eng_scripts.namd_sub_split package", "TIES_MD.eng_scripts.openmm_sub package", "TIES_MD.eng_scripts.openmm_sub_split package", "TIES_MD.openmmtools package", "TIES_MD.ties_analysis package", "TIES_MD.ties_analysis.engines package", "TIES_MD.ties_analysis.methods package", "Binding Free Energy Tutorial", "Welcome to the TIES MD documentation.", "Installation", "TIES_MD", "Parallelization", "Theory", "Tutorial"], "terms": {"here": [0, 1, 14, 16, 17, 18], "we": [0, 1, 9, 10, 11, 12, 16, 17, 18], "provid": [0, 1, 14, 16, 17, 18], "some": [0, 1, 12, 14, 16, 17, 18], "exampl": [0, 1, 12, 14, 16, 17, 18], "variou": 0, "system": [0, 1, 8, 12, 13, 14, 16, 17, 18], "ti": [0, 9, 10, 12, 15, 17, 18], "md": [0, 12, 16, 17, 18], "attempt": [0, 14], "automat": [0, 18], "write": [0, 1, 12, 14, 16], "sensibl": 0, "namd2": [0, 1, 16, 18], "target": [0, 1, 14, 17, 18], "archer": [0, 16], "2": [0, 10, 12, 14, 16, 17, 18], "summit": [0, 1, 12, 16], "In": [0, 12, 14, 16, 18], "gener": [0, 9, 10, 13, 16, 17, 18], "user": [0, 1, 12, 14, 17, 18], "can": [0, 1, 8, 11, 12, 13, 14, 16, 17, 18], "make": [0, 1, 11, 12, 16], "own": [0, 12, 18], "whichev": 0, "cluster": [0, 12], "thei": [0, 1, 12], "prefer": 0, "To": [0, 12, 14, 16, 17, 18], "aid": 0, "expos": 0, "option": [0, 1, 8, 9, 10, 12, 16, 17, 18], "api": [0, 1, 12], "call": [0, 1, 12, 17, 18], "sub_head": [0, 12], "sub_run_lin": [0, 12], "The": [0, 1, 8, 12, 14, 16, 17, 18], "string": [0, 1, 9, 10, 11, 18], "pass": [0, 1, 11, 12, 16, 18], "inject": 0, "templat": 0, "all": [0, 1, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "ar": [0, 1, 8, 10, 11, 12, 13, 14, 16, 17, 18], "written": [0, 1, 18], "base": [0, 1, 8, 9, 10, 11, 13, 18], "directori": [0, 1, 10, 12, 14, 18], "sub": [0, 1, 16], "sh": [0, 14, 16], "an": [0, 1, 8, 10, 13, 14, 16, 17, 18], "thi": [0, 1, 8, 10, 11, 12, 13, 14, 16, 17, 18], "i": [0, 1, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "run": [0, 1, 9, 10, 13, 14, 16], "larg": 0, "100k": 0, "atom": [0, 1, 12, 17, 18], "supermuc": 0, "ng": 0, "bin": [0, 12, 14], "bash": [0, 12], "sbatch": 0, "job": [0, 1], "name": [0, 1, 8, 10, 12, 14, 18], "ligpair": [0, 12], "o": [0, 12], "x": [0, 1, 12, 14, 16, 17, 18], "j": [0, 12], "out": [0, 1, 12, 18], "e": [0, 1, 8, 10, 12, 17, 18], "err": 0, "d": [0, 1], "node": [0, 1, 16, 18], "130": 0, "task": 0, "per": [0, 1, 16, 18], "48": 0, "requeu": 0, "export": [0, 12, 14], "none": [0, 1, 8, 9, 11, 18], "get": [0, 1, 10, 12, 13], "env": 0, "account": 0, "xxx": 0, "partit": 0, "time": [0, 1, 10, 11, 12, 18], "10": [0, 12, 14, 18], "00": [0, 10, 14, 16, 18], "modul": [0, 14, 15], "load": [0, 14], "slurm_setup": 0, "14": [0, 1, 18], "gcc8": 0, "impi": 0, "nodes_per_namd": [0, 16], "cpus_per_namd": [0, 16], "480": 0, "echo": 0, "chang": [0, 1, 10, 12, 14, 17, 18], "line": [0, 1, 12, 13, 16], "point": [0, 1, 10, 11, 12, 18], "your": [0, 14], "project": 0, "ties_dir": [0, 12, 16], "hppf": 0, "work": [0, 1, 14, 16], "pn98ve": 0, "di67rov": 0, "test_ti": 0, "studi": [0, 18], "prot": [0, 10], "l2": 0, "l1": 0, "com": [0, 12, 14, 18], "cd": [0, 12, 14, 18], "replica": [0, 1, 10, 11, 12, 16, 18], "conf": [0, 1, 16, 18], "stage": [0, 1, 16, 18], "0": [0, 1, 8, 10, 12, 14, 16, 17, 18], "do": [0, 1, 10, 11, 12, 14, 16, 17, 18], "lambda": [0, 8, 10, 11, 12, 15, 16, 17, 18], "05": [0, 16, 17, 18], "1": [0, 1, 8, 10, 12, 14, 16, 17, 18], "4": [0, 12, 14, 16, 17, 18], "5": [0, 12, 16, 17, 18], "6": [0, 12, 14, 16, 17, 18], "7": [0, 12, 14, 16, 17, 18], "8": [0, 12, 14, 16, 17, 18], "9": [0, 12, 16, 17, 18], "95": [0, 16, 17, 18], "srun": [0, 16, 18], "n": [0, 12, 14, 16, 18], "tclmain": [0, 16, 18], "sleep": [0, 16, 18], "done": [0, 12, 16, 18], "wait": [0, 12, 16, 18], "first": [0, 17, 18], "20": [0, 13, 17], "could": [0, 14, 16, 18], "adapt": 0, "smaller": [0, 16], "10k": 0, "follow": [0, 12, 14, 16, 18], "13": [0, 12, 18], "45": 0, "micro": 0, "scale": [0, 16, 17], "up": [0, 9, 11, 12, 16, 18], "simul": [0, 1, 11, 12, 13, 14, 16, 17], "bsub": [0, 12], "p": [0, 12, 14], "w": [0, 1, 12], "nnode": [0, 12], "alloc_flag": [0, 12], "gpudefault": [0, 12], "smt1": [0, 12], "test": [0, 1, 8, 14, 16, 18], "otest": 0, "etest": 0, "ls_subcwd": 0, "path": [0, 1, 9, 10, 11, 12, 14, 17], "gpf": 0, "alpin": 0, "scratch": 0, "adw62": [0, 14], "chm155": 0, "ties_test": 0, "miniconda": [0, 14], "ties_md": [0, 12, 13, 14, 16, 18], "ethan": [0, 18], "zero_sum": [0, 18], "leg1": 0, "cuda": [0, 1, 14, 16], "168": 0, "date": [0, 18], "jsrun": [0, 12, 16], "smpiarg": [0, 12, 16], "off": [0, 12, 14, 16, 18], "c": [0, 12, 14, 16], "g": [0, 1, 12, 16, 17, 18], "b": [0, 12, 14, 16, 17], "pack": [0, 12, 16], "config_fil": [0, 1, 9, 12, 16, 18], "cfg": [0, 1, 9, 12, 16, 18], "exp_nam": [0, 1, 12, 16, 18], "sys_solv": [0, 16, 18], "windows_mask": [0, 1, 12, 16, 18], "node_id": [0, 1, 12, 16, 18], "namd3": [0, 1, 16, 18], "thetagpu": [0, 16], "cobalt": 0, "A": [0, 1, 8, 12, 14, 17, 18], "t": [0, 1], "100": 0, "q": 0, "full": 0, "mpirun": 0, "lu": 0, "theta": 0, "fs0": 0, "softwar": [0, 13], "openmpi": 0, "compbioaffin": 0, "awad": 0, "namd_3": 0, "0alpha9_linux": 0, "x86_64": [0, 14], "multicor": 0, "node1": 0, "sed": 0, "1q": 0, "cobalt_nodefil": 0, "node2": 0, "2q": 0, "many_rep": 0, "mcl1": 0, "l18": 0, "l39": 0, "host": 0, "cpu": [0, 1, 14, 18], "set": [0, 1, 8, 9, 12, 14, 16, 17, 18], "bind": [0, 1, 13, 17, 18], "core": [0, 18], "np": [0, 1, 10, 11], "devic": [0, 1, 16, 18], "30": 0, "40": 0, "50": [0, 18], "60": 0, "70": 0, "80": [0, 14], "90": 0, "alchem": [0, 1, 8, 12, 13, 14, 16, 18], "window": [0, 1, 10, 11, 16, 17, 18], "us": [0, 1, 8, 10, 11, 12, 13, 14, 16, 17, 18], "onli": [0, 16, 18], "each": [0, 1, 10, 11, 12, 16, 17, 18], "addition": 0, "gpu": [0, 1, 14, 16, 18], "idl": 0, "For": [0, 16, 17, 18], "real": 0, "world": 0, "applic": [0, 17, 18], "need": [0, 1, 12, 14, 16, 17, 18], "current": [0, 1, 18], "build": [0, 1, 9, 10, 12, 13, 14, 18], "creat": [0, 1, 16, 17, 18], "python": [0, 14, 16, 18], "veri": 0, "help": [0, 1], "would": [0, 16, 18], "allow": [0, 1, 10, 14, 16, 18], "u": [0, 1, 12, 16], "import": [0, 12], "__name__": 0, "__main__": 0, "acc_nam": 0, "how": [0, 1, 16, 17, 18], "mani": [0, 1, 16, 18], "want": [0, 1, 10, 11, 12, 14, 16], "what": [0, 1, 10, 11, 12, 16, 17, 18], "thermodynam": [0, 11, 12, 13, 14, 17], "leg": [0, 1, 10, 12, 18], "mai": [0, 1, 12, 18], "have": [0, 8, 12, 14, 16, 18], "differ": [0, 1, 8, 10, 11, 12, 14, 16, 18], "wall": 0, "where": [0, 1, 9, 10, 11, 14, 18], "binari": 0, "namd3_ex": 0, "cwd": [0, 1, 12], "getcwd": [0, 12], "give": [0, 12], "lig": [0, 10, 12], "wall_tim": 0, "els": [0, 11], "open": [0, 13], "join": [0, 12], "thetagpu_": 0, "format": [0, 1, 9, 10, 18], "f": 0, "header": [0, 1, 12], "instal": [0, 13, 18], "locat": [0, 1, 10, 16, 18], "read": [0, 1, 8, 9, 10, 11, 12, 14, 18], "file": [0, 1, 9, 10, 11, 12, 16, 17, 18], "rang": [0, 1, 16], "move": [0, 18], "iter": [0, 1, 10, 12], "over": [0, 1, 10, 12, 16, 18], "minim": [0, 1, 18], "nvt": [0, 1, 18], "eq": 0, "npt": [0, 1, 18], "product": [0, 1, 18], "run0": 0, "run1": 0, "run2": 0, "run3": 0, "count": 0, "lam": [0, 1], "rep": [0, 1, 10, 11], "2f": [0, 1], "number": [0, 1, 10, 11, 18], "next": [0, 12], "when": [0, 1, 12, 16, 17, 18], "fill": [0, 18], "sure": [0, 12], "between": [0, 1, 11, 12, 14, 16, 17, 18], "sim": [0, 1], "finish": [0, 1, 12, 18], "eng_script": [1, 15], "cfg_script": [1, 2], "namd_sub": [1, 2], "namd_sub_split": [1, 2], "openmm_sub": [1, 2], "openmm_sub_split": [1, 2], "openmmtool": [1, 14, 15], "alchemi": [1, 15], "ties_analysi": [1, 15, 18], "engin": [1, 9, 18], "namd": [1, 9, 13, 17, 18], "openmm": [1, 8, 9, 12, 13, 18], "method": [1, 9, 10, 12, 13, 16, 17, 18], "fep": [1, 9, 10, 14, 18], "config": [1, 12, 15, 16, 17, 18], "class": [1, 8, 9, 10, 11, 18], "run_typ": [1, 12, 18], "period": [1, 18], "true": [1, 8, 11], "platform": [1, 14], "kwarg": [1, 8], "object": [1, 8, 9, 10, 11], "control": [1, 16, 17, 18], "protocol": [1, 12, 13, 14], "initi": [1, 12], "variabl": [1, 8], "function": [1, 8, 9, 10, 11, 18], "start": [1, 13, 14, 16], "input": [1, 11, 12, 13, 17], "script": [1, 12, 13, 16, 18], "paramet": [1, 8, 9, 10, 11, 17, 18], "str": [1, 8, 9, 10], "experi": [1, 12, 18], "complex": [1, 12, 18], "pdb": [1, 12, 18], "prmtop": [1, 18], "flag": 1, "sai": 1, "should": [1, 11, 14, 16, 17, 18], "dynam": [1, 16, 18], "list": [1, 10, 11, 17, 18], "int": [1, 10, 11, 18], "which": [1, 8, 10, 11, 12, 14, 16, 17, 18], "float": [1, 8, 10, 11, 17, 18], "id": [1, 10, 14], "denot": [1, 18], "execut": [1, 12, 16, 18], "contain": [1, 9, 10, 11, 12, 17, 18], "end": [1, 11, 16, 17], "boolean": [1, 11], "determin": [1, 14, 17, 18], "custom": [1, 14], "schedul": [1, 10, 11, 12, 17, 18], "sting": 1, "valu": [1, 8, 10, 11, 12, 14, 16, 17, 18], "opencl": [1, 14], "dict": [1, 9, 11], "from": [1, 8, 10, 11, 12, 16, 17, 18], "properti": 1, "box_typ": [1, 18], "type": [1, 18], "box": [1, 16, 18], "being": [1, 8, 16, 17, 18], "cube": [1, 18], "truncatedoctahedron": [1, 18], "rhombicdodecahedron": [1, 18], "na": [1, 18], "manual": [1, 18], "return": [1, 8, 9, 10, 11, 14], "build_results_dir": 1, "folder": [1, 18], "helper": [1, 10], "output": [1, 10, 11, 14, 16, 18], "param": [1, 9], "elec_edg": [1, 17, 18], "electrostat": [1, 17, 18], "potenti": [1, 10, 11, 18], "begin": [1, 17, 18], "stop": [1, 18], "appear": [1, 10, 17, 18], "molecular": [1, 16, 18], "go": 1, "get_opt": [1, 9, 12], "print": [1, 9, 12], "global_lambda": [1, 16, 17, 18], "global": [1, 8, 18], "parallel": [1, 13, 18], "setup": [1, 9, 13, 18], "split_run": 1, "tiesmd": [1, 12], "subset": 1, "bool": [1, 10, 11], "split": 1, "ster_edg": [1, 17, 18], "lennard_jon": [1, 18], "update_cfg": [1, 12], "after": [1, 18], "made": [1, 18], "write_analysis_cfg": 1, "configur": [1, 12, 14, 16, 18], "analysi": [1, 9, 10, 11, 13, 14], "write_namd_eq": 1, "eq1": 1, "eq2": 1, "equilibr": [1, 18], "write_namd_min": 1, "eq0": 1, "write_namd_prod": 1, "sim1": 1, "write_namd_script": 1, "write_namd_submiss": 1, "submiss": [1, 12, 13, 16, 18], "hpc": [1, 12, 13, 16, 18], "archer2": 1, "write_openmm_submiss": 1, "get_box_vector": 1, "comput": [1, 11, 12, 14, 18], "vector": [1, 18], "know": 1, "edg": [1, 18], "length": [1, 18], "defin": [1, 8, 18], "bix": 1, "unit": [1, 8, 10, 11, 18], "angstrom": [1, 8, 18], "vec3": 1, "basi": 1, "get_header_and_run": 1, "namd_vers": [1, 10], "num_window": 1, "prep": [1, 12, 18], "inspect": [1, 10, 12], "best": [1, 17], "guess": 1, "version": [1, 8, 10, 14], "ani": [1, 10, 12, 14, 16, 18], "one": [1, 10, 11, 12, 16, 17, 18], "nice_print": [1, 9], "pad": [1, 9], "read_config": [1, 9, 12], "disk": [1, 12], "arg": [1, 8], "alchsi": 1, "temperatur": [1, 10, 11, 18], "pressur": [1, 18], "constraint_fil": [1, 18], "constraint_column": [1, 18], "basis_vector": 1, "input_typ": [1, 18], "amber": [1, 18], "absolut": 1, "fals": [1, 8, 11], "debug": 1, "free": [1, 11, 13, 16, 17, 18], "energi": [1, 11, 13, 16, 17, 18], "calcul": [1, 10, 11, 12, 13, 14, 16, 18], "thermostat": [1, 18], "barostat": [1, 18], "detail": [1, 12, 17, 18], "constraint": [1, 12, 18], "beta": 1, "occup": [1, 18], "column": [1, 18], "mbar": [1, 11], "explicit": 1, "cell": [1, 16, 18], "pme": 1, "cutoffnonperiod": 1, "remov": [1, 10, 11], "forc": [1, 14], "nonbond": 1, "note": [1, 12, 16, 18], "gromac": 1, "add_consraint": 1, "add": [1, 18], "constrain": [1, 18], "dure": [1, 18], "construct": [1, 18], "boundari": 1, "condit": 1, "amend_original_posit": 1, "posit": [1, 18], "updat": [1, 10, 12, 14], "store": [1, 9], "clash": 1, "found": [1, 12, 17, 18], "initialis": 1, "build_simul": 1, "device_id": 1, "take": [1, 12, 16, 17, 18], "index": [1, 10, 18], "integr": [1, 11, 13, 14, 17], "debug_forc": 1, "while": 1, "maintain": 1, "ensembl": [1, 16, 18], "modifi": [1, 8, 12, 18], "get_gradi": 1, "val": 1, "context": [1, 8], "h": 1, "analitic_ster": 1, "gradient": [1, 10, 11, 18], "r": 1, "eg": 1, "lambda_electrostatics_appear": 1, "finit": [1, 17], "analyt": 1, "steric": 1, "experiment": 1, "numer": [1, 11, 16], "get_intersect_angl": 1, "appear_idx": 1, "disappear_idx": 1, "idx": 1, "angl": 1, "straddl": 1, "region": 1, "dissapear": 1, "get_intersect_bond": 1, "bond": 1, "get_intersect_tors": 1, "torsion": 1, "disappear": [1, 10, 17, 18], "rebuild_tors": 1, "intersect_tors": 1, "rebuild": 1, "without": [1, 16, 18], "non": [1, 17, 18], "physic": [1, 13, 17, 18], "fulli": [1, 17], "result": [1, 10, 11, 12, 14, 16, 18], "nan": 1, "eval": 1, "refer": [1, 14, 16, 17, 18], "set_context_to_st": 1, "param_v": 1, "see": [1, 12, 13, 16, 18], "shift_alchemical_posit": 1, "small": [1, 17, 18], "pertub": 1, "resolv": 1, "caus": [1, 12], "overlap": [1, 11], "test_sim": 1, "find": 1, "undefin": [1, 8], "pdb_line": 1, "let": 1, "address": 1, "readabl": 1, "system_id": 1, "inform": [1, 10, 11, 13, 14, 16, 17, 18], "repeat": [1, 16], "total": [1, 16, 18], "add_simulation_report": 1, "total_step": 1, "save": [1, 11, 18], "report": 1, "step": [1, 12, 14, 17], "dcd": 1, "equilibri": 1, "save_fil": 1, "perform": [1, 10, 11, 12, 14, 18], "state": [1, 8, 11, 17, 18], "indic": 1, "whether": 1, "ha": [1, 8, 14, 16, 18], "get_alchemical_atom": 1, "pdb_file": 1, "pull": 1, "temp": [1, 10, 11, 14], "factor": [1, 18], "logic": 1, "get_constraint": 1, "fuction": 1, "row": 1, "data": [1, 10, 11], "strength": 1, "relax": 1, "preproduct": [1, 18], "equili_step": 1, "equili_state_fil": 1, "meta": 1, "wrap": 1, "togeth": 1, "equilib": 1, "remove_simulation_report": 1, "strip": 1, "simulate_system": 1, "alch_si": 1, "mask": [1, 16], "niter": 1, "steps_per_it": 1, "1000": 1, "main": [1, 9, 18], "Will": 1, "assign": 1, "worker": 1, "pre": [1, 18], "collect": [1, 10, 13], "requir": [1, 8, 18], "grad": [1, 11], "sampl": [1, 10, 11, 13, 17, 18], "much": [1, 18], "argv": 1, "entri": [1, 11, 18], "program": [1, 12, 17, 18], "command": [1, 12, 13, 14, 16], "argument": [1, 12], "global_lamb": 1, "fraction": 1, "electr": 1, "kei": [1, 18], "lambda_": 1, "_": [1, 8], "termin": [1, 9, 12, 14], "update_attrs_from_schedul": [1, 10], "attribut": 1, "self": [1, 10, 11], "lambda_sterics_appear": [1, 10], "appear_func": 1, "evalu": 1, "two": [1, 12, 13, 16, 17, 18], "y": [1, 17, 18], "disappear_func": 1, "get_lin": 1, "global_lam": 1, "numpi": [1, 10, 11], "arrai": [1, 10, 11], "interpol": 1, "across": [1, 16], "except": 8, "alchemicalstateerror": 8, "globalparametererror": 8, "error": [8, 11, 14, 16], "rais": 8, "alchemicalst": 8, "modifiedabsolutealchemicalfactori": 8, "consistent_except": 8, "switch_width": 8, "quantiti": 8, "alchemical_pme_treat": 8, "exact": [8, 18], "alchemical_rf_treat": 8, "switch": 8, "disable_alchemical_dispersion_correct": 8, "split_alchemical_forc": 8, "absolutealchemicalfactori": 8, "super": 8, "modifiedalchemicalst": 8, "parameters_name_suffix": 8, "globalparameterst": 8, "apply_to_context": 8, "put": [8, 12], "If": [8, 12, 14, 16, 18], "doe": [8, 12, 14, 18], "apply_to_system": 8, "check_system_consist": 8, "check": 8, "It": [8, 18], "consist": 8, "classmethod": 8, "from_system": 8, "constructor": 8, "specifi": [8, 10, 11, 16, 18], "search": 8, "parameter_nam": 8, "repres": 8, "same": [8, 12, 16, 18], "get_alchemical_vari": 8, "variable_nam": 8, "warn": 8, "deprec": 8, "get_function_vari": 8, "instead": [8, 14], "variable_valu": 8, "enter": 8, "mathemat": 8, "express": 8, "alchemicalfunct": 8, "enslav": 8, "arbitrari": 8, "lambda_angl": 8, "interv": 8, "standard": [8, 11, 18], "lambda_bond": 8, "lambda_electrostat": 8, "lambda_ster": 8, "lambda_tors": 8, "set_alchemical_paramet": 8, "new_valu": 8, "given": [8, 18], "those": 8, "remain": 8, "new": [8, 10, 12], "set_alchemical_vari": 8, "set_function_vari": 8, "analysis_cfg": 9, "hold": [9, 10], "chose": 9, "win_mask": 10, "distribut": [10, 11], "rep_convg": [10, 11], "sampling_convg": [10, 11], "vdw_a": 10, "vdw_d": 10, "ele_a": 10, "ele_d": 10, "dir": 10, "writen": [10, 18], "dg": [10, 11], "individu": [10, 11, 12, 16], "intermedi": [10, 17], "you": [10, 12, 14, 18], "wish": [10, 12, 14, 18], "converg": 10, "amount": 10, "describ": 10, "vdw": 10, "elec": 10, "alch": [10, 15], "collate_data": 10, "data_root": 10, "protein": [10, 12, 13, 17, 18], "ligand": [10, 12, 13, 17, 18], "thermo": 10, "run_analysi": 10, "kelvin": [10, 11, 18], "implement": [10, 13, 16, 17], "stdev": 10, "get_it": 10, "file_loc": 10, "get_replica": 10, "sort": 10, "specif": [10, 13, 17, 18], "rep0": 10, "get_window": 10, "lambda_0": 10, "read_alch_fil": 10, "file_path": 10, "namd_ver": 10, "ver": 10, "old": 10, "look": [10, 11, 14, 16, 18], "12": [10, 12], "about": [10, 11, 18], "easili": 10, "queryabl": 10, "etc": 10, "fep_combine_rep": 10, "openmm_ti": [10, 18], "combin": [10, 16], "seri": [10, 11], "concaten": 10, "mbar_analysi": 11, "analysis_dir": 11, "decorrel": 11, "averag": 11, "befor": 11, "process": 11, "u_kln": 11, "n_k": 11, "mask_window": 11, "rep_id": 11, "matrix": 11, "associ": [11, 12, 17, 18], "decorrelate_data": 11, "decorrol": 11, "turpl": 11, "plot_overlap_mat": 11, "mat": 11, "plot": [11, 17], "replica_analysi": 11, "consid": [11, 16, 17, 18], "trajectori": 11, "bootstrap": 11, "sem": [11, 12], "ti_analysi": 11, "deviat": [11, 18], "intergr": 11, "lambda_paramet": 11, "varianc": 11, "plot_du_by_dl": 11, "du": 11, "dlam": 11, "v": [11, 14], "includ": [11, 12, 17], "ci": 11, "compute_bs_error": 11, "var": 11, "boot": 11, "strap": 11, "get_lam_diff": 11, "lambda_arrai": 11, "adjac": 11, "discuss": [12, 16], "section": [12, 13, 14, 18], "outlin": [12, 13, 16, 18], "shorten": 12, "respect": [12, 18], "transform": [12, 14, 17, 18], "anoth": [12, 17], "water": 12, "now": [12, 16], "insid": 12, "\u03b4": 12, "g_": 12, "mutation1": 12, "mutation2": 12, "equal": [12, 16, 18], "\u03b4\u03b4": 12, "idea": [12, 16], "relat": 12, "shown": [12, 17, 18], "figur": [12, 17], "more": [12, 13, 16, 17, 18], "public": [12, 17], "cournia": 12, "et": 12, "al": 12, "whole": 12, "cycl": 12, "must": [12, 14, 18], "hand": 12, "ties20": [12, 17, 18], "principl": 12, "addit": [12, 16], "howev": [12, 16], "normal": 12, "avoid": 12, "rapid": 12, "crystal": 12, "structur": [12, 18], "conform": 12, "earli": 12, "close": 12, "contact": 12, "also": [12, 14, 16, 18], "so": [12, 14, 16, 18], "expens": 12, "computation": 12, "recommend": [12, 17, 18], "design": 12, "both": [12, 18], "parameter": 12, "hybrid": [12, 17], "browser": 12, "altern": [12, 16, 18], "pair": 12, "ligand_ff_nam": 12, "gaff2": 12, "ligand_net_charg": 12, "md_engin": 12, "liganda": 12, "mol2": 12, "antechamber_prepare_mol2": 12, "ligandb": 12, "ensur": [12, 14, 16, 18], "make_atom_names_uniqu": 12, "turn": [12, 18], "superimpos": 12, "sinc": 12, "declar": 12, "prepare_input": 12, "receptor": 12, "protein_ff": 12, "leaprc": 12, "ff14sb": 12, "re": 12, "prepar": [12, 13], "built": [12, 13, 17, 18], "order": [12, 14], "via": 12, "At": 12, "map": 12, "thermodynamic_leg": [12, 18], "wa": [12, 14, 18], "seen": 12, "good": [12, 18], "default": [12, 14, 18], "quickli": 12, "cli": [12, 15], "thermo_leg": 12, "args_dict": 12, "reps_per_exec": [12, 16, 18], "total_rep": [12, 16, 18], "chm155_001": 12, "120": 12, "oligpair": 12, "eligpair": 12, "expr": 12, "abov": [12, 14, 16, 18], "intern": 12, "yield": [12, 14], "3": [12, 13, 14, 16, 17, 18], "11": [12, 14], "These": [12, 14, 16, 17, 18], "onc": 12, "last": 12, "ties_ana": [12, 18], "Then": [12, 14], "our": [12, 13, 16, 18], "like": [12, 14, 16, 18], "minu": 12, "care": 12, "compar": 12, "depend": [12, 18], "again": [12, 16], "dat": [12, 18], "packag": [13, 14, 15, 18], "stand": 13, "enhanc": [13, 17], "accur": 13, "reproduc": 13, "rel": [13, 17], "pleas": [13, 18], "theori": 13, "within": [13, 14, 18], "avail": [13, 14, 16, 18], "onlin": [13, 18], "sourc": [13, 18], "explain": 13, "websit": 13, "builder": 13, "linux": 13, "ppc64le": 13, "tutori": [13, 14], "bfe": 13, "background": 13, "pathwai": [13, 18], "github": [13, 14, 16, 18], "conda": 14, "manag": 14, "assum": 14, "wget": 14, "http": [14, 18], "repo": 14, "continuum": 14, "io": 14, "miniconda3": 14, "latest": 14, "chmod": 14, "prefix": [14, 18], "match": 14, "machin": 14, "permiss": 14, "final": 14, "page": [14, 16, 18], "With": [14, 18], "forg": 14, "verifi": 14, "m": 14, "testinstal": 14, "older": 14, "simtk": 14, "instanc": [14, 16, 18], "wrong": 14, "cudatoolkit": 14, "happen": 14, "produc": [14, 18], "git": [14, 18], "revis": 14, "130124a3f9277b054ec40927360a6ad20c8f5fa6": 14, "There": [14, 18], "successfulli": 14, "cuda_error_unsupported_ptx_vers": 14, "222": 14, "median": 14, "30571e": 14, "06": 14, "76359e": 14, "05194e": 14, "07": 14, "toler": 14, "critic": [14, 16], "correct": [14, 18], "replac": 14, "particular": [14, 18], "One": 14, "appropri": 14, "nvidia": 14, "smi": 14, "460": 14, "driver": 14, "persist": 14, "bu": 14, "disp": 14, "volatil": 14, "uncorr": 14, "ecc": 14, "fan": 14, "perf": 14, "pwr": 14, "usag": 14, "cap": 14, "memori": 14, "util": [14, 18], "mig": 14, "quadro": 14, "m1000m": 14, "00000000": 14, "01": 14, "50c": 14, "p5": 14, "435mib": 14, "2002mib": 14, "top": 14, "right": 14, "my": [14, 18], "correctli": 14, "download": [14, 18], "clone": [14, 18], "ucl": [14, 18], "cc": [14, 18], "pymabr": 14, "therefor": [14, 18], "until": 14, "around": 14, "copi": 14, "elsewher": 14, "skip": 14, "And": 14, "mkdir": 14, "openmmtools_instal": 14, "powerpc": 14, "pip": 14, "featur": 14, "tree": 14, "subpackag": 15, "content": 15, "submodul": [15, 18], "domain": 16, "kind": 16, "spatial": 16, "were": 16, "decompos": 16, "difficult": 16, "achiev": [16, 18], "than": 16, "ones": 16, "focu": 16, "aleator": 16, "inher": 16, "chaotic": 16, "commun": 16, "other": 16, "embarrassingli": 16, "problem": [16, 18], "easi": 16, "likewis": 16, "remaind": 16, "explor": 16, "th": 16, "spit": 16, "separ": [16, 17, 18], "tell": [16, 18], "otherwis": 16, "ident": 16, "uniqu": [16, 18], "further": 16, "inclus": 16, "exclus": 16, "maximum": 16, "clariti": 16, "multipl": [16, 18], "resourc": 16, "alloc": 16, "handl": 16, "case": [16, 18], "messag": 16, "interfac": 16, "mpi": 16, "vari": [16, 18], "univers": 16, "solut": [16, 18], "independ": [16, 18], "someth": [16, 18], "notic": [16, 18], "loop": [16, 18], "65": 16, "anecdot": 16, "less": 16, "crash": 16, "135": 16, "extens": 16, "provis": 16, "hardwar": 16, "exhaust": 16, "suggest": [16, 18], "consult": [16, 17, 18], "document": [16, 17, 18], "comprehens": 16, "molecul": [17, 18], "coval": 17, "dual": 17, "topologi": [17, 18], "approach": 17, "complementari": 17, "involv": [17, 18], "chemic": 17, "moieti": 17, "destroi": 17, "stratifi": 17, "along": 17, "chosen": 17, "keep": 17, "track": 17, "\u03bb": [17, 18], "As": [17, 18], "three": [17, 18], "tune": 17, "wai": 17, "comma": [17, 18], "exactli": [17, 18], "lennard": 17, "jone": 17, "lj": 17, "interact": 17, "second": [17, 18], "graphic": 17, "guid": 17, "intend": 18, "submit": 18, "expect": 18, "code": 18, "navig": 18, "essenti": 18, "support": 18, "them": 18, "place": 18, "understand": 18, "renam": 18, "anyth": 18, "fix": 18, "novel": 18, "desir": 18, "occasion": 18, "alongsid": 18, "valid": 18, "300": 18, "atmospher": 18, "4n": 18, "sampling_per_window": 18, "nanosecond": 18, "2n": 18, "equili_per_window": 18, "estim": 18, "least": 18, "evoc": 18, "parallelis": 18, "space": 18, "con": 18, "beta_factor": 18, "edge_length": 18, "nanomet": 18, "cell_basis_vec1": 18, "cell_basis_vec2": 18, "cell_basis_vec3": 18, "simpl": 18, "imag": 18, "show": 18, "appli": 18, "alwai": 18, "leap": 18, "log": 18, "preform": 18, "popul": 18, "size": 18, "typic": 18, "possibli": 18, "drug": 18, "solvent": 18, "later": 18, "why": 18, "present": 18, "almost": 18, "readi": 18, "invok": 18, "just": 18, "taken": 18, "either": 18, "halt": 18, "advanc": 18, "below": 18, "silent": 18, "ignor": 18, "integ": 18, "request": 18, "By": 18, "intens": 18, "pc": 18, "head": 18, "lambda_x": 18, "repi": 18, "analys": 18, "zero": 18, "sum": 18, "smallest": 18, "branch": 18, "mind": 18, "6x1": 18, "lot": 18, "calcualt": 18, "128": 18, "might": 18, "explicitli": 18, "wide": 18, "solv": 18, "issu": 18, "miss": 18, "under": 18, "exp": 18, "theoret": 18, "\u03b4g": 18, "kcal": 18, "mol": 18, "unknown": 18, "measur": 18, "left": 18, "becaus": 18, "carri": 18, "special": 18, "infer": 18, "dictionari": 18, "methodologi": 18, "openmm_fep": 18, "023": 18, "003": 18, "076": 18}, "objects": {"": [[1, 0, 0, "-", "TIES_MD"]], "TIES_MD": [[1, 0, 0, "-", "TIES"], [1, 0, 0, "-", "alch"], [1, 0, 0, "-", "cli"], [2, 0, 0, "-", "eng_scripts"], [1, 0, 0, "-", "lambdas"], [8, 0, 0, "-", "openmmtools"], [9, 0, 0, "-", "ties_analysis"]], "TIES_MD.TIES": [[1, 1, 1, "", "TIES"], [1, 4, 1, "", "get_box_vectors"], [1, 4, 1, "", "get_header_and_run"], [1, 4, 1, "", "nice_print"], [1, 4, 1, "", "read_config"]], "TIES_MD.TIES.TIES": [[1, 2, 1, "", "box_type"], [1, 3, 1, "", "build_results_dirs"], [1, 2, 1, "", "elec_edges"], [1, 2, 1, "", "engine"], [1, 3, 1, "", "get_options"], [1, 2, 1, "", "global_lambdas"], [1, 3, 1, "", "run"], [1, 3, 1, "", "setup"], [1, 2, 1, "", "split_run"], [1, 2, 1, "", "ster_edges"], [1, 3, 1, "", "update_cfg"], [1, 3, 1, "", "write_analysis_cfg"], [1, 3, 1, "", "write_namd_eq"], [1, 3, 1, "", "write_namd_min"], [1, 3, 1, "", "write_namd_prod"], [1, 3, 1, "", "write_namd_scripts"], [1, 3, 1, "", "write_namd_submissions"], [1, 3, 1, "", "write_openmm_submission"]], "TIES_MD.alch": [[1, 1, 1, "", "AlchSys"], [1, 1, 1, "", "PDB_line"], [1, 1, 1, "", "System_ID"], [1, 4, 1, "", "add_simulation_reporters"], [1, 4, 1, "", "equilibriation"], [1, 4, 1, "", "get_alchemical_atoms"], [1, 4, 1, "", "get_constraints"], [1, 4, 1, "", "minimization"], [1, 4, 1, "", "preproduction"], [1, 4, 1, "", "remove_simulation_reporters"], [1, 4, 1, "", "simulate_system"]], "TIES_MD.alch.AlchSys": [[1, 3, 1, "", "add_consraints"], [1, 3, 1, "", "amend_original_positions"], [1, 3, 1, "", "build_simulation"], [1, 3, 1, "", "debug_force"], [1, 3, 1, "", "get_gradients"], [1, 3, 1, "", "get_intersect_angles"], [1, 3, 1, "", "get_intersect_bonds"], [1, 3, 1, "", "get_intersect_torsions"], [1, 3, 1, "", "rebuild_torsion"], [1, 3, 1, "", "set_context_to_state"], [1, 3, 1, "", "shift_alchemical_positions"], [1, 3, 1, "", "test_sim"]], "TIES_MD.cli": [[1, 4, 1, "", "main"]], "TIES_MD.eng_scripts": [[3, 0, 0, "-", "cfg_scripts"], [4, 0, 0, "-", "namd_sub"], [5, 0, 0, "-", "namd_sub_split"], [6, 0, 0, "-", "openmm_sub"], [7, 0, 0, "-", "openmm_sub_split"]], "TIES_MD.lambdas": [[1, 1, 1, "", "Lambdas"], [1, 4, 1, "", "appear_func"], [1, 4, 1, "", "disappear_func"], [1, 4, 1, "", "get_line"]], "TIES_MD.lambdas.Lambdas": [[1, 3, 1, "", "update_attrs_from_schedule"]], "TIES_MD.openmmtools": [[8, 0, 0, "-", "alchemy"]], "TIES_MD.openmmtools.alchemy": [[8, 5, 1, "", "AlchemicalStateError"], [8, 1, 1, "", "ModifiedAbsoluteAlchemicalFactory"], [8, 1, 1, "", "ModifiedAlchemicalState"]], "TIES_MD.openmmtools.alchemy.ModifiedAlchemicalState": [[8, 3, 1, "", "apply_to_context"], [8, 3, 1, "", "apply_to_system"], [8, 3, 1, "", "check_system_consistency"], [8, 3, 1, "", "from_system"], [8, 3, 1, "", "get_alchemical_variable"], [8, 3, 1, "", "get_function_variable"], [8, 6, 1, "", "lambda_angles"], [8, 6, 1, "", "lambda_bonds"], [8, 6, 1, "", "lambda_electrostatics"], [8, 6, 1, "", "lambda_sterics"], [8, 6, 1, "", "lambda_torsions"], [8, 3, 1, "", "set_alchemical_parameters"], [8, 3, 1, "", "set_alchemical_variable"], [8, 3, 1, "", "set_function_variable"]], "TIES_MD.ties_analysis": [[9, 0, 0, "-", "config"], [10, 0, 0, "-", "engines"], [11, 0, 0, "-", "methods"], [9, 0, 0, "-", "ties_analysis"]], "TIES_MD.ties_analysis.config": [[9, 1, 1, "", "Config"], [9, 4, 1, "", "read_config"]], "TIES_MD.ties_analysis.config.Config": [[9, 3, 1, "", "get_options"]], "TIES_MD.ties_analysis.engines": [[10, 0, 0, "-", "namd"], [10, 0, 0, "-", "openmm"]], "TIES_MD.ties_analysis.engines.namd": [[10, 1, 1, "", "NAMD"], [10, 4, 1, "", "get_iter"], [10, 4, 1, "", "get_replica"], [10, 4, 1, "", "get_window"], [10, 4, 1, "", "read_alch_file"]], "TIES_MD.ties_analysis.engines.namd.NAMD": [[10, 3, 1, "", "collate_data"], [10, 3, 1, "", "run_analysis"]], "TIES_MD.ties_analysis.engines.openmm": [[10, 1, 1, "", "Lambdas"], [10, 1, 1, "", "OpenMM"], [10, 4, 1, "", "get_replica"], [10, 4, 1, "", "get_window"]], "TIES_MD.ties_analysis.engines.openmm.Lambdas": [[10, 3, 1, "", "update_attrs_from_schedule"]], "TIES_MD.ties_analysis.engines.openmm.OpenMM": [[10, 3, 1, "", "collate_data"], [10, 3, 1, "", "run_analysis"]], "TIES_MD.ties_analysis.methods": [[11, 0, 0, "-", "FEP"], [11, 0, 0, "-", "TI"]], "TIES_MD.ties_analysis.methods.FEP": [[11, 1, 1, "", "MBAR_Analysis"]], "TIES_MD.ties_analysis.methods.FEP.MBAR_Analysis": [[11, 3, 1, "", "analysis"], [11, 3, 1, "", "decorrelate_data"], [11, 3, 1, "", "plot_overlap_mat"], [11, 3, 1, "", "replica_analysis"]], "TIES_MD.ties_analysis.methods.TI": [[11, 1, 1, "", "TI_Analysis"], [11, 4, 1, "", "compute_bs_error"], [11, 4, 1, "", "get_lam_diff"]], "TIES_MD.ties_analysis.methods.TI.TI_Analysis": [[11, 3, 1, "", "analysis"], [11, 3, 1, "", "intergrate"], [11, 3, 1, "", "plot_du_by_dl"]], "TIES_MD.ties_analysis.ties_analysis": [[9, 1, 1, "", "Analysis"], [9, 4, 1, "", "main"], [9, 4, 1, "", "nice_print"]], "TIES_MD.ties_analysis.ties_analysis.Analysis": [[9, 3, 1, "", "run"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:property", "3": "py:method", "4": "py:function", "5": "py:exception", "6": "py:attribute"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "property", "Python property"], "3": ["py", "method", "Python method"], "4": ["py", "function", "Python function"], "5": ["py", "exception", "Python exception"], "6": ["py", "attribute", "Python attribute"]}, "titleterms": {"hpc": 0, "submiss": 0, "script": 0, "namd": [0, 10, 16], "openmm": [0, 10, 14, 16], "3": 0, "ties_md": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15], "packag": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "subpackag": [1, 2, 9], "submodul": [1, 8, 9, 10, 11], "ti": [1, 11, 13, 14, 16], "modul": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], "alch": 1, "cli": 1, "lambda": 1, "content": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13], "eng_script": [2, 3, 4, 5, 6, 7], "cfg_script": 3, "namd_sub": 4, "namd_sub_split": 5, "openmm_sub": 6, "openmm_sub_split": 7, "openmmtool": 8, "alchemi": 8, "ties_analysi": [9, 10, 11], "config": 9, "engin": 10, "method": 11, "fep": 11, "bind": 12, "free": 12, "energi": 12, "tutori": [12, 18], "gener": 12, "bfe": 12, "background": 12, "setup": 12, "run": [12, 18], "analysi": [12, 18], "welcom": 13, "md": [13, 14], "document": 13, "code": 13, "instal": 14, "linux": 14, "ppc64le": 14, "parallel": 16, "theori": 17, "outlin": 17, "alchem": 17, "calcul": 17, "pathwai": 17, "get": 18, "start": 18, "input": 18, "command": 18, "line": 18, "simul": 18, "prepar": 18}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file +Search.setIndex({"docnames": ["API", "HPC_submissions", "TIES_MD", "TIES_MD.eng_scripts", "TIES_MD.eng_scripts.cfg_scripts", "TIES_MD.eng_scripts.namd_sub", "TIES_MD.eng_scripts.namd_sub_split", "TIES_MD.eng_scripts.openmm_sub", "TIES_MD.eng_scripts.openmm_sub_split", "TIES_MD.openmmtools", "TIES_MD.ties_analysis", "TIES_MD.ties_analysis.engines", "TIES_MD.ties_analysis.methods", "binding_free_energies", "index", "install", "modules", "parallelization", "theory", "tutorial"], "filenames": ["API.rst", "HPC_submissions.rst", "TIES_MD.rst", "TIES_MD.eng_scripts.rst", "TIES_MD.eng_scripts.cfg_scripts.rst", "TIES_MD.eng_scripts.namd_sub.rst", "TIES_MD.eng_scripts.namd_sub_split.rst", "TIES_MD.eng_scripts.openmm_sub.rst", "TIES_MD.eng_scripts.openmm_sub_split.rst", "TIES_MD.openmmtools.rst", "TIES_MD.ties_analysis.rst", "TIES_MD.ties_analysis.engines.rst", "TIES_MD.ties_analysis.methods.rst", "binding_free_energies.rst", "index.rst", "install.rst", "modules.rst", "parallelization.rst", "theory.rst", "tutorial.rst"], "titles": ["TIES MD API", "HPC Submission scripts", "TIES_MD package", "TIES_MD.eng_scripts package", "TIES_MD.eng_scripts.cfg_scripts package", "TIES_MD.eng_scripts.namd_sub package", "TIES_MD.eng_scripts.namd_sub_split package", "TIES_MD.eng_scripts.openmm_sub package", "TIES_MD.eng_scripts.openmm_sub_split package", "TIES_MD.openmmtools package", "TIES_MD.ties_analysis package", "TIES_MD.ties_analysis.engines package", "TIES_MD.ties_analysis.methods package", "Binding Free Energy Tutorial", "Welcome to the TIES MD documentation.", "Installation", "TIES_MD", "Parallelization", "Theory", "Tutorial"], "terms": {"can": [0, 1, 2, 9, 12, 13, 14, 15, 17, 18, 19], "us": [0, 1, 2, 9, 11, 12, 13, 14, 15, 17, 18, 19], "command": [0, 2, 13, 14, 15, 17], "line": [0, 1, 2, 13, 14, 17], "greater": 0, "autom": 0, "we": [0, 1, 2, 10, 11, 12, 13, 17, 18, 19], "also": [0, 13, 15, 17, 19], "provid": [0, 1, 2, 15, 17, 18, 19], "an": [0, 1, 2, 9, 11, 14, 15, 17, 18, 19], "expos": [0, 1], "some": [0, 1, 2, 13, 15, 17, 18, 19], "option": [0, 1, 2, 9, 10, 11, 13, 17, 18, 19], "mai": [0, 1, 2, 13, 19], "routin": 0, "chang": [0, 1, 2, 11, 13, 15, 18, 19], "dure": [0, 2, 19], "setup": [0, 2, 10, 14, 19], "here": [0, 1, 2, 13, 15, 17, 18, 19], "detail": [0, 2, 13, 18, 19], "all": [0, 1, 2, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19], "what": [0, 1, 2, 11, 12, 13, 17, 18, 19], "should": [0, 2, 12, 15, 17, 18, 19], "pass": [0, 1, 2, 12, 13, 17, 19], "The": [0, 1, 2, 9, 13, 15, 17, 18, 19], "were": [0, 17], "previous": 0, "class": [0, 2, 9, 10, 11, 12, 19], "like": [0, 13, 15, 17, 19], "so": [0, 13, 15, 17, 19], "from": [0, 2, 9, 11, 12, 13, 17, 18, 19], "ties_md": [0, 1, 13, 14, 15, 17, 19], "import": [0, 1, 13], "cwd": [0, 1, 2], "windows_mask": [0, 1, 2, 13, 17, 19], "0": [0, 1, 2, 9, 11, 13, 15, 17, 18, 19], "1": [0, 1, 2, 9, 11, 13, 15, 17, 18, 19], "rep_id": [0, 1, 2, 12, 17, 19], "exp_nam": [0, 1, 2, 17, 19], "sys_solv": [0, 1, 17, 19], "onc": [0, 13], "i": [0, 1, 2, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19], "construct": [0, 2, 19], "cfg": [0, 1, 2, 10, 13, 17, 19], "now": [0, 13, 17], "set": [0, 1, 2, 9, 10, 13, 15, 17, 18, 19], "attribut": [0, 2], "openmm": [0, 2, 9, 10, 13, 14, 19], "unit": [0, 2, 9, 11, 12, 19], "need": [0, 1, 2, 13, 15, 17, 18, 19], "valu": [0, 2, 9, 11, 12, 13, 15, 18, 19], "string": [0, 1, 2, 10, 11, 12, 19], "molecular": [0, 2, 17, 19], "dynam": [0, 2, 17, 19], "engin": [0, 2, 10, 19], "namd2": [0, 1, 2, 17, 19], "14": [0, 1, 2, 19], "namd3": [0, 1, 2, 17, 19], "target": [0, 1, 2, 15, 18, 19], "temperatur": [0, 2, 11, 12, 19], "thermostat": [0, 2, 19], "300": [0, 19], "kelvin": [0, 11, 12, 19], "pressur": [0, 2, 19], "barostat": [0, 2, 19], "atmospher": [0, 19], "how": [0, 1, 2, 17, 18, 19], "much": [0, 2, 19], "product": [0, 1, 2, 19], "sampl": [0, 2, 11, 12, 14, 18, 19], "run": [0, 1, 2, 10, 11, 14, 15, 17], "per": [0, 1, 2, 17, 19], "alchem": [0, 1, 2, 9, 13, 14, 15, 17, 19], "window": [0, 1, 2, 11, 12, 17, 18, 19], "4n": [0, 19], "recommend": [0, 13, 18, 19], "sampling_per_window": [0, 19], "04": 0, "nanosecond": [0, 19], "equilibr": [0, 2, 19], "2n": [0, 19], "equili_per_window": [0, 19], "002": 0, "list": [0, 2, 11, 12, 18, 19], "which": [0, 2, 9, 11, 12, 13, 15, 17, 18, 19], "estim": [0, 19], "method": [0, 2, 10, 11, 13, 14, 17, 18, 19], "fep": [0, 2, 10, 11, 15, 19], "mani": [0, 1, 2, 17, 19], "total": [0, 2, 17, 19], "replica": [0, 1, 2, 11, 12, 13, 17, 19], "each": [0, 1, 2, 11, 12, 13, 17, 18, 19], "ar": [0, 1, 2, 9, 11, 12, 13, 14, 15, 17, 18, 19], "least": [0, 19], "5": [0, 1, 17, 18, 19], "total_rep": [0, 13, 17, 19], "3": [0, 14, 15, 17, 18, 19], "boolean": [0, 2, 12, 19], "split": [0, 2, 19], "separ": [0, 17, 18, 19], "true": [0, 2, 9, 10, 12, 13], "maximum": [0, 17, 19], "parallel": [0, 2, 14, 19], "split_run": [0, 2, 13, 17, 19], "fals": [0, 2, 9, 12], "where": [0, 1, 2, 10, 11, 12, 15, 19], "lambda": [0, 1, 9, 11, 12, 13, 16, 17, 18, 19], "schedul": [0, 2, 11, 12, 13, 18, 19], "electrostat": [0, 2, 18, 19], "potenti": [0, 2, 11, 12, 19], "begin": [0, 2, 18, 19], "stop": [0, 2, 19], "appear": [0, 2, 11, 18, 19], "elec_edg": [0, 2, 18, 19], "lennard_jon": [0, 2, 19], "ster_edg": [0, 2, 18, 19], "global": [0, 2, 9, 19], "control": [0, 2, 17, 18, 19], "paramet": [0, 2, 9, 10, 11, 12, 18, 19], "take": [0, 2, 13, 17, 18, 19], "global_lambda": [0, 2, 17, 18, 19], "00": [0, 1, 11, 15, 17, 19], "05": [0, 1, 17, 18, 19], "2": [0, 1, 11, 15, 17, 18, 19], "4": [0, 1, 15, 17, 18, 19], "6": [0, 1, 13, 15, 17, 18, 19], "7": [0, 1, 15, 17, 18, 19], "8": [0, 1, 15, 17, 18, 19], "9": [0, 1, 17, 18, 19], "95": [0, 1, 17, 18, 19], "name": [0, 1, 2, 9, 11, 13, 15, 19], "pdb": [0, 2, 13, 19], "file": [0, 1, 2, 10, 11, 12, 13, 17, 18, 19], "constraint": [0, 2, 13, 19], "build": [0, 1, 2, 10, 11, 13, 14, 15, 19], "directori": [0, 1, 2, 11, 13, 15, 19], "e": [0, 1, 2, 9, 11, 13, 18, 19], "con": [0, 19], "constraint_fil": [0, 2, 19], "none": [0, 1, 2, 9, 10, 12, 19], "column": [0, 2, 19], "valid": [0, 19], "occup": [0, 2, 19], "beta_factor": [0, 19], "constraint_column": [0, 2, 19], "input": [0, 2, 12, 13, 14, 18], "type": [0, 2, 19], "onli": [0, 1, 17, 19], "amber": [0, 2, 19], "support": [0, 19], "input_typ": [0, 2, 19], "x": [0, 1, 2, 13, 15, 17, 18, 19], "y": [0, 2, 18, 19], "z": [0, 2], "float": [0, 2, 9, 11, 12, 18, 19], "box": [0, 2, 17, 19], "vector": [0, 2, 19], "thi": [0, 1, 2, 9, 11, 12, 13, 14, 15, 17, 18, 19], "simul": [0, 1, 2, 12, 13, 14, 15, 17, 18], "angstrom": [0, 2, 9, 19], "cell_basis_vec1": [0, 2, 19], "34": 0, "55": 0, "cell_basis_vec2": [0, 2, 19], "11": [0, 15], "516722937414105": 0, "32": 0, "574214501232206": 0, "cell_basis_vec3": [0, 2, 19], "16": 0, "287105279373797": 0, "28": 0, "21009840448772": 0, "final": [0, 15], "three": [0, 18, 19], "addit": [0, 13, 17], "don": 0, "t": [0, 1, 2], "A": [0, 1, 2, 9, 13, 15, 18, 19], "header": [0, 1, 2, 13], "submiss": [0, 2, 13, 14, 17, 19], "script": [0, 2, 13, 14, 17, 19], "written": [0, 1, 2, 19], "job": [0, 1, 2], "sub_head": [0, 1, 13], "exampl": [0, 1, 2, 13, 15, 17, 18, 19], "summit": [0, 1, 2, 13, 17], "bsub": [0, 1, 13], "p": [0, 1, 13, 15], "chm155_001": [0, 13], "w": [0, 1, 2, 13], "120": [0, 13], "nnode": [0, 1, 13], "13": [0, 1, 13, 19], "alloc_flag": [0, 1, 13], "gpudefault": [0, 1, 13], "smt1": [0, 1, 13], "j": [0, 1, 13], "ligpair": [0, 1, 13], "o": [0, 1, 13], "oligpair": [0, 13], "eligpair": [0, 13], "prefix": [0, 15, 19], "pre_run_lin": [0, 1, 13], "jsrun": [0, 1, 13, 17], "smpiarg": [0, 1, 13, 17], "off": [0, 1, 13, 15, 17, 19], "n": [0, 1, 13, 15, 17, 19], "c": [0, 1, 13, 15, 17], "g": [0, 1, 2, 13, 17, 18, 19], "b": [0, 1, 13, 15, 17, 18], "pack": [0, 1, 13, 17], "run_lin": [0, 1, 13], "config_fil": [0, 1, 2, 10, 13, 17, 19], "ties_dir": [0, 1, 13, 17], "expr": [0, 13], "node_id": [0, 13], "produc": [0, 15, 19], "look": [0, 11, 12, 15, 17, 19], "bin": [0, 1, 15], "bash": [0, 1], "export": [0, 1, 15], "liganda": [0, 13], "ligandb": [0, 13], "lig": [0, 1, 11, 13], "cd": [0, 1, 13, 15, 19], "10": [0, 1, 15], "12": [0, 11], "do": [0, 1, 2, 11, 12, 13, 15, 17, 18, 19], "done": [0, 1, 17, 19], "wait": [0, 1, 17, 19], "If": [0, 9, 13, 15, 17, 19], "make": [0, 1, 2, 12, 13, 17], "best": [0, 2, 18], "guess": [0, 2], "ideal": 0, "small": [0, 2, 18, 19], "modif": 0, "ani": [0, 2, 11, 13, 15, 17, 19], "tweak": 0, "appli": [0, 19], "get": [0, 1, 2, 11, 13, 14], "work": [0, 1, 2, 15, 17], "futur": 0, "system": [0, 1, 2, 9, 13, 14, 15, 17, 18, 19], "For": [0, 1, 17, 18, 19], "gener": [0, 1, 10, 11, 14, 17, 18, 19], "idea": [0, 13, 17], "see": [0, 2, 13, 14, 17, 19], "hpc": [0, 2, 13, 14, 17, 19], "variou": 1, "ti": [1, 10, 11, 13, 16, 18, 19], "md": [1, 13, 17, 18, 19], "attempt": [1, 15], "automat": [1, 13, 19], "write": [1, 2, 13, 15, 17], "sensibl": 1, "archer": [1, 17], "In": [1, 13, 15, 17, 19], "user": [1, 2, 13, 15, 18, 19], "own": [1, 13, 19], "whichev": 1, "cluster": [1, 13], "thei": [1, 2, 13], "prefer": 1, "To": [1, 13, 15, 17, 18, 19], "aid": 1, "api": [1, 2, 13, 14], "call": [1, 2, 13, 18, 19], "inject": 1, "templat": 1, "base": [1, 2, 9, 10, 11, 12, 14, 19], "sub": [1, 2, 17], "sh": [1, 15, 17], "larg": 1, "100k": 1, "atom": [1, 2, 13, 18, 19], "supermuc": 1, "ng": 1, "sbatch": 1, "out": [1, 2, 13, 19], "err": 1, "d": [1, 2], "node": [1, 2, 17, 19], "130": 1, "task": 1, "48": 1, "requeu": 1, "env": 1, "account": 1, "xxx": 1, "partit": 1, "time": [1, 2, 11, 12, 13, 19], "modul": [1, 15, 16], "load": [1, 15], "slurm_setup": 1, "gcc8": 1, "impi": 1, "nodes_per_namd": [1, 17], "cpus_per_namd": [1, 17], "480": 1, "echo": 1, "point": [1, 2, 11, 12, 13, 19], "your": [1, 15], "project": 1, "hppf": 1, "pn98ve": 1, "di67rov": 1, "test_ti": 1, "studi": [1, 19], "prot": [1, 11], "l2": 1, "l1": 1, "com": [1, 13, 15, 19], "conf": [1, 2, 17, 19], "stage": [1, 2, 17, 19], "srun": [1, 17, 19], "tclmain": [1, 17, 19], "sleep": [1, 17, 19], "first": [1, 18, 19], "20": [1, 14, 18, 19], "could": [1, 15, 17, 19], "adapt": 1, "smaller": [1, 17], "10k": 1, "follow": [1, 13, 15, 17, 19], "45": 1, "micro": 1, "scale": [1, 17, 18], "up": [1, 10, 12, 13, 17, 19], "test": [1, 2, 9, 15, 17, 19], "otest": 1, "etest": 1, "ls_subcwd": 1, "path": [1, 2, 10, 11, 12, 13, 15, 18], "gpf": 1, "alpin": 1, "scratch": 1, "adw62": [1, 15], "chm155": 1, "ties_test": 1, "miniconda": [1, 15], "ethan": [1, 19], "zero_sum": [1, 19], "leg1": 1, "cuda": [1, 2, 15, 17], "168": 1, "date": [1, 19], "thetagpu": [1, 17], "cobalt": 1, "100": 1, "q": 1, "full": 1, "mpirun": 1, "lu": 1, "theta": 1, "fs0": 1, "softwar": [1, 14], "openmpi": 1, "compbioaffin": 1, "awad": 1, "namd_3": 1, "0alpha9_linux": 1, "x86_64": [1, 15], "multicor": 1, "node1": 1, "sed": 1, "1q": 1, "cobalt_nodefil": 1, "node2": 1, "2q": 1, "many_rep": 1, "mcl1": 1, "l18": 1, "l39": 1, "host": 1, "cpu": [1, 2, 15, 19], "bind": [1, 2, 14, 18, 19], "core": [1, 19], "np": [1, 2, 11, 12], "devic": [1, 2, 17, 19], "30": 1, "40": 1, "50": [1, 19], "60": 1, "70": 1, "80": [1, 15], "90": 1, "addition": 1, "gpu": [1, 2, 15, 17, 19], "idl": 1, "real": 1, "world": 1, "applic": [1, 18, 19], "current": [1, 2, 19], "creat": [1, 2, 17, 18, 19], "python": [1, 15, 17, 19], "veri": 1, "help": [1, 2], "would": [1, 17, 19], "allow": [1, 2, 11, 15, 17, 19], "u": [1, 2, 13, 17], "__name__": 1, "__main__": 1, "acc_nam": 1, "want": [1, 2, 11, 12, 13, 15, 17], "thermodynam": [1, 12, 13, 14, 15, 18], "leg": [1, 2, 11, 13, 19], "have": [1, 9, 13, 15, 17, 19], "differ": [1, 2, 9, 11, 12, 13, 15, 17, 19], "wall": 1, "binari": 1, "namd3_ex": 1, "getcwd": [1, 13], "give": [1, 13], "wall_tim": 1, "els": [1, 12], "open": [1, 14], "join": [1, 13], "thetagpu_": 1, "format": [1, 2, 10, 11, 19], "f": 1, "instal": [1, 14, 19], "locat": [1, 2, 11, 19], "read": [1, 2, 9, 10, 11, 12, 13, 15, 19], "rang": [1, 2, 17], "move": [1, 19], "iter": [1, 2, 11, 13], "over": [1, 2, 11, 13, 17, 19], "minim": [1, 2, 19], "nvt": [1, 2, 19], "eq": 1, "npt": [1, 2, 19], "run0": 1, "run1": 1, "run2": 1, "run3": 1, "count": 1, "lam": [1, 2], "rep": [1, 2, 11, 12], "2f": [1, 2], "number": [1, 2, 11, 12, 19], "next": [1, 13], "when": [1, 2, 13, 17, 18, 19], "fill": [1, 19], "sure": 1, "between": [1, 2, 12, 13, 15, 17, 18, 19], "sim": [1, 2], "finish": [1, 2, 13, 19], "eng_script": [2, 16], "cfg_script": [2, 3], "namd_sub": [2, 3], "namd_sub_split": [2, 3], "openmm_sub": [2, 3], "openmm_sub_split": [2, 3], "openmmtool": [2, 15, 16], "alchemi": [2, 16], "ties_analysi": [2, 16, 19], "namd": [2, 10, 14, 18, 19], "config": [2, 13, 16, 17, 18, 19], "complex": [2, 13, 19], "run_typ": [2, 13, 19], "period": 2, "platform": [2, 15], "kwarg": [2, 9], "object": [2, 9, 10, 11, 12], "protocol": [2, 13, 14, 15], "initi": [2, 13], "variabl": [2, 9], "function": [2, 9, 10, 11, 12, 19], "start": [2, 14, 15, 17], "str": [2, 9, 10, 11], "experi": [2, 13, 19], "prmtop": [2, 19], "flag": 2, "sai": 2, "int": [2, 11, 12, 19], "id": [2, 11, 15], "denot": [2, 19], "execut": [2, 13, 17, 19], "contain": [2, 10, 11, 12, 13, 18, 19], "end": [2, 12, 17, 18], "determin": [2, 15, 17, 18, 19], "custom": [2, 15], "sting": 2, "opencl": [2, 15], "dict": [2, 10, 12], "build_results_dir": 2, "folder": [2, 19], "helper": [2, 11], "output": [2, 11, 12, 15, 19], "param": [2, 10], "return": [2, 9, 10, 11, 12, 15], "properti": 2, "1st": 2, "basi": 2, "cell": [2, 17], "compon": 2, "2nd": 2, "3rd": 2, "go": 2, "get_opt": [2, 10, 13], "print": [2, 10, 13], "tiesmd": [2, 13], "subset": 2, "bool": [2, 11, 12], "update_cfg": 2, "after": [2, 19], "made": [2, 19], "write_analysis_cfg": 2, "configur": [2, 13, 15, 17, 19], "analysi": [2, 10, 11, 12, 14, 15], "write_namd_eq": 2, "eq1": 2, "eq2": 2, "write_namd_min": 2, "eq0": 2, "write_namd_prod": 2, "sim1": 2, "write_namd_script": 2, "write_namd_submiss": 2, "archer2": 2, "write_openmm_submiss": 2, "get_box_vector": 2, "box_typ": 2, "comput": [2, 12, 13, 15, 19], "know": 2, "edg": 2, "length": 2, "defin": [2, 9, 19], "bix": 2, "vec3": 2, "get_header_and_run": 2, "namd_vers": [2, 11], "num_window": 2, "prep": [2, 13, 19], "inspect": [2, 11, 13], "version": [2, 9, 11, 15], "one": [2, 11, 12, 13, 17, 18, 19], "nice_print": [2, 10], "pad": [2, 10], "read_config": [2, 10], "disk": 2, "arg": [2, 9], "alchsi": 2, "basis_vector": 2, "absolut": 2, "debug": 2, "free": [2, 12, 14, 17, 18, 19], "energi": [2, 12, 14, 17, 18, 19], "calcul": [2, 11, 12, 13, 14, 15, 17, 19], "beta": 2, "mbar": [2, 12], "explicit": 2, "pme": 2, "cutoffnonperiod": 2, "remov": [2, 11, 12], "forc": [2, 15], "nonbond": 2, "note": [2, 13, 17, 19], "gromac": 2, "add_consraint": 2, "add": [2, 19], "constrain": [2, 19], "boundari": 2, "condit": 2, "amend_original_posit": 2, "posit": [2, 19], "updat": [2, 11, 15], "store": [2, 10], "clash": 2, "found": [2, 13, 18, 19], "initialis": 2, "build_simul": 2, "device_id": 2, "index": [2, 11, 19], "integr": [2, 12, 14, 15, 18], "debug_forc": 2, "while": 2, "maintain": 2, "ensembl": [2, 17, 19], "modifi": [2, 9, 13, 19], "get_gradi": 2, "val": 2, "context": [2, 9], "h": 2, "analitic_ster": 2, "gradient": [2, 11, 12, 19], "r": 2, "eg": 2, "lambda_electrostatics_appear": 2, "finit": [2, 18], "analyt": 2, "steric": 2, "experiment": 2, "numer": [2, 12, 17], "get_intersect_angl": 2, "appear_idx": 2, "disappear_idx": 2, "idx": 2, "angl": 2, "straddl": 2, "region": 2, "dissapear": 2, "get_intersect_bond": 2, "bond": 2, "get_intersect_tors": 2, "torsion": 2, "disappear": [2, 11, 18, 19], "rebuild_tors": 2, "intersect_tors": 2, "rebuild": 2, "without": [2, 17, 19], "non": [2, 18, 19], "physic": [2, 14, 18, 19], "fulli": [2, 18], "result": [2, 11, 12, 13, 15, 17, 19], "nan": 2, "eval": 2, "refer": [2, 15, 17, 18, 19], "set_context_to_st": 2, "param_v": 2, "shift_alchemical_posit": 2, "pertub": 2, "resolv": 2, "caus": [2, 13], "overlap": [2, 12], "test_sim": 2, "find": 2, "undefin": [2, 9], "pdb_line": 2, "let": 2, "address": 2, "readabl": 2, "system_id": 2, "inform": [2, 11, 12, 14, 15, 17, 18, 19], "repeat": [2, 17], "add_simulation_report": 2, "total_step": 2, "save": [2, 12, 19], "report": 2, "step": [2, 13, 15, 18], "dcd": 2, "equilibri": 2, "save_fil": 2, "perform": [2, 11, 12, 13, 15, 19], "state": [2, 9, 12, 18, 19], "indic": 2, "whether": 2, "ha": [2, 9, 15, 17, 19], "get_alchemical_atom": 2, "pdb_file": 2, "pull": 2, "temp": [2, 11, 12, 15], "factor": [2, 19], "logic": 2, "get_constraint": 2, "fuction": 2, "row": 2, "data": [2, 11, 12], "strength": 2, "relax": 2, "preproduct": [2, 19], "equili_step": 2, "equili_state_fil": 2, "meta": 2, "wrap": 2, "togeth": 2, "equilib": 2, "remove_simulation_report": 2, "strip": 2, "simulate_system": 2, "alch_si": 2, "mask": [2, 17], "niter": 2, "steps_per_it": 2, "1000": 2, "main": [2, 10, 19], "Will": 2, "assign": 2, "worker": 2, "pre": [2, 19], "collect": [2, 11, 14], "requir": [2, 9, 19], "grad": [2, 12], "argv": 2, "entri": [2, 12, 19], "program": [2, 13, 18, 19], "argument": [2, 13], "global_lamb": 2, "fraction": 2, "electr": 2, "kei": [2, 19], "lambda_": 2, "_": [2, 9], "termin": [2, 10, 13, 15], "update_attrs_from_schedul": [2, 11], "self": [2, 11, 12], "lambda_sterics_appear": [2, 11], "appear_func": 2, "evalu": 2, "two": [2, 13, 14, 17, 18, 19], "disappear_func": 2, "get_lin": 2, "global_lam": 2, "numpi": [2, 11, 12], "arrai": [2, 11, 12], "interpol": 2, "across": [2, 17], "except": 9, "alchemicalstateerror": 9, "globalparametererror": 9, "error": [9, 12, 15, 17], "rais": 9, "alchemicalst": 9, "modifiedabsolutealchemicalfactori": 9, "consistent_except": 9, "switch_width": 9, "quantiti": 9, "alchemical_pme_treat": 9, "exact": [9, 19], "alchemical_rf_treat": 9, "switch": 9, "disable_alchemical_dispersion_correct": 9, "split_alchemical_forc": 9, "absolutealchemicalfactori": 9, "super": 9, "modifiedalchemicalst": 9, "parameters_name_suffix": 9, "globalparameterst": 9, "apply_to_context": 9, "put": [9, 13], "doe": [9, 13, 15, 19], "apply_to_system": 9, "check_system_consist": 9, "check": 9, "It": [9, 19], "consist": 9, "classmethod": 9, "from_system": 9, "constructor": 9, "specifi": [9, 11, 12, 17, 19], "search": 9, "parameter_nam": 9, "repres": 9, "same": [9, 13, 17, 19], "get_alchemical_vari": 9, "variable_nam": 9, "warn": 9, "deprec": 9, "get_function_vari": 9, "instead": [9, 15], "variable_valu": 9, "enter": 9, "mathemat": 9, "express": 9, "alchemicalfunct": 9, "enslav": 9, "arbitrari": 9, "lambda_angl": 9, "interv": 9, "standard": [9, 12, 19], "lambda_bond": 9, "lambda_electrostat": 9, "lambda_ster": 9, "lambda_tors": 9, "set_alchemical_paramet": 9, "new_valu": 9, "given": [9, 19], "those": 9, "being": [9, 17, 18, 19], "remain": 9, "new": [9, 11, 13], "set_alchemical_vari": 9, "set_function_vari": 9, "analysis_cfg": 10, "hold": [10, 11], "chose": 10, "make_exp": 10, "verbos": 10, "win_mask": 11, "distribut": [11, 12], "rep_convg": [11, 12], "sampling_convg": [11, 12], "vdw_a": 11, "vdw_d": 11, "ele_a": 11, "ele_d": 11, "dir": 11, "writen": [11, 19], "dg": [11, 12], "individu": [11, 12, 13, 17], "intermedi": [11, 18], "you": [11, 13, 15, 19], "wish": [11, 13, 15, 19], "converg": 11, "amount": 11, "describ": 11, "vdw": 11, "elec": 11, "alch": [11, 16], "collate_data": 11, "data_root": 11, "protein": [11, 13, 14, 18, 19], "ligand": [11, 13, 14, 18, 19], "thermo": 11, "run_analysi": 11, "implement": [11, 14, 17, 18], "stdev": 11, "get_it": 11, "file_loc": 11, "get_replica": 11, "sort": 11, "specif": [11, 13, 14, 18, 19], "rep0": 11, "get_window": 11, "lambda_0": 11, "read_alch_fil": 11, "file_path": 11, "namd_ver": 11, "ver": 11, "old": 11, "about": [11, 12, 19], "easili": 11, "queryabl": 11, "etc": 11, "fep_combine_rep": 11, "openmm_ti": [11, 19], "combin": [11, 17], "seri": [11, 12], "concaten": 11, "mbar_analysi": 12, "analysis_dir": 12, "decorrel": 12, "averag": 12, "befor": 12, "process": 12, "u_kln": 12, "n_k": 12, "mask_window": 12, "matrix": 12, "associ": [12, 13, 18, 19], "decorrelate_data": 12, "decorrol": 12, "turpl": 12, "plot_overlap_mat": 12, "mat": 12, "plot": [12, 18], "replica_analysi": 12, "consid": [12, 17, 18, 19], "trajectori": 12, "bootstrap": 12, "sem": [12, 13], "ti_analysi": 12, "deviat": [12, 19], "intergr": 12, "lambda_paramet": 12, "varianc": 12, "plot_du_by_dl": 12, "du": 12, "dlam": 12, "v": [12, 15], "includ": [12, 13, 18], "ci": 12, "compute_bs_error": 12, "var": 12, "boot": 12, "strap": 12, "get_lam_diff": 12, "lambda_arrai": 12, "adjac": 12, "discuss": [13, 17], "section": [13, 14, 15, 19], "outlin": [13, 14, 17, 19], "shorten": 13, "respect": [13, 19], "transform": [13, 15, 18, 19], "anoth": [13, 18], "water": 13, "insid": 13, "\u03b4": 13, "g_": 13, "mutation1": 13, "mutation2": 13, "equal": [13, 17, 19], "\u03b4\u03b4": 13, "relat": 13, "shown": [13, 18, 19], "figur": [13, 18], "more": [13, 14, 17, 18, 19], "public": [13, 18], "cournia": 13, "et": 13, "al": 13, "whole": 13, "cycl": 13, "must": [13, 15, 19], "hand": 13, "ties20": [13, 18, 19], "principl": 13, "howev": [13, 17], "normal": 13, "avoid": 13, "rapid": 13, "crystal": 13, "structur": [13, 19], "conform": 13, "earli": 13, "close": 13, "contact": 13, "expens": 13, "computation": 13, "design": 13, "both": [13, 19], "parameter": 13, "hybrid": [13, 18], "browser": 13, "altern": [13, 17, 19], "pair": 13, "ligand_ff_nam": 13, "gaff2": 13, "ligand_net_charg": 13, "md_engin": 13, "mol2": 13, "antechamber_prepare_mol2": 13, "ensur": [13, 15, 19], "make_atom_names_uniqu": 13, "turn": [13, 19], "superimpos": 13, "sinc": 13, "declar": 13, "prepare_input": 13, "receptor": 13, "protein_ff": 13, "leaprc": 13, "ff14sb": 13, "re": 13, "prepar": [13, 14], "built": [13, 14, 18, 19], "order": [13, 15], "via": [13, 19], "At": 13, "map": 13, "thermodynamic_leg": [13, 19], "wa": [13, 15, 19], "seen": 13, "good": [13, 19], "default": [13, 15, 19], "quickli": 13, "thermo_leg": 13, "element": 13, "part": 13, "abov": [13, 15, 17, 19], "intern": 13, "These": [13, 15, 17, 18, 19], "last": 13, "ties_ana": [13, 19], "Then": [13, 15], "our": [13, 14, 17, 19], "minu": 13, "care": 13, "compar": 13, "depend": [13, 19], "again": 13, "dat": [13, 19], "packag": [14, 15, 16, 19], "stand": 14, "enhanc": [14, 18], "accur": 14, "reproduc": 14, "rel": [14, 18], "pleas": [14, 19], "theori": 14, "within": [14, 15, 19], "avail": [14, 15, 17, 19], "onlin": [14, 19], "sourc": [14, 19], "explain": 14, "websit": 14, "builder": 14, "linux": 14, "ppc64le": 14, "tutori": [14, 15], "bfe": 14, "background": 14, "pathwai": [14, 19], "github": [14, 15, 17, 19], "conda": 15, "manag": 15, "assum": 15, "wget": 15, "http": [15, 19], "repo": 15, "continuum": 15, "io": 15, "miniconda3": 15, "latest": 15, "chmod": 15, "match": 15, "machin": 15, "permiss": 15, "page": [15, 17, 19], "With": [15, 19], "forg": 15, "verifi": 15, "m": 15, "testinstal": 15, "older": 15, "simtk": 15, "instanc": [15, 17, 19], "wrong": 15, "cudatoolkit": 15, "happen": 15, "git": [15, 19], "revis": 15, "130124a3f9277b054ec40927360a6ad20c8f5fa6": 15, "There": [15, 19], "successfulli": 15, "cuda_error_unsupported_ptx_vers": 15, "222": 15, "median": 15, "30571e": 15, "06": 15, "76359e": 15, "05194e": 15, "07": 15, "toler": 15, "critic": [15, 17], "correct": [15, 19], "replac": 15, "particular": [15, 19], "One": 15, "appropri": 15, "nvidia": 15, "smi": 15, "yield": 15, "460": 15, "driver": 15, "persist": 15, "bu": 15, "disp": 15, "volatil": 15, "uncorr": 15, "ecc": 15, "fan": 15, "perf": 15, "pwr": 15, "usag": 15, "cap": 15, "memori": 15, "util": 15, "mig": 15, "quadro": 15, "m1000m": 15, "00000000": 15, "01": 15, "50c": 15, "p5": 15, "435mib": 15, "2002mib": 15, "top": 15, "right": 15, "my": [15, 19], "correctli": 15, "download": [15, 19], "clone": [15, 19], "ucl": [15, 19], "cc": [15, 19], "pymabr": 15, "therefor": [15, 19], "until": 15, "around": 15, "copi": 15, "elsewher": 15, "skip": 15, "And": 15, "mkdir": 15, "openmmtools_instal": 15, "powerpc": 15, "pip": 15, "featur": 15, "tree": 15, "subpackag": 16, "content": 16, "submodul": [16, 19], "cli": 16, "domain": 17, "kind": 17, "spatial": 17, "decompos": 17, "difficult": 17, "achiev": [17, 19], "than": 17, "ones": 17, "focu": 17, "aleator": 17, "inher": 17, "chaotic": 17, "commun": 17, "other": 17, "embarrassingli": 17, "problem": [17, 19], "easi": 17, "likewis": 17, "remaind": 17, "explor": 17, "th": 17, "spit": 17, "tell": [17, 19], "further": 17, "inclus": 17, "exclus": 17, "sing": 17, "clariti": 17, "multipl": [17, 19], "resourc": 17, "alloc": 17, "handl": 17, "case": [17, 19], "messag": 17, "interfac": 17, "mpi": 17, "vari": [17, 19], "univers": 17, "solut": [17, 19], "independ": [17, 19], "someth": [17, 19], "notic": [17, 19], "loop": [17, 19], "65": 17, "anecdot": 17, "less": 17, "crash": 17, "135": 17, "extens": 17, "provis": 17, "hardwar": 17, "exhaust": 17, "suggest": [17, 19], "consult": [17, 18, 19], "document": [17, 18, 19], "comprehens": 17, "molecul": [18, 19], "coval": 18, "dual": 18, "topologi": [18, 19], "approach": 18, "complementari": 18, "involv": [18, 19], "chemic": 18, "moieti": 18, "destroi": 18, "stratifi": 18, "along": 18, "chosen": 18, "keep": 18, "track": 18, "\u03bb": [18, 19], "As": [18, 19], "tune": 18, "wai": 18, "comma": [18, 19], "exactli": [18, 19], "lennard": 18, "jone": 18, "lj": 18, "interact": 18, "second": [18, 19], "graphic": 18, "guid": 18, "expect": 19, "code": 19, "navig": 19, "essenti": 19, "place": 19, "understand": 19, "renam": 19, "anyth": 19, "fix": 19, "novel": 19, "desir": 19, "servic": 19, "local": 19, "later": 19, "occasion": 19, "alongsid": 19, "space": 19, "na": 19, "manual": 19, "simpl": 19, "imag": 19, "show": 19, "alwai": 19, "popul": 19, "size": 19, "typic": 19, "possibli": 19, "drug": 19, "solvent": 19, "why": 19, "present": 19, "almost": 19, "readi": 19, "invok": 19, "just": 19, "taken": 19, "either": 19, "halt": 19, "advanc": 19, "below": 19, "silent": 19, "ignor": 19, "integ": 19, "request": 19, "uniqu": 19, "By": 19, "intens": 19, "pc": 19, "head": 19, "lambda_x": 19, "repi": 19, "analys": 19, "zero": 19, "sum": 19, "smallest": 19, "branch": 19, "mind": 19, "6x1": 19, "lot": 19, "128": 19, "might": 19, "explicitli": 19, "wide": 19, "solv": 19, "issu": 19, "submit": 19, "miss": 19, "under": 19, "exp": 19, "theoret": 19, "\u03b4g": 19, "kcal": 19, "mol": 19, "unknown": 19, "measur": 19, "left": 19, "becaus": 19, "carri": 19, "special": 19, "infer": 19, "dictionari": 19, "methodologi": 19, "openmm_fep": 19, "023": 19, "003": 19, "076": 19}, "objects": {"": [[2, 0, 0, "-", "TIES_MD"]], "TIES_MD": [[2, 0, 0, "-", "TIES"], [2, 0, 0, "-", "alch"], [2, 0, 0, "-", "cli"], [3, 0, 0, "-", "eng_scripts"], [2, 0, 0, "-", "lambdas"], [9, 0, 0, "-", "openmmtools"], [10, 0, 0, "-", "ties_analysis"]], "TIES_MD.TIES": [[2, 1, 1, "", "TIES"], [2, 4, 1, "", "get_box_vectors"], [2, 4, 1, "", "get_header_and_run"], [2, 4, 1, "", "nice_print"], [2, 4, 1, "", "read_config"]], "TIES_MD.TIES.TIES": [[2, 2, 1, "", "build_results_dirs"], [2, 3, 1, "", "cell_basis_vec1"], [2, 3, 1, "", "cell_basis_vec2"], [2, 3, 1, "", "cell_basis_vec3"], [2, 3, 1, "", "elec_edges"], [2, 3, 1, "", "engine"], [2, 2, 1, "", "get_options"], [2, 3, 1, "", "global_lambdas"], [2, 2, 1, "", "run"], [2, 2, 1, "", "setup"], [2, 3, 1, "", "split_run"], [2, 3, 1, "", "ster_edges"], [2, 2, 1, "", "update_cfg"], [2, 2, 1, "", "write_analysis_cfg"], [2, 2, 1, "", "write_namd_eq"], [2, 2, 1, "", "write_namd_min"], [2, 2, 1, "", "write_namd_prod"], [2, 2, 1, "", "write_namd_scripts"], [2, 2, 1, "", "write_namd_submissions"], [2, 2, 1, "", "write_openmm_submission"]], "TIES_MD.alch": [[2, 1, 1, "", "AlchSys"], [2, 1, 1, "", "PDB_line"], [2, 1, 1, "", "System_ID"], [2, 4, 1, "", "add_simulation_reporters"], [2, 4, 1, "", "equilibriation"], [2, 4, 1, "", "get_alchemical_atoms"], [2, 4, 1, "", "get_constraints"], [2, 4, 1, "", "minimization"], [2, 4, 1, "", "preproduction"], [2, 4, 1, "", "remove_simulation_reporters"], [2, 4, 1, "", "simulate_system"]], "TIES_MD.alch.AlchSys": [[2, 2, 1, "", "add_consraints"], [2, 2, 1, "", "amend_original_positions"], [2, 2, 1, "", "build_simulation"], [2, 2, 1, "", "debug_force"], [2, 2, 1, "", "get_gradients"], [2, 2, 1, "", "get_intersect_angles"], [2, 2, 1, "", "get_intersect_bonds"], [2, 2, 1, "", "get_intersect_torsions"], [2, 2, 1, "", "rebuild_torsion"], [2, 2, 1, "", "set_context_to_state"], [2, 2, 1, "", "shift_alchemical_positions"], [2, 2, 1, "", "test_sim"]], "TIES_MD.cli": [[2, 4, 1, "", "main"]], "TIES_MD.eng_scripts": [[4, 0, 0, "-", "cfg_scripts"], [5, 0, 0, "-", "namd_sub"], [6, 0, 0, "-", "namd_sub_split"], [7, 0, 0, "-", "openmm_sub"], [8, 0, 0, "-", "openmm_sub_split"]], "TIES_MD.lambdas": [[2, 1, 1, "", "Lambdas"], [2, 4, 1, "", "appear_func"], [2, 4, 1, "", "disappear_func"], [2, 4, 1, "", "get_line"]], "TIES_MD.lambdas.Lambdas": [[2, 2, 1, "", "update_attrs_from_schedule"]], "TIES_MD.openmmtools": [[9, 0, 0, "-", "alchemy"]], "TIES_MD.openmmtools.alchemy": [[9, 5, 1, "", "AlchemicalStateError"], [9, 1, 1, "", "ModifiedAbsoluteAlchemicalFactory"], [9, 1, 1, "", "ModifiedAlchemicalState"]], "TIES_MD.openmmtools.alchemy.ModifiedAlchemicalState": [[9, 2, 1, "", "apply_to_context"], [9, 2, 1, "", "apply_to_system"], [9, 2, 1, "", "check_system_consistency"], [9, 2, 1, "", "from_system"], [9, 2, 1, "", "get_alchemical_variable"], [9, 2, 1, "", "get_function_variable"], [9, 6, 1, "", "lambda_angles"], [9, 6, 1, "", "lambda_bonds"], [9, 6, 1, "", "lambda_electrostatics"], [9, 6, 1, "", "lambda_sterics"], [9, 6, 1, "", "lambda_torsions"], [9, 2, 1, "", "set_alchemical_parameters"], [9, 2, 1, "", "set_alchemical_variable"], [9, 2, 1, "", "set_function_variable"]], "TIES_MD.ties_analysis": [[10, 0, 0, "-", "config"], [11, 0, 0, "-", "engines"], [12, 0, 0, "-", "methods"], [10, 0, 0, "-", "ties_analysis"]], "TIES_MD.ties_analysis.config": [[10, 1, 1, "", "Config"], [10, 4, 1, "", "read_config"]], "TIES_MD.ties_analysis.config.Config": [[10, 2, 1, "", "get_options"]], "TIES_MD.ties_analysis.engines": [[11, 0, 0, "-", "namd"], [11, 0, 0, "-", "openmm"]], "TIES_MD.ties_analysis.engines.namd": [[11, 1, 1, "", "NAMD"], [11, 4, 1, "", "get_iter"], [11, 4, 1, "", "get_replica"], [11, 4, 1, "", "get_window"], [11, 4, 1, "", "read_alch_file"]], "TIES_MD.ties_analysis.engines.namd.NAMD": [[11, 2, 1, "", "collate_data"], [11, 2, 1, "", "run_analysis"]], "TIES_MD.ties_analysis.engines.openmm": [[11, 1, 1, "", "Lambdas"], [11, 1, 1, "", "OpenMM"], [11, 4, 1, "", "get_replica"], [11, 4, 1, "", "get_window"]], "TIES_MD.ties_analysis.engines.openmm.Lambdas": [[11, 2, 1, "", "update_attrs_from_schedule"]], "TIES_MD.ties_analysis.engines.openmm.OpenMM": [[11, 2, 1, "", "collate_data"], [11, 2, 1, "", "run_analysis"]], "TIES_MD.ties_analysis.methods": [[12, 0, 0, "-", "FEP"], [12, 0, 0, "-", "TI"]], "TIES_MD.ties_analysis.methods.FEP": [[12, 1, 1, "", "MBAR_Analysis"]], "TIES_MD.ties_analysis.methods.FEP.MBAR_Analysis": [[12, 2, 1, "", "analysis"], [12, 2, 1, "", "decorrelate_data"], [12, 2, 1, "", "plot_overlap_mat"], [12, 2, 1, "", "replica_analysis"]], "TIES_MD.ties_analysis.methods.TI": [[12, 1, 1, "", "TI_Analysis"], [12, 4, 1, "", "compute_bs_error"], [12, 4, 1, "", "get_lam_diff"]], "TIES_MD.ties_analysis.methods.TI.TI_Analysis": [[12, 2, 1, "", "analysis"], [12, 2, 1, "", "intergrate"], [12, 2, 1, "", "plot_du_by_dl"]], "TIES_MD.ties_analysis.ties_analysis": [[10, 1, 1, "", "Analysis"], [10, 4, 1, "", "main"], [10, 4, 1, "", "make_exp"], [10, 4, 1, "", "nice_print"]], "TIES_MD.ties_analysis.ties_analysis.Analysis": [[10, 2, 1, "", "run"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:property", "4": "py:function", "5": "py:exception", "6": "py:attribute"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "property", "Python property"], "4": ["py", "function", "Python function"], "5": ["py", "exception", "Python exception"], "6": ["py", "attribute", "Python attribute"]}, "titleterms": {"ti": [0, 2, 12, 14, 15, 17], "md": [0, 14, 15], "api": 0, "hpc": 1, "submiss": 1, "script": 1, "namd": [1, 11, 17], "openmm": [1, 11, 15, 17], "3": 1, "ties_md": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 16], "packag": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "subpackag": [2, 3, 10], "submodul": [2, 9, 10, 11, 12], "modul": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "alch": 2, "cli": 2, "lambda": 2, "content": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14], "eng_script": [3, 4, 5, 6, 7, 8], "cfg_script": 4, "namd_sub": 5, "namd_sub_split": 6, "openmm_sub": 7, "openmm_sub_split": 8, "openmmtool": 9, "alchemi": 9, "ties_analysi": [10, 11, 12], "config": 10, "engin": 11, "method": 12, "fep": 12, "bind": 13, "free": 13, "energi": 13, "tutori": [13, 19], "gener": 13, "bfe": 13, "background": 13, "setup": 13, "run": [13, 19], "analysi": [13, 19], "welcom": 14, "document": 14, "code": 14, "instal": 15, "linux": 15, "ppc64le": 15, "parallel": 17, "theori": 18, "outlin": 18, "alchem": 18, "calcul": 18, "pathwai": 18, "get": 19, "start": 19, "input": 19, "command": 19, "line": 19, "simul": 19, "prepar": 19}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file diff --git a/docs/theory.html b/docs/theory.html index c72e5d4..2a5db01 100644 --- a/docs/theory.html +++ b/docs/theory.html @@ -42,6 +42,7 @@ +
                • TIES MD API
                • Binding Free Energy Tutorial
                • Parallelization
                • HPC Submission scripts
                • @@ -88,7 +89,7 @@

                  Tutorial

                  Getting started

                  -

                  TIES MD is a package which is intended to be used on the command line and submitted to a HPC system. In this document +

                  TIES MD is a package for the preparation, running and analysis of binding free energy calculations. In this document we will outline what commands should be run to calculate binding free energies. To start with any free energy calculations we must first outline what are the expected input files to the TIES MD program.

                  In this tutorial we will refer to example systems which can be found in the @@ -96,21 +97,23 @@

                  Getting started
                  git clone https://github.com/UCL-CCS/TIES_MD.git
                   

              -

              and navigating to TIES_MD/TIES_MD/examples/

              +

              and found by navigating to TIES_MD/TIES_MD/examples/

              Input

              TIES MD expects a number of input files, these are two essential files, e.g. complex.pdb and complex.prmtop. These files contain information about the position, topology and parameters for the system. Currently we only support -the AMBER based format prmtop but provide a utility to build them online. complex.pdb also -contains the alchemical indexes denoting which atoms will appear and disappear during the simulation. There is also -an optional input file, constraints.pdb, and this contains indexes denoting which atoms, if any, are constrained -during the pre-production simulation. This input should all be placed in a directory named build located -where the user wishes to run the simulation. Examples of these files can be found here. -Please use a directory structure like study/system/ligand/thermodynamic_leg/build this will allow the analysis scripts to +the AMBER based format prmtop. complex.pdb also contains the alchemical indexes denoting which atoms will +appear and disappear during the simulation. There is also an optional input file, constraints.pdb, and this +contains indexes denoting which atoms, if any, are constrained during the pre-production simulation. This input should +all be placed in a directory named build located where the user wishes to run the simulation. Examples of these files +can be found here.

              +

              Please use a directory structure like study/system/ligand/thermodynamic_leg/build this will allow the analysis scripts to understand the structure and perform analysis automatically. study, system, ligand and thermodynamic_leg can be renamed to anything but the name of the build directory is fixed. If input for novel ligand transformations is desired the -TIES20 program can be used to generate all required inputs.

              +TIES20 program can be used to generate all required inputs. TIES 20 can be +used via our online service or locally and details of how to use this will be provided +later in these documents.

              The only non standard input to TIES MD is a configuration file (TIES.cfg) which specifies options which the user my wish to occasionally change. This file must be placed alongside the build directory. Here we provide an example of such a file:

              -

              total_reps and reps_per_exec are options which can be used to achieve simple parallelism of the simulations. +

              total_reps and split_run are options which can be used to achieve simple parallelism of the simulations. For example if you wished to run a total of 5 simulations on 5 GPUs in parallel one could use the settings -total_reps = 5 and reps_per_exec = 1. See the Parallelization section for more details of how to +total_reps = 5 and split_run = 1. See the Parallelization section for more details of how to achieve this.

              The following image shows TIES_MD applied to one alchemical transformation.

              Alternative text @@ -186,10 +183,9 @@

              Input energy functions of the system and for more information these settings please see the Alchemical Pathways section.

              Note the option constraint_column which determines if the constraint indexes will be read from the temperature factor or occupancy column of the constraints PDB. The alchemical indexes are always be read from the temperature factor column -in the main PDB complex.pdb. The edge_length option can be found in the leap.log file created during system -preparation preformed by the users or TIES20. TIES20 will populate a TIES.cfg automatically with the correct box size.

              +in the main PDB complex.pdb. TIES20 will populate a TIES.cfg automatically with the correct box size.

              Typically a constraint file may be used during preproduction of simulations involving proteins but possibly not a small -drug like molecule in only solvent. It will be show later in the Binding Free Energy Calculations section when and +drug like molecule in only solvent. It will be shown later in the Binding Free Energy Tutorial section when and why we use a constraints file.

              @@ -216,16 +212,13 @@

              Command Lineties_md --exp_name=sys_solv --windows_mask=5,6 --devices=5&

              -

              There are a lot of options for how these OpenMM calcualtions can be structured and parallelized with TIES_MD see our +

              There are a lot of options for how these OpenMM calculations can be structured and parallelized with TIES_MD see our Parallelization page for more information on this. For a NAMD calculation if the submission script requested 6 CPU nodes each with 128 cores the run lines in the submission script might look like:

              cd $build/replica-confs
              @@ -335,7 +328,7 @@ 

              Analysis - +