ForceBalance API  1.3
Automated optimization of force fields and empirical potentials
Functions | Variables
src.openmmio Namespace Reference

Functions

def get_mask (grps)
 Given a list of booleans [1, 0, 1] return the bitmask that sets these force groups appropriately in Context.getState(). More...
 
def energy_components (Sim, verbose=False)
 
def get_multipoles (simulation, q=None, mass=None, positions=None, rmcom=True)
 Return the current multipole moments in Debye and Buckingham units. More...
 
def get_dipole (simulation, q=None, mass=None, positions=None)
 Return the current dipole moment in Debye. More...
 
def PrepareVirtualSites (system)
 Prepare a list of function wrappers and vsite parameters from the system. More...
 
def ResetVirtualSites_fast (positions, vsinfo)
 Given a set of OpenMM-compatible positions and a System object, compute the correct virtual site positions according to the System. More...
 
def ResetVirtualSites (positions, system)
 Given a set of OpenMM-compatible positions and a System object, compute the correct virtual site positions according to the System. More...
 
def GetVirtualSiteParameters (system)
 Return an array of all virtual site parameters in the system. More...
 
def CopyAmoebaBondParameters (src, dest)
 
def CopyAmoebaOutOfPlaneBendParameters (src, dest)
 
def CopyAmoebaAngleParameters (src, dest)
 
def CopyAmoebaInPlaneAngleParameters (src, dest)
 
def CopyAmoebaVdwParameters (src, dest)
 
def CopyAmoebaMultipoleParameters (src, dest)
 
def CopyHarmonicBondParameters (src, dest)
 
def CopyHarmonicAngleParameters (src, dest)
 
def CopyPeriodicTorsionParameters (src, dest)
 
def CopyNonbondedParameters (src, dest)
 
def CopyGBSAOBCParameters (src, dest)
 
def CopyCustomNonbondedParameters (src, dest)
 copy whatever updateParametersInContext can update: per-particle parameters More...
 
def do_nothing (src, dest)
 
def CopySystemParameters (src, dest)
 Copy parameters from one system (i.e. More...
 
def UpdateSimulationParameters (src_system, dest_simulation)
 
def SetAmoebaVirtualExclusions (system)
 
def AddVirtualSiteBonds (mod, ff)
 
def SetAmoebaNonbondedExcludeAll (system, topology)
 Manually set the AmoebaVdwForce, AmoebaMultipoleForce to exclude all atoms belonging to the same residue. More...
 
def MTSVVVRIntegrator (temperature, collision_rate, timestep, system, ninnersteps=4)
 Create a multiple timestep velocity verlet with velocity randomization (VVVR) integrator. More...
 

Variables

 logger = getLogger(__name__)
 

Function Documentation

◆ AddVirtualSiteBonds()

def src.openmmio.AddVirtualSiteBonds (   mod,
  ff 
)

Definition at line 368 of file openmmio.py.

◆ CopyAmoebaAngleParameters()

def src.openmmio.CopyAmoebaAngleParameters (   src,
  dest 
)

Definition at line 247 of file openmmio.py.

◆ CopyAmoebaBondParameters()

def src.openmmio.CopyAmoebaBondParameters (   src,
  dest 
)

Definition at line 233 of file openmmio.py.

◆ CopyAmoebaInPlaneAngleParameters()

def src.openmmio.CopyAmoebaInPlaneAngleParameters (   src,
  dest 
)

Definition at line 256 of file openmmio.py.

◆ CopyAmoebaMultipoleParameters()

def src.openmmio.CopyAmoebaMultipoleParameters (   src,
  dest 
)

Definition at line 269 of file openmmio.py.

◆ CopyAmoebaOutOfPlaneBendParameters()

def src.openmmio.CopyAmoebaOutOfPlaneBendParameters (   src,
  dest 
)

Definition at line 239 of file openmmio.py.

◆ CopyAmoebaVdwParameters()

def src.openmmio.CopyAmoebaVdwParameters (   src,
  dest 
)

Definition at line 265 of file openmmio.py.

◆ CopyCustomNonbondedParameters()

def src.openmmio.CopyCustomNonbondedParameters (   src,
  dest 
)

copy whatever updateParametersInContext can update: per-particle parameters

Definition at line 303 of file openmmio.py.

◆ CopyGBSAOBCParameters()

def src.openmmio.CopyGBSAOBCParameters (   src,
  dest 
)

Definition at line 292 of file openmmio.py.

◆ CopyHarmonicAngleParameters()

def src.openmmio.CopyHarmonicAngleParameters (   src,
  dest 
)

Definition at line 277 of file openmmio.py.

◆ CopyHarmonicBondParameters()

def src.openmmio.CopyHarmonicBondParameters (   src,
  dest 
)

Definition at line 273 of file openmmio.py.

◆ CopyNonbondedParameters()

def src.openmmio.CopyNonbondedParameters (   src,
  dest 
)

Definition at line 285 of file openmmio.py.

◆ CopyPeriodicTorsionParameters()

def src.openmmio.CopyPeriodicTorsionParameters (   src,
  dest 
)

Definition at line 281 of file openmmio.py.

◆ CopySystemParameters()

def src.openmmio.CopySystemParameters (   src,
  dest 
)

Copy parameters from one system (i.e.

that which is created by a new force field) sto another system (i.e. the one stored inside the Target object). DANGER: These need to be implemented manually!!!

Definition at line 314 of file openmmio.py.

◆ do_nothing()

def src.openmmio.do_nothing (   src,
  dest 
)

Definition at line 307 of file openmmio.py.

◆ energy_components()

def src.openmmio.energy_components (   Sim,
  verbose = False 
)

Definition at line 58 of file openmmio.py.

◆ get_dipole()

def src.openmmio.get_dipole (   simulation,
  q = None,
  mass = None,
  positions = None 
)

Return the current dipole moment in Debye.

Note that this quantity is meaningless if the system carries a net charge.

Definition at line 127 of file openmmio.py.

Here is the call graph for this function:

◆ get_mask()

def src.openmmio.get_mask (   grps)

Given a list of booleans [1, 0, 1] return the bitmask that sets these force groups appropriately in Context.getState().

Any values not provided are defaulted to 1.

Definition at line 48 of file openmmio.py.

◆ get_multipoles()

def src.openmmio.get_multipoles (   simulation,
  q = None,
  mass = None,
  positions = None,
  rmcom = True 
)

Return the current multipole moments in Debye and Buckingham units.

Definition at line 68 of file openmmio.py.

◆ GetVirtualSiteParameters()

def src.openmmio.GetVirtualSiteParameters (   system)

Return an array of all virtual site parameters in the system.

Used for comparison purposes.

Definition at line 214 of file openmmio.py.

◆ MTSVVVRIntegrator()

def src.openmmio.MTSVVVRIntegrator (   temperature,
  collision_rate,
  timestep,
  system,
  ninnersteps = 4 
)

Create a multiple timestep velocity verlet with velocity randomization (VVVR) integrator.

ARGUMENTS

temperature (Quantity compatible with kelvin) - the temperature collision_rate (Quantity compatible with 1/picoseconds) - the collision rate timestep (Quantity compatible with femtoseconds) - the integration timestep system (simtk.openmm.System) - system whose forces will be partitioned ninnersteps (int) - number of inner timesteps (default: 4)

RETURNS

integrator (openmm.CustomIntegrator) - a VVVR integrator

NOTES

This integrator is equivalent to a Langevin integrator in the velocity Verlet discretization with a timestep correction to ensure that the field-free diffusion constant is timestep invariant. The inner velocity Verlet discretization is transformed into a multiple timestep algorithm.

REFERENCES

VVVR Langevin integrator:

TODO

Move initialization of 'sigma' to setting the per-particle variables.

Definition at line 429 of file openmmio.py.

Here is the call graph for this function:

◆ PrepareVirtualSites()

def src.openmmio.PrepareVirtualSites (   system)

Prepare a list of function wrappers and vsite parameters from the system.

Definition at line 132 of file openmmio.py.

◆ ResetVirtualSites()

def src.openmmio.ResetVirtualSites (   positions,
  system 
)

Given a set of OpenMM-compatible positions and a System object, compute the correct virtual site positions according to the System.

Definition at line 187 of file openmmio.py.

◆ ResetVirtualSites_fast()

def src.openmmio.ResetVirtualSites_fast (   positions,
  vsinfo 
)

Given a set of OpenMM-compatible positions and a System object, compute the correct virtual site positions according to the System.

Definition at line 172 of file openmmio.py.

◆ SetAmoebaNonbondedExcludeAll()

def src.openmmio.SetAmoebaNonbondedExcludeAll (   system,
  topology 
)

Manually set the AmoebaVdwForce, AmoebaMultipoleForce to exclude all atoms belonging to the same residue.

Definition at line 382 of file openmmio.py.

◆ SetAmoebaVirtualExclusions()

def src.openmmio.SetAmoebaVirtualExclusions (   system)

Definition at line 348 of file openmmio.py.

◆ UpdateSimulationParameters()

def src.openmmio.UpdateSimulationParameters (   src_system,
  dest_simulation 
)

Definition at line 335 of file openmmio.py.

Here is the call graph for this function:

Variable Documentation

◆ logger

src.openmmio.logger = getLogger(__name__)

Definition at line 35 of file openmmio.py.