Package ffx.openmm

Class System

java.lang.Object
ffx.openmm.System
Direct Known Subclasses:
OpenMMSystem

public class System extends Object
This class represents a molecular system. The definition of a System involves four elements:
  • The set of particles in the system
  • The forces acting on them
  • Pairs of particles whose separation should be constrained to a fixed value
  • For periodic systems, the dimensions of the periodic box
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 Details

    • System

      public System()
      Constructor.
  • Method Details

    • addConstraint

      public void addConstraint(int particle1, int particle2, double distance)
      Add a constraint to the system.
      Parameters:
      particle1 - The first particle.
      particle2 - The second particle.
      distance - The distance between the particles.
    • addForce

      public void addForce(Force force)
      Add a force to the system.
      Parameters:
      force - The force to add.
    • addParticle

      public void addParticle(double mass)
      Add a particle to the system.
      Parameters:
      mass - The mass of the particle.
    • getNumConstraints

      public int getNumConstraints()
      Get the number of constraints in the system.
      Returns:
      The number of constraints in the system.
    • removeForce

      public void removeForce(int index)
      Remove a force from the system.
      Parameters:
      index - The index of the force to remove.
    • setDefaultPeriodicBoxVectors

      public void setDefaultPeriodicBoxVectors(edu.uiowa.jopenmm.OpenMM_Vec3 a, edu.uiowa.jopenmm.OpenMM_Vec3 b, edu.uiowa.jopenmm.OpenMM_Vec3 c)
      Set the default periodic box vectors.
      Parameters:
      a - The first vector.
      b - The second vector.
      c - The third vector.
    • setParticleMass

      public void setParticleMass(int index, double mass)
      Set the mass of a particle.
      Parameters:
      index - The index of the particle.
      mass - The mass of the particle.
    • getPointer

      public com.sun.jna.ptr.PointerByReference getPointer()
      Get the pointer to the system.
      Returns:
      The pointer to the system.
    • destroy

      public void destroy()
      Destroy the system.