All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
AmoebaVdwForce.h
#ifndef OPENMM_AMOEBA_VDW_FORCE_H_
#define OPENMM_AMOEBA_VDW_FORCE_H_
/* -------------------------------------------------------------------------- *
* OpenMMAmoeba *
* -------------------------------------------------------------------------- *
* 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-2012 Stanford University and the Authors. *
* Authors: Mark Friedrichs, 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/Force.h"
#include "internal/windowsExportAmoeba.h"
#include <vector>
namespace OpenMM {
class OPENMM_EXPORT_AMOEBA AmoebaVdwForce : public Force {
public:
enum NonbondedMethod {
NoCutoff = 0,
CutoffPeriodic = 1,
};
AmoebaVdwForce();
int getNumParticles() const {
return parameters.size();
}
void setParticleParameters(int particleIndex, int parentIndex, double sigma, double epsilon, double reductionFactor);
void getParticleParameters(int particleIndex, int& parentIndex, double& sigma, double& epsilon, double& reductionFactor) const;
int addParticle(int parentIndex, double sigma, double epsilon, double reductionFactor);
void setSigmaCombiningRule(const std::string& sigmaCombiningRule);
const std::string& getSigmaCombiningRule(void) const;
void setEpsilonCombiningRule(const std::string& epsilonCombiningRule);
const std::string& getEpsilonCombiningRule(void) const;
bool getUseDispersionCorrection() const {
return useDispersionCorrection;
}
void setUseDispersionCorrection(bool useCorrection) {
useDispersionCorrection = useCorrection;
}
void setParticleExclusions(int particleIndex, const std::vector<int>& exclusions);
void getParticleExclusions(int particleIndex, std::vector<int>& exclusions) const;
void setCutoff(double cutoff);
double getCutoff() const;
NonbondedMethod getNonbondedMethod() const;
void setNonbondedMethod(NonbondedMethod method);
void updateParametersInContext(Context& context);
bool usesPeriodicBoundaryConditions() const {
return nonbondedMethod == AmoebaVdwForce::CutoffPeriodic;
}
protected:
ForceImpl* createImpl() const;
private:
class VdwInfo;
NonbondedMethod nonbondedMethod;
double cutoff;
bool useDispersionCorrection;
std::string sigmaCombiningRule;
std::string epsilonCombiningRule;
std::vector< std::vector<int> > exclusions;
std::vector<VdwInfo> parameters;
std::vector< std::vector< std::vector<double> > > sigEpsTable;
};
class AmoebaVdwForce::VdwInfo {
public:
int parentIndex;
double reductionFactor, sigma, epsilon, cutoff;
VdwInfo() {
parentIndex = -1;
reductionFactor = 0.0;
sigma = 1.0;
epsilon = 0.0;
}
VdwInfo(int parentIndex, double sigma, double epsilon, double reductionFactor) :
parentIndex(parentIndex), sigma(sigma), epsilon(epsilon), reductionFactor(reductionFactor) {
}
};
} // namespace OpenMM
#endif /*OPENMM_AMOEBA_VDW_FORCE_H_*/
OpenMM::AmoebaVdwForce::getUseDispersionCorrection
bool getUseDispersionCorrection() const
Get whether to add a contribution to the energy that approximately represents the effect of VdW inter...
Definition: AmoebaVdwForce.h:156
OpenMM::AmoebaVdwForce
This class implements a buffered 14-7 potential used to model van der Waals forces.
Definition: AmoebaVdwForce.h:55
OpenMM::Context
A Context stores the complete state of a simulation.
Definition: Context.h:67
OpenMM::AmoebaVdwForce::CutoffPeriodic
Periodic boundary conditions are used, so that each particle interacts only with the nearest periodic...
Definition: AmoebaVdwForce.h:70
OpenMM::Force
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
OpenMM::AmoebaVdwForce::usesPeriodicBoundaryConditions
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: AmoebaVdwForce.h:221
OpenMM::AmoebaVdwForce::getNumParticles
int getNumParticles() const
Get the number of particles.
Definition: AmoebaVdwForce.h:81
OpenMM::AmoebaVdwForce::setUseDispersionCorrection
void setUseDispersionCorrection(bool useCorrection)
Set whether to add a contribution to the energy that approximately represents the effect of VdW inter...
Definition: AmoebaVdwForce.h:166
OpenMM
Definition: AndersenThermostat.h:40
OpenMM::AmoebaVdwForce::NonbondedMethod
NonbondedMethod
This is an enumeration of the different methods that may be used for handling long range nonbonded fo...
Definition: AmoebaVdwForce.h:60