Commit b8f6d269 authored by Jason Swails's avatar Jason Swails
Browse files

Changes to bring in line with SimTK style guide.

parent ab82c962
...@@ -123,7 +123,9 @@ public: ...@@ -123,7 +123,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -154,7 +154,9 @@ public: ...@@ -154,7 +154,9 @@ public:
* *
* @returns false * @returns false
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -67,7 +67,9 @@ public: ...@@ -67,7 +67,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -208,7 +208,9 @@ public: ...@@ -208,7 +208,9 @@ public:
* *
* @returns false * @returns false
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -205,7 +205,9 @@ public: ...@@ -205,7 +205,9 @@ public:
* *
* @returns false * @returns false
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -303,7 +303,9 @@ public: ...@@ -303,7 +303,9 @@ public:
* *
* @returns false * @returns false
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -205,7 +205,9 @@ public: ...@@ -205,7 +205,9 @@ public:
* *
* @returns false * @returns false
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -211,7 +211,9 @@ public: ...@@ -211,7 +211,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -108,7 +108,9 @@ public: ...@@ -108,7 +108,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -105,7 +105,9 @@ public: ...@@ -105,7 +105,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -177,7 +177,9 @@ public: ...@@ -177,7 +177,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return true;} bool usesPeriodicBoundaryConditions() const {
return true;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -133,7 +133,9 @@ public: ...@@ -133,7 +133,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return true;} bool usesPeriodicBoundaryConditions() const {
return true;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -230,7 +230,9 @@ public: ...@@ -230,7 +230,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return true;} bool usesPeriodicBoundaryConditions() const {
return true;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -114,7 +114,9 @@ public: ...@@ -114,7 +114,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -123,7 +123,9 @@ public: ...@@ -123,7 +123,9 @@ public:
* *
* @returns true if force uses PBC and false otherwise * @returns true if force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions() const {return false;} bool usesPeriodicBoundaryConditions() const {
return false;
}
protected: protected:
ForceImpl* createImpl() const; ForceImpl* createImpl() const;
private: private:
......
...@@ -230,7 +230,7 @@ public: ...@@ -230,7 +230,7 @@ public:
* If a force in this System does not implement usesPeriodicBoundaryConditions * If a force in this System does not implement usesPeriodicBoundaryConditions
* a OpenMM::OpenMMException is thrown * a OpenMM::OpenMMException is thrown
* *
* @return true of at least one force uses PBC and false otherwise * @return true if at least one force uses PBC and false otherwise
*/ */
bool usesPeriodicBoundaryConditions(); bool usesPeriodicBoundaryConditions();
private: private:
......
...@@ -129,7 +129,8 @@ bool System::usesPeriodicBoundaryConditions() { ...@@ -129,7 +129,8 @@ bool System::usesPeriodicBoundaryConditions() {
try { try {
if ((*it)->usesPeriodicBoundaryConditions()) if ((*it)->usesPeriodicBoundaryConditions())
uses_pbc = true; uses_pbc = true;
} catch (OpenMMException &e) { }
catch (OpenMMException &e) {
all_forces_implement = false; all_forces_implement = false;
} }
} }
......
...@@ -140,7 +140,8 @@ void testOBC(GBSAOBCForce::NonbondedMethod obcMethod, CustomGBForce::NonbondedMe ...@@ -140,7 +140,8 @@ void testOBC(GBSAOBCForce::NonbondedMethod obcMethod, CustomGBForce::NonbondedMe
ASSERT(obc->usesPeriodicBoundaryConditions()); ASSERT(obc->usesPeriodicBoundaryConditions());
ASSERT(standardSystem.usesPeriodicBoundaryConditions()); ASSERT(standardSystem.usesPeriodicBoundaryConditions());
ASSERT(customSystem.usesPeriodicBoundaryConditions()); ASSERT(customSystem.usesPeriodicBoundaryConditions());
} else { }
else {
ASSERT(!custom->usesPeriodicBoundaryConditions()); ASSERT(!custom->usesPeriodicBoundaryConditions());
ASSERT(!obc->usesPeriodicBoundaryConditions()); ASSERT(!obc->usesPeriodicBoundaryConditions());
ASSERT(!standardSystem.usesPeriodicBoundaryConditions()); ASSERT(!standardSystem.usesPeriodicBoundaryConditions());
...@@ -539,7 +540,8 @@ static void buildEthane( GBVIForce* gbviForce, std::vector<Vec3>& positions ) { ...@@ -539,7 +540,8 @@ static void buildEthane( GBVIForce* gbviForce, std::vector<Vec3>& positions ) {
C_gamma = -0.2863; C_gamma = -0.2863;
H_radius = 0.125; H_radius = 0.125;
H_gamma = 0.2437; H_gamma = 0.2437;
} else { }
else {
C_radius = 0.215; C_radius = 0.215;
C_gamma = -1.1087; C_gamma = -1.1087;
H_radius = 0.150; H_radius = 0.150;
...@@ -617,7 +619,8 @@ static void buildDimer( GBVIForce* gbviForce, std::vector<Vec3>& positions ) { ...@@ -617,7 +619,8 @@ static void buildDimer( GBVIForce* gbviForce, std::vector<Vec3>& positions ) {
C_gamma = -0.2863; C_gamma = -0.2863;
H_radius = 0.125; H_radius = 0.125;
H_gamma = 0.2437; H_gamma = 0.2437;
} else { }
else {
C_radius = 0.215; C_radius = 0.215;
C_gamma = -1.1087; C_gamma = -1.1087;
H_radius = 0.150; H_radius = 0.150;
...@@ -744,7 +747,8 @@ static void findScaledRadii( GBVIForce& gbviForce, std::vector<double> & scaledR ...@@ -744,7 +747,8 @@ static void findScaledRadii( GBVIForce& gbviForce, std::vector<double> & scaledR
} }
scaledRadiusJ = radiusJ; scaledRadiusJ = radiusJ;
// errors++; // errors++;
} else { }
else {
double rJ2 = radiusJ*radiusJ; double rJ2 = radiusJ*radiusJ;
...@@ -774,7 +778,8 @@ static void findScaledRadii( GBVIForce& gbviForce, std::vector<double> & scaledR ...@@ -774,7 +778,8 @@ static void findScaledRadii( GBVIForce& gbviForce, std::vector<double> & scaledR
scaledRadiusJ = (radiusJ*radiusJ*radiusJ) - 0.125*scaledRadiusJ; scaledRadiusJ = (radiusJ*radiusJ*radiusJ) - 0.125*scaledRadiusJ;
if( scaledRadiusJ > 0.0 ){ if( scaledRadiusJ > 0.0 ){
scaledRadiusJ = 0.95*pow( scaledRadiusJ, (1.0/3.0) ); scaledRadiusJ = 0.95*pow( scaledRadiusJ, (1.0/3.0) );
} else { }
else {
scaledRadiusJ = 0.0; scaledRadiusJ = 0.0;
} }
} }
...@@ -849,9 +854,11 @@ void testGBVI(GBVIForce::NonbondedMethod gbviMethod, CustomGBForce::NonbondedMet ...@@ -849,9 +854,11 @@ void testGBVI(GBVIForce::NonbondedMethod gbviMethod, CustomGBForce::NonbondedMet
if( molecule == "Monomer" ){ if( molecule == "Monomer" ){
buildMonomer( gbvi, positions ); buildMonomer( gbvi, positions );
} else if( molecule == "Dimer" ){ }
else if( molecule == "Dimer" ){
buildDimer( gbvi, positions ); buildDimer( gbvi, positions );
} else { }
else {
buildEthane( gbvi, positions ); buildEthane( gbvi, positions );
} }
......
...@@ -66,7 +66,8 @@ void validateAxilrodTeller(CustomManyParticleForce* force, const vector<Vec3>& p ...@@ -66,7 +66,8 @@ void validateAxilrodTeller(CustomManyParticleForce* force, const vector<Vec3>& p
if (force->getNonbondedMethod() == CustomManyParticleForce::CutoffPeriodic) { if (force->getNonbondedMethod() == CustomManyParticleForce::CutoffPeriodic) {
ASSERT(force->usesPeriodicBoundaryConditions()); ASSERT(force->usesPeriodicBoundaryConditions());
ASSERT(system.usesPeriodicBoundaryConditions()); ASSERT(system.usesPeriodicBoundaryConditions());
} else { }
else {
ASSERT(!force->usesPeriodicBoundaryConditions()); ASSERT(!force->usesPeriodicBoundaryConditions());
ASSERT(!system.usesPeriodicBoundaryConditions()); ASSERT(!system.usesPeriodicBoundaryConditions());
} }
......
...@@ -128,7 +128,8 @@ void testEnergyEthane( int applyBornRadiiScaling ) { ...@@ -128,7 +128,8 @@ void testEnergyEthane( int applyBornRadiiScaling ) {
C_gamma = -0.2863; C_gamma = -0.2863;
H_radius = 0.125; H_radius = 0.125;
H_gamma = 0.2437; H_gamma = 0.2437;
} else { }
else {
C_radius = 0.215; C_radius = 0.215;
C_gamma = -1.1087; C_gamma = -1.1087;
H_radius = 0.150; H_radius = 0.150;
...@@ -144,7 +145,8 @@ void testEnergyEthane( int applyBornRadiiScaling ) { ...@@ -144,7 +145,8 @@ void testEnergyEthane( int applyBornRadiiScaling ) {
GBVIForce* forceField = new GBVIForce(); GBVIForce* forceField = new GBVIForce();
if( applyBornRadiiScaling ){ if( applyBornRadiiScaling ){
forceField->setBornRadiusScalingMethod( GBVIForce::QuinticSpline ); forceField->setBornRadiusScalingMethod( GBVIForce::QuinticSpline );
} else { }
else {
forceField->setBornRadiusScalingMethod( GBVIForce::NoScaling ); forceField->setBornRadiusScalingMethod( GBVIForce::NoScaling );
} }
for( int i = 0; i < numParticles; i++ ){ for( int i = 0; i < numParticles; i++ ){
......
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