All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
CMAPTorsionForce.h
#ifndef OPENMM_CMAPTORSIONFORCE_H_
#define OPENMM_CMAPTORSIONFORCE_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) 2010-2015 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 "Vec3.h"
#include <vector>
#include "internal/windowsExport.h"
namespace OpenMM {
class OPENMM_EXPORT CMAPTorsionForce : public Force {
public:
CMAPTorsionForce();
int getNumMaps() const {
return maps.size();
}
int getNumTorsions() const {
return torsions.size();
}
int addMap(int size, const std::vector<double>& energy);
void getMapParameters(int index, int& size, std::vector<double>& energy) const;
void setMapParameters(int index, int size, const std::vector<double>& energy);
int addTorsion(int map, int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4);
void getTorsionParameters(int index, int& map, int& a1, int& a2, int& a3, int& a4, int& b1, int& b2, int& b3, int& b4) const;
void setTorsionParameters(int index, int map, int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4);
void updateParametersInContext(Context& context);
bool usesPeriodicBoundaryConditions() const {
return false;
}
protected:
ForceImpl* createImpl() const;
private:
class MapInfo;
class CMAPTorsionInfo;
std::vector<MapInfo> maps;
std::vector<CMAPTorsionInfo> torsions;
};
class CMAPTorsionForce::MapInfo {
public:
int size;
std::vector<double> energy;
MapInfo() {
size = -1;
}
MapInfo(int size, const std::vector<double>& energy) :
size(size), energy(energy) {
}
};
class CMAPTorsionForce::CMAPTorsionInfo {
public:
int map, a1, a2, a3, a4, b1, b2, b3, b4;
CMAPTorsionInfo() {
map = a1 = a2 = a3 = a4 = b1 = b2 = b3 = b4 = -1;
}
CMAPTorsionInfo(int map, int a1, int a2, int a3, int a4, int b1, int b2, int b3, int b4) :
map(map), a1(a1), a2(a2), a3(a3), a4(a4), b1(b1), b2(b2), b3(b3), b4(b4) {
}
};
} // namespace OpenMM
#endif /*OPENMM_CMAPTORSIONFORCE_H_*/
OpenMM::Context
A Context stores the complete state of a simulation.
Definition: Context.h:67
OpenMM::CMAPTorsionForce::usesPeriodicBoundaryConditions
bool usesPeriodicBoundaryConditions() const
Returns whether or not this force makes use of periodic boundary conditions.
Definition: CMAPTorsionForce.h:168
OpenMM::Force
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
OpenMM::CMAPTorsionForce::getNumMaps
int getNumMaps() const
Get the number of maps that have been defined.
Definition: CMAPTorsionForce.h:64
OpenMM::CMAPTorsionForce
This class implements an interaction between pairs of dihedral angles.
Definition: CMAPTorsionForce.h:55
OpenMM::CMAPTorsionForce::getNumTorsions
int getNumTorsions() const
Get the number of CMAP torsion terms in the potential function.
Definition: CMAPTorsionForce.h:70
OpenMM
Definition: AndersenThermostat.h:40