Class OpenMMDualTopologySystem
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AmoebaTorsionTorsionForce
OpenMM Custom Torsion-Torsion Force for topology 2.protected AngleForce
OpenMM Custom Angle Force for topology 2.protected AngleTorsionForce
OpenMM Custom Angle-Torsion Force for topology 2.protected BondForce
OpenMM Custom Bond Force for topology 2.protected ForceFieldEnergy
The ForceFieldEnergy instance for the first topology.protected ForceFieldEnergy
The ForceFieldEnergy instance for the second topology.protected ImproperTorsionForce
OpenMM Custom Improper Torsion Force for topology 2.protected InPlaneAngleForce
OpenMM Custom In-Plane Angle Force for topology 2.protected OutOfPlaneBendForce
OpenMM Custom Out-of-Plane Bend Force for topology 2.protected PiOrbitalTorsionForce
OpenMM Custom Pi-Orbital Torsion Force for topology 2.protected RestrainTorsionsForce
OpenMM Custom Restrain Torsion Force for topology 2.protected StretchBendForce
OpenMM Custom Stetch-Bend Force for topology 2.protected StretchTorsionForce
OpenMM Custom Stretch-Torsion Force for topology 2.protected TorsionForce
OpenMM Custom Torsion Force for topology 2.protected UreyBradleyForce
OpenMM Custom Urey-Bradley Force for topology 2.Fields inherited from class ffx.potential.openmm.OpenMMSystem
amoebaGeneralizedKirkwoodForce, amoebaGKCavitationForce, amoebaMultipoleForce, amoebaTorsionTorsionForce, amoebaVDWForce, amoebaWcaDispersionForce, andersenThermostat, angleForce, angleTorsionForce, atoms, bondForce, cmMotionRemover, fixedChargeAlchemicalForces, fixedChargeGBForce, fixedChargeNonBondedForce, forceField, improperTorsionForce, inPlaneAngleForce, monteCarloBarostat, outOfPlaneBendForce, piOrbitalTorsionForce, restrainGroupsForce, restrainPositionsForce, restrainTorsionsForce, softcoreCreated, stretchBendForce, stretchTorsionForce, torsionForce, updateBondedTerms, ureyBradleyForce
-
Constructor Summary
ConstructorsConstructorDescriptionOpenMMDualTopologySystem
(OpenMMDualTopologyEnergy openMMDualTopologyEnergy) OpenMMDualTopologyEnergy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add forces to the system.int
Calculate the number of degrees of freedom.void
free()
Destroy the dual-topology system.Get the Crystal instance.int
Get the number of variables.Get the Potential in use.protected void
Set the default values of the vectors defining the axes of the periodic box (measured in nm).void
updateParameters
(Atom[] atoms) Update parameters if the Use flags and/or Lambda value has changed.Methods inherited from class ffx.potential.openmm.OpenMMSystem
addAndersenThermostatForce, addAndersenThermostatForce, addAtoms, addCOMMRemoverForce, addHydrogenConstraints, addMonteCarloBarostatForce, addUpBondConstraints, getAtoms, getForceField, getTemperature, hasAmoebaCavitationForce, isHydrogenAngle, removeForce, setUpdateBondedTerms, setUpHydrogenAngleConstraints, updateAtomMass
Methods inherited from class ffx.openmm.System
addConstraint, addForce, addParticle, destroy, getConstraintParameters, getConstraintParameters, getDefaultPeriodicBoxVectors, getForce, getNumConstraints, getNumForces, getNumParticles, getParticleMass, getPointer, getVirtualSite, isVirtualSite, removeConstraint, removeForce, setConstraintParameters, setDefaultPeriodicBoxVectors, setParticleMass, setPointer, setVirtualSite, usesPeriodicBoundaryConditions
-
Field Details
-
forceFieldEnergy
The ForceFieldEnergy instance for the first topology. -
forceFieldEnergy2
The ForceFieldEnergy instance for the second topology. -
bondForce2
OpenMM Custom Bond Force for topology 2. -
angleForce2
OpenMM Custom Angle Force for topology 2. -
inPlaneAngleForce2
OpenMM Custom In-Plane Angle Force for topology 2. -
stretchBendForce2
OpenMM Custom Stetch-Bend Force for topology 2. -
ureyBradleyForce2
OpenMM Custom Urey-Bradley Force for topology 2. -
outOfPlaneBendForce2
OpenMM Custom Out-of-Plane Bend Force for topology 2. -
piOrbitalTorsionForce2
OpenMM Custom Pi-Orbital Torsion Force for topology 2. -
torsionForce2
OpenMM Custom Torsion Force for topology 2. -
improperTorsionForce2
OpenMM Custom Improper Torsion Force for topology 2. -
stretchTorsionForce2
OpenMM Custom Stretch-Torsion Force for topology 2. -
angleTorsionForce2
OpenMM Custom Angle-Torsion Force for topology 2. -
restrainTorsionsForce2
OpenMM Custom Restrain Torsion Force for topology 2. -
amoebaTorsionTorsionForce2
OpenMM Custom Torsion-Torsion Force for topology 2. ToDo: There is no updateParametersInContext method for the AmoebaTorsionTorsionForce. We assume that the AmoebaTorsionTorsionForce is constant along the alchemical path.
-
-
Constructor Details
-
OpenMMDualTopologySystem
OpenMMDualTopologyEnergy constructor.- Parameters:
openMMDualTopologyEnergy
- OpenMMDualTopologyEnergy instance.
-
-
Method Details
-
getPotential
Get the Potential in use.- Overrides:
getPotential
in classOpenMMSystem
- Returns:
- The Potential.
-
getCrystal
Get the Crystal instance.- Overrides:
getCrystal
in classOpenMMSystem
- Returns:
- the Crystal instance.
-
setDefaultPeriodicBoxVectors
protected void setDefaultPeriodicBoxVectors()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.
- Overrides:
setDefaultPeriodicBoxVectors
in classOpenMMSystem
-
addForces
public void addForces()Add forces to the system.- Overrides:
addForces
in classOpenMMSystem
-
getNumberOfVariables
public int getNumberOfVariables()Get the number of variables.- Overrides:
getNumberOfVariables
in classOpenMMSystem
- Returns:
- the number of variables.
-
calculateDegreesOfFreedom
public int calculateDegreesOfFreedom()Calculate the number of degrees of freedom.- Overrides:
calculateDegreesOfFreedom
in classOpenMMSystem
- Returns:
- Number of degrees of freedom.
-
free
public void free()Destroy the dual-topology system.- Overrides:
free
in classOpenMMSystem
-
updateParameters
Update parameters if the Use flags and/or Lambda value has changed.- Overrides:
updateParameters
in classOpenMMSystem
- Parameters:
atoms
- Atoms in this list are considered.
-