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 AmoebaTorsionTorsionForceOpenMM Custom Torsion-Torsion Force for topology 2.protected AngleForceOpenMM Custom Angle Force for topology 2.protected AngleTorsionForceOpenMM Custom Angle-Torsion Force for topology 2.protected BondForceOpenMM Custom Bond Force for topology 2.protected ForceFieldEnergyThe ForceFieldEnergy instance for the first topology.protected ForceFieldEnergyThe ForceFieldEnergy instance for the second topology.protected ImproperTorsionForceOpenMM Custom Improper Torsion Force for topology 2.protected InPlaneAngleForceOpenMM Custom In-Plane Angle Force for topology 2.protected OutOfPlaneBendForceOpenMM Custom Out-of-Plane Bend Force for topology 2.protected PiOrbitalTorsionForceOpenMM Custom Pi-Orbital Torsion Force for topology 2.protected RestrainTorsionsForceOpenMM Custom Restrain Torsion Force for topology 2.protected StretchBendForceOpenMM Custom Stetch-Bend Force for topology 2.protected StretchTorsionForceOpenMM Custom Stretch-Torsion Force for topology 2.protected TorsionForceOpenMM Custom Torsion Force for topology 2.protected UreyBradleyForceOpenMM 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 TypeMethodDescriptionvoidAdd forces to the system.intCalculate the number of degrees of freedom.voidfree()Destroy the dual-topology system.Get the Crystal instance.intGet the number of variables.Get the Potential in use.protected voidSet the default values of the vectors defining the axes of the periodic box (measured in nm).voidupdateParameters(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, updateAtomMassMethods 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:
getPotentialin classOpenMMSystem- Returns:
- The Potential.
-
getCrystal
Get the Crystal instance.- Overrides:
getCrystalin 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:
setDefaultPeriodicBoxVectorsin classOpenMMSystem
-
addForces
public void addForces()Add forces to the system.- Overrides:
addForcesin classOpenMMSystem
-
getNumberOfVariables
public int getNumberOfVariables()Get the number of variables.- Overrides:
getNumberOfVariablesin classOpenMMSystem- Returns:
- the number of variables.
-
calculateDegreesOfFreedom
public int calculateDegreesOfFreedom()Calculate the number of degrees of freedom.- Overrides:
calculateDegreesOfFreedomin classOpenMMSystem- Returns:
- Number of degrees of freedom.
-
free
public void free()Destroy the dual-topology system.- Overrides:
freein classOpenMMSystem
-
updateParameters
Update parameters if the Use flags and/or Lambda value has changed.- Overrides:
updateParametersin classOpenMMSystem- Parameters:
atoms- Atoms in this list are considered.
-