All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
GBVIForce.h
#ifndef OPENMM_GBVIFORCEFIELD_H_
#define OPENMM_GBVIFORCEFIELD_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) 2008-2009 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 "Force.h"
#include <vector>
#include "internal/windowsExport.h"
namespace OpenMM {
class OPENMM_EXPORT GBVIForce : public Force {
public:
enum NonbondedMethod {
NoCutoff = 0,
CutoffNonPeriodic = 1,
CutoffPeriodic = 2,
};
enum BornRadiusScalingMethod {
NoScaling = 0,
QuinticSpline = 1
};
/*
* Create a GBVIForce.
*/
GBVIForce();
int getNumParticles() const {
return particles.size();
}
int addParticle(double charge, double radius, double gamma);
void getParticleParameters(int index, double& charge, double& radius, double& gamma) const;
void setParticleParameters(int index, double charge, double radius, double gamma);
int addBond(int particle1, int particle2, double distance);
void getBondParameters(int index, int& particle1, int& particle2, double& distance) const;
void setBondParameters( int index, int particle1, int particle2, double bondLength);
int getNumBonds() const;
double getSolventDielectric() const {
return solventDielectric;
}
void setSolventDielectric(double dielectric) {
solventDielectric = dielectric;
}
double getSoluteDielectric() const {
return soluteDielectric;
}
void setSoluteDielectric(double dielectric) {
soluteDielectric = dielectric;
}
NonbondedMethod getNonbondedMethod() const;
void setNonbondedMethod(NonbondedMethod method);
double getCutoffDistance() const;
void setCutoffDistance(double distance);
BornRadiusScalingMethod getBornRadiusScalingMethod() const;
void setBornRadiusScalingMethod( BornRadiusScalingMethod method);
double getQuinticLowerLimitFactor() const;
void setQuinticLowerLimitFactor(double quinticLowerLimitFactor );
double getQuinticUpperBornRadiusLimit() const;
void setQuinticUpperBornRadiusLimit(double quinticUpperBornRadiusLimit);
bool usesPeriodicBoundaryConditions() const {
return nonbondedMethod == GBVIForce::CutoffPeriodic;
}
protected:
ForceImpl* createImpl() const;
private:
class ParticleInfo;
NonbondedMethod nonbondedMethod;
double cutoffDistance, solventDielectric, soluteDielectric;
BornRadiusScalingMethod scalingMethod;
double quinticLowerLimitFactor, quinticUpperBornRadiusLimit;
class BondInfo;
std::vector<ParticleInfo> particles;
std::vector<BondInfo> bonds;
};
class GBVIForce::ParticleInfo {
public:
double charge, radius, gamma;
ParticleInfo() {
charge = radius = gamma = 0.0;
}
ParticleInfo(double charge, double radius, double gamma) :
charge(charge), radius(radius), gamma(gamma) {
}
};
class GBVIForce::BondInfo {
public:
int particle1, particle2;
double bondLength;
BondInfo() {
bondLength = 0.0;
particle1 = -1;
particle2 = -1;
}
BondInfo(int atomIndex1, int atomIndex2, double bondLength) :
particle1(atomIndex1), particle2(atomIndex2), bondLength(bondLength) {
}
};
} // namespace OpenMM
#endif /*OPENMM_GBVIFORCEFIELD_H_*/
OpenMM::GBVIForce::getSoluteDielectric
double getSoluteDielectric() const
Get the dielectric constant for the solute.
Definition: GBVIForce.h:177
OpenMM::GBVIForce::CutoffPeriodic
Periodic boundary conditions are used, so that each particle interacts only with the nearest periodic...
Definition: GBVIForce.h:72
OpenMM::Force
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
OpenMM::GBVIForce::BornRadiusScalingMethod
BornRadiusScalingMethod
This is an enumeration of the different methods that may be used for scaling of the Born radii...
Definition: GBVIForce.h:78
OpenMM::GBVIForce::usesPeriodicBoundaryConditions
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: GBVIForce.h:238
OpenMM::GBVIForce::setSoluteDielectric
void setSoluteDielectric(double dielectric)
Set the dielectric constant for the solute.
Definition: GBVIForce.h:183
OpenMM::GBVIForce::setSolventDielectric
void setSolventDielectric(double dielectric)
Set the dielectric constant for the solvent.
Definition: GBVIForce.h:171
OpenMM::GBVIForce::getNumParticles
int getNumParticles() const
Get the number of particles in the system.
Definition: GBVIForce.h:96
OpenMM::GBVIForce::getSolventDielectric
double getSolventDielectric() const
Get the dielectric constant for the solvent.
Definition: GBVIForce.h:165
OpenMM
Definition: AndersenThermostat.h:40
OpenMM::GBVIForce
This class implements an implicit solvation force using the GB/VI model.
Definition: GBVIForce.h:53
OpenMM::GBVIForce::NonbondedMethod
NonbondedMethod
This is an enumeration of the different methods that may be used for handling long range nonbonded fo...
Definition: GBVIForce.h:58