1 #ifndef OPENMM_AMOEBA_TORSION_TORSION_FORCE_H_
2 #define OPENMM_AMOEBA_TORSION_TORSION_FORCE_H_
35 #include "openmm/Force.h"
36 #include "internal/windowsExportAmoeba.h"
65 return torsionTorsions.size();
72 return torsionTorsionGrids.size();
87 int addTorsionTorsion(
int particle1,
int particle2,
int particle3,
int particle4,
int particle5,
int chiralCheckAtomIndex,
int gridIndex);
101 void getTorsionTorsionParameters(
int index,
int& particle1,
int& particle2,
int& particle3,
int& particle4,
int& particle5,
int& chiralCheckAtomIndex,
int& gridIndex)
const;
115 void setTorsionTorsionParameters(
int index,
int particle1,
int particle2,
int particle3,
int particle4,
int particle5,
int chiralCheckAtomIndex,
int gridIndex);
123 const std::vector<std::vector<std::vector<double> > >& getTorsionTorsionGrid(
int index)
const;
137 void setTorsionTorsionGrid(
int index,
const std::vector<std::vector<std::vector<double> > >& grid);
142 class TorsionTorsionInfo;
143 class TorsionTorsionGridInfo;
144 std::vector<TorsionTorsionInfo> torsionTorsions;
145 std::vector<TorsionTorsionGridInfo> torsionTorsionGrids;
152 class AmoebaTorsionTorsionForce::TorsionTorsionInfo {
156 int particle1, particle2, particle3, particle4, particle5;
157 int chiralCheckAtomIndex;
159 TorsionTorsionInfo() {
160 particle1 = particle2 = particle3 = particle4 = particle5 = chiralCheckAtomIndex = -1;
163 TorsionTorsionInfo(
int particle1,
int particle2,
int particle3,
int particle4,
int particle5,
int chiralCheckAtomIndex,
int gridIndex) :
164 particle1(particle1), particle2(particle2), particle3(particle3),
165 particle4(particle4), particle5(particle5), gridIndex(gridIndex), chiralCheckAtomIndex(chiralCheckAtomIndex) {
174 class AmoebaTorsionTorsionForce::TorsionTorsionGridInfo {
178 TorsionTorsionGridInfo() {
179 _size[0] = _size[1] = 0;
180 _startValues[0] = _startValues[1] = 0.0;
181 _spacing[0] = _spacing[1] = 1.0;
186 _grid.resize(grid.size());
187 for(
unsigned int kk = 0; kk < grid.size(); kk++){
188 _grid[kk].resize(grid[kk].size());
189 for(
unsigned int jj = 0; jj < grid[kk].size(); jj++){
190 _grid[kk][jj].resize(grid[kk][jj].size());
191 for(
unsigned int ii = 0; ii < grid[kk][jj].size(); ii++){
192 _grid[kk][jj][ii] = grid[kk][jj][ii];
197 _startValues[0] = _grid[0][0][0];
198 _startValues[1] = _grid[0][0][1];
200 _spacing[0] =
static_cast<double>(_grid.size()-1)/360.0;
201 _spacing[1] =
static_cast<double>(grid.size()-1)/360.0;
203 _size[0] =
static_cast<int>(grid.size());
204 _size[1] =
static_cast<int>(grid[0].size());
211 int getDimensionSize(
int index)
const {
214 double getStartValue(
int index)
const {
215 return _startValues[index];
217 double getSpacing(
int index)
const {
218 return _spacing[index];
225 double _startValues[2];
std::vector< std::vector< std::vector< double > > > TorsionTorsionGrid
Definition: AmoebaTorsionTorsionForce.h:43
std::vector< std::vector< std::vector< float > > > TorsionTorsionGridFloat
Definition: AmoebaTorsionTorsionForce.h:44
const std::vector< std::vector< std::vector< double > > > & getTorsionTorsionGrid(int index) const
Get the torsion-torsion grid at the specified index.
This class implements the Amoeba torsion-torsion interaction.
Definition: AmoebaTorsionTorsionForce.h:53
Force objects apply forces to the particles in a System, or alter their behavior in other ways...
Definition: Force.h:65
A ForceImpl provides the internal implementation of a Force.
Definition: ForceImpl.h:57
int getNumTorsionTorsions(void) const
Get the number of torsion-torsion terms in the potential function.
Definition: AmoebaTorsionTorsionForce.h:64
int getNumTorsionTorsionGrids(void) const
Get the number of torsion-torsion grids.
Definition: AmoebaTorsionTorsionForce.h:71