-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added functionality to support running cosolvent simulations in a high-throughput manner #15
Conversation
@@ -26,13 +26,15 @@ | |||
dnaResidues = ['DA', 'DG', 'DC', 'DT', 'DI'] | |||
|
|||
class CosolventMolecule(object): | |||
def __init__(self, name: str, smiles: str=None, mol_filename: str=None, resname: str=None, copies: int=None, concentration: float=None): | |||
def __init__(self, name: str, smiles: str=None, mol_save_dir: str = None, mol_filename: str=None, resname: str=None, copies: int=None, concentration: float=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
cosolvkit/cosolvent_system.py
Outdated
"""Converts an openff topology to openmm without specifying a different chain for each residue. | ||
|
||
:param off_topology: Openff Topology | ||
:type off_topology: openff.Topology | ||
:param starting_id: starting index | ||
:type starting_id: int | ||
:param chain_id: chain_id for solvent molecules | ||
:type chain_id: str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary. Keep it as original
chain = last_chain | ||
else: | ||
chain = omm_topology.addChain(atom_chain_id) | ||
atom_residue_name = molecule.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
Description:
To enable running cosolvent simulations in a high-throughput manner, we added functionality to allow the user to setup simulations whose number of copies of each components is iteratively adjusted if the initial conditions do not yield a valid starting configuration. In addition, we adjusted the logic of the
add_cosolvents
function such that it terminates if it is unable to add a molecule after a certain number of pre-specified attempts.Changes:
iteratively_adjust_copies
such that if it is true, the number of copies of each components is iteratively reduced by a constant multiplicative factor until an valid initial configuration is reached. This feature is tied to the functionadd_cosolvents_adaptive
. If the user does not have hard constraints on initial copy numbers but rather wants to create a 'crowded' cosolvent environment in an automated fashion, this flag should be set to true.add_cosolvents
now terminates if it is unable to add a molecule after a certain number of pre-specified attempts. Previously, if a molecule was unable to be added, it would repeatedly be attempted to be added until successful. However, this effectively led to an infinite loop if the initial copy numbers or concentrations were too high._to_openmm_topology
. Prior, there was a lot of unnecessary code that was not executed. In addition, all cosolvents are now assigned a single chain namedS
create_cosolvent_system
now takes in 4 additional arguments.num_simulation_steps
traj_write_freq
time_step
iteratively_adjust_copies