All Classes Namespaces Functions Variables Pages
System Class Reference

This class represents a molecular system. More...

Inherits _object.

## Public Member Functions

def | __del__
| del(OpenMM::System self) More...
def | getNumParticles
| getNumParticles(System self) -> int More...
def | addParticle
| addParticle(System self, double mass) -> int More...
def | getParticleMass
| getParticleMass(System self, int index) -> double More...
def | setParticleMass
| setParticleMass(System self, int index, double mass) More...
def | setVirtualSite
| setVirtualSite(System self, int index, VirtualSite virtualSite) More...
def | isVirtualSite
| isVirtualSite(System self, int index) -> bool More...
def | getVirtualSite
| getVirtualSite(System self, int index) -> VirtualSite More...
def | getNumConstraints
| getNumConstraints(System self) -> int More...
def | addConstraint
| addConstraint(System self, int particle1, int particle2, double distance) -> int More...
def | getConstraintParameters
| getConstraintParameters(System self, int index) More...
def | setConstraintParameters
| setConstraintParameters(System self, int index, int particle1, int particle2, double distance) More...
def | removeConstraint
| removeConstraint(System self, int index) More...
def | addForce
| addForce(System self, Force force) -> int More...
def | getNumForces
| getNumForces(System self) -> int More...
def | getForce
| getForce(System self, int index) -> Force getForce(System self, int index) -> Force More...
def | removeForce
| removeForce(System self, int index) More...
def | getDefaultPeriodicBoxVectors
| getDefaultPeriodicBoxVectors(System self) More...
def | setDefaultPeriodicBoxVectors
| setDefaultPeriodicBoxVectors(System self, Vec3 const & a, Vec3 const & b, Vec3 const & c) More...
def | usesPeriodicBoundaryConditions
| usesPeriodicBoundaryConditions(System self) -> bool More...
def | __getstate__
def | __setstate__
def | getForces
| Get the list of Forces in this System. More...
def | __init__
| init(OpenMM::System self) -> System init(OpenMM::System self, System other) -> System More...

## Public Attributes

| this

## Detailed Description

This class represents a molecular system.

The definition of a System involves four elements:

The particles and constraints are defined directly by the System object, while forces are defined by objects that extend the Force class. After creating a System, call addParticle() once for each particle, addConstraint() for each constraint, and addForce() for each Force.

In addition, particles may be designated as "virtual sites". These are particles whose positions are computed automatically based on the positions of other particles. To define a virtual site, call setVirtualSite(), passing in a VirtualSite object that defines the rules for computing its position.

## Constructor & Destructor Documentation

def __del__ | ( |  | self | ) |

del(OpenMM::System self)

References simtk.openmm.openmm.stripUnits().

def __init__ | ( |  | self,
|  |  | args
| ) |  |

init(OpenMM::System self) -> System init(OpenMM::System self, System other) -> System

Create a new System.

References simtk.openmm.openmm.stripUnits(), ios.this, ostream.this, istream.this, iostream.this, pairii.this, vectord.this, vectorddd.this, vectori.this, vectorii.this, vectorpairii.this, vectorstring.this, mapstringstring.this, mapstringdouble.this, mapii.this, seti.this, AmoebaAngleForce.this, AmoebaBondForce.this, AmoebaGeneralizedKirkwoodForce.this, AmoebaInPlaneAngleForce.this, AmoebaMultipoleForce.this, AmoebaOutOfPlaneBendForce.this, AmoebaPiTorsionForce.this, AmoebaStretchBendForce.this, AmoebaTorsionTorsionForce.this, AmoebaVdwForce.this, AmoebaWcaDispersionForce.this, AndersenThermostat.this, Integrator.this, BrownianIntegrator.this, CMAPTorsionForce.this, CMMotionRemover.this, Context.this, Continuous1DFunction.this, Continuous2DFunction.this, Continuous3DFunction.this, CustomAngleForce.this, CustomBondForce.this, CustomCompoundBondForce.this, CustomExternalForce.this, CustomGBForce.this, CustomHbondForce.this, CustomIntegrator.this, CustomManyParticleForce.this, CustomNonbondedForce.this, CustomTorsionForce.this, Discrete1DFunction.this, Discrete2DFunction.this, Discrete3DFunction.this, DrudeForce.this, DrudeLangevinIntegrator.this, DrudeSCFIntegrator.this, GBSAOBCForce.this, GBVIForce.this, HarmonicAngleForce.this, HarmonicBondForce.this, LangevinIntegrator.this, LocalCoordinatesSite.this, MonteCarloAnisotropicBarostat.this, MonteCarloBarostat.this, MonteCarloMembraneBarostat.this, NonbondedForce.this, OpenMMException.this, OutOfPlaneSite.this, PeriodicTorsionForce.this, RBTorsionForce.this, RPMDIntegrator.this, RPMDMonteCarloBarostat.this, and System.this.

## Member Function Documentation

def __getstate__ | ( |  | self | ) |

def __setstate__ | ( |  | self,
|  |  | serializationString
| ) |  |

def addConstraint | ( |  | self,
|  |  | args
| ) |  |

addConstraint(System self, int particle1, int particle2, double distance) -> int

Add a constraint to the System. Particles whose mass is 0 cannot participate in constraints.

Parameters

  particle1 | the index of the first particle involved in the constraint
  particle2 | the index of the second particle involved in the constraint
  distance | the required distance between the two particles, measured in nm

References simtk.openmm.openmm.stripUnits().

def addForce | ( |  | self,
|  |  | args
| ) |  |

addForce(System self, Force force) -> int

Add a Force to the System. The Force should have been created on the heap with the "new" operator. The System takes over ownership of it, and deletes the Force when the System itself is deleted.

Parameters

  force | a pointer to the Force object to be added

def addParticle | ( |  | self,
|  |  | args
| ) |  |

addParticle(System self, double mass) -> int

Add a particle to the System. If the mass is 0, Integrators will ignore the particle and not modify its position or velocity. This is most often used for virtual sites, but can also be used as a way to prevent a particle from moving.

Parameters

  mass | the mass of the particle (in atomic mass units)

References simtk.openmm.openmm.stripUnits().

def getConstraintParameters | ( |  | self,
|  |  | args
| ) |  |

getConstraintParameters(System self, int index)

Get the parameters defining a distance constraint.

Parameters

  index | the index of the constraint for which to get parameters
  particle1 | the index of the first particle involved in the constraint
  particle2 | the index of the second particle involved in the constraint
  distance | the required distance between the two particles, measured in nm

References simtk.openmm.openmm.stripUnits().

def getDefaultPeriodicBoxVectors | ( |  | self,
|  |  | args
| ) |  |

getDefaultPeriodicBoxVectors(System self)

Get the default values of the vectors defining the axes of the periodic box (measured in nm). Any newly created Context will have its box vectors set to these. They will affect any Force added to the System that uses periodic boundary conditions.

Parameters

  a | on exit, this contains the vector defining the first edge of the periodic box
  b | on exit, this contains the vector defining the second edge of the periodic box
  c | on exit, this contains the vector defining the third edge of the periodic box

References simtk.openmm.openmm.stripUnits().

def getForce | ( |  | self,
|  |  | args
| ) |  |

getForce(System self, int index) -> Force getForce(System self, int index) -> Force

Get a writable reference to one of the Forces in this System.

Parameters

  index | the index of the Force to get

References simtk.openmm.openmm.stripUnits().

Referenced by System.getForces().

def getForces | ( |  | self | ) |

Get the list of Forces in this System.

References System.getForce(), and System.getNumForces().

def getNumConstraints | ( |  | self,
|  |  | args
| ) |  |

getNumConstraints(System self) -> int

Get the number of distance constraints in this System.

References simtk.openmm.openmm.stripUnits().

def getNumForces | ( |  | self,
|  |  | args
| ) |  |

getNumForces(System self) -> int

Get the number of Force objects that have been added to the System.

References simtk.openmm.openmm.stripUnits().

Referenced by System.getForces().

def getNumParticles | ( |  | self,
|  |  | args
| ) |  |

getNumParticles(System self) -> int

Get the number of particles in this System.

References simtk.openmm.openmm.stripUnits().

def getParticleMass | ( |  | self,
|  |  | args
| ) |  |

getParticleMass(System self, int index) -> double

Get the mass (in atomic mass units) of a particle. If the mass is 0, Integrators will ignore the particle and not modify its position or velocity. This is most often used for virtual sites, but can also be used as a way to prevent a particle from moving.

Parameters

  index | the index of the particle for which to get the mass

References simtk.openmm.openmm.stripUnits().

def getVirtualSite | ( |  | self,
|  |  | args
| ) |  |

getVirtualSite(System self, int index) -> VirtualSite

Get VirtualSite object for a particle. If the particle is not a virtual site, this throws an exception.

Parameters

  index | the index of the particle to get

References simtk.openmm.openmm.stripUnits().

def isVirtualSite | ( |  | self,
|  |  | args
| ) |  |

isVirtualSite(System self, int index) -> bool

Get whether a particle is a VirtualSite.

Parameters

  index | the index of the particle to check

References simtk.openmm.openmm.stripUnits().

def removeConstraint | ( |  | self,
|  |  | args
| ) |  |

removeConstraint(System self, int index)

Remove a constraint from the System.

Parameters

  index | the index of the constraint to remove

References simtk.openmm.openmm.stripUnits().

def removeForce | ( |  | self,
|  |  | args
| ) |  |

removeForce(System self, int index)

Remove a Force from the System. The memory associated with the removed Force object is deleted.

Parameters

  index | the index of the Force to remove

References simtk.openmm.openmm.stripUnits().

def setConstraintParameters | ( |  | self,
|  |  | args
| ) |  |

setConstraintParameters(System self, int index, int particle1, int particle2, double distance)

Set the parameters defining a distance constraint. Particles whose mass is 0 cannot participate in constraints.

Parameters

  index | the index of the constraint for which to set parameters
  particle1 | the index of the first particle involved in the constraint
  particle2 | the index of the second particle involved in the constraint
  distance | the required distance between the two particles, measured in nm

References simtk.openmm.openmm.stripUnits().

def setDefaultPeriodicBoxVectors | ( |  | self,
|  |  | args
| ) |  |

setDefaultPeriodicBoxVectors(System self, Vec3 const & a, Vec3 const & b, Vec3 const & c)

Set the default values of the vectors defining the axes of the periodic box (measured in nm). Any newly created Context will have its box vectors set to these. They will affect any Force added to the System that uses periodic boundary conditions.

Triclinic boxes are supported, but the vectors must satisfy certain requirements. In particular, a must point in the x direction, b must point "mostly" in the y direction, and c must point "mostly" in the z direction. See the documentation for details.

Parameters

  a | the vector defining the first edge of the periodic box
  b | the vector defining the second edge of the periodic box
  c | the vector defining the third edge of the periodic box

References simtk.openmm.openmm.stripUnits().

def setParticleMass | ( |  | self,
|  |  | args
| ) |  |

setParticleMass(System self, int index, double mass)

Set the mass (in atomic mass units) of a particle. If the mass is 0, Integrators will ignore the particle and not modify its position or velocity. This is most often used for virtual sites, but can also be used as a way to prevent a particle from moving.

Parameters

  index | the index of the particle for which to set the mass
  mass | the mass of the particle

References simtk.openmm.openmm.stripUnits().

def setVirtualSite | ( |  | self,
|  |  | args
| ) |  |

setVirtualSite(System self, int index, VirtualSite virtualSite)

Set a particle to be a virtual site. The VirtualSite object should have been created on the heap with the "new" operator. The System takes over ownership of it, and deletes it when the System itself is deleted.

Parameters

  index | the index of the particle that should be treated as a virtual site
  virtualSite | a pointer to the VirtualSite object describing it

def usesPeriodicBoundaryConditions | ( |  | self,
|  |  | args
| ) |  |

usesPeriodicBoundaryConditions(System self) -> bool

Returns whether or not any forces in this System use periodic boundaries.

If a force in this System does not implement usesPeriodicBoundaryConditions a OpenMM::OpenMMException is thrown

References simtk.openmm.openmm.stripUnits().

## Member Data Documentation

this

Referenced by System.__init__().

The documentation for this class was generated from the following file:

- openmm.py