janus.mm_wrapper.OpenMMWrapper

class janus.mm_wrapper.OpenMMWrapper(sys_info=None, sys_info_format='pdb', mm_forcefield='amber99sb.xml', mm_water_forcefield='tip3p.xml', NVE_integrator='Verlet', NVT_integrator='Langevin', temp=300, step_size=1, fric_coeff=1, nonbondedCutoff=0.8, **kwargs)

A MM wrapper class that calls OpenMM to obtain molecular mechanics information. Also can be used to take steps in a molecular dynamics simulation. Class inherits from MMWrapper.

Parameters:
  • sys_info (str) – A string with the filename or a list with multiple filenames that contain position and topology information. Default is None.
  • sys_info_format (str) – A str describing what kind of input is contained in sys_info. Default is pdb. Possible values also include Amber and Gromacs.
  • mm_forcefield (str) – The name of the forcefield to use, default is amber99sb.xml.
  • mm_water_forcefield (str) – The name of the forcefield to use for water, default is tip3p.xml.
  • NVE_integrator (str) – What type of integrator to use for a NVE ensemble, default is Verlet.
  • NVT_integrator (str) – What type of integrator to use for a NVT ensemble, default is Langevin.
  • temp (Int) – The temperature at which to run a simulation in kelvin, default is 300.
  • step_size (float) – The step size to integrate system in femtoseconds, default is 1.
  • fric_coeff (float) – friction coefficient to couple the system to heat bath in a NVT ensemble in inverse picoseconds, default is 1.
  • nonbondedCutoff (float) – The cutoff distance for nonbonded interactions in nanometers, default is 1.
  • **kwargs (dict) –

    Other parameters for OpenMM, which include: - nonbondedMethod : method for nonbonded interactions, default is OM_app.NoCutoff - constraints : which bonds and angles implemented with constraints,

    default is None
    • rigid_water : whether water is treated as rigid, default is True
    • removeCMMotion : whether to include a CMMotionRemover, default is True
    • ignoreExternalBonds : whether to ignore external bonds when matching residues to templates,
      default is True
    • flexibleConstraints : whether to add parameters for constrained parameters,
      default is False
    • hydrogenMass : the mass to use for hydrogen atoms bonded to heavy atoms,
      default is False
    • residueTemplates : allows user to specify a template for a residue,
      default is empty dict {}
    • switchDistance : the distance to turn on potential energy switching function for
      Lennard-Jones interactions. Default is None
    • keywords for MD simulation parameters.
      For possible keywords consult the Molecular Dynamics section of the manual.

    Each pair of key:value in the dictionary is given as a string. For more information about these pararmeters and other possible parameter values consult docs.openmm.org

__init__(sys_info=None, sys_info_format='pdb', mm_forcefield='amber99sb.xml', mm_water_forcefield='tip3p.xml', NVE_integrator='Verlet', NVT_integrator='Langevin', temp=300, step_size=1, fric_coeff=1, nonbondedCutoff=0.8, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([sys_info, sys_info_format, …]) Initialize self.
build_qm_param() Function not implemented for MM wrappers
compute_info(topology, positions[, …]) Gets information about a system.
convert_input() Converts inputs to OpenMM readable topologies and positions.
convert_trajectory(traj) Converts an OpenMM trajectory to get topology and positions that are compatible with MDtraj
create_modeller(atoms[, keep_atoms]) Makes a OpenMM modeller object based on given geometry
create_new_residue_template(topology) Create a new OpeMM residue template when there is no matching residue and registers it into self.forcefield forcefield object.
create_openmm_simulation(openmm_system, …) Creates an OpenMM simulation object given an OpenMM system, topology, and positions
create_openmm_system(topology[, …]) Calls OpenMM to create an OpenMM System object give a topology, forcefield, and other parameters specified in the instantiation parameters.
delete_atoms(atoms) Delete specified atoms from an OpenMM Modeller object
get_energy_and_gradient(traj[, geometry, …]) Gets the energy and gradient from a MM computation
get_geom_from_trajectory() Function not implemented for MM wrappers
get_main_charges() Gets the MM point charges for the system of interest
get_main_info() Gets the information for the system of interest.
get_state_info([main_info, energy, …]) Gets information like the kinetic and potential energy, positions, forces, and topology from an OpenMM state.
initialize(embedding_method) Gets information for the system of interest in its initial state.
keep_atoms(atoms) Acts on an OpenMM Modeller object to keep the specified atoms in the MM system and deletes everything else
optimize_geometry() Function not implemented for MM wrappers
restart(embedding_method, chkpt_file, …)
set_LJ_zero(OM_system) Removes the Lennard-Jones (van der Waals) force from the system
set_charge_zero(OM_system[, link_atoms]) Removes the coulombic forces by setting charges of specified atoms to zero
set_external_charges() Function not implemented for classes
set_qm_geometry() Function not implemented for MM wrappers
set_up_reporters(simulation) Sets up reporters according to options specified by arguments in md_param.
take_step(num) Takes a specified num of steps in the MD simulation
take_updated_step(force) Updates the system with forces from qmmm and takes a simulation step
update_forces(forces, force_obj, simulation) Updates a simulation with external forces
write_pdb(info) Write a pdb file

Attributes

au_bohr_to_kjmol_nm
kjmol_nm_to_au_bohr
kjmol_to_au
nm_to_angstrom
nm_to_bohr