Commit 643ea90e authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Added test for GBVIForce w/ Born radii switching

parent 6c15e603
...@@ -91,7 +91,7 @@ void testSingleParticle() { ...@@ -91,7 +91,7 @@ void testSingleParticle() {
ASSERT_EQUAL_TOL((bornEnergy+nonpolarEnergy), state.getPotentialEnergy(), 0.01); ASSERT_EQUAL_TOL((bornEnergy+nonpolarEnergy), state.getPotentialEnergy(), 0.01);
} }
void testEnergyEthane() { void testEnergyEthane( int applyBornRadiiScaling ) {
ReferencePlatform platform; ReferencePlatform platform;
const int numParticles = 8; const int numParticles = 8;
...@@ -140,6 +140,11 @@ void testEnergyEthane() { ...@@ -140,6 +140,11 @@ void testEnergyEthane() {
(void) fprintf( stderr, "Applying GB/VI\n" ); (void) fprintf( stderr, "Applying GB/VI\n" );
} }
GBVIForce* forceField = new GBVIForce(); GBVIForce* forceField = new GBVIForce();
if( applyBornRadiiScaling ){
forceField->setBornRadiusScalingMethod( GBVIForce::QuinticSpline );
} else {
forceField->setBornRadiusScalingMethod( GBVIForce::NoScaling );
}
for( int i = 0; i < numParticles; i++ ){ for( int i = 0; i < numParticles; i++ ){
system.addParticle(1.0); system.addParticle(1.0);
forceField->addParticle( H_charge, H_radius, H_gamma); forceField->addParticle( H_charge, H_radius, H_gamma);
...@@ -251,7 +256,8 @@ void testEnergyEthane() { ...@@ -251,7 +256,8 @@ void testEnergyEthane() {
int main() { int main() {
try { try {
testSingleParticle(); testSingleParticle();
testEnergyEthane(); testEnergyEthane( 0 );
testEnergyEthane( 1 );
} }
catch(const exception& e) { catch(const exception& e) {
cout << "exception: " << e.what() << endl; cout << "exception: " << e.what() << endl;
......
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