All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
VirtualSite.h
#ifndef OPENMM_VIRTUALSITE_H_
#define OPENMM_VIRTUALSITE_H_
/* -------------------------------------------------------------------------- *
* OpenMM *
* -------------------------------------------------------------------------- *
* This is part of the OpenMM molecular simulation toolkit originating from *
* Simbios, the NIH National Center for Physics-Based Simulation of *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2012-2014 Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the "Software"), *
* to deal in the Software without restriction, including without limitation *
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
* and/or sell copies of the Software, and to permit persons to whom the *
* Software is furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
* THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
#include <openmm/Vec3.h>
#include "internal/windowsExport.h"
#include <vector>
namespace OpenMM {
class OPENMM_EXPORT VirtualSite {
public:
virtual ~VirtualSite() {
}
int getNumParticles() const;
int getParticle(int particle) const;
protected:
VirtualSite() {
}
void setParticles(const std::vector<int>& particleIndices);
private:
std::vector<int> particles;
};
class OPENMM_EXPORT TwoParticleAverageSite : public VirtualSite {
public:
TwoParticleAverageSite(int particle1, int particle2, double weight1, double weight2);
double getWeight(int particle) const;
private:
double weight1, weight2;
};
class OPENMM_EXPORT ThreeParticleAverageSite : public VirtualSite {
public:
ThreeParticleAverageSite(int particle1, int particle2, int particle3, double weight1, double weight2, double weight3);
double getWeight(int particle) const;
private:
double weight1, weight2, weight3;
};
class OPENMM_EXPORT OutOfPlaneSite : public VirtualSite {
public:
OutOfPlaneSite(int particle1, int particle2, int particle3, double weight12, double weight13, double weightCross);
double getWeight12() const;
double getWeight13() const;
double getWeightCross() const;
private:
double weight12, weight13, weightCross;
};
class OPENMM_EXPORT LocalCoordinatesSite : public VirtualSite {
public:
LocalCoordinatesSite(int particle1, int particle2, int particle3, const Vec3& originWeights, const Vec3& xWeights, const Vec3& yWeights, const Vec3& localPosition);
const Vec3& getOriginWeights() const;
const Vec3& getXWeights() const;
const Vec3& getYWeights() const;
const Vec3& getLocalPosition() const;
private:
Vec3 originWeights, xWeights, yWeights, localPosition;
};
} // namespace OpenMM
#endif /*OPENMM_VIRTUALSITE_H_*/
OpenMM::ThreeParticleAverageSite
This is a VirtualSite that computes the particle location as a weighted average of three other partic...
Definition: VirtualSite.h:104
OpenMM::VirtualSite::~VirtualSite
virtual ~VirtualSite()
Definition: VirtualSite.h:50
OpenMM::VirtualSite::VirtualSite
VirtualSite()
Definition: VirtualSite.h:64
OpenMM::VirtualSite
A VirtualSite describes the rules for computing a particle's position based on other particles...
Definition: VirtualSite.h:48
OpenMM::OutOfPlaneSite
This is a VirtualSite that computes the particle location based on three other particles' locations...
Definition: VirtualSite.h:141
OpenMM::Vec3
This class represents a three component vector.
Definition: Vec3.h:45
OpenMM::LocalCoordinatesSite
This is a VirtualSite that uses the locations of three other particles to compute a local coordinate ...
Definition: VirtualSite.h:195
OpenMM::TwoParticleAverageSite
This is a VirtualSite that computes the particle location as a weighted average of two other particle...
Definition: VirtualSite.h:76
OpenMM
Definition: AndersenThermostat.h:40