OpenSMOG Module

SBM Class

class OpenSMOG.SBM(time_step=None, collision_rate=None, r_cutoff=None, temperature=None, cmm=True, pbc=False, name='OpenSMOG', warn=True)[source]

Bases: object

addForce(force, name=None)[source]

Wrapper that streamlines the addition of a new force and name in the OpenSMOG framework .

Args:

force (force object, required):

The force term that you want to add to the model.

name (str, optional):

Optional name to give the new force. This is the name that will be used in the force file. If no value is provided, then the name “forceN” will be used, where N is an assigned integer.

createReporters(trajectory=True, trajectoryName=None, trajectoryFormat='dcd', energies=True, energiesName=None, energy_components=False, energy_componentsName=None, logFileName='OpenSMOG.log', interval=1000, checkpoint=True, checkpointName='smog.chk', checkpointInterval=1000000)[source]

Creates the reporters to provide the output data.

Parameters:
  • trajectory (bool, optional) – Whether to save the trajectory .dcd file containing the position of the atoms as a function of time. (Default value: True).

  • trajectoryName (str, optional) – Name of the trajectory file.

  • trajectoryFormat (str, optional) – File format of the trajectory file. Options are dcd, pdb, pdbx, hdf5, netcdf, and xtc. Saving the trajectory in the file formats hdf5 or netcdf requires the MDTraj package. xtc only requires MDtraj if using older versions of OpenMM (Default value: dcd).

  • energies (bool, optional) – Whether to save the energies in a .txt file containing five columns, comma-delimited. The header of the files shows the information of each column: #”Step”,”Potential Energy”,”Kinetic Energy”,”Total Energy”,”Temperature”. (Default value: True).

  • energiesName (str, optional) – Name of the energy file.

  • energy_components (bool, optional) – Whether to save the potential energy for each applied force in a .txt file containing several columns, comma-delimited. The header of the files shows the information of each column. An example of the header is: #”Step”,”electrostatic”,”Non-Contacts”,”Bonds”,”Angles”,”Dihedrals”,”contact_1-10-12”. (Default value: False).

  • energy_componentsName (str, optional) – Name of the energy_components file.

  • logFileName (str, optional) – Name of log file. (Default value: OpenSMOG.log).

  • interval (int, optional) – Frequency to write the data to the output files. (Default value: 10**3)

  • checkpoint (bool,optional) – Turn on periodic checkpointing (Default value: True)

  • checkpointName (str,optional) – Name of checkpoint file. (Default value: smog.chk)

  • checkpointInterval (int,optional) – Interval (in time steps) for writing checkpoint files (Default value: 10**6)

createSimulation()[source]

Creates the simulation context and loads it into the OpenMM platform.

help()[source]

Prints information about SMOG models and how to use OpenSMOG.

loadCheckpoint(filename)[source]

Wrapper to load a checkpoint file.

Arg:

filename (str, required):

name of the checkpoint file to be read

loadGro(Grofile)[source]

Loads the .gro file format in the OpenMM system platform. The input files are generated using SMOG2 software with the flag -OpenSMOG. Details on how to create the files can be found in the SMOG2 User Manual.

Parameters:

Grofile (file, required) – Initial structure for the MD simulations in .gro file format. This is typically generated by SMOG2 with the flag -OpenSMOG. (Default value: None).

loadState(filename)[source]

Wrapper to load a state file.

Arg:

filename (str, required):

name of the state file to be read

loadSystem(Grofile='smog.gro', Topfile='smog.top', Xmlfile='smog.xml', noxml=False)[source]

Loads the input files in the OpenMM system platform. The input files are generated using SMOG2 software with the flag -OpenSMOG. Details on how to create the files can be found in the SMOG2 User Manual. Tutorials for how to generate the input files can be found on the smog-server page.

Parameters:
  • Grofile (file, optional) – Initial structure for the simulation in .gro file format generated by SMOG2 software with the flag -OpenSMOG. (Default value: smog.gro).

  • Topfile (file, optional) – Topology .top file format generated by SMOG2 software with the flag -OpenSMOG. The topology file lists some/all the interactions between the system atoms. Depending on the force field and version of SMOG 2 that was used, information about contact, dihedrals and non-bonded terms may be in an .xml file. (Default value: smog.top).

  • Xmlfile (file, optional) – The .xml file can contain information about contacts, dihedrals and nonbonded interactions. The .xml file is generated by SMOG2 software with the flag -OpenSMOG, which support custom potential functions. (Default value: smog.xml).

  • noxml (boolean, optional) – Run without reading an xml file. (Default value: False).

loadTop(Topfile)[source]

Loads the .top file format in the OpenMM system platform. The input files are generated using SMOG2 software with the flag -OpenSMOG. Details on how to create the files can be found in the SMOG2 User Manual.

Parameters:

Topfile (file, required) – Topology .top file format generated by SMOG2 software with the flag -OpenSMOG. The topology file defines many of the interactions between atoms, but contacts, dihedrals and nonbonded terms may be defined in the .xml file. (Default value: None).

loadXml(Xmlfile)[source]

Loads the .xml file format in the OpenMM system platform. The input files are generated using SMOG2 software with the flag -OpenSMOG. Details on how to create the files can be found in the SMOG2 User Manual.

Parameters:

Xmlfile (file, required) – The .xml file can contain information that defines the contacts, nonbonded and dihedral terms. The .xml file is generated by SMOG2 software with the flag -OpenSMOG, which support custom potential energy functions. (Default value: None).

minimize(tolerance=1.0, maxIterations=None, reportInterval=100, minTrajectory=None)[source]
opensmogcheck()[source]
pt = '/home/docs/checkouts/readthedocs.org/user_builds/opensmog/checkouts/1.2-docs/OpenSMOG/.versionnotes'
run(nsteps, report=True, interval=10000)[source]
runAA(time_step=0.002, nsteps=10000, collision_rate=1.0, r_cutoff=0.65, temperature=0.5, gro='smog.gro', top='smog.top', xml='smog.xml', saveinterval=1000, trajectoryName=None, trajectoryFormat='dcd', energies=True, energiesName=None, energy_components=False, energy_componentsName=None, logFileName='OpenSMOG.log')[source]

A quick way to start a simulation with default parameters that typical with the standard all-atom SMOG model. You can also override many parameters, if needed. This may not be suitable for production runs.

Args:

name (str, optional):

Name to use for system. This will serve as the default prefix for all output file. (Default value: smogtest)

time_step (float, optional):

simulation time step, in Reduced Units (Default value: 0.002)

nsteps (int, optional):

number of time steps to simulate (Default value: 10000)

collision_rate (float, optional):

drag constant for Langevin Dynamics simulations (Default value: 1)

r_cutoff (float, optional):

distance cutoff for nonbonded interactions (Default value: 0.65)

temperature (float, optional):

simulated temperature, in Reduced Units (Default value: 0.5)

gro (str, optional):

name of input gro file (Default value: smog.gro)

top (str, optional):

name of input top file (Default value: smog.top)

xml (str, optional):

name of input xml file (Default value: smog.xml)

saveinterval (int, optional):

interval (in time steps) between data saves (Default value: 1000)

trajectoryName (str, optional):

name of output trajectory file. Note, if this is set to :code: None, then the value of name will be used (Default : None)

trajectoryFormat (str, optional):

type of trajectory file to save (Default value: dcd)

energies (bool, optional):

calculate and report the system energy (Default value: True)

energiesName (str, optional):

name of output energy file. Note, if this is set to :code: None, then the value of name will be used (Default : None)

energy_components (bool, optional):

calculate and report the energy, by type (Default value: False)

energy_componentsName (str, optional):

name of output energy component file. Note, if this is set to :code: None, then the value of name will be used (Default : None)

logFileName (str, optional):

name of log file. (Default : OpenSMOG.log)

runForClockTime(time, report=True, interval=10000, checkpointFile=None, stateFile=None, checkpointInterval=None)[source]
saveCheckpoint(filename)[source]

Wrapper for saving checkpoint files.

Arg:

filename (str, required):

name of the checkpoint file to be written

saveFolder(folder)[source]

Sets the folder path to save data. This is optional. If not used, output will be written to current directory.

Args:

folder (str, required):

Path to save the simulation data. If the folder path does not exist, the function will create the directory.

saveState(filename)[source]

Wrapper for saving State files.

Arg:

filename (str, required):

name of the state file to be written

setup_openmm(platform=None, precision='', GPUindex='default', integrator='')[source]

Sets up the parameters for the OpenMM platform. This is optional. If it is not used, then the following defaults will be used:

precision: single integrator: LangevinMiddle platform: Use a guess for the fastest platform available GPUindex: Default

Args:

platform (str, optional):

Platform to use in the simulation. Options are CUDA, OpenCL, HIP, CPU, Reference. (Default value: OpenCL).

precision (str, optional):

Numerical precision type of the simulation. Options are single, mixed, double. (Default value: single). For details check the OpenMM Documentation.

GPUIndex (str, optional):

Set of Platform device index IDs. Ex: 0,1,2 for the system to use the devices 0, 1 and 2.

integrator (str, or integrator object):

Integrator to use in the simulations. Options are langevin, langevinMiddle, *variableLangevin, langevinmiddletruncated and brownian. You may also build your own custom integrator and pass it, rather than use a standard integrator. (Default value: langevinmiddle).

version = '1.2'

//smog-server.org

The SBM sets the environment for molecular dynamics simulations using OpenMM libraries.

Args:

time_step (float, required):

Simulation time step in units of \(\tau\).

collision_rate (float, required):

Friction/Damping constant in units of reciprocal time (\(1/\tau\)).

r_cutoff (float, required):

Cutoff distance to consider non-bonded interactions (nanometers).

temperature (float, required):

Temperature in reduced units

pbc (boolean, optional):

Turn PBC on/off. (Default value: False)

cmm (boolean, optional):

Remove center of mass motion. (Default value: True)

name (str, optional):

Name used in the output files. (Default value: OpenSMOG)

warn (boolean, optional):

Give cautionary warnings… (Default value: True)

Type:

The SBM class performs Molecular dynamics simulations using structure-based (SMOG) models to investigate a broad range of biomolecular dynamics, including domain rearrangements in proteins, folding and ligand binding in RNA and large-scale rearrangements in ribonucleoprotein assemblies. In its simplest form, a structure-based model defines a particular structure (usually obtained from X-ray, cryo-EM, or NMR methods) as the energetic global minimum. Find more information about SMOG models and OpenSMOG at http