Package ffx.openmm
Class VirtualSite
java.lang.Object
ffx.openmm.VirtualSite
- Direct Known Subclasses:
LocalCoordinatesSite
,OutOfPlaneSite
,ThreeParticleAverageSite
,TwoParticleAverageSite
A VirtualSite describes the rules for computing a particle's position based on
other particles. This is an abstract class. Subclasses define particular rules.
To define a virtual site, create an instance of a VirtualSite subclass and then
call setVirtualSite() on the System.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.sun.jna.ptr.PointerByReference
The pointer is allocated and deallocated by classes that extend VirtualSite. -
Constructor Summary
ConstructorsConstructorDescriptionVirtualSite
(com.sun.jna.ptr.PointerByReference pointer) Create a VirtualSite from an existing pointer. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
destroy()
Destroy the virtual site.int
Get the number of particles this virtual site depends on.int
getParticle
(int particle) Get the index of a particle this virtual site depends on.com.sun.jna.ptr.PointerByReference
Get the pointer to the OpenMM VirtualSite.
-
Field Details
-
pointer
protected com.sun.jna.ptr.PointerByReference pointerThe pointer is allocated and deallocated by classes that extend VirtualSite.
-
-
Constructor Details
-
VirtualSite
public VirtualSite(com.sun.jna.ptr.PointerByReference pointer) Create a VirtualSite from an existing pointer.- Parameters:
pointer
- The pointer to the OpenMM VirtualSite.
-
-
Method Details
-
destroy
public abstract void destroy()Destroy the virtual site. -
getNumParticles
public int getNumParticles()Get the number of particles this virtual site depends on.- Returns:
- The number of particles.
-
getParticle
public int getParticle(int particle) Get the index of a particle this virtual site depends on.- Parameters:
particle
- the particle to get (between 0 and getNumParticles())- Returns:
- the index of the particle in the System
-
getPointer
public com.sun.jna.ptr.PointerByReference getPointer()Get the pointer to the OpenMM VirtualSite.- Returns:
- The pointer to the OpenMM VirtualSite.
-