Commit 162d69a2 authored by peastman's avatar peastman
Browse files

Merge pull request #827 from peastman/reference

Lots of cleanup to reference platform
parents 2379b982 c44c956d
...@@ -77,7 +77,7 @@ public: ...@@ -77,7 +77,7 @@ public:
* *
* @return global cubicK term * @return global cubicK term
*/ */
double getAmoebaGlobalAngleCubic( void ) const; double getAmoebaGlobalAngleCubic() const;
/** /**
* Set the global quartic term * Set the global quartic term
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
* *
* @return global quartic term * @return global quartic term
*/ */
double getAmoebaGlobalAngleQuartic( void ) const; double getAmoebaGlobalAngleQuartic() const;
/** /**
* Set the global pentic term * Set the global pentic term
...@@ -105,7 +105,7 @@ public: ...@@ -105,7 +105,7 @@ public:
* *
* @return global penticK term * @return global penticK term
*/ */
double getAmoebaGlobalAnglePentic( void ) const; double getAmoebaGlobalAnglePentic() const;
/** /**
* Set the global sextic term * Set the global sextic term
...@@ -119,7 +119,7 @@ public: ...@@ -119,7 +119,7 @@ public:
* *
* @return global sextic term * @return global sextic term
*/ */
double getAmoebaGlobalAngleSextic( void ) const; double getAmoebaGlobalAngleSextic() const;
/** /**
* Add an angle term to the force field. * Add an angle term to the force field.
......
...@@ -78,7 +78,7 @@ public: ...@@ -78,7 +78,7 @@ public:
* *
* @return global cubicK term * @return global cubicK term
*/ */
double getAmoebaGlobalBondCubic( void ) const; double getAmoebaGlobalBondCubic() const;
/** /**
* Set the global quartic term * Set the global quartic term
...@@ -92,7 +92,7 @@ public: ...@@ -92,7 +92,7 @@ public:
* *
* @return global quartic term * @return global quartic term
*/ */
double getAmoebaGlobalBondQuartic( void ) const; double getAmoebaGlobalBondQuartic() const;
/** /**
* Add a bond term to the force field. * Add a bond term to the force field.
......
...@@ -127,7 +127,7 @@ public: ...@@ -127,7 +127,7 @@ public:
/** /**
* Get the flag signaling whether the cavity term should be included * Get the flag signaling whether the cavity term should be included
*/ */
int getIncludeCavityTerm( ) const; int getIncludeCavityTerm() const;
/** /**
* Set the flag signaling whether the cavity term should be included * Set the flag signaling whether the cavity term should be included
......
...@@ -77,7 +77,7 @@ public: ...@@ -77,7 +77,7 @@ public:
* *
* @return global cubicK term * @return global cubicK term
*/ */
double getAmoebaGlobalInPlaneAngleCubic( void ) const; double getAmoebaGlobalInPlaneAngleCubic() const;
/** /**
* Set the global quartic term * Set the global quartic term
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
* *
* @return global quartic term * @return global quartic term
*/ */
double getAmoebaGlobalInPlaneAngleQuartic( void ) const; double getAmoebaGlobalInPlaneAngleQuartic() const;
/** /**
* Set the global pentic term * Set the global pentic term
...@@ -105,7 +105,7 @@ public: ...@@ -105,7 +105,7 @@ public:
* *
* @return global penticK term * @return global penticK term
*/ */
double getAmoebaGlobalInPlaneAnglePentic( void ) const; double getAmoebaGlobalInPlaneAnglePentic() const;
/** /**
* Set the global sextic term * Set the global sextic term
...@@ -119,7 +119,7 @@ public: ...@@ -119,7 +119,7 @@ public:
* *
* @return global sextic term * @return global sextic term
*/ */
double getAmoebaGlobalInPlaneAngleSextic( void ) const; double getAmoebaGlobalInPlaneAngleSextic() const;
/** /**
* Add an angle term to the force field. * Add an angle term to the force field.
......
...@@ -97,7 +97,7 @@ private: ...@@ -97,7 +97,7 @@ private:
static int CovalentDegrees[AmoebaMultipoleForce::CovalentEnd]; static int CovalentDegrees[AmoebaMultipoleForce::CovalentEnd];
static bool initializedCovalentDegrees; static bool initializedCovalentDegrees;
static const int* getCovalentDegrees( void ); static const int* getCovalentDegrees();
}; };
} // namespace OpenMM } // namespace OpenMM
......
...@@ -63,7 +63,7 @@ void AmoebaAngleForce::setAngleParameters(int index, int particle1, int particle ...@@ -63,7 +63,7 @@ void AmoebaAngleForce::setAngleParameters(int index, int particle1, int particle
angles[index].quadraticK = quadraticK; angles[index].quadraticK = quadraticK;
} }
double AmoebaAngleForce::getAmoebaGlobalAngleCubic( void ) const { double AmoebaAngleForce::getAmoebaGlobalAngleCubic() const {
return _globalCubicK; return _globalCubicK;
} }
...@@ -71,7 +71,7 @@ void AmoebaAngleForce::setAmoebaGlobalAngleCubic(double cubicK ) { ...@@ -71,7 +71,7 @@ void AmoebaAngleForce::setAmoebaGlobalAngleCubic(double cubicK ) {
_globalCubicK = cubicK; _globalCubicK = cubicK;
} }
double AmoebaAngleForce::getAmoebaGlobalAngleQuartic( void ) const { double AmoebaAngleForce::getAmoebaGlobalAngleQuartic() const {
return _globalQuarticK; return _globalQuarticK;
} }
...@@ -79,7 +79,7 @@ void AmoebaAngleForce::setAmoebaGlobalAngleQuartic(double quarticK ) { ...@@ -79,7 +79,7 @@ void AmoebaAngleForce::setAmoebaGlobalAngleQuartic(double quarticK ) {
_globalQuarticK = quarticK; _globalQuarticK = quarticK;
} }
double AmoebaAngleForce::getAmoebaGlobalAnglePentic( void ) const { double AmoebaAngleForce::getAmoebaGlobalAnglePentic() const {
return _globalPenticK; return _globalPenticK;
} }
...@@ -87,7 +87,7 @@ void AmoebaAngleForce::setAmoebaGlobalAnglePentic(double penticK ) { ...@@ -87,7 +87,7 @@ void AmoebaAngleForce::setAmoebaGlobalAnglePentic(double penticK ) {
_globalPenticK = penticK; _globalPenticK = penticK;
} }
double AmoebaAngleForce::getAmoebaGlobalAngleSextic( void ) const { double AmoebaAngleForce::getAmoebaGlobalAngleSextic() const {
return _globalSexticK; return _globalSexticK;
} }
......
...@@ -67,11 +67,11 @@ void AmoebaBondForce::setAmoebaGlobalBondQuartic(double quarticK ) { ...@@ -67,11 +67,11 @@ void AmoebaBondForce::setAmoebaGlobalBondQuartic(double quarticK ) {
_globalQuarticK = quarticK; _globalQuarticK = quarticK;
} }
double AmoebaBondForce::getAmoebaGlobalBondCubic( void ) const { double AmoebaBondForce::getAmoebaGlobalBondCubic() const {
return _globalCubicK; return _globalCubicK;
} }
double AmoebaBondForce::getAmoebaGlobalBondQuartic( void ) const { double AmoebaBondForce::getAmoebaGlobalBondQuartic() const {
return _globalQuarticK; return _globalQuarticK;
} }
......
...@@ -73,11 +73,11 @@ void AmoebaInPlaneAngleForce::setAmoebaGlobalInPlaneAngleQuartic(double quarticK ...@@ -73,11 +73,11 @@ void AmoebaInPlaneAngleForce::setAmoebaGlobalInPlaneAngleQuartic(double quarticK
_globalQuarticK = quarticK; _globalQuarticK = quarticK;
} }
double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleCubic( void ) const { double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleCubic() const {
return _globalCubicK; return _globalCubicK;
} }
double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleQuartic( void ) const { double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleQuartic() const {
return _globalQuarticK; return _globalQuarticK;
} }
...@@ -89,11 +89,11 @@ void AmoebaInPlaneAngleForce::setAmoebaGlobalInPlaneAngleSextic(double quarticK ...@@ -89,11 +89,11 @@ void AmoebaInPlaneAngleForce::setAmoebaGlobalInPlaneAngleSextic(double quarticK
_globalSexticK = quarticK; _globalSexticK = quarticK;
} }
double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAnglePentic( void ) const { double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAnglePentic() const {
return _globalPenticK; return _globalPenticK;
} }
double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleSextic( void ) const { double AmoebaInPlaneAngleForce::getAmoebaGlobalInPlaneAngleSextic() const {
return _globalSexticK; return _globalSexticK;
} }
......
...@@ -45,7 +45,7 @@ AmoebaMultipoleForce::AmoebaMultipoleForce() : nonbondedMethod(NoCutoff), polari ...@@ -45,7 +45,7 @@ AmoebaMultipoleForce::AmoebaMultipoleForce() : nonbondedMethod(NoCutoff), polari
pmeGridDimension[0] = pmeGridDimension[1] = pmeGridDimension[2]; pmeGridDimension[0] = pmeGridDimension[1] = pmeGridDimension[2];
} }
AmoebaMultipoleForce::NonbondedMethod AmoebaMultipoleForce::getNonbondedMethod( void ) const { AmoebaMultipoleForce::NonbondedMethod AmoebaMultipoleForce::getNonbondedMethod() const {
return nonbondedMethod; return nonbondedMethod;
} }
...@@ -53,7 +53,7 @@ void AmoebaMultipoleForce::setNonbondedMethod( AmoebaMultipoleForce::NonbondedMe ...@@ -53,7 +53,7 @@ void AmoebaMultipoleForce::setNonbondedMethod( AmoebaMultipoleForce::NonbondedMe
nonbondedMethod = method; nonbondedMethod = method;
} }
AmoebaMultipoleForce::PolarizationType AmoebaMultipoleForce::getPolarizationType( void ) const { AmoebaMultipoleForce::PolarizationType AmoebaMultipoleForce::getPolarizationType() const {
return polarizationType; return polarizationType;
} }
...@@ -77,7 +77,7 @@ void AmoebaMultipoleForce::setAEwald(double inputAewald ) { ...@@ -77,7 +77,7 @@ void AmoebaMultipoleForce::setAEwald(double inputAewald ) {
aewald = inputAewald; aewald = inputAewald;
} }
int AmoebaMultipoleForce::getPmeBSplineOrder( void ) const { int AmoebaMultipoleForce::getPmeBSplineOrder() const {
return pmeBSplineOrder; return pmeBSplineOrder;
} }
...@@ -103,7 +103,7 @@ void AmoebaMultipoleForce::setPmeGridDimensions( const std::vector<int>& gridDim ...@@ -103,7 +103,7 @@ void AmoebaMultipoleForce::setPmeGridDimensions( const std::vector<int>& gridDim
return; return;
} }
int AmoebaMultipoleForce::getMutualInducedMaxIterations( void ) const { int AmoebaMultipoleForce::getMutualInducedMaxIterations() const {
return mutualInducedMaxIterations; return mutualInducedMaxIterations;
} }
...@@ -111,7 +111,7 @@ void AmoebaMultipoleForce::setMutualInducedMaxIterations( int inputMutualInduced ...@@ -111,7 +111,7 @@ void AmoebaMultipoleForce::setMutualInducedMaxIterations( int inputMutualInduced
mutualInducedMaxIterations = inputMutualInducedMaxIterations; mutualInducedMaxIterations = inputMutualInducedMaxIterations;
} }
double AmoebaMultipoleForce::getMutualInducedTargetEpsilon( void ) const { double AmoebaMultipoleForce::getMutualInducedTargetEpsilon() const {
return mutualInducedTargetEpsilon; return mutualInducedTargetEpsilon;
} }
......
...@@ -138,7 +138,7 @@ std::vector<std::string> AmoebaMultipoleForceImpl::getKernelNames() { ...@@ -138,7 +138,7 @@ std::vector<std::string> AmoebaMultipoleForceImpl::getKernelNames() {
return names; return names;
} }
const int* AmoebaMultipoleForceImpl::getCovalentDegrees( void ) { const int* AmoebaMultipoleForceImpl::getCovalentDegrees() {
if( !initializedCovalentDegrees ){ if( !initializedCovalentDegrees ){
initializedCovalentDegrees = true; initializedCovalentDegrees = true;
CovalentDegrees[AmoebaMultipoleForce::Covalent12] = 1; CovalentDegrees[AmoebaMultipoleForce::Covalent12] = 1;
......
...@@ -44,7 +44,7 @@ AmoebaOutOfPlaneBendForce::AmoebaOutOfPlaneBendForce() { ...@@ -44,7 +44,7 @@ AmoebaOutOfPlaneBendForce::AmoebaOutOfPlaneBendForce() {
} }
double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendCubic( void ) const { double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendCubic() const {
return _globalCubicK; return _globalCubicK;
} }
...@@ -52,7 +52,7 @@ void AmoebaOutOfPlaneBendForce::setAmoebaGlobalOutOfPlaneBendCubic(double cubicK ...@@ -52,7 +52,7 @@ void AmoebaOutOfPlaneBendForce::setAmoebaGlobalOutOfPlaneBendCubic(double cubicK
_globalCubicK = cubicK; _globalCubicK = cubicK;
} }
double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendQuartic( void ) const { double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendQuartic() const {
return _globalQuarticK; return _globalQuarticK;
} }
...@@ -60,7 +60,7 @@ void AmoebaOutOfPlaneBendForce::setAmoebaGlobalOutOfPlaneBendQuartic(double quar ...@@ -60,7 +60,7 @@ void AmoebaOutOfPlaneBendForce::setAmoebaGlobalOutOfPlaneBendQuartic(double quar
_globalQuarticK = quarticK; _globalQuarticK = quarticK;
} }
double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendPentic( void ) const { double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendPentic() const {
return _globalPenticK; return _globalPenticK;
} }
...@@ -68,7 +68,7 @@ void AmoebaOutOfPlaneBendForce::setAmoebaGlobalOutOfPlaneBendPentic(double penti ...@@ -68,7 +68,7 @@ void AmoebaOutOfPlaneBendForce::setAmoebaGlobalOutOfPlaneBendPentic(double penti
_globalPenticK = penticK; _globalPenticK = penticK;
} }
double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendSextic( void ) const { double AmoebaOutOfPlaneBendForce::getAmoebaGlobalOutOfPlaneBendSextic() const {
return _globalSexticK; return _globalSexticK;
} }
......
...@@ -66,7 +66,7 @@ void AmoebaVdwForce::setSigmaCombiningRule( const std::string& inputSigmaCombini ...@@ -66,7 +66,7 @@ void AmoebaVdwForce::setSigmaCombiningRule( const std::string& inputSigmaCombini
sigmaCombiningRule = inputSigmaCombiningRule; sigmaCombiningRule = inputSigmaCombiningRule;
} }
const std::string& AmoebaVdwForce::getSigmaCombiningRule( void ) const { const std::string& AmoebaVdwForce::getSigmaCombiningRule() const {
return sigmaCombiningRule; return sigmaCombiningRule;
} }
...@@ -74,7 +74,7 @@ void AmoebaVdwForce::setEpsilonCombiningRule( const std::string& inputEpsilonCom ...@@ -74,7 +74,7 @@ void AmoebaVdwForce::setEpsilonCombiningRule( const std::string& inputEpsilonCom
epsilonCombiningRule = inputEpsilonCombiningRule; epsilonCombiningRule = inputEpsilonCombiningRule;
} }
const std::string& AmoebaVdwForce::getEpsilonCombiningRule( void ) const { const std::string& AmoebaVdwForce::getEpsilonCombiningRule() const {
return epsilonCombiningRule; return epsilonCombiningRule;
} }
......
...@@ -63,35 +63,35 @@ void AmoebaWcaDispersionForce::setParticleParameters(int particleIndex, double r ...@@ -63,35 +63,35 @@ void AmoebaWcaDispersionForce::setParticleParameters(int particleIndex, double r
parameters[particleIndex].epsilon = epsilon; parameters[particleIndex].epsilon = epsilon;
} }
double AmoebaWcaDispersionForce::getEpso( void ) const { double AmoebaWcaDispersionForce::getEpso() const {
return epso; return epso;
} }
double AmoebaWcaDispersionForce::getEpsh( void ) const { double AmoebaWcaDispersionForce::getEpsh() const {
return epsh; return epsh;
} }
double AmoebaWcaDispersionForce::getRmino( void ) const { double AmoebaWcaDispersionForce::getRmino() const {
return rmino; return rmino;
} }
double AmoebaWcaDispersionForce::getRminh( void ) const { double AmoebaWcaDispersionForce::getRminh() const {
return rminh; return rminh;
} }
double AmoebaWcaDispersionForce::getAwater( void ) const { double AmoebaWcaDispersionForce::getAwater() const {
return awater; return awater;
} }
double AmoebaWcaDispersionForce::getShctd( void ) const { double AmoebaWcaDispersionForce::getShctd() const {
return shctd; return shctd;
} }
double AmoebaWcaDispersionForce::getDispoff( void ) const { double AmoebaWcaDispersionForce::getDispoff() const {
return dispoff; return dispoff;
} }
double AmoebaWcaDispersionForce::getSlevy( void ) const { double AmoebaWcaDispersionForce::getSlevy() const {
return slevy; return slevy;
} }
......
...@@ -91,16 +91,16 @@ ReferenceCalcAmoebaBondForceKernel::~ReferenceCalcAmoebaBondForceKernel() { ...@@ -91,16 +91,16 @@ ReferenceCalcAmoebaBondForceKernel::~ReferenceCalcAmoebaBondForceKernel() {
void ReferenceCalcAmoebaBondForceKernel::initialize(const System& system, const AmoebaBondForce& force) { void ReferenceCalcAmoebaBondForceKernel::initialize(const System& system, const AmoebaBondForce& force) {
numBonds = force.getNumBonds(); numBonds = force.getNumBonds();
for( int ii = 0; ii < numBonds; ii++) { for (int ii = 0; ii < numBonds; ii++) {
int particle1Index, particle2Index; int particle1Index, particle2Index;
double lengthValue, kValue; double lengthValue, kValue;
force.getBondParameters(ii, particle1Index, particle2Index, lengthValue, kValue ); force.getBondParameters(ii, particle1Index, particle2Index, lengthValue, kValue);
particle1.push_back( particle1Index ); particle1.push_back(particle1Index);
particle2.push_back( particle2Index ); particle2.push_back(particle2Index);
length.push_back( static_cast<RealOpenMM>( lengthValue ) ); length.push_back( static_cast<RealOpenMM>(lengthValue));
kQuadratic.push_back( static_cast<RealOpenMM>( kValue ) ); kQuadratic.push_back(static_cast<RealOpenMM>(kValue));
} }
globalBondCubic = static_cast<RealOpenMM>(force.getAmoebaGlobalBondCubic()); globalBondCubic = static_cast<RealOpenMM>(force.getAmoebaGlobalBondCubic());
globalBondQuartic = static_cast<RealOpenMM>(force.getAmoebaGlobalBondQuartic()); globalBondQuartic = static_cast<RealOpenMM>(force.getAmoebaGlobalBondQuartic());
...@@ -110,9 +110,9 @@ double ReferenceCalcAmoebaBondForceKernel::execute(ContextImpl& context, bool in ...@@ -110,9 +110,9 @@ double ReferenceCalcAmoebaBondForceKernel::execute(ContextImpl& context, bool in
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
AmoebaReferenceBondForce amoebaReferenceBondForce; AmoebaReferenceBondForce amoebaReferenceBondForce;
RealOpenMM energy = amoebaReferenceBondForce.calculateForceAndEnergy( numBonds, posData, particle1, particle2, length, kQuadratic, RealOpenMM energy = amoebaReferenceBondForce.calculateForceAndEnergy(numBonds, posData, particle1, particle2, length, kQuadratic,
globalBondCubic, globalBondQuartic, globalBondCubic, globalBondQuartic,
forceData ); forceData);
return static_cast<double>(energy); return static_cast<double>(energy);
} }
...@@ -150,11 +150,11 @@ void ReferenceCalcAmoebaAngleForceKernel::initialize(const System& system, const ...@@ -150,11 +150,11 @@ void ReferenceCalcAmoebaAngleForceKernel::initialize(const System& system, const
int particle1Index, particle2Index, particle3Index; int particle1Index, particle2Index, particle3Index;
double angleValue, k; double angleValue, k;
force.getAngleParameters(ii, particle1Index, particle2Index, particle3Index, angleValue, k); force.getAngleParameters(ii, particle1Index, particle2Index, particle3Index, angleValue, k);
particle1.push_back( particle1Index ); particle1.push_back(particle1Index);
particle2.push_back( particle2Index ); particle2.push_back(particle2Index);
particle3.push_back( particle3Index ); particle3.push_back(particle3Index);
angle.push_back( static_cast<RealOpenMM>( angleValue ) ); angle.push_back( static_cast<RealOpenMM>(angleValue));
kQuadratic.push_back( static_cast<RealOpenMM>( k) ); kQuadratic.push_back(static_cast<RealOpenMM>(k));
} }
globalAngleCubic = static_cast<RealOpenMM>(force.getAmoebaGlobalAngleCubic()); globalAngleCubic = static_cast<RealOpenMM>(force.getAmoebaGlobalAngleCubic());
globalAngleQuartic = static_cast<RealOpenMM>(force.getAmoebaGlobalAngleQuartic()); globalAngleQuartic = static_cast<RealOpenMM>(force.getAmoebaGlobalAngleQuartic());
...@@ -166,8 +166,8 @@ double ReferenceCalcAmoebaAngleForceKernel::execute(ContextImpl& context, bool i ...@@ -166,8 +166,8 @@ double ReferenceCalcAmoebaAngleForceKernel::execute(ContextImpl& context, bool i
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
AmoebaReferenceAngleForce amoebaReferenceAngleForce; AmoebaReferenceAngleForce amoebaReferenceAngleForce;
RealOpenMM energy = amoebaReferenceAngleForce.calculateForceAndEnergy( numAngles, RealOpenMM energy = amoebaReferenceAngleForce.calculateForceAndEnergy(numAngles,
posData, particle1, particle2, particle3, angle, kQuadratic, globalAngleCubic, globalAngleQuartic, globalAnglePentic, globalAngleSextic, forceData ); posData, particle1, particle2, particle3, angle, kQuadratic, globalAngleCubic, globalAngleQuartic, globalAnglePentic, globalAngleSextic, forceData);
return static_cast<double>(energy); return static_cast<double>(energy);
} }
...@@ -202,12 +202,12 @@ void ReferenceCalcAmoebaInPlaneAngleForceKernel::initialize(const System& system ...@@ -202,12 +202,12 @@ void ReferenceCalcAmoebaInPlaneAngleForceKernel::initialize(const System& system
int particle1Index, particle2Index, particle3Index, particle4Index; int particle1Index, particle2Index, particle3Index, particle4Index;
double angleValue, k; double angleValue, k;
force.getAngleParameters(ii, particle1Index, particle2Index, particle3Index, particle4Index, angleValue, k); force.getAngleParameters(ii, particle1Index, particle2Index, particle3Index, particle4Index, angleValue, k);
particle1.push_back( particle1Index ); particle1.push_back(particle1Index);
particle2.push_back( particle2Index ); particle2.push_back(particle2Index);
particle3.push_back( particle3Index ); particle3.push_back(particle3Index);
particle4.push_back( particle4Index ); particle4.push_back(particle4Index);
angle.push_back( static_cast<RealOpenMM>( angleValue ) ); angle.push_back( static_cast<RealOpenMM>(angleValue));
kQuadratic.push_back( static_cast<RealOpenMM>( k ) ); kQuadratic.push_back( static_cast<RealOpenMM>(k));
} }
globalInPlaneAngleCubic = static_cast<RealOpenMM>(force.getAmoebaGlobalInPlaneAngleCubic()); globalInPlaneAngleCubic = static_cast<RealOpenMM>(force.getAmoebaGlobalInPlaneAngleCubic());
globalInPlaneAngleQuartic = static_cast<RealOpenMM>(force.getAmoebaGlobalInPlaneAngleQuartic()); globalInPlaneAngleQuartic = static_cast<RealOpenMM>(force.getAmoebaGlobalInPlaneAngleQuartic());
...@@ -220,9 +220,9 @@ double ReferenceCalcAmoebaInPlaneAngleForceKernel::execute(ContextImpl& context, ...@@ -220,9 +220,9 @@ double ReferenceCalcAmoebaInPlaneAngleForceKernel::execute(ContextImpl& context,
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
AmoebaReferenceInPlaneAngleForce amoebaReferenceInPlaneAngleForce; AmoebaReferenceInPlaneAngleForce amoebaReferenceInPlaneAngleForce;
RealOpenMM energy = amoebaReferenceInPlaneAngleForce.calculateForceAndEnergy( numAngles, posData, particle1, particle2, particle3, particle4, RealOpenMM energy = amoebaReferenceInPlaneAngleForce.calculateForceAndEnergy(numAngles, posData, particle1, particle2, particle3, particle4,
angle, kQuadratic, globalInPlaneAngleCubic, globalInPlaneAngleQuartic, angle, kQuadratic, globalInPlaneAngleCubic, globalInPlaneAngleQuartic,
globalInPlaneAnglePentic, globalInPlaneAngleSextic, forceData ); globalInPlaneAnglePentic, globalInPlaneAngleSextic, forceData);
return static_cast<double>(energy); return static_cast<double>(energy);
} }
...@@ -257,14 +257,14 @@ void ReferenceCalcAmoebaPiTorsionForceKernel::initialize(const System& system, c ...@@ -257,14 +257,14 @@ void ReferenceCalcAmoebaPiTorsionForceKernel::initialize(const System& system, c
int particle1Index, particle2Index, particle3Index, particle4Index, particle5Index, particle6Index; int particle1Index, particle2Index, particle3Index, particle4Index, particle5Index, particle6Index;
double kTorsionParameter; double kTorsionParameter;
force.getPiTorsionParameters(ii, particle1Index, particle2Index, particle3Index, particle4Index, particle5Index, particle6Index, kTorsionParameter ); force.getPiTorsionParameters(ii, particle1Index, particle2Index, particle3Index, particle4Index, particle5Index, particle6Index, kTorsionParameter);
particle1.push_back( particle1Index ); particle1.push_back(particle1Index);
particle2.push_back( particle2Index ); particle2.push_back(particle2Index);
particle3.push_back( particle3Index ); particle3.push_back(particle3Index);
particle4.push_back( particle4Index ); particle4.push_back(particle4Index);
particle5.push_back( particle5Index ); particle5.push_back(particle5Index);
particle6.push_back( particle6Index ); particle6.push_back(particle6Index);
kTorsion.push_back( static_cast<RealOpenMM>(kTorsionParameter) ); kTorsion.push_back(static_cast<RealOpenMM>(kTorsionParameter));
} }
} }
...@@ -272,9 +272,9 @@ double ReferenceCalcAmoebaPiTorsionForceKernel::execute(ContextImpl& context, bo ...@@ -272,9 +272,9 @@ double ReferenceCalcAmoebaPiTorsionForceKernel::execute(ContextImpl& context, bo
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
AmoebaReferencePiTorsionForce amoebaReferencePiTorsionForce; AmoebaReferencePiTorsionForce amoebaReferencePiTorsionForce;
RealOpenMM energy = amoebaReferencePiTorsionForce.calculateForceAndEnergy( numPiTorsions, posData, particle1, particle2, RealOpenMM energy = amoebaReferencePiTorsionForce.calculateForceAndEnergy(numPiTorsions, posData, particle1, particle2,
particle3, particle4, particle5, particle6, particle3, particle4, particle5, particle6,
kTorsion, forceData ); kTorsion, forceData);
return static_cast<double>(energy); return static_cast<double>(energy);
} }
...@@ -305,18 +305,18 @@ ReferenceCalcAmoebaStretchBendForceKernel::~ReferenceCalcAmoebaStretchBendForceK ...@@ -305,18 +305,18 @@ ReferenceCalcAmoebaStretchBendForceKernel::~ReferenceCalcAmoebaStretchBendForceK
void ReferenceCalcAmoebaStretchBendForceKernel::initialize(const System& system, const AmoebaStretchBendForce& force) { void ReferenceCalcAmoebaStretchBendForceKernel::initialize(const System& system, const AmoebaStretchBendForce& force) {
numStretchBends = force.getNumStretchBends(); numStretchBends = force.getNumStretchBends();
for ( int ii = 0; ii < numStretchBends; ii++) { for (int ii = 0; ii < numStretchBends; ii++) {
int particle1Index, particle2Index, particle3Index; int particle1Index, particle2Index, particle3Index;
double lengthAB, lengthCB, angle, k1, k2; double lengthAB, lengthCB, angle, k1, k2;
force.getStretchBendParameters(ii, particle1Index, particle2Index, particle3Index, lengthAB, lengthCB, angle, k1, k2); force.getStretchBendParameters(ii, particle1Index, particle2Index, particle3Index, lengthAB, lengthCB, angle, k1, k2);
particle1.push_back( particle1Index ); particle1.push_back(particle1Index);
particle2.push_back( particle2Index ); particle2.push_back(particle2Index);
particle3.push_back( particle3Index ); particle3.push_back(particle3Index);
lengthABParameters.push_back( static_cast<RealOpenMM>(lengthAB) ); lengthABParameters.push_back(static_cast<RealOpenMM>(lengthAB));
lengthCBParameters.push_back( static_cast<RealOpenMM>(lengthCB) ); lengthCBParameters.push_back(static_cast<RealOpenMM>(lengthCB));
angleParameters.push_back( static_cast<RealOpenMM>(angle) ); angleParameters.push_back( static_cast<RealOpenMM>(angle));
k1Parameters.push_back( static_cast<RealOpenMM>(k1) ); k1Parameters.push_back( static_cast<RealOpenMM>(k1));
k2Parameters.push_back( static_cast<RealOpenMM>(k2) ); k2Parameters.push_back( static_cast<RealOpenMM>(k2));
} }
} }
...@@ -324,9 +324,9 @@ double ReferenceCalcAmoebaStretchBendForceKernel::execute(ContextImpl& context, ...@@ -324,9 +324,9 @@ double ReferenceCalcAmoebaStretchBendForceKernel::execute(ContextImpl& context,
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
AmoebaReferenceStretchBendForce amoebaReferenceStretchBendForce; AmoebaReferenceStretchBendForce amoebaReferenceStretchBendForce;
RealOpenMM energy = amoebaReferenceStretchBendForce.calculateForceAndEnergy( numStretchBends, posData, particle1, particle2, particle3, RealOpenMM energy = amoebaReferenceStretchBendForce.calculateForceAndEnergy(numStretchBends, posData, particle1, particle2, particle3,
lengthABParameters, lengthCBParameters, angleParameters, k1Parameters, lengthABParameters, lengthCBParameters, angleParameters, k1Parameters,
k2Parameters, forceData ); k2Parameters, forceData);
return static_cast<double>(energy); return static_cast<double>(energy);
} }
...@@ -366,16 +366,16 @@ void ReferenceCalcAmoebaOutOfPlaneBendForceKernel::initialize(const System& syst ...@@ -366,16 +366,16 @@ void ReferenceCalcAmoebaOutOfPlaneBendForceKernel::initialize(const System& syst
double k; double k;
force.getOutOfPlaneBendParameters(ii, particle1Index, particle2Index, particle3Index, particle4Index, k); force.getOutOfPlaneBendParameters(ii, particle1Index, particle2Index, particle3Index, particle4Index, k);
particle1.push_back( particle1Index ); particle1.push_back(particle1Index);
particle2.push_back( particle2Index ); particle2.push_back(particle2Index);
particle3.push_back( particle3Index ); particle3.push_back(particle3Index);
particle4.push_back( particle4Index ); particle4.push_back(particle4Index);
kParameters.push_back( static_cast<RealOpenMM>(k) ); kParameters.push_back(static_cast<RealOpenMM>(k));
} }
globalOutOfPlaneBendAngleCubic = static_cast<RealOpenMM>( force.getAmoebaGlobalOutOfPlaneBendCubic()); globalOutOfPlaneBendAngleCubic = static_cast<RealOpenMM>(force.getAmoebaGlobalOutOfPlaneBendCubic());
globalOutOfPlaneBendAngleQuartic = static_cast<RealOpenMM>( force.getAmoebaGlobalOutOfPlaneBendQuartic()); globalOutOfPlaneBendAngleQuartic = static_cast<RealOpenMM>(force.getAmoebaGlobalOutOfPlaneBendQuartic());
globalOutOfPlaneBendAnglePentic = static_cast<RealOpenMM>( force.getAmoebaGlobalOutOfPlaneBendPentic()); globalOutOfPlaneBendAnglePentic = static_cast<RealOpenMM>(force.getAmoebaGlobalOutOfPlaneBendPentic());
globalOutOfPlaneBendAngleSextic = static_cast<RealOpenMM>( force.getAmoebaGlobalOutOfPlaneBendSextic()); globalOutOfPlaneBendAngleSextic = static_cast<RealOpenMM>(force.getAmoebaGlobalOutOfPlaneBendSextic());
} }
...@@ -383,13 +383,13 @@ double ReferenceCalcAmoebaOutOfPlaneBendForceKernel::execute(ContextImpl& contex ...@@ -383,13 +383,13 @@ double ReferenceCalcAmoebaOutOfPlaneBendForceKernel::execute(ContextImpl& contex
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
AmoebaReferenceOutOfPlaneBendForce amoebaReferenceOutOfPlaneBendForce; AmoebaReferenceOutOfPlaneBendForce amoebaReferenceOutOfPlaneBendForce;
RealOpenMM energy = amoebaReferenceOutOfPlaneBendForce.calculateForceAndEnergy( numOutOfPlaneBends, posData, RealOpenMM energy = amoebaReferenceOutOfPlaneBendForce.calculateForceAndEnergy(numOutOfPlaneBends, posData,
particle1, particle2, particle3, particle4, particle1, particle2, particle3, particle4,
kParameters, kParameters,
globalOutOfPlaneBendAngleCubic, globalOutOfPlaneBendAngleCubic,
globalOutOfPlaneBendAngleQuartic, globalOutOfPlaneBendAngleQuartic,
globalOutOfPlaneBendAnglePentic, globalOutOfPlaneBendAnglePentic,
globalOutOfPlaneBendAngleSextic, forceData ); globalOutOfPlaneBendAngleSextic, forceData);
return static_cast<double>(energy); return static_cast<double>(energy);
} }
...@@ -426,13 +426,13 @@ void ReferenceCalcAmoebaTorsionTorsionForceKernel::initialize(const System& syst ...@@ -426,13 +426,13 @@ void ReferenceCalcAmoebaTorsionTorsionForceKernel::initialize(const System& syst
int particle1Index, particle2Index, particle3Index, particle4Index, particle5Index, chiralCheckAtomIndex, gridIndex; int particle1Index, particle2Index, particle3Index, particle4Index, particle5Index, chiralCheckAtomIndex, gridIndex;
force.getTorsionTorsionParameters(ii, particle1Index, particle2Index, particle3Index, force.getTorsionTorsionParameters(ii, particle1Index, particle2Index, particle3Index,
particle4Index, particle5Index, chiralCheckAtomIndex, gridIndex); particle4Index, particle5Index, chiralCheckAtomIndex, gridIndex);
particle1.push_back( particle1Index ); particle1.push_back(particle1Index);
particle2.push_back( particle2Index ); particle2.push_back(particle2Index);
particle3.push_back( particle3Index ); particle3.push_back(particle3Index);
particle4.push_back( particle4Index ); particle4.push_back(particle4Index);
particle5.push_back( particle5Index ); particle5.push_back(particle5Index);
chiralCheckAtom.push_back( chiralCheckAtomIndex ); chiralCheckAtom.push_back(chiralCheckAtomIndex);
gridIndices.push_back( gridIndex ); gridIndices.push_back(gridIndex);
} }
// torsion-torsion grids // torsion-torsion grids
...@@ -441,25 +441,25 @@ void ReferenceCalcAmoebaTorsionTorsionForceKernel::initialize(const System& syst ...@@ -441,25 +441,25 @@ void ReferenceCalcAmoebaTorsionTorsionForceKernel::initialize(const System& syst
torsionTorsionGrids.resize(numTorsionTorsionGrids); torsionTorsionGrids.resize(numTorsionTorsionGrids);
for (int ii = 0; ii < numTorsionTorsionGrids; ii++) { for (int ii = 0; ii < numTorsionTorsionGrids; ii++) {
const TorsionTorsionGrid grid = force.getTorsionTorsionGrid( ii ); const TorsionTorsionGrid grid = force.getTorsionTorsionGrid(ii);
torsionTorsionGrids[ii].resize( grid.size() ); torsionTorsionGrids[ii].resize(grid.size());
// check if grid needs to be reordered: x-angle should be 'slow' index // check if grid needs to be reordered: x-angle should be 'slow' index
TorsionTorsionGrid reorderedGrid; TorsionTorsionGrid reorderedGrid;
int reorder = 0; int reorder = 0;
if( grid[0][0][0] != grid[0][1][0] ){ if (grid[0][0][0] != grid[0][1][0]) {
AmoebaTorsionTorsionForceImpl::reorderGrid( grid, reorderedGrid ); AmoebaTorsionTorsionForceImpl::reorderGrid(grid, reorderedGrid);
reorder = 1; reorder = 1;
} }
for (unsigned int kk = 0; kk < grid.size(); kk++) { for (unsigned int kk = 0; kk < grid.size(); kk++) {
torsionTorsionGrids[ii][kk].resize( grid[kk].size() ); torsionTorsionGrids[ii][kk].resize(grid[kk].size());
for (unsigned int jj = 0; jj < grid[kk].size(); jj++) { for (unsigned int jj = 0; jj < grid[kk].size(); jj++) {
torsionTorsionGrids[ii][kk][jj].resize( grid[kk][jj].size() ); torsionTorsionGrids[ii][kk][jj].resize(grid[kk][jj].size());
if( reorder ){ if (reorder) {
for (unsigned int ll = 0; ll < grid[ll][jj].size(); ll++) { for (unsigned int ll = 0; ll < grid[ll][jj].size(); ll++) {
torsionTorsionGrids[ii][kk][jj][ll] = static_cast<RealOpenMM>(reorderedGrid[kk][jj][ll]); torsionTorsionGrids[ii][kk][jj][ll] = static_cast<RealOpenMM>(reorderedGrid[kk][jj][ll]);
} }
...@@ -478,9 +478,9 @@ double ReferenceCalcAmoebaTorsionTorsionForceKernel::execute(ContextImpl& contex ...@@ -478,9 +478,9 @@ double ReferenceCalcAmoebaTorsionTorsionForceKernel::execute(ContextImpl& contex
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
AmoebaReferenceTorsionTorsionForce amoebaReferenceTorsionTorsionForce; AmoebaReferenceTorsionTorsionForce amoebaReferenceTorsionTorsionForce;
RealOpenMM energy = amoebaReferenceTorsionTorsionForce.calculateForceAndEnergy( numTorsionTorsions, posData, RealOpenMM energy = amoebaReferenceTorsionTorsionForce.calculateForceAndEnergy(numTorsionTorsions, posData,
particle1, particle2, particle3, particle4, particle5, particle1, particle2, particle3, particle4, particle5,
chiralCheckAtom, gridIndices, torsionTorsionGrids, forceData ); chiralCheckAtom, gridIndices, torsionTorsionGrids, forceData);
return static_cast<double>(energy); return static_cast<double>(energy);
} }
...@@ -517,7 +517,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c ...@@ -517,7 +517,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c
int quadrupoleIndex = 0; int quadrupoleIndex = 0;
int maxCovalentRange = 0; int maxCovalentRange = 0;
double totalCharge = 0.0; double totalCharge = 0.0;
for( int ii = 0; ii < numMultipoles; ii++ ){ for (int ii = 0; ii < numMultipoles; ii++) {
// multipoles // multipoles
...@@ -526,7 +526,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c ...@@ -526,7 +526,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c
std::vector<double> dipolesD; std::vector<double> dipolesD;
std::vector<double> quadrupolesD; std::vector<double> quadrupolesD;
force.getMultipoleParameters(ii, charge, dipolesD, quadrupolesD, axisType, multipoleAtomZ, multipoleAtomX, multipoleAtomY, force.getMultipoleParameters(ii, charge, dipolesD, quadrupolesD, axisType, multipoleAtomZ, multipoleAtomX, multipoleAtomY,
tholeD, dampingFactorD, polarityD ); tholeD, dampingFactorD, polarityD);
totalCharge += charge; totalCharge += charge;
axisTypes[ii] = axisType; axisTypes[ii] = axisType;
...@@ -556,13 +556,13 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c ...@@ -556,13 +556,13 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c
// covalent info // covalent info
std::vector< std::vector<int> > covalentLists; std::vector< std::vector<int> > covalentLists;
force.getCovalentMaps(ii, covalentLists ); force.getCovalentMaps(ii, covalentLists);
multipoleAtomCovalentInfo[ii] = covalentLists; multipoleAtomCovalentInfo[ii] = covalentLists;
} }
polarizationType = force.getPolarizationType(); polarizationType = force.getPolarizationType();
if( polarizationType == AmoebaMultipoleForce::Mutual ){ if (polarizationType == AmoebaMultipoleForce::Mutual) {
mutualInducedMaxIterations = force.getMutualInducedMaxIterations(); mutualInducedMaxIterations = force.getMutualInducedMaxIterations();
mutualInducedTargetEpsilon = force.getMutualInducedTargetEpsilon(); mutualInducedTargetEpsilon = force.getMutualInducedTargetEpsilon();
} }
...@@ -570,7 +570,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c ...@@ -570,7 +570,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c
// PME // PME
nonbondedMethod = force.getNonbondedMethod(); nonbondedMethod = force.getNonbondedMethod();
if( nonbondedMethod == AmoebaMultipoleForce::PME ){ if (nonbondedMethod == AmoebaMultipoleForce::PME) {
usePme = true; usePme = true;
alphaEwald = force.getAEwald(); alphaEwald = force.getAEwald();
cutoffDistance = force.getCutoffDistance(); cutoffDistance = force.getCutoffDistance();
...@@ -591,7 +591,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c ...@@ -591,7 +591,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::initialize(const System& system, c
return; return;
} }
AmoebaReferenceMultipoleForce* ReferenceCalcAmoebaMultipoleForceKernel::setupAmoebaReferenceMultipoleForce(ContextImpl& context ) AmoebaReferenceMultipoleForce* ReferenceCalcAmoebaMultipoleForceKernel::setupAmoebaReferenceMultipoleForce(ContextImpl& context)
{ {
// amoebaReferenceMultipoleForce is set to AmoebaReferenceGeneralizedKirkwoodForce if AmoebaGeneralizedKirkwoodForce is present // amoebaReferenceMultipoleForce is set to AmoebaReferenceGeneralizedKirkwoodForce if AmoebaGeneralizedKirkwoodForce is present
...@@ -609,66 +609,66 @@ AmoebaReferenceMultipoleForce* ReferenceCalcAmoebaMultipoleForceKernel::setupAmo ...@@ -609,66 +609,66 @@ AmoebaReferenceMultipoleForce* ReferenceCalcAmoebaMultipoleForceKernel::setupAmo
} }
AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = NULL; AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = NULL;
if( gkKernel ){ if (gkKernel) {
// amoebaReferenceGeneralizedKirkwoodForce is deleted in AmoebaReferenceGeneralizedKirkwoodMultipoleForce // amoebaReferenceGeneralizedKirkwoodForce is deleted in AmoebaReferenceGeneralizedKirkwoodMultipoleForce
// destructor // destructor
AmoebaReferenceGeneralizedKirkwoodForce* amoebaReferenceGeneralizedKirkwoodForce = new AmoebaReferenceGeneralizedKirkwoodForce(); AmoebaReferenceGeneralizedKirkwoodForce* amoebaReferenceGeneralizedKirkwoodForce = new AmoebaReferenceGeneralizedKirkwoodForce();
amoebaReferenceGeneralizedKirkwoodForce->setNumParticles( gkKernel->getNumParticles() ); amoebaReferenceGeneralizedKirkwoodForce->setNumParticles(gkKernel->getNumParticles());
amoebaReferenceGeneralizedKirkwoodForce->setSoluteDielectric( gkKernel->getSoluteDielectric() ); amoebaReferenceGeneralizedKirkwoodForce->setSoluteDielectric(gkKernel->getSoluteDielectric());
amoebaReferenceGeneralizedKirkwoodForce->setSolventDielectric( gkKernel->getSolventDielectric() ); amoebaReferenceGeneralizedKirkwoodForce->setSolventDielectric(gkKernel->getSolventDielectric());
amoebaReferenceGeneralizedKirkwoodForce->setDielectricOffset( gkKernel->getDielectricOffset() ); amoebaReferenceGeneralizedKirkwoodForce->setDielectricOffset(gkKernel->getDielectricOffset());
amoebaReferenceGeneralizedKirkwoodForce->setProbeRadius( gkKernel->getProbeRadius() ); amoebaReferenceGeneralizedKirkwoodForce->setProbeRadius(gkKernel->getProbeRadius());
amoebaReferenceGeneralizedKirkwoodForce->setSurfaceAreaFactor( gkKernel->getSurfaceAreaFactor() ); amoebaReferenceGeneralizedKirkwoodForce->setSurfaceAreaFactor(gkKernel->getSurfaceAreaFactor());
amoebaReferenceGeneralizedKirkwoodForce->setIncludeCavityTerm( gkKernel->getIncludeCavityTerm() ); amoebaReferenceGeneralizedKirkwoodForce->setIncludeCavityTerm(gkKernel->getIncludeCavityTerm());
amoebaReferenceGeneralizedKirkwoodForce->setDirectPolarization( gkKernel->getDirectPolarization() ); amoebaReferenceGeneralizedKirkwoodForce->setDirectPolarization(gkKernel->getDirectPolarization());
vector<RealOpenMM> parameters; vector<RealOpenMM> parameters;
gkKernel->getAtomicRadii( parameters ); gkKernel->getAtomicRadii(parameters);
amoebaReferenceGeneralizedKirkwoodForce->setAtomicRadii( parameters ); amoebaReferenceGeneralizedKirkwoodForce->setAtomicRadii(parameters);
gkKernel->getScaleFactors( parameters ); gkKernel->getScaleFactors(parameters);
amoebaReferenceGeneralizedKirkwoodForce->setScaleFactors( parameters ); amoebaReferenceGeneralizedKirkwoodForce->setScaleFactors(parameters);
gkKernel->getCharges( parameters ); gkKernel->getCharges(parameters);
amoebaReferenceGeneralizedKirkwoodForce->setCharges( parameters ); amoebaReferenceGeneralizedKirkwoodForce->setCharges(parameters);
// calculate Grycuk Born radii // calculate Grycuk Born radii
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
amoebaReferenceGeneralizedKirkwoodForce->calculateGrycukBornRadii( posData ); amoebaReferenceGeneralizedKirkwoodForce->calculateGrycukBornRadii(posData);
amoebaReferenceMultipoleForce = new AmoebaReferenceGeneralizedKirkwoodMultipoleForce( amoebaReferenceGeneralizedKirkwoodForce ); amoebaReferenceMultipoleForce = new AmoebaReferenceGeneralizedKirkwoodMultipoleForce(amoebaReferenceGeneralizedKirkwoodForce);
} else if( usePme ) { } else if (usePme) {
AmoebaReferencePmeMultipoleForce* amoebaReferencePmeMultipoleForce = new AmoebaReferencePmeMultipoleForce( ); AmoebaReferencePmeMultipoleForce* amoebaReferencePmeMultipoleForce = new AmoebaReferencePmeMultipoleForce();
amoebaReferencePmeMultipoleForce->setAlphaEwald( alphaEwald ); amoebaReferencePmeMultipoleForce->setAlphaEwald(alphaEwald);
amoebaReferencePmeMultipoleForce->setCutoffDistance( cutoffDistance ); amoebaReferencePmeMultipoleForce->setCutoffDistance(cutoffDistance);
amoebaReferencePmeMultipoleForce->setPmeGridDimensions( pmeGridDimension ); amoebaReferencePmeMultipoleForce->setPmeGridDimensions(pmeGridDimension);
RealVec* boxVectors = extractBoxVectors(context); RealVec* boxVectors = extractBoxVectors(context);
double minAllowedSize = 1.999999*cutoffDistance; double minAllowedSize = 1.999999*cutoffDistance;
if (boxVectors[0][0] < minAllowedSize || boxVectors[1][1] < minAllowedSize || boxVectors[2][2] < minAllowedSize){ if (boxVectors[0][0] < minAllowedSize || boxVectors[1][1] < minAllowedSize || boxVectors[2][2] < minAllowedSize) {
throw OpenMMException("The periodic box size has decreased to less than twice the nonbonded cutoff."); throw OpenMMException("The periodic box size has decreased to less than twice the nonbonded cutoff.");
} }
amoebaReferencePmeMultipoleForce->setPeriodicBoxSize(boxVectors); amoebaReferencePmeMultipoleForce->setPeriodicBoxSize(boxVectors);
amoebaReferenceMultipoleForce = static_cast<AmoebaReferenceMultipoleForce*>(amoebaReferencePmeMultipoleForce); amoebaReferenceMultipoleForce = static_cast<AmoebaReferenceMultipoleForce*>(amoebaReferencePmeMultipoleForce);
} else { } else {
amoebaReferenceMultipoleForce = new AmoebaReferenceMultipoleForce( AmoebaReferenceMultipoleForce::NoCutoff ); amoebaReferenceMultipoleForce = new AmoebaReferenceMultipoleForce(AmoebaReferenceMultipoleForce::NoCutoff);
} }
// set polarization type // set polarization type
if( polarizationType == AmoebaMultipoleForce::Mutual ){ if (polarizationType == AmoebaMultipoleForce::Mutual) {
amoebaReferenceMultipoleForce->setPolarizationType( AmoebaReferenceMultipoleForce::Mutual ); amoebaReferenceMultipoleForce->setPolarizationType(AmoebaReferenceMultipoleForce::Mutual);
amoebaReferenceMultipoleForce->setMutualInducedDipoleTargetEpsilon( mutualInducedTargetEpsilon ); amoebaReferenceMultipoleForce->setMutualInducedDipoleTargetEpsilon(mutualInducedTargetEpsilon);
amoebaReferenceMultipoleForce->setMaximumMutualInducedDipoleIterations( mutualInducedMaxIterations ); amoebaReferenceMultipoleForce->setMaximumMutualInducedDipoleIterations(mutualInducedMaxIterations);
} else if( polarizationType == AmoebaMultipoleForce::Direct ){ } else if (polarizationType == AmoebaMultipoleForce::Direct) {
amoebaReferenceMultipoleForce->setPolarizationType( AmoebaReferenceMultipoleForce::Direct ); amoebaReferenceMultipoleForce->setPolarizationType(AmoebaReferenceMultipoleForce::Direct);
} else { } else {
throw OpenMMException("Polarization type not recognzied." ); throw OpenMMException("Polarization type not recognzied.");
} }
return amoebaReferenceMultipoleForce; return amoebaReferenceMultipoleForce;
...@@ -677,11 +677,11 @@ AmoebaReferenceMultipoleForce* ReferenceCalcAmoebaMultipoleForceKernel::setupAmo ...@@ -677,11 +677,11 @@ AmoebaReferenceMultipoleForce* ReferenceCalcAmoebaMultipoleForceKernel::setupAmo
double ReferenceCalcAmoebaMultipoleForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) { double ReferenceCalcAmoebaMultipoleForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) {
AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = setupAmoebaReferenceMultipoleForce( context ); AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = setupAmoebaReferenceMultipoleForce(context);
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
RealOpenMM energy = amoebaReferenceMultipoleForce->calculateForceAndEnergy( posData, charges, dipoles, quadrupoles, tholes, RealOpenMM energy = amoebaReferenceMultipoleForce->calculateForceAndEnergy(posData, charges, dipoles, quadrupoles, tholes,
dampingFactors, polarity, axisTypes, dampingFactors, polarity, axisTypes,
multipoleAtomZs, multipoleAtomXs, multipoleAtomYs, multipoleAtomZs, multipoleAtomXs, multipoleAtomYs,
multipoleAtomCovalentInfo, forceData); multipoleAtomCovalentInfo, forceData);
...@@ -697,7 +697,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::getInducedDipoles(ContextImpl& con ...@@ -697,7 +697,7 @@ void ReferenceCalcAmoebaMultipoleForceKernel::getInducedDipoles(ContextImpl& con
// Create an AmoebaReferenceMultipoleForce to do the calculation. // Create an AmoebaReferenceMultipoleForce to do the calculation.
AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = setupAmoebaReferenceMultipoleForce( context ); AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = setupAmoebaReferenceMultipoleForce(context);
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
// Retrieve the induced dipoles. // Retrieve the induced dipoles.
...@@ -711,44 +711,44 @@ void ReferenceCalcAmoebaMultipoleForceKernel::getInducedDipoles(ContextImpl& con ...@@ -711,44 +711,44 @@ void ReferenceCalcAmoebaMultipoleForceKernel::getInducedDipoles(ContextImpl& con
} }
void ReferenceCalcAmoebaMultipoleForceKernel::getElectrostaticPotential(ContextImpl& context, const std::vector< Vec3 >& inputGrid, void ReferenceCalcAmoebaMultipoleForceKernel::getElectrostaticPotential(ContextImpl& context, const std::vector< Vec3 >& inputGrid,
std::vector< double >& outputElectrostaticPotential ){ std::vector< double >& outputElectrostaticPotential) {
AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = setupAmoebaReferenceMultipoleForce( context ); AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = setupAmoebaReferenceMultipoleForce(context);
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec> grid( inputGrid.size() ); vector<RealVec> grid(inputGrid.size());
vector<RealOpenMM> potential( inputGrid.size() ); vector<RealOpenMM> potential(inputGrid.size());
for( unsigned int ii = 0; ii < inputGrid.size(); ii++ ){ for (unsigned int ii = 0; ii < inputGrid.size(); ii++) {
grid[ii] = inputGrid[ii]; grid[ii] = inputGrid[ii];
} }
amoebaReferenceMultipoleForce->calculateElectrostaticPotential( posData, charges, dipoles, quadrupoles, tholes, amoebaReferenceMultipoleForce->calculateElectrostaticPotential(posData, charges, dipoles, quadrupoles, tholes,
dampingFactors, polarity, axisTypes, dampingFactors, polarity, axisTypes,
multipoleAtomZs, multipoleAtomXs, multipoleAtomYs, multipoleAtomZs, multipoleAtomXs, multipoleAtomYs,
multipoleAtomCovalentInfo, grid, potential ); multipoleAtomCovalentInfo, grid, potential);
outputElectrostaticPotential.resize( inputGrid.size() ); outputElectrostaticPotential.resize(inputGrid.size());
for( unsigned int ii = 0; ii < inputGrid.size(); ii++ ){ for (unsigned int ii = 0; ii < inputGrid.size(); ii++) {
outputElectrostaticPotential[ii] = potential[ii]; outputElectrostaticPotential[ii] = potential[ii];
} }
delete amoebaReferenceMultipoleForce; delete amoebaReferenceMultipoleForce;
} }
void ReferenceCalcAmoebaMultipoleForceKernel::getSystemMultipoleMoments(ContextImpl& context, std::vector< double >& outputMultipoleMoments){ void ReferenceCalcAmoebaMultipoleForceKernel::getSystemMultipoleMoments(ContextImpl& context, std::vector< double >& outputMultipoleMoments) {
// retrieve masses // retrieve masses
const System& system = context.getSystem(); const System& system = context.getSystem();
vector<RealOpenMM> masses; vector<RealOpenMM> masses;
for (int i = 0; i < system.getNumParticles(); ++i) { for (int i = 0; i < system.getNumParticles(); ++i) {
masses.push_back( static_cast<RealOpenMM>(system.getParticleMass(i)) ); masses.push_back(static_cast<RealOpenMM>(system.getParticleMass(i)));
} }
AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = setupAmoebaReferenceMultipoleForce( context ); AmoebaReferenceMultipoleForce* amoebaReferenceMultipoleForce = setupAmoebaReferenceMultipoleForce(context);
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
amoebaReferenceMultipoleForce->calculateAmoebaSystemMultipoleMoments( masses, posData, charges, dipoles, quadrupoles, tholes, amoebaReferenceMultipoleForce->calculateAmoebaSystemMultipoleMoments(masses, posData, charges, dipoles, quadrupoles, tholes,
dampingFactors, polarity, axisTypes, dampingFactors, polarity, axisTypes,
multipoleAtomZs, multipoleAtomXs, multipoleAtomYs, multipoleAtomZs, multipoleAtomXs, multipoleAtomYs,
multipoleAtomCovalentInfo, outputMultipoleMoments ); multipoleAtomCovalentInfo, outputMultipoleMoments);
delete amoebaReferenceMultipoleForce; delete amoebaReferenceMultipoleForce;
} }
...@@ -801,51 +801,51 @@ ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::ReferenceCalcAmoebaGeneralize ...@@ -801,51 +801,51 @@ ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::ReferenceCalcAmoebaGeneralize
ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::~ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel() { ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::~ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel() {
} }
int ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getNumParticles( void ) const { int ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getNumParticles() const {
return numParticles; return numParticles;
} }
int ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getIncludeCavityTerm( void ) const { int ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getIncludeCavityTerm() const {
return includeCavityTerm; return includeCavityTerm;
} }
int ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getDirectPolarization( void ) const { int ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getDirectPolarization() const {
return directPolarization; return directPolarization;
} }
RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getSoluteDielectric( void ) const { RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getSoluteDielectric() const {
return soluteDielectric; return soluteDielectric;
} }
RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getSolventDielectric( void ) const { RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getSolventDielectric() const {
return solventDielectric; return solventDielectric;
} }
RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getDielectricOffset( void ) const { RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getDielectricOffset() const {
return dielectricOffset; return dielectricOffset;
} }
RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getProbeRadius( void ) const { RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getProbeRadius() const {
return probeRadius; return probeRadius;
} }
RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getSurfaceAreaFactor( void ) const { RealOpenMM ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getSurfaceAreaFactor() const {
return surfaceAreaFactor; return surfaceAreaFactor;
} }
void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getAtomicRadii( vector<RealOpenMM>& outputAtomicRadii ) const { void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getAtomicRadii(vector<RealOpenMM>& outputAtomicRadii) const {
outputAtomicRadii.resize( atomicRadii.size() ); outputAtomicRadii.resize(atomicRadii.size());
copy( atomicRadii.begin(), atomicRadii.end(), outputAtomicRadii.begin() ); copy(atomicRadii.begin(), atomicRadii.end(), outputAtomicRadii.begin());
} }
void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getScaleFactors( vector<RealOpenMM>& outputScaleFactors ) const { void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getScaleFactors(vector<RealOpenMM>& outputScaleFactors) const {
outputScaleFactors.resize( scaleFactors.size() ); outputScaleFactors.resize(scaleFactors.size());
copy( scaleFactors.begin(), scaleFactors.end(), outputScaleFactors.begin() ); copy(scaleFactors.begin(), scaleFactors.end(), outputScaleFactors.begin());
} }
void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getCharges( vector<RealOpenMM>& outputCharges ) const { void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::getCharges(vector<RealOpenMM>& outputCharges) const {
outputCharges.resize( charges.size() ); outputCharges.resize(charges.size());
copy( charges.begin(), charges.end(), outputCharges.begin() ); copy(charges.begin(), charges.end(), outputCharges.begin());
} }
void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::initialize(const System& system, const AmoebaGeneralizedKirkwoodForce& force) { void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::initialize(const System& system, const AmoebaGeneralizedKirkwoodForce& force) {
...@@ -861,37 +861,37 @@ void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::initialize(const System& ...@@ -861,37 +861,37 @@ void ReferenceCalcAmoebaGeneralizedKirkwoodForceKernel::initialize(const System&
throw OpenMMException("AmoebaGeneralizedKirkwoodForce requires the System to also contain an AmoebaMultipoleForce."); throw OpenMMException("AmoebaGeneralizedKirkwoodForce requires the System to also contain an AmoebaMultipoleForce.");
} }
if (amoebaMultipoleForce->getNonbondedMethod() != AmoebaMultipoleForce::NoCutoff ) { if (amoebaMultipoleForce->getNonbondedMethod() != AmoebaMultipoleForce::NoCutoff) {
throw OpenMMException("AmoebaGeneralizedKirkwoodForce requires the AmoebaMultipoleForce use the NoCutoff nonbonded method."); throw OpenMMException("AmoebaGeneralizedKirkwoodForce requires the AmoebaMultipoleForce use the NoCutoff nonbonded method.");
} }
numParticles = system.getNumParticles(); numParticles = system.getNumParticles();
for( int ii = 0; ii < numParticles; ii++ ){ for (int ii = 0; ii < numParticles; ii++) {
double particleCharge, particleRadius, scalingFactor; double particleCharge, particleRadius, scalingFactor;
force.getParticleParameters(ii, particleCharge, particleRadius, scalingFactor); force.getParticleParameters(ii, particleCharge, particleRadius, scalingFactor);
atomicRadii.push_back( static_cast<RealOpenMM>( particleRadius ) ); atomicRadii.push_back(static_cast<RealOpenMM>(particleRadius));
scaleFactors.push_back( static_cast<RealOpenMM>( scalingFactor ) ); scaleFactors.push_back(static_cast<RealOpenMM>(scalingFactor));
charges.push_back( static_cast<RealOpenMM>( particleCharge ) ); charges.push_back(static_cast<RealOpenMM>(particleCharge));
// Make sure the charge matches the one specified by the AmoebaMultipoleForce. // Make sure the charge matches the one specified by the AmoebaMultipoleForce.
double charge2, thole, damping, polarity; double charge2, thole, damping, polarity;
int axisType, atomX, atomY, atomZ; int axisType, atomX, atomY, atomZ;
vector<double> dipole, quadrupole; vector<double> dipole, quadrupole;
amoebaMultipoleForce->getMultipoleParameters( ii, charge2, dipole, quadrupole, axisType, atomZ, atomX, atomY, thole, damping, polarity); amoebaMultipoleForce->getMultipoleParameters(ii, charge2, dipole, quadrupole, axisType, atomZ, atomX, atomY, thole, damping, polarity);
if ( particleCharge != charge2 ){ if (particleCharge != charge2) {
throw OpenMMException("AmoebaGeneralizedKirkwoodForce and AmoebaMultipoleForce must specify the same charge for every atom."); throw OpenMMException("AmoebaGeneralizedKirkwoodForce and AmoebaMultipoleForce must specify the same charge for every atom.");
} }
} }
includeCavityTerm = force.getIncludeCavityTerm(); includeCavityTerm = force.getIncludeCavityTerm();
soluteDielectric = static_cast<RealOpenMM>( force.getSoluteDielectric() ); soluteDielectric = static_cast<RealOpenMM>(force.getSoluteDielectric());
solventDielectric = static_cast<RealOpenMM>( force.getSolventDielectric() ); solventDielectric = static_cast<RealOpenMM>(force.getSolventDielectric());
dielectricOffset = static_cast<RealOpenMM>( 0.009 ); dielectricOffset = static_cast<RealOpenMM>(0.009);
probeRadius = static_cast<RealOpenMM>( force.getProbeRadius() ), probeRadius = static_cast<RealOpenMM>(force.getProbeRadius()),
surfaceAreaFactor = static_cast<RealOpenMM>( force.getSurfaceAreaFactor() ); surfaceAreaFactor = static_cast<RealOpenMM>(force.getSurfaceAreaFactor());
directPolarization = amoebaMultipoleForce->getPolarizationType() == AmoebaMultipoleForce::Direct ? 1 : 0; directPolarization = amoebaMultipoleForce->getPolarizationType() == AmoebaMultipoleForce::Direct ? 1 : 0;
} }
...@@ -924,7 +924,7 @@ ReferenceCalcAmoebaVdwForceKernel::ReferenceCalcAmoebaVdwForceKernel(std::string ...@@ -924,7 +924,7 @@ ReferenceCalcAmoebaVdwForceKernel::ReferenceCalcAmoebaVdwForceKernel(std::string
} }
ReferenceCalcAmoebaVdwForceKernel::~ReferenceCalcAmoebaVdwForceKernel() { ReferenceCalcAmoebaVdwForceKernel::~ReferenceCalcAmoebaVdwForceKernel() {
if( neighborList ){ if (neighborList) {
delete neighborList; delete neighborList;
} }
} }
...@@ -935,28 +935,28 @@ void ReferenceCalcAmoebaVdwForceKernel::initialize(const System& system, const A ...@@ -935,28 +935,28 @@ void ReferenceCalcAmoebaVdwForceKernel::initialize(const System& system, const A
numParticles = system.getNumParticles(); numParticles = system.getNumParticles();
indexIVs.resize( numParticles ); indexIVs.resize(numParticles);
allExclusions.resize( numParticles ); allExclusions.resize(numParticles);
sigmas.resize( numParticles ); sigmas.resize(numParticles);
epsilons.resize( numParticles ); epsilons.resize(numParticles);
reductions.resize( numParticles ); reductions.resize(numParticles);
for( int ii = 0; ii < numParticles; ii++ ){ for (int ii = 0; ii < numParticles; ii++) {
int indexIV; int indexIV;
double sigma, epsilon, reduction; double sigma, epsilon, reduction;
std::vector<int> exclusions; std::vector<int> exclusions;
force.getParticleParameters( ii, indexIV, sigma, epsilon, reduction ); force.getParticleParameters(ii, indexIV, sigma, epsilon, reduction);
force.getParticleExclusions( ii, exclusions ); force.getParticleExclusions(ii, exclusions);
for( unsigned int jj = 0; jj < exclusions.size(); jj++ ){ for (unsigned int jj = 0; jj < exclusions.size(); jj++) {
allExclusions[ii].insert( exclusions[jj] ); allExclusions[ii].insert(exclusions[jj]);
} }
indexIVs[ii] = indexIV; indexIVs[ii] = indexIV;
sigmas[ii] = static_cast<RealOpenMM>( sigma ); sigmas[ii] = static_cast<RealOpenMM>(sigma);
epsilons[ii] = static_cast<RealOpenMM>( epsilon ); epsilons[ii] = static_cast<RealOpenMM>(epsilon);
reductions[ii] = static_cast<RealOpenMM>( reduction ); reductions[ii] = static_cast<RealOpenMM>(reduction);
} }
sigmaCombiningRule = force.getSigmaCombiningRule(); sigmaCombiningRule = force.getSigmaCombiningRule();
epsilonCombiningRule = force.getEpsilonCombiningRule(); epsilonCombiningRule = force.getEpsilonCombiningRule();
...@@ -972,27 +972,27 @@ double ReferenceCalcAmoebaVdwForceKernel::execute(ContextImpl& context, bool inc ...@@ -972,27 +972,27 @@ double ReferenceCalcAmoebaVdwForceKernel::execute(ContextImpl& context, bool inc
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
AmoebaReferenceVdwForce vdwForce( sigmaCombiningRule, epsilonCombiningRule ); AmoebaReferenceVdwForce vdwForce(sigmaCombiningRule, epsilonCombiningRule);
RealOpenMM energy; RealOpenMM energy;
if( useCutoff ){ if (useCutoff) {
vdwForce.setCutoff( cutoff ); vdwForce.setCutoff(cutoff);
computeNeighborListVoxelHash( *neighborList, numParticles, posData, allExclusions, extractBoxVectors(context), usePBC, cutoff, 0.0); computeNeighborListVoxelHash(*neighborList, numParticles, posData, allExclusions, extractBoxVectors(context), usePBC, cutoff, 0.0);
if( usePBC ){ if (usePBC) {
vdwForce.setNonbondedMethod( AmoebaReferenceVdwForce::CutoffPeriodic); vdwForce.setNonbondedMethod(AmoebaReferenceVdwForce::CutoffPeriodic);
RealVec* boxVectors = extractBoxVectors(context); RealVec* boxVectors = extractBoxVectors(context);
double minAllowedSize = 1.999999*cutoff; double minAllowedSize = 1.999999*cutoff;
if (boxVectors[0][0] < minAllowedSize || boxVectors[1][1] < minAllowedSize || boxVectors[2][2] < minAllowedSize){ if (boxVectors[0][0] < minAllowedSize || boxVectors[1][1] < minAllowedSize || boxVectors[2][2] < minAllowedSize) {
throw OpenMMException("The periodic box size has decreased to less than twice the cutoff."); throw OpenMMException("The periodic box size has decreased to less than twice the cutoff.");
} }
vdwForce.setPeriodicBox(boxVectors); vdwForce.setPeriodicBox(boxVectors);
energy = vdwForce.calculateForceAndEnergy( numParticles, posData, indexIVs, sigmas, epsilons, reductions, *neighborList, forceData); energy = vdwForce.calculateForceAndEnergy(numParticles, posData, indexIVs, sigmas, epsilons, reductions, *neighborList, forceData);
energy += dispersionCoefficient/(boxVectors[0][0]*boxVectors[1][1]*boxVectors[2][2]); energy += dispersionCoefficient/(boxVectors[0][0]*boxVectors[1][1]*boxVectors[2][2]);
} else { } else {
vdwForce.setNonbondedMethod( AmoebaReferenceVdwForce::CutoffNonPeriodic); vdwForce.setNonbondedMethod(AmoebaReferenceVdwForce::CutoffNonPeriodic);
} }
} else { } else {
vdwForce.setNonbondedMethod( AmoebaReferenceVdwForce::NoCutoff ); vdwForce.setNonbondedMethod(AmoebaReferenceVdwForce::NoCutoff);
energy = vdwForce.calculateForceAndEnergy( numParticles, posData, indexIVs, sigmas, epsilons, reductions, allExclusions, forceData); energy = vdwForce.calculateForceAndEnergy(numParticles, posData, indexIVs, sigmas, epsilons, reductions, allExclusions, forceData);
} }
return static_cast<double>(energy); return static_cast<double>(energy);
} }
...@@ -1032,32 +1032,32 @@ void ReferenceCalcAmoebaWcaDispersionForceKernel::initialize(const System& syste ...@@ -1032,32 +1032,32 @@ void ReferenceCalcAmoebaWcaDispersionForceKernel::initialize(const System& syste
numParticles = system.getNumParticles(); numParticles = system.getNumParticles();
radii.resize(numParticles); radii.resize(numParticles);
epsilons.resize(numParticles); epsilons.resize(numParticles);
for( int ii = 0; ii < numParticles; ii++ ){ for (int ii = 0; ii < numParticles; ii++) {
double radius, epsilon; double radius, epsilon;
force.getParticleParameters( ii, radius, epsilon ); force.getParticleParameters(ii, radius, epsilon);
radii[ii] = static_cast<RealOpenMM>( radius ); radii[ii] = static_cast<RealOpenMM>(radius);
epsilons[ii] = static_cast<RealOpenMM>( epsilon ); epsilons[ii] = static_cast<RealOpenMM>(epsilon);
} }
totalMaximumDispersionEnergy = static_cast<RealOpenMM>( AmoebaWcaDispersionForceImpl::getTotalMaximumDispersionEnergy( force ) ); totalMaximumDispersionEnergy = static_cast<RealOpenMM>(AmoebaWcaDispersionForceImpl::getTotalMaximumDispersionEnergy(force));
epso = static_cast<RealOpenMM>( force.getEpso() ); epso = static_cast<RealOpenMM>(force.getEpso() );
epsh = static_cast<RealOpenMM>( force.getEpsh() ); epsh = static_cast<RealOpenMM>(force.getEpsh() );
rmino = static_cast<RealOpenMM>( force.getRmino() ); rmino = static_cast<RealOpenMM>(force.getRmino() );
rminh = static_cast<RealOpenMM>( force.getRminh() ); rminh = static_cast<RealOpenMM>(force.getRminh() );
awater = static_cast<RealOpenMM>( force.getAwater() ); awater = static_cast<RealOpenMM>(force.getAwater());
shctd = static_cast<RealOpenMM>( force.getShctd() ); shctd = static_cast<RealOpenMM>(force.getShctd() );
dispoff = static_cast<RealOpenMM>( force.getDispoff()); dispoff = static_cast<RealOpenMM>(force.getDispoff());
slevy = static_cast<RealOpenMM>( force.getSlevy() ); slevy = static_cast<RealOpenMM>(force.getSlevy() );
} }
double ReferenceCalcAmoebaWcaDispersionForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) { double ReferenceCalcAmoebaWcaDispersionForceKernel::execute(ContextImpl& context, bool includeForces, bool includeEnergy) {
vector<RealVec>& posData = extractPositions(context); vector<RealVec>& posData = extractPositions(context);
vector<RealVec>& forceData = extractForces(context); vector<RealVec>& forceData = extractForces(context);
AmoebaReferenceWcaDispersionForce amoebaReferenceWcaDispersionForce( epso, epsh, rmino, rminh, awater, shctd, dispoff, slevy ); AmoebaReferenceWcaDispersionForce amoebaReferenceWcaDispersionForce(epso, epsh, rmino, rminh, awater, shctd, dispoff, slevy);
RealOpenMM energy = amoebaReferenceWcaDispersionForce.calculateForceAndEnergy( numParticles, posData, radii, epsilons, totalMaximumDispersionEnergy, forceData); RealOpenMM energy = amoebaReferenceWcaDispersionForce.calculateForceAndEnergy(numParticles, posData, radii, epsilons, totalMaximumDispersionEnergy, forceData);
return static_cast<double>(energy); return static_cast<double>(energy);
} }
......
...@@ -357,7 +357,7 @@ public: ...@@ -357,7 +357,7 @@ public:
* *
* @return pointer to initialized instance of AmoebaReferenceMultipoleForce * @return pointer to initialized instance of AmoebaReferenceMultipoleForce
*/ */
AmoebaReferenceMultipoleForce* setupAmoebaReferenceMultipoleForce(ContextImpl& context ); AmoebaReferenceMultipoleForce* setupAmoebaReferenceMultipoleForce(ContextImpl& context);
/** /**
* Execute the kernel to calculate the forces and/or energy. * Execute the kernel to calculate the forces and/or energy.
* *
...@@ -382,7 +382,7 @@ public: ...@@ -382,7 +382,7 @@ public:
* @param outputElectrostaticPotential output potential * @param outputElectrostaticPotential output potential
*/ */
void getElectrostaticPotential(ContextImpl& context, const std::vector< Vec3 >& inputGrid, void getElectrostaticPotential(ContextImpl& context, const std::vector< Vec3 >& inputGrid,
std::vector< double >& outputElectrostaticPotential ); std::vector< double >& outputElectrostaticPotential);
/** /**
* Get the system multipole moments. * Get the system multipole moments.
...@@ -393,7 +393,7 @@ public: ...@@ -393,7 +393,7 @@ public:
dipole_x, dipole_y, dipole_z, dipole_x, dipole_y, dipole_z,
quadrupole_xx, quadrupole_xy, quadrupole_xz, quadrupole_xx, quadrupole_xy, quadrupole_xz,
quadrupole_yx, quadrupole_yy, quadrupole_yz, quadrupole_yx, quadrupole_yy, quadrupole_yz,
quadrupole_zx, quadrupole_zy, quadrupole_zz ) quadrupole_zx, quadrupole_zy, quadrupole_zz)
*/ */
void getSystemMultipoleMoments(ContextImpl& context, std::vector< double >& outputMultipoleMoments); void getSystemMultipoleMoments(ContextImpl& context, std::vector< double >& outputMultipoleMoments);
/** /**
...@@ -555,14 +555,14 @@ public: ...@@ -555,14 +555,14 @@ public:
* *
* @return includeCavityTerm * @return includeCavityTerm
*/ */
int getIncludeCavityTerm( void ) const; int getIncludeCavityTerm() const;
/** /**
* Get the number of particles. * Get the number of particles.
* *
* @return number of particles * @return number of particles
*/ */
int getNumParticles( void ) const; int getNumParticles() const;
/** /**
* Get Direct Polarization flag. * Get Direct Polarization flag.
...@@ -570,7 +570,7 @@ public: ...@@ -570,7 +570,7 @@ public:
* @return directPolarization * @return directPolarization
* *
*/ */
int getDirectPolarization( void ) const; int getDirectPolarization() const;
/** /**
* Get the solute dielectric. * Get the solute dielectric.
...@@ -578,7 +578,7 @@ public: ...@@ -578,7 +578,7 @@ public:
* @return soluteDielectric * @return soluteDielectric
* *
*/ */
RealOpenMM getSoluteDielectric( void ) const; RealOpenMM getSoluteDielectric() const;
/** /**
* Get the solvent dielectric. * Get the solvent dielectric.
...@@ -586,7 +586,7 @@ public: ...@@ -586,7 +586,7 @@ public:
* @return solventDielectric * @return solventDielectric
* *
*/ */
RealOpenMM getSolventDielectric( void ) const; RealOpenMM getSolventDielectric() const;
/** /**
* Get the dielectric offset. * Get the dielectric offset.
...@@ -594,7 +594,7 @@ public: ...@@ -594,7 +594,7 @@ public:
* @return dielectricOffset * @return dielectricOffset
* *
*/ */
RealOpenMM getDielectricOffset( void ) const; RealOpenMM getDielectricOffset() const;
/** /**
* Get the probe radius. * Get the probe radius.
...@@ -602,7 +602,7 @@ public: ...@@ -602,7 +602,7 @@ public:
* @return probeRadius * @return probeRadius
* *
*/ */
RealOpenMM getProbeRadius( void ) const; RealOpenMM getProbeRadius() const;
/** /**
* Get the surface area factor. * Get the surface area factor.
...@@ -610,7 +610,7 @@ public: ...@@ -610,7 +610,7 @@ public:
* @return surfaceAreaFactor * @return surfaceAreaFactor
* *
*/ */
RealOpenMM getSurfaceAreaFactor( void ) const; RealOpenMM getSurfaceAreaFactor() const;
/** /**
* Get the vector of particle radii. * Get the vector of particle radii.
...@@ -618,7 +618,7 @@ public: ...@@ -618,7 +618,7 @@ public:
* @param atomicRadii vector of atomic radii * @param atomicRadii vector of atomic radii
* *
*/ */
void getAtomicRadii( std::vector<RealOpenMM>& atomicRadii ) const; void getAtomicRadii(std::vector<RealOpenMM>& atomicRadii) const;
/** /**
* Get the vector of scale factors. * Get the vector of scale factors.
...@@ -626,7 +626,7 @@ public: ...@@ -626,7 +626,7 @@ public:
* @param scaleFactors vector of scale factors * @param scaleFactors vector of scale factors
* *
*/ */
void getScaleFactors( std::vector<RealOpenMM>& scaleFactors ) const; void getScaleFactors(std::vector<RealOpenMM>& scaleFactors) const;
/** /**
* Get the vector of charges. * Get the vector of charges.
...@@ -634,7 +634,7 @@ public: ...@@ -634,7 +634,7 @@ public:
* @param charges vector of charges * @param charges vector of charges
* *
*/ */
void getCharges( std::vector<RealOpenMM>& charges ) const; void getCharges(std::vector<RealOpenMM>& charges) const;
/** /**
* Copy changed parameters over to a context. * Copy changed parameters over to a context.
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "AmoebaReferenceAngleForce.h" #include "AmoebaReferenceAngleForce.h"
using std::vector; using std::vector;
using OpenMM::RealVec; using namespace OpenMM;
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -46,11 +46,11 @@ using OpenMM::RealVec; ...@@ -46,11 +46,11 @@ using OpenMM::RealVec;
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM AmoebaReferenceAngleForce::getPrefactorsGivenAngleCosine( RealOpenMM cosine, RealOpenMM AmoebaReferenceAngleForce::getPrefactorsGivenAngleCosine(RealOpenMM cosine,
RealOpenMM idealAngle, RealOpenMM angleK, RealOpenMM idealAngle, RealOpenMM angleK,
RealOpenMM angleCubic, RealOpenMM angleQuartic, RealOpenMM angleCubic, RealOpenMM angleQuartic,
RealOpenMM anglePentic, RealOpenMM angleSextic, RealOpenMM anglePentic, RealOpenMM angleSextic,
RealOpenMM* dEdR ) const { RealOpenMM* dEdR) const {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -67,9 +67,9 @@ RealOpenMM AmoebaReferenceAngleForce::getPrefactorsGivenAngleCosine( RealOpenMM ...@@ -67,9 +67,9 @@ RealOpenMM AmoebaReferenceAngleForce::getPrefactorsGivenAngleCosine( RealOpenMM
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
RealOpenMM angle; RealOpenMM angle;
if( cosine >= one ){ if (cosine >= one) {
angle = zero; angle = zero;
} else if( cosine <= -one ){ } else if (cosine <= -one) {
angle = RADIAN*PI_M; angle = RADIAN*PI_M;
} else { } else {
angle = RADIAN*ACOS(cosine); angle = RADIAN*ACOS(cosine);
...@@ -79,10 +79,10 @@ RealOpenMM AmoebaReferenceAngleForce::getPrefactorsGivenAngleCosine( RealOpenMM ...@@ -79,10 +79,10 @@ RealOpenMM AmoebaReferenceAngleForce::getPrefactorsGivenAngleCosine( RealOpenMM
RealOpenMM deltaIdeal3 = deltaIdeal*deltaIdeal2; RealOpenMM deltaIdeal3 = deltaIdeal*deltaIdeal2;
RealOpenMM deltaIdeal4 = deltaIdeal2*deltaIdeal2; RealOpenMM deltaIdeal4 = deltaIdeal2*deltaIdeal2;
*dEdR = ( two + three*angleCubic*deltaIdeal + *dEdR = (two + three*angleCubic*deltaIdeal +
four*angleQuartic*deltaIdeal2 + four*angleQuartic*deltaIdeal2 +
five*anglePentic*deltaIdeal3 + five*anglePentic*deltaIdeal3 +
six*angleSextic*deltaIdeal4 ); six*angleSextic*deltaIdeal4);
*dEdR *= RADIAN*angleK*deltaIdeal; *dEdR *= RADIAN*angleK*deltaIdeal;
...@@ -113,12 +113,12 @@ RealOpenMM AmoebaReferenceAngleForce::getPrefactorsGivenAngleCosine( RealOpenMM ...@@ -113,12 +113,12 @@ RealOpenMM AmoebaReferenceAngleForce::getPrefactorsGivenAngleCosine( RealOpenMM
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn( const RealVec& positionAtomA, const RealVec& positionAtomB, RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn(const RealVec& positionAtomA, const RealVec& positionAtomB,
const RealVec& positionAtomC, const RealVec& positionAtomC,
RealOpenMM angle, RealOpenMM angleK, RealOpenMM angle, RealOpenMM angleK,
RealOpenMM angleCubic, RealOpenMM angleQuartic, RealOpenMM angleCubic, RealOpenMM angleQuartic,
RealOpenMM anglePentic, RealOpenMM angleSextic, RealOpenMM anglePentic, RealOpenMM angleSextic,
RealVec* forces ) const { RealVec* forces) const {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -132,30 +132,30 @@ RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn( const RealVec& position ...@@ -132,30 +132,30 @@ RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn( const RealVec& position
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
std::vector<RealOpenMM> deltaR[2]; std::vector<RealOpenMM> deltaR[2];
AmoebaReferenceForce::loadDeltaR( positionAtomA, positionAtomB, deltaR[0] ); AmoebaReferenceForce::loadDeltaR(positionAtomA, positionAtomB, deltaR[0]);
RealOpenMM rAB2 = AmoebaReferenceForce::getNormSquared3( deltaR[0] ); RealOpenMM rAB2 = AmoebaReferenceForce::getNormSquared3(deltaR[0]);
RealOpenMM rAB = SQRT( rAB2 ); RealOpenMM rAB = SQRT(rAB2);
AmoebaReferenceForce::loadDeltaR( positionAtomC, positionAtomB, deltaR[1] ); AmoebaReferenceForce::loadDeltaR(positionAtomC, positionAtomB, deltaR[1]);
RealOpenMM rCB2 = AmoebaReferenceForce::getNormSquared3( deltaR[1] ); RealOpenMM rCB2 = AmoebaReferenceForce::getNormSquared3(deltaR[1]);
RealOpenMM rCB = SQRT( rCB2 ); RealOpenMM rCB = SQRT(rCB2);
if( rAB <= zero || rCB <= zero ){ if (rAB <= zero || rCB <= zero) {
return zero; return zero;
} }
std::vector<RealOpenMM> pVector(3); std::vector<RealOpenMM> pVector(3);
AmoebaReferenceForce::getCrossProduct( deltaR[0], deltaR[1], pVector ); AmoebaReferenceForce::getCrossProduct(deltaR[0], deltaR[1], pVector);
RealOpenMM rp = AmoebaReferenceForce::getNorm3( pVector ); RealOpenMM rp = AmoebaReferenceForce::getNorm3(pVector);
if( rp < 1.0e-06 ){ if (rp < 1.0e-06) {
rp = 1.0e-06; rp = 1.0e-06;
} }
RealOpenMM dot = AmoebaReferenceForce::getDotProduct3( deltaR[0], deltaR[1] ); RealOpenMM dot = AmoebaReferenceForce::getDotProduct3(deltaR[0], deltaR[1]);
RealOpenMM cosine = dot/(rAB*rCB); RealOpenMM cosine = dot/(rAB*rCB);
RealOpenMM dEdR; RealOpenMM dEdR;
RealOpenMM energy = getPrefactorsGivenAngleCosine( cosine, angle, angleK, angleCubic, angleQuartic, RealOpenMM energy = getPrefactorsGivenAngleCosine(cosine, angle, angleK, angleCubic, angleQuartic,
anglePentic, angleSextic, &dEdR ); anglePentic, angleSextic, &dEdR);
RealOpenMM termA = dEdR/(rAB2*rp); RealOpenMM termA = dEdR/(rAB2*rp);
RealOpenMM termC = -dEdR/(rCB2*rp); RealOpenMM termC = -dEdR/(rCB2*rp);
...@@ -164,9 +164,9 @@ RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn( const RealVec& position ...@@ -164,9 +164,9 @@ RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn( const RealVec& position
deltaCrossP[0].resize(3); deltaCrossP[0].resize(3);
deltaCrossP[1].resize(3); deltaCrossP[1].resize(3);
deltaCrossP[2].resize(3); deltaCrossP[2].resize(3);
AmoebaReferenceForce::getCrossProduct( deltaR[0], pVector, deltaCrossP[0] ); AmoebaReferenceForce::getCrossProduct(deltaR[0], pVector, deltaCrossP[0]);
AmoebaReferenceForce::getCrossProduct( deltaR[1], pVector, deltaCrossP[2] ); AmoebaReferenceForce::getCrossProduct(deltaR[1], pVector, deltaCrossP[2]);
for( unsigned int ii = 0; ii < 3; ii++ ){ for (unsigned int ii = 0; ii < 3; ii++) {
deltaCrossP[0][ii] *= termA; deltaCrossP[0][ii] *= termA;
deltaCrossP[2][ii] *= termC; deltaCrossP[2][ii] *= termC;
deltaCrossP[1][ii] = -1.0f*(deltaCrossP[0][ii] + deltaCrossP[2][ii]); deltaCrossP[1][ii] = -1.0f*(deltaCrossP[0][ii] + deltaCrossP[2][ii]);
...@@ -174,7 +174,7 @@ RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn( const RealVec& position ...@@ -174,7 +174,7 @@ RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn( const RealVec& position
// accumulate forces // accumulate forces
for( int jj = 0; jj < 3; jj++ ){ for (int jj = 0; jj < 3; jj++) {
forces[jj][0] = deltaCrossP[jj][0]; forces[jj][0] = deltaCrossP[jj][0];
forces[jj][1] = deltaCrossP[jj][1]; forces[jj][1] = deltaCrossP[jj][1];
forces[jj][2] = deltaCrossP[jj][2]; forces[jj][2] = deltaCrossP[jj][2];
...@@ -183,7 +183,7 @@ RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn( const RealVec& position ...@@ -183,7 +183,7 @@ RealOpenMM AmoebaReferenceAngleForce::calculateAngleIxn( const RealVec& position
return energy; return energy;
} }
RealOpenMM AmoebaReferenceAngleForce::calculateForceAndEnergy( int numAngles, vector<RealVec>& posData, RealOpenMM AmoebaReferenceAngleForce::calculateForceAndEnergy(int numAngles, vector<RealVec>& posData,
const std::vector<int>& particle1, const std::vector<int>& particle1,
const std::vector<int>& particle2, const std::vector<int>& particle2,
const std::vector<int>& particle3, const std::vector<int>& particle3,
...@@ -202,10 +202,10 @@ RealOpenMM AmoebaReferenceAngleForce::calculateForceAndEnergy( int numAngles, ve ...@@ -202,10 +202,10 @@ RealOpenMM AmoebaReferenceAngleForce::calculateForceAndEnergy( int numAngles, ve
RealOpenMM idealAngle = angle[ii]; RealOpenMM idealAngle = angle[ii];
RealOpenMM angleK = kQuadratic[ii]; RealOpenMM angleK = kQuadratic[ii];
RealVec forces[3]; RealVec forces[3];
energy += calculateAngleIxn( posData[particle1Index], posData[particle2Index], posData[particle3Index], energy += calculateAngleIxn(posData[particle1Index], posData[particle2Index], posData[particle3Index],
idealAngle, angleK, angleCubic, angleQuartic, anglePentic, angleSextic, forces ); idealAngle, angleK, angleCubic, angleQuartic, anglePentic, angleSextic, forces);
for( unsigned int jj = 0; jj < 3; jj++ ){ for (unsigned int jj = 0; jj < 3; jj++) {
forceData[particle1Index][jj] += forces[0][jj]; forceData[particle1Index][jj] += forces[0][jj];
forceData[particle2Index][jj] += forces[1][jj]; forceData[particle2Index][jj] += forces[1][jj];
forceData[particle3Index][jj] += forces[2][jj]; forceData[particle3Index][jj] += forces[2][jj];
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "RealVec.h" #include "RealVec.h"
#include <vector> #include <vector>
// --------------------------------------------------------------------------------------- namespace OpenMM {
class AmoebaReferenceAngleForce { class AmoebaReferenceAngleForce {
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
AmoebaReferenceAngleForce( ){}; AmoebaReferenceAngleForce() {};
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
~AmoebaReferenceAngleForce( ){}; ~AmoebaReferenceAngleForce() {};
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -72,17 +72,17 @@ public: ...@@ -72,17 +72,17 @@ public:
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM calculateForceAndEnergy( int numAngles, std::vector<OpenMM::RealVec>& posData, RealOpenMM calculateForceAndEnergy(int numAngles, std::vector<OpenMM::RealVec>& posData,
const std::vector<int>& particle1, const std::vector<int>& particle1,
const std::vector<int>& particle2, const std::vector<int>& particle2,
const std::vector<int>& particle3, const std::vector<int>& particle3,
const std::vector<RealOpenMM>& angle, const std::vector<RealOpenMM>& angle,
const std::vector<RealOpenMM>& kQuadratic, const std::vector<RealOpenMM>& kQuadratic,
RealOpenMM globalAngleCubic, RealOpenMM globalAngleCubic,
RealOpenMM globalAngleQuartic, RealOpenMM globalAngleQuartic,
RealOpenMM globalAnglePentic, RealOpenMM globalAnglePentic,
RealOpenMM globalAngleSextic, RealOpenMM globalAngleSextic,
std::vector<OpenMM::RealVec>& forceData ) const; std::vector<OpenMM::RealVec>& forceData) const;
private: private:
...@@ -104,10 +104,10 @@ private: ...@@ -104,10 +104,10 @@ private:
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM getPrefactorsGivenAngleCosine( RealOpenMM cosine, RealOpenMM idealAngle, RealOpenMM angleK, RealOpenMM getPrefactorsGivenAngleCosine(RealOpenMM cosine, RealOpenMM idealAngle, RealOpenMM angleK,
RealOpenMM angleCubic, RealOpenMM angleQuartic, RealOpenMM angleCubic, RealOpenMM angleQuartic,
RealOpenMM anglePentic, RealOpenMM angleSextic, RealOpenMM anglePentic, RealOpenMM angleSextic,
RealOpenMM* dEdR ) const; RealOpenMM* dEdR) const;
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -128,15 +128,15 @@ private: ...@@ -128,15 +128,15 @@ private:
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM calculateAngleIxn( const OpenMM::RealVec& positionAtomA, const OpenMM::RealVec& positionAtomB, RealOpenMM calculateAngleIxn(const OpenMM::RealVec& positionAtomA, const OpenMM::RealVec& positionAtomB,
const OpenMM::RealVec& positionAtomC, const OpenMM::RealVec& positionAtomC,
RealOpenMM angle, RealOpenMM angleK, RealOpenMM angle, RealOpenMM angleK,
RealOpenMM angleCubic, RealOpenMM angleQuartic, RealOpenMM angleCubic, RealOpenMM angleQuartic,
RealOpenMM anglePentic, RealOpenMM angleSextic, RealOpenMM anglePentic, RealOpenMM angleSextic,
OpenMM::RealVec* forces ) const; OpenMM::RealVec* forces) const;
}; };
// --------------------------------------------------------------------------------------- } // namespace OpenMM
#endif // _AmoebaReferenceAngleForce___ #endif // _AmoebaReferenceAngleForce___
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "AmoebaReferenceForce.h" #include "AmoebaReferenceForce.h"
using std::vector; using std::vector;
using OpenMM::RealVec; using namespace OpenMM;
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -44,10 +44,10 @@ using OpenMM::RealVec; ...@@ -44,10 +44,10 @@ using OpenMM::RealVec;
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM AmoebaReferenceBondForce::calculateBondIxn( const RealVec& positionAtomA, const RealVec& positionAtomB, RealOpenMM AmoebaReferenceBondForce::calculateBondIxn(const RealVec& positionAtomA, const RealVec& positionAtomB,
RealOpenMM bondLength, RealOpenMM bondK, RealOpenMM bondLength, RealOpenMM bondK,
RealOpenMM bondCubic, RealOpenMM bondQuartic, RealOpenMM bondCubic, RealOpenMM bondQuartic,
RealVec* forces ) const { RealVec* forces) const {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -63,8 +63,8 @@ RealOpenMM AmoebaReferenceBondForce::calculateBondIxn( const RealVec& positionAt ...@@ -63,8 +63,8 @@ RealOpenMM AmoebaReferenceBondForce::calculateBondIxn( const RealVec& positionAt
// get deltaR, R2, and R between 2 atoms // get deltaR, R2, and R between 2 atoms
std::vector<RealOpenMM> deltaR; std::vector<RealOpenMM> deltaR;
AmoebaReferenceForce::loadDeltaR( positionAtomA, positionAtomB, deltaR ); AmoebaReferenceForce::loadDeltaR(positionAtomA, positionAtomB, deltaR);
RealOpenMM r = AmoebaReferenceForce::getNorm3( deltaR ); RealOpenMM r = AmoebaReferenceForce::getNorm3(deltaR);
// deltaIdeal = r - r_0 // deltaIdeal = r - r_0
...@@ -84,11 +84,11 @@ RealOpenMM AmoebaReferenceBondForce::calculateBondIxn( const RealVec& positionAt ...@@ -84,11 +84,11 @@ RealOpenMM AmoebaReferenceBondForce::calculateBondIxn( const RealVec& positionAt
forces[1][1] = dEdR*deltaR[1]; forces[1][1] = dEdR*deltaR[1];
forces[1][2] = dEdR*deltaR[2]; forces[1][2] = dEdR*deltaR[2];
RealOpenMM energy = bondK*deltaIdeal2*( one + bondCubic*deltaIdeal + bondQuartic*deltaIdeal2 ); RealOpenMM energy = bondK*deltaIdeal2*(one + bondCubic*deltaIdeal + bondQuartic*deltaIdeal2);
return energy; return energy;
} }
RealOpenMM AmoebaReferenceBondForce::calculateForceAndEnergy( int numBonds, RealOpenMM AmoebaReferenceBondForce::calculateForceAndEnergy(int numBonds,
vector<RealVec>& particlePositions, vector<RealVec>& particlePositions,
const std::vector<int>& particle1, const std::vector<int>& particle1,
const std::vector<int>& particle2, const std::vector<int>& particle2,
...@@ -96,20 +96,20 @@ RealOpenMM AmoebaReferenceBondForce::calculateForceAndEnergy( int numBonds, ...@@ -96,20 +96,20 @@ RealOpenMM AmoebaReferenceBondForce::calculateForceAndEnergy( int numBonds,
const std::vector<RealOpenMM>& kQuadratic, const std::vector<RealOpenMM>& kQuadratic,
RealOpenMM globalBondCubic, RealOpenMM globalBondCubic,
RealOpenMM globalBondQuartic, RealOpenMM globalBondQuartic,
vector<RealVec>& forceData ) const { vector<RealVec>& forceData) const {
RealOpenMM energy = 0.0; RealOpenMM energy = 0.0;
for( int ii = 0; ii < numBonds; ii++ ){ for (int ii = 0; ii < numBonds; ii++) {
int particle1Index = particle1[ii]; int particle1Index = particle1[ii];
int particle2Index = particle2[ii]; int particle2Index = particle2[ii];
RealOpenMM bondLength = length[ii]; RealOpenMM bondLength = length[ii];
RealOpenMM bondK = kQuadratic[ii]; RealOpenMM bondK = kQuadratic[ii];
RealVec forces[2]; RealVec forces[2];
energy += calculateBondIxn( particlePositions[particle1Index], particlePositions[particle2Index], energy += calculateBondIxn(particlePositions[particle1Index], particlePositions[particle2Index],
bondLength, bondK, globalBondCubic, globalBondQuartic, bondLength, bondK, globalBondCubic, globalBondQuartic,
forces ); forces);
for( int jj = 0; jj < 3; jj++ ){ for (int jj = 0; jj < 3; jj++) {
forceData[particle1Index][jj] += forces[0][jj]; forceData[particle1Index][jj] += forces[0][jj];
forceData[particle2Index][jj] += forces[1][jj]; forceData[particle2Index][jj] += forces[1][jj];
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "RealVec.h" #include "RealVec.h"
#include <vector> #include <vector>
// --------------------------------------------------------------------------------------- namespace OpenMM {
class AmoebaReferenceBondForce { class AmoebaReferenceBondForce {
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
AmoebaReferenceBondForce( ){}; AmoebaReferenceBondForce() {};
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
~AmoebaReferenceBondForce( ){}; ~AmoebaReferenceBondForce() {};
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -69,13 +69,13 @@ public: ...@@ -69,13 +69,13 @@ public:
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM calculateForceAndEnergy( int numBonds, std::vector<OpenMM::RealVec>& posData, RealOpenMM calculateForceAndEnergy(int numBonds, std::vector<OpenMM::RealVec>& posData,
const std::vector<int>& particle1, const std::vector<int>& particle1,
const std::vector<int>& particle2, const std::vector<int>& particle2,
const std::vector<RealOpenMM>& bondLength, const std::vector<RealOpenMM>& bondLength,
const std::vector<RealOpenMM>& bondK, const std::vector<RealOpenMM>& bondK,
RealOpenMM bondCubic, RealOpenMM bondQuartic, RealOpenMM bondCubic, RealOpenMM bondQuartic,
std::vector<OpenMM::RealVec>& forceData ) const; std::vector<OpenMM::RealVec>& forceData) const;
private: private:
...@@ -95,13 +95,13 @@ private: ...@@ -95,13 +95,13 @@ private:
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM calculateBondIxn( const OpenMM::RealVec& positionAtomA, const OpenMM::RealVec& positionAtomB, RealOpenMM calculateBondIxn(const OpenMM::RealVec& positionAtomA, const OpenMM::RealVec& positionAtomB,
RealOpenMM bondLength, RealOpenMM bondK, RealOpenMM bondLength, RealOpenMM bondK,
RealOpenMM bondCubic, RealOpenMM bondQuartic, RealOpenMM bondCubic, RealOpenMM bondQuartic,
OpenMM::RealVec* forces ) const; OpenMM::RealVec* forces) const;
}; };
// --------------------------------------------------------------------------------------- } // namespace OpenMM
#endif // _AmoebaReferenceBondForce___ #endif // _AmoebaReferenceBondForce___
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "AmoebaReferenceForce.h" #include "AmoebaReferenceForce.h"
#include <vector> #include <vector>
using OpenMM::RealVec; using namespace OpenMM;
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -37,8 +37,8 @@ using OpenMM::RealVec; ...@@ -37,8 +37,8 @@ using OpenMM::RealVec;
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
void AmoebaReferenceForce::loadDeltaR( const RealVec& xVector, const RealVec& yVector, void AmoebaReferenceForce::loadDeltaR(const RealVec& xVector, const RealVec& yVector,
std::vector<RealOpenMM>& deltaR ){ std::vector<RealOpenMM>& deltaR) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -48,9 +48,9 @@ void AmoebaReferenceForce::loadDeltaR( const RealVec& xVector, const RealVec& yV ...@@ -48,9 +48,9 @@ void AmoebaReferenceForce::loadDeltaR( const RealVec& xVector, const RealVec& yV
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
deltaR.resize(0); deltaR.resize(0);
deltaR.push_back( yVector[0] - xVector[0] ); deltaR.push_back(yVector[0] - xVector[0]);
deltaR.push_back( yVector[1] - xVector[1] ); deltaR.push_back(yVector[1] - xVector[1]);
deltaR.push_back( yVector[2] - xVector[2] ); deltaR.push_back(yVector[2] - xVector[2]);
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -63,7 +63,7 @@ void AmoebaReferenceForce::loadDeltaR( const RealVec& xVector, const RealVec& yV ...@@ -63,7 +63,7 @@ void AmoebaReferenceForce::loadDeltaR( const RealVec& xVector, const RealVec& yV
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM AmoebaReferenceForce::getNormSquared3( const std::vector<RealOpenMM>& inputVector ){ RealOpenMM AmoebaReferenceForce::getNormSquared3(const std::vector<RealOpenMM>& inputVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -73,7 +73,7 @@ RealOpenMM AmoebaReferenceForce::getNormSquared3( const std::vector<RealOpenMM>& ...@@ -73,7 +73,7 @@ RealOpenMM AmoebaReferenceForce::getNormSquared3( const std::vector<RealOpenMM>&
// get 3 norm // get 3 norm
return ( inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2] ); return (inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2]);
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -86,7 +86,7 @@ RealOpenMM AmoebaReferenceForce::getNormSquared3( const std::vector<RealOpenMM>& ...@@ -86,7 +86,7 @@ RealOpenMM AmoebaReferenceForce::getNormSquared3( const std::vector<RealOpenMM>&
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM AmoebaReferenceForce::getNormSquared3( const RealOpenMM* inputVector ){ RealOpenMM AmoebaReferenceForce::getNormSquared3(const RealOpenMM* inputVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -96,7 +96,7 @@ RealOpenMM AmoebaReferenceForce::getNormSquared3( const RealOpenMM* inputVector ...@@ -96,7 +96,7 @@ RealOpenMM AmoebaReferenceForce::getNormSquared3( const RealOpenMM* inputVector
// get 3 norm // get 3 norm
return ( inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2] ); return (inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2]);
} }
/**--------------------------------------------------------------------------------------- /**---------------------------------------------------------------------------------------
...@@ -109,7 +109,7 @@ RealOpenMM AmoebaReferenceForce::getNormSquared3( const RealOpenMM* inputVector ...@@ -109,7 +109,7 @@ RealOpenMM AmoebaReferenceForce::getNormSquared3( const RealOpenMM* inputVector
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM AmoebaReferenceForce::getNorm3( const std::vector<RealOpenMM>& inputVector ){ RealOpenMM AmoebaReferenceForce::getNorm3(const std::vector<RealOpenMM>& inputVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -119,10 +119,10 @@ RealOpenMM AmoebaReferenceForce::getNorm3( const std::vector<RealOpenMM>& inputV ...@@ -119,10 +119,10 @@ RealOpenMM AmoebaReferenceForce::getNorm3( const std::vector<RealOpenMM>& inputV
// get 3 norm // get 3 norm
return SQRT( inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2] ); return SQRT(inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2]);
} }
RealOpenMM AmoebaReferenceForce::getNorm3( const RealOpenMM* inputVector ){ RealOpenMM AmoebaReferenceForce::getNorm3(const RealOpenMM* inputVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -132,10 +132,10 @@ RealOpenMM AmoebaReferenceForce::getNorm3( const RealOpenMM* inputVector ){ ...@@ -132,10 +132,10 @@ RealOpenMM AmoebaReferenceForce::getNorm3( const RealOpenMM* inputVector ){
// get 3 norm // get 3 norm
return SQRT( inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2] ); return SQRT(inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2]);
} }
RealOpenMM AmoebaReferenceForce::normalizeVector3( RealOpenMM* inputVector ){ RealOpenMM AmoebaReferenceForce::normalizeVector3(RealOpenMM* inputVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -143,8 +143,8 @@ RealOpenMM AmoebaReferenceForce::normalizeVector3( RealOpenMM* inputVector ){ ...@@ -143,8 +143,8 @@ RealOpenMM AmoebaReferenceForce::normalizeVector3( RealOpenMM* inputVector ){
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
RealOpenMM norm = SQRT( inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2] ); RealOpenMM norm = SQRT(inputVector[0]*inputVector[0] + inputVector[1]*inputVector[1] + inputVector[2]*inputVector[2]);
if( norm > 0.0 ){ if (norm > 0.0) {
RealOpenMM normI = 1.0/norm; RealOpenMM normI = 1.0/norm;
inputVector[0] *= normI; inputVector[0] *= normI;
inputVector[1] *= normI; inputVector[1] *= normI;
...@@ -165,7 +165,7 @@ RealOpenMM AmoebaReferenceForce::normalizeVector3( RealOpenMM* inputVector ){ ...@@ -165,7 +165,7 @@ RealOpenMM AmoebaReferenceForce::normalizeVector3( RealOpenMM* inputVector ){
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM AmoebaReferenceForce::getDotProduct3( const std::vector<RealOpenMM>& xVector, const std::vector<RealOpenMM>& yVector ){ RealOpenMM AmoebaReferenceForce::getDotProduct3(const std::vector<RealOpenMM>& xVector, const std::vector<RealOpenMM>& yVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -189,7 +189,7 @@ RealOpenMM AmoebaReferenceForce::getDotProduct3( const std::vector<RealOpenMM>& ...@@ -189,7 +189,7 @@ RealOpenMM AmoebaReferenceForce::getDotProduct3( const std::vector<RealOpenMM>&
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM AmoebaReferenceForce::getDotProduct3( const RealOpenMM* xVector, const RealOpenMM* yVector ){ RealOpenMM AmoebaReferenceForce::getDotProduct3(const RealOpenMM* xVector, const RealOpenMM* yVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -202,7 +202,7 @@ RealOpenMM AmoebaReferenceForce::getDotProduct3( const RealOpenMM* xVector, cons ...@@ -202,7 +202,7 @@ RealOpenMM AmoebaReferenceForce::getDotProduct3( const RealOpenMM* xVector, cons
return xVector[0]*yVector[0] + xVector[1]*yVector[1] + xVector[2]*yVector[2]; return xVector[0]*yVector[0] + xVector[1]*yVector[1] + xVector[2]*yVector[2];
} }
RealOpenMM AmoebaReferenceForce::getDotProduct3( const RealOpenMM* xVector, const OpenMM::Vec3& yVector ){ RealOpenMM AmoebaReferenceForce::getDotProduct3(const RealOpenMM* xVector, const OpenMM::Vec3& yVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -227,7 +227,7 @@ RealOpenMM AmoebaReferenceForce::getDotProduct3( const RealOpenMM* xVector, cons ...@@ -227,7 +227,7 @@ RealOpenMM AmoebaReferenceForce::getDotProduct3( const RealOpenMM* xVector, cons
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
RealOpenMM AmoebaReferenceForce::getDotProduct3( unsigned int vectorOffset, const std::vector<RealOpenMM>& xVector, const RealOpenMM* yVector ){ RealOpenMM AmoebaReferenceForce::getDotProduct3(unsigned int vectorOffset, const std::vector<RealOpenMM>& xVector, const RealOpenMM* yVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -250,9 +250,9 @@ RealOpenMM AmoebaReferenceForce::getDotProduct3( unsigned int vectorOffset, cons ...@@ -250,9 +250,9 @@ RealOpenMM AmoebaReferenceForce::getDotProduct3( unsigned int vectorOffset, cons
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
void AmoebaReferenceForce::getCrossProduct( const std::vector<RealOpenMM>& xVector, void AmoebaReferenceForce::getCrossProduct(const std::vector<RealOpenMM>& xVector,
const std::vector<RealOpenMM>& yVector, const std::vector<RealOpenMM>& yVector,
std::vector<RealOpenMM>& zVector ){ std::vector<RealOpenMM>& zVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
...@@ -277,9 +277,9 @@ void AmoebaReferenceForce::getCrossProduct( const std::vector<RealOpenMM>& xVect ...@@ -277,9 +277,9 @@ void AmoebaReferenceForce::getCrossProduct( const std::vector<RealOpenMM>& xVect
--------------------------------------------------------------------------------------- */ --------------------------------------------------------------------------------------- */
void AmoebaReferenceForce::getCrossProduct( const RealOpenMM* xVector, void AmoebaReferenceForce::getCrossProduct(const RealOpenMM* xVector,
const RealOpenMM* yVector, const RealOpenMM* yVector,
RealOpenMM* zVector ){ RealOpenMM* zVector) {
// --------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment