OpenMM
 All Classes Namespaces Functions Variables Pages
LocalCoordinatesSite Class Reference

This is a VirtualSite that uses the locations of three other particles to compute a local coordinate system, then places the virtual site at a fixed location in that coordinate system. More...

+ Inheritance diagram for LocalCoordinatesSite:

Public Member Functions

def getOriginWeights
 getOriginWeights(LocalCoordinatesSite self) -> Vec3 const & More...
 
def getXWeights
 getXWeights(LocalCoordinatesSite self) -> Vec3 const & More...
 
def getYWeights
 getYWeights(LocalCoordinatesSite self) -> Vec3 const & More...
 
def getLocalPosition
 getLocalPosition(LocalCoordinatesSite self) -> Vec3 const & More...
 
def __init__
 init(OpenMM::LocalCoordinatesSite self, int particle1, int particle2, int particle3, Vec3 const & originWeights, Vec3 const & xWeights, Vec3 const & yWeights, Vec3 const & localPosition) -> LocalCoordinatesSite init(OpenMM::LocalCoordinatesSite self, LocalCoordinatesSite other) -> LocalCoordinatesSite More...
 
def __del__
 del(OpenMM::LocalCoordinatesSite self) More...
 
- Public Member Functions inherited from VirtualSite
def __init__
 
def __del__
 del(OpenMM::VirtualSite self) More...
 
def getNumParticles
 getNumParticles(VirtualSite self) -> int More...
 
def getParticle
 getParticle(VirtualSite self, int particle) -> int More...
 

Public Attributes

 this
 

Detailed Description

This is a VirtualSite that uses the locations of three other particles to compute a local coordinate system, then places the virtual site at a fixed location in that coordinate system.

The origin of the coordinate system and the directions of its x and y axes are each specified as a weighted sum of the locations of the three particles:

origin = w1r1 + w2r2 + w3r3

xdir = w1r1 + w2r2 + w3r3

ydir = w1r1 + w2r2 + w3r3

For the origin, the three weights must add to one. For example if (w1, w2, w3) = (1.0, 0.0, 0.0), the origin of the local coordinate system is at the location of particle 1. For xdir and ydir, the weights must add to zero. For excample, if (w1, w2, w3) = (-1.0, 0.5, 0.5), the x axis points from particle 1 toward the midpoint between particles 2 and 3.

The z direction is computed as zdir = xdir x ydir. To ensure the axes are all orthogonal, ydir is then recomputed as ydir = zdir x xdir. All three axis vectors are then normalized, and the virtual site location is set to

origin + x*xdir + y*ydir + z*zdir

Constructor & Destructor Documentation

def __init__ (   self,
  args 
)

init(OpenMM::LocalCoordinatesSite self, int particle1, int particle2, int particle3, Vec3 const & originWeights, Vec3 const & xWeights, Vec3 const & yWeights, Vec3 const & localPosition) -> LocalCoordinatesSite init(OpenMM::LocalCoordinatesSite self, LocalCoordinatesSite other) -> LocalCoordinatesSite

Create a new LocalCoordinatesSite virtual site.

Parameters
particle1the index of the first particle
particle2the index of the second particle
particle3the index of the third particle
originWeightsthe weight factors for the three particles when computing the origin location
xWeightsthe weight factors for the three particles when computing xdir
yWeightsthe weight factors for the three particles when computing ydir
localPositionthe position of the virtual site in the local coordinate system

References simtk.openmm.openmm.stripUnits().

def __del__ (   self)

del(OpenMM::LocalCoordinatesSite self)

References simtk.openmm.openmm.stripUnits().

Member Function Documentation

def getLocalPosition (   self)

getLocalPosition(LocalCoordinatesSite self) -> Vec3 const &

Get the position of the virtual site in the local coordinate system.

References simtk.openmm.openmm.stripUnits().

def getOriginWeights (   self)

getOriginWeights(LocalCoordinatesSite self) -> Vec3 const &

Get the weight factors for the three particles when computing the origin location.

References simtk.openmm.openmm.stripUnits().

def getXWeights (   self)

getXWeights(LocalCoordinatesSite self) -> Vec3 const &

Get the weight factors for the three particles when computing xdir.

References simtk.openmm.openmm.stripUnits().

def getYWeights (   self)

getYWeights(LocalCoordinatesSite self) -> Vec3 const &

Get the weight factors for the three particles when computing ydir.

References simtk.openmm.openmm.stripUnits().

Member Data Documentation

this

Referenced by System.__init__().


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