Commit 1f15a914 authored by Jason Swails's avatar Jason Swails
Browse files

More

} else { -->
}
else {

However, these were not my additions originally, but rather part of the Amoeba
test cases that have been around for awhile. I figured while I was at it, I
might as well update these styles as well.
parent b8f6d269
...@@ -82,9 +82,11 @@ static void getPrefactorsGivenAngleCosine( double cosine, double idealAngle, dou ...@@ -82,9 +82,11 @@ static void getPrefactorsGivenAngleCosine( double cosine, double idealAngle, dou
double angle; double angle;
if( cosine >= 1.0 ){ if( cosine >= 1.0 ){
angle = 0.0f; angle = 0.0f;
} else if( cosine <= -1.0 ){ }
else if( cosine <= -1.0 ){
angle = RADIAN*PI_M; angle = RADIAN*PI_M;
} else { }
else {
angle = RADIAN*acos(cosine); angle = RADIAN*acos(cosine);
} }
#ifdef AMOEBA_DEBUG #ifdef AMOEBA_DEBUG
...@@ -157,7 +159,7 @@ static void computeAmoebaAngleForce(int bondIndex, std::vector<Vec3>& positions ...@@ -157,7 +159,7 @@ static void computeAmoebaAngleForce(int bondIndex, std::vector<Vec3>& positions
double rp = sqrt( pVector[0]*pVector[0] + pVector[1]*pVector[1] + pVector[2]*pVector[2] ); double rp = sqrt( pVector[0]*pVector[0] + pVector[1]*pVector[1] + pVector[2]*pVector[2] );
if( rp < 1.0e-06 ){ if( rp < 1.0e-06 ){
rp = 1.0e-06; rp = 1.0e-06;
} }
double dot = deltaR[0][0]*deltaR[1][0] + deltaR[0][1]*deltaR[1][1] + deltaR[0][2]*deltaR[1][2]; double dot = deltaR[0][0]*deltaR[1][0] + deltaR[0][1]*deltaR[1][1] + deltaR[0][2]*deltaR[1][2];
double cosine = dot/sqrt(r2_0*r2_1); double cosine = dot/sqrt(r2_0*r2_1);
......
...@@ -8488,7 +8488,8 @@ int main( int numberOfArguments, char* argv[] ) { ...@@ -8488,7 +8488,8 @@ int main( int numberOfArguments, char* argv[] ) {
testGeneralizedKirkwoodVillinDirectPolarization( log ); testGeneralizedKirkwoodVillinDirectPolarization( log );
testGeneralizedKirkwoodVillinMutualPolarization( log ); testGeneralizedKirkwoodVillinMutualPolarization( log );
   
} catch(const std::exception& e) { }
catch(const std::exception& e) {
std::cout << "exception: " << e.what() << std::endl; std::cout << "exception: " << e.what() << std::endl;
std::cout << "FAIL - ERROR. Test failed." << std::endl; std::cout << "FAIL - ERROR. Test failed." << std::endl;
return 1; return 1;
......
...@@ -84,9 +84,11 @@ static void getPrefactorsGivenInPlaneAngleCosine( double cosine, double idealInP ...@@ -84,9 +84,11 @@ static void getPrefactorsGivenInPlaneAngleCosine( double cosine, double idealInP
double angle; double angle;
if( cosine >= 1.0 ){ if( cosine >= 1.0 ){
angle = 0.0f; angle = 0.0f;
} else if( cosine <= -1.0 ){ }
else if( cosine <= -1.0 ){
angle = RADIAN*PI_M; angle = RADIAN*PI_M;
} else { }
else {
angle = RADIAN*acos(cosine); angle = RADIAN*acos(cosine);
} }
#ifdef AMOEBA_DEBUG #ifdef AMOEBA_DEBUG
...@@ -175,7 +177,7 @@ static void computeAmoebaInPlaneAngleForce(int bondIndex, std::vector<Vec3>& po ...@@ -175,7 +177,7 @@ static void computeAmoebaInPlaneAngleForce(int bondIndex, std::vector<Vec3>& po
deltaR[P][ii] = positions[particle2][ii] + deltaR[T][ii]*delta; deltaR[P][ii] = positions[particle2][ii] + deltaR[T][ii]*delta;
deltaR[AP][ii] = positions[particle1][ii] - deltaR[P][ii]; deltaR[AP][ii] = positions[particle1][ii] - deltaR[P][ii];
deltaR[CP][ii] = positions[particle3][ii] - deltaR[P][ii]; deltaR[CP][ii] = positions[particle3][ii] - deltaR[P][ii];
} }
double rAp2 = dotVector3( deltaR[AP], deltaR[AP] ); double rAp2 = dotVector3( deltaR[AP], deltaR[AP] );
double rCp2 = dotVector3( deltaR[CP], deltaR[CP] ); double rCp2 = dotVector3( deltaR[CP], deltaR[CP] );
...@@ -245,7 +247,8 @@ static void computeAmoebaInPlaneAngleForce(int bondIndex, std::vector<Vec3>& po ...@@ -245,7 +247,8 @@ static void computeAmoebaInPlaneAngleForce(int bondIndex, std::vector<Vec3>& po
forceTerm[dD][ii] = -( forceTerm[dA][ii] + forceTerm[dB][ii] + forceTerm[dC][ii] ); forceTerm[dD][ii] = -( forceTerm[dA][ii] + forceTerm[dB][ii] + forceTerm[dC][ii] );
} }
} else { }
else {
for( int ii = 0; ii < 3; ii++ ){ for( int ii = 0; ii < 3; ii++ ){
forceTerm[dA][ii] += delta*deltaR[CDxdB][ii]; forceTerm[dA][ii] += delta*deltaR[CDxdB][ii];
......
...@@ -623,7 +623,7 @@ static void setupAndGetForcesEnergyMultipoleWater( AmoebaMultipoleForce::Nonbond ...@@ -623,7 +623,7 @@ static void setupAndGetForcesEnergyMultipoleWater( AmoebaMultipoleForce::Nonbond
covalentMap.push_back( jj+1 ); covalentMap.push_back( jj+1 );
amoebaMultipoleForce->setCovalentMap( jj+2, static_cast<OpenMM::AmoebaMultipoleForce::CovalentType>(1), covalentMap ); amoebaMultipoleForce->setCovalentMap( jj+2, static_cast<OpenMM::AmoebaMultipoleForce::CovalentType>(1), covalentMap );
} }
std::vector<Vec3> positions(numberOfParticles); std::vector<Vec3> positions(numberOfParticles);
...@@ -841,7 +841,8 @@ static void testQuadrupoleValidation( FILE* log ){ ...@@ -841,7 +841,8 @@ static void testQuadrupoleValidation( FILE* log ){
std::stringstream buffer; std::stringstream buffer;
buffer << "Exception not thrown for quadrupole tensor w/ nonzero trace."; buffer << "Exception not thrown for quadrupole tensor w/ nonzero trace.";
throw OpenMMException(buffer.str()); throw OpenMMException(buffer.str());
} catch(const std::exception& e) { }
catch(const std::exception& e) {
} }
oxygenMolecularQuadrupole[4] -= 0.1; oxygenMolecularQuadrupole[4] -= 0.1;
...@@ -857,7 +858,8 @@ static void testQuadrupoleValidation( FILE* log ){ ...@@ -857,7 +858,8 @@ static void testQuadrupoleValidation( FILE* log ){
std::stringstream buffer; std::stringstream buffer;
buffer << "Exception not thrown for quadrupole tensor w/ nonzero trace."; buffer << "Exception not thrown for quadrupole tensor w/ nonzero trace.";
throw OpenMMException(buffer.str()); throw OpenMMException(buffer.str());
} catch(const std::exception& e) { }
catch(const std::exception& e) {
} }
oxygenMolecularQuadrupole[1] -= 0.1; oxygenMolecularQuadrupole[1] -= 0.1;
...@@ -871,7 +873,8 @@ static void testQuadrupoleValidation( FILE* log ){ ...@@ -871,7 +873,8 @@ static void testQuadrupoleValidation( FILE* log ){
std::stringstream buffer; std::stringstream buffer;
buffer << "Exception not thrown for quadrupole tensor w/ nonzero trace."; buffer << "Exception not thrown for quadrupole tensor w/ nonzero trace.";
throw OpenMMException(buffer.str()); throw OpenMMException(buffer.str());
} catch(const std::exception& e) { }
catch(const std::exception& e) {
} }
oxygenMolecularQuadrupole[2] -= 0.1; oxygenMolecularQuadrupole[2] -= 0.1;
...@@ -885,7 +888,8 @@ static void testQuadrupoleValidation( FILE* log ){ ...@@ -885,7 +888,8 @@ static void testQuadrupoleValidation( FILE* log ){
std::stringstream buffer; std::stringstream buffer;
buffer << "Exception not thrown for quadrupole tensor w/ nonzero trace."; buffer << "Exception not thrown for quadrupole tensor w/ nonzero trace.";
throw OpenMMException(buffer.str()); throw OpenMMException(buffer.str());
} catch(const std::exception& e) { }
catch(const std::exception& e) {
} }
oxygenMolecularQuadrupole[5] -= 0.1; oxygenMolecularQuadrupole[5] -= 0.1;
...@@ -1043,7 +1047,7 @@ static void setupAndGetForcesEnergyMultipoleIonsAndWater( AmoebaMultipoleForce:: ...@@ -1043,7 +1047,7 @@ static void setupAndGetForcesEnergyMultipoleIonsAndWater( AmoebaMultipoleForce::
covalentMap.push_back( jj+1 ); covalentMap.push_back( jj+1 );
amoebaMultipoleForce->setCovalentMap( jj+2, static_cast<OpenMM::AmoebaMultipoleForce::CovalentType>(1), covalentMap ); amoebaMultipoleForce->setCovalentMap( jj+2, static_cast<OpenMM::AmoebaMultipoleForce::CovalentType>(1), covalentMap );
} }
std::vector<Vec3> positions(numberOfParticles); std::vector<Vec3> positions(numberOfParticles);
...@@ -1259,7 +1263,7 @@ static void setupAndGetForcesEnergyMultipoleLargeWater( AmoebaMultipoleForce::No ...@@ -1259,7 +1263,7 @@ static void setupAndGetForcesEnergyMultipoleLargeWater( AmoebaMultipoleForce::No
covalentMap.push_back( jj+1 ); covalentMap.push_back( jj+1 );
amoebaMultipoleForce->setCovalentMap( jj+2, static_cast<OpenMM::AmoebaMultipoleForce::CovalentType>(1), covalentMap ); amoebaMultipoleForce->setCovalentMap( jj+2, static_cast<OpenMM::AmoebaMultipoleForce::CovalentType>(1), covalentMap );
} }
system.addForce(amoebaMultipoleForce); system.addForce(amoebaMultipoleForce);
static std::vector<Vec3> positions; // Static to work around bug in Visual Studio that makes compilation very very slow. static std::vector<Vec3> positions; // Static to work around bug in Visual Studio that makes compilation very very slow.
...@@ -1923,9 +1927,11 @@ static void setupAndGetForcesEnergyMultipoleLargeWater( AmoebaMultipoleForce::No ...@@ -1923,9 +1927,11 @@ static void setupAndGetForcesEnergyMultipoleLargeWater( AmoebaMultipoleForce::No
if( testName == "testSystemMultipoleMoments" ){ if( testName == "testSystemMultipoleMoments" ){
amoebaMultipoleForce->getSystemMultipoleMoments( context, outputMultipoleMoments ); amoebaMultipoleForce->getSystemMultipoleMoments( context, outputMultipoleMoments );
} else if( testName == "testMultipoleGridPotential" ){ }
else if( testName == "testMultipoleGridPotential" ){
amoebaMultipoleForce->getElectrostaticPotential( inputGrid, context, outputGridPotential ); amoebaMultipoleForce->getElectrostaticPotential( inputGrid, context, outputGridPotential );
} else { }
else {
State state = context.getState(State::Forces | State::Energy); State state = context.getState(State::Forces | State::Energy);
forces = state.getForces(); forces = state.getForces();
...@@ -2690,7 +2696,8 @@ static void testSystemMultipoleMoments( FILE* log ) { ...@@ -2690,7 +2696,8 @@ static void testSystemMultipoleMoments( FILE* log ) {
double difference; double difference;
if( fabs( tinkerMoments[ii] ) > 0.0 ){ if( fabs( tinkerMoments[ii] ) > 0.0 ){
difference = fabs( outputMultipoleMoments[ii] - tinkerMoments[ii] )/fabs( tinkerMoments[ii] ); difference = fabs( outputMultipoleMoments[ii] - tinkerMoments[ii] )/fabs( tinkerMoments[ii] );
} else { }
else {
difference = fabs( outputMultipoleMoments[ii] - tinkerMoments[ii] ); difference = fabs( outputMultipoleMoments[ii] - tinkerMoments[ii] );
} }
if( log ){ if( log ){
...@@ -2854,7 +2861,8 @@ int main( int numberOfArguments, char* argv[] ) { ...@@ -2854,7 +2861,8 @@ int main( int numberOfArguments, char* argv[] ) {
testPMEMutualPolarizationLargeWater( log ); testPMEMutualPolarizationLargeWater( log );
} catch(const std::exception& e) { }
catch(const std::exception& e) {
std::cout << "exception: " << e.what() << std::endl; std::cout << "exception: " << e.what() << std::endl;
std::cout << "FAIL - ERROR. Test failed." << std::endl; std::cout << "FAIL - ERROR. Test failed." << std::endl;
return 1; return 1;
......
...@@ -114,7 +114,7 @@ static void computeAmoebaOutOfPlaneBendForce(int bondIndex, std::vector<Vec3>& ...@@ -114,7 +114,7 @@ static void computeAmoebaOutOfPlaneBendForce(int bondIndex, std::vector<Vec3>&
deltaR[DB][ii] = positions[particle4][ii] - positions[particle2][ii]; deltaR[DB][ii] = positions[particle4][ii] - positions[particle2][ii];
deltaR[AD][ii] = positions[particle1][ii] - positions[particle4][ii]; deltaR[AD][ii] = positions[particle1][ii] - positions[particle4][ii];
deltaR[CD][ii] = positions[particle3][ii] - positions[particle4][ii]; deltaR[CD][ii] = positions[particle3][ii] - positions[particle4][ii];
} }
double rDB2 = dotVector3( deltaR[DB], deltaR[DB] ); double rDB2 = dotVector3( deltaR[DB], deltaR[DB] );
double rAD2 = dotVector3( deltaR[AD], deltaR[AD] ); double rAD2 = dotVector3( deltaR[AD], deltaR[AD] );
...@@ -134,9 +134,11 @@ static void computeAmoebaOutOfPlaneBendForce(int bondIndex, std::vector<Vec3>& ...@@ -134,9 +134,11 @@ static void computeAmoebaOutOfPlaneBendForce(int bondIndex, std::vector<Vec3>&
double angle; double angle;
if( cosine >= 1.0 ){ if( cosine >= 1.0 ){
angle = 0.0; angle = 0.0;
} else if( cosine <= -1.0 ){ }
else if( cosine <= -1.0 ){
angle = PI_M; angle = PI_M;
} else { }
else {
angle = RADIAN*acos(cosine); angle = RADIAN*acos(cosine);
} }
#ifdef AMOEBA_DEBUG #ifdef AMOEBA_DEBUG
...@@ -405,37 +407,43 @@ void testOneOutOfPlaneBend2( FILE* log, int setId ) { ...@@ -405,37 +407,43 @@ void testOneOutOfPlaneBend2( FILE* log, int setId ) {
particleIndices.push_back( 443 ); particleIndices.push_back( 443 );
particleIndices.push_back( 444 ); particleIndices.push_back( 444 );
kOutOfPlaneBend = 0.328682196E-01; kOutOfPlaneBend = 0.328682196E-01;
} else if( setId == 2 ){ }
else if( setId == 2 ){
particleIndices.push_back( 441 ); particleIndices.push_back( 441 );
particleIndices.push_back( 442 ); particleIndices.push_back( 442 );
particleIndices.push_back( 444 ); particleIndices.push_back( 444 );
particleIndices.push_back( 443 ); particleIndices.push_back( 443 );
kOutOfPlaneBend = 0.164493407E-01; kOutOfPlaneBend = 0.164493407E-01;
} else if( setId == 3 ){ }
else if( setId == 3 ){
particleIndices.push_back( 443 ); particleIndices.push_back( 443 );
particleIndices.push_back( 442 ); particleIndices.push_back( 442 );
particleIndices.push_back( 444 ); particleIndices.push_back( 444 );
particleIndices.push_back( 441 ); particleIndices.push_back( 441 );
kOutOfPlaneBend = 0.636650407E-02; kOutOfPlaneBend = 0.636650407E-02;
} else if( setId == 4 ){ }
else if( setId == 4 ){
particleIndices.push_back( 442 ); particleIndices.push_back( 442 );
particleIndices.push_back( 444 ); particleIndices.push_back( 444 );
particleIndices.push_back( 447 ); particleIndices.push_back( 447 );
particleIndices.push_back( 448 ); particleIndices.push_back( 448 );
kOutOfPlaneBend = 0.392956472E-02; kOutOfPlaneBend = 0.392956472E-02;
} else if( setId == 5 ){ }
else if( setId == 5 ){
particleIndices.push_back( 442 ); particleIndices.push_back( 442 );
particleIndices.push_back( 444 ); particleIndices.push_back( 444 );
particleIndices.push_back( 448 ); particleIndices.push_back( 448 );
particleIndices.push_back( 447 ); particleIndices.push_back( 447 );
kOutOfPlaneBend = 0.392956472E-02; kOutOfPlaneBend = 0.392956472E-02;
} else if( setId == 6 ){ }
else if( setId == 6 ){
particleIndices.push_back( 447 ); particleIndices.push_back( 447 );
particleIndices.push_back( 444 ); particleIndices.push_back( 444 );
particleIndices.push_back( 448 ); particleIndices.push_back( 448 );
particleIndices.push_back( 442 ); particleIndices.push_back( 442 );
kOutOfPlaneBend = 0.214755281E-01; kOutOfPlaneBend = 0.214755281E-01;
} else { }
else {
#ifdef AMOEBA_DEBUG #ifdef AMOEBA_DEBUG
if( log ){ if( log ){
(void) fprintf( log, "Set id %d not recognized.\n", setId ); (void) fprintf( log, "Set id %d not recognized.\n", setId );
......
...@@ -129,9 +129,11 @@ static void computeAmoebaStretchBendForce(int bondIndex, std::vector<Vec3>& pos ...@@ -129,9 +129,11 @@ static void computeAmoebaStretchBendForce(int bondIndex, std::vector<Vec3>& pos
double angle; double angle;
if( cosine >= 1.0 ){ if( cosine >= 1.0 ){
angle = 0.0; angle = 0.0;
} else if( cosine <= -1.0 ){ }
else if( cosine <= -1.0 ){
angle = PI_M; angle = PI_M;
} else { }
else {
angle = RADIAN*acos(cosine); angle = RADIAN*acos(cosine);
} }
......
...@@ -2620,7 +2620,8 @@ void testTorsionTorsion(int systemId, bool includeDerivs) { ...@@ -2620,7 +2620,8 @@ void testTorsionTorsion(int systemId, bool includeDerivs) {
expectedEnergy = -2.699654759E+00; expectedEnergy = -2.699654759E+00;
} else if( systemId == 1 ){ }
else if( systemId == 1 ){
// villin: 158 176 177 178 183 -1 0 // villin: 158 176 177 178 183 -1 0
chiralCheckAtomIndex = -1; chiralCheckAtomIndex = -1;
...@@ -2676,7 +2677,8 @@ int main( int numberOfArguments, char* argv[] ) { ...@@ -2676,7 +2677,8 @@ int main( int numberOfArguments, char* argv[] ) {
registerAmoebaReferenceKernelFactories(); registerAmoebaReferenceKernelFactories();
testTorsionTorsion(1, true); testTorsionTorsion(1, true);
testTorsionTorsion(1, false); testTorsionTorsion(1, false);
} catch(const std::exception& e) { }
catch(const std::exception& e) {
std::cout << "exception: " << e.what() << std::endl; std::cout << "exception: " << e.what() << std::endl;
std::cout << "FAIL - ERROR. Test failed." << std::endl; std::cout << "FAIL - ERROR. Test failed." << std::endl;
return 1; return 1;
......
...@@ -75,7 +75,8 @@ void testVdw( FILE* log ) { ...@@ -75,7 +75,8 @@ void testVdw( FILE* log ) {
sigma = 1.70250E+00; sigma = 1.70250E+00;
epsilon = 1.10000E-01; epsilon = 1.10000E-01;
reduction = 0.0; reduction = 0.0;
} else { }
else {
mass = 1.0; mass = 1.0;
indexIV = ii < 3 ? 0 : 3; indexIV = ii < 3 ? 0 : 3;
sigma = 1.32750E+00; sigma = 1.32750E+00;
...@@ -89,7 +90,8 @@ void testVdw( FILE* log ) { ...@@ -89,7 +90,8 @@ void testVdw( FILE* log ) {
exclusions.push_back ( 0 ); exclusions.push_back ( 0 );
exclusions.push_back ( 1 ); exclusions.push_back ( 1 );
exclusions.push_back ( 2 ); exclusions.push_back ( 2 );
} else { }
else {
exclusions.push_back ( 3 ); exclusions.push_back ( 3 );
exclusions.push_back ( 4 ); exclusions.push_back ( 4 );
exclusions.push_back ( 5 ); exclusions.push_back ( 5 );
...@@ -155,7 +157,7 @@ void testVdw( FILE* log ) { ...@@ -155,7 +157,7 @@ void testVdw( FILE* log ) {
forces[ii][0] *= conversion; forces[ii][0] *= conversion;
forces[ii][1] *= conversion; forces[ii][1] *= conversion;
forces[ii][2] *= conversion; forces[ii][2] *= conversion;
} }
expectedEnergy *= CalToJoule; expectedEnergy *= CalToJoule;
#ifdef AMOEBA_DEBUG #ifdef AMOEBA_DEBUG
...@@ -223,7 +225,8 @@ void setupAndGetForcesEnergyVdwAmmonia( const std::string& sigmaCombiningRule, c ...@@ -223,7 +225,8 @@ void setupAndGetForcesEnergyVdwAmmonia( const std::string& sigmaCombiningRule, c
system.setDefaultPeriodicBoxVectors( a, b, c ); system.setDefaultPeriodicBoxVectors( a, b, c );
amoebaVdwForce->setNonbondedMethod(AmoebaVdwForce::CutoffPeriodic); amoebaVdwForce->setNonbondedMethod(AmoebaVdwForce::CutoffPeriodic);
amoebaVdwForce->setUseDispersionCorrection( 1 ); amoebaVdwForce->setUseDispersionCorrection( 1 );
} else { }
else {
amoebaVdwForce->setNonbondedMethod(AmoebaVdwForce::NoCutoff); amoebaVdwForce->setNonbondedMethod(AmoebaVdwForce::NoCutoff);
amoebaVdwForce->setUseDispersionCorrection( 0 ); amoebaVdwForce->setUseDispersionCorrection( 0 );
} }
...@@ -330,7 +333,8 @@ void setupAndGetForcesEnergyVdwAmmonia( const std::string& sigmaCombiningRule, c ...@@ -330,7 +333,8 @@ void setupAndGetForcesEnergyVdwAmmonia( const std::string& sigmaCombiningRule, c
if( boxDimension > 0.0 ){ if( boxDimension > 0.0 ){
ASSERT(amoebaVdwForce->usesPeriodicBoundaryConditions()); ASSERT(amoebaVdwForce->usesPeriodicBoundaryConditions());
} else { }
else {
ASSERT(!amoebaVdwForce->usesPeriodicBoundaryConditions()); ASSERT(!amoebaVdwForce->usesPeriodicBoundaryConditions());
} }
...@@ -573,7 +577,8 @@ void setupAndGetForcesEnergyVdwWater( const std::string& sigmaCombiningRule, con ...@@ -573,7 +577,8 @@ void setupAndGetForcesEnergyVdwWater( const std::string& sigmaCombiningRule, con
system.setDefaultPeriodicBoxVectors( a, b, c ); system.setDefaultPeriodicBoxVectors( a, b, c );
amoebaVdwForce->setNonbondedMethod(AmoebaVdwForce::CutoffPeriodic); amoebaVdwForce->setNonbondedMethod(AmoebaVdwForce::CutoffPeriodic);
amoebaVdwForce->setUseDispersionCorrection( includeVdwDispersionCorrection ); amoebaVdwForce->setUseDispersionCorrection( includeVdwDispersionCorrection );
} else { }
else {
amoebaVdwForce->setNonbondedMethod(AmoebaVdwForce::NoCutoff); amoebaVdwForce->setNonbondedMethod(AmoebaVdwForce::NoCutoff);
amoebaVdwForce->setUseDispersionCorrection( 0 ); amoebaVdwForce->setUseDispersionCorrection( 0 );
} }
...@@ -1281,7 +1286,8 @@ void testVdwWater( int includeVdwDispersionCorrection, FILE* log ) { ...@@ -1281,7 +1286,8 @@ void testVdwWater( int includeVdwDispersionCorrection, FILE* log ) {
std::string testName; std::string testName;
if( includeVdwDispersionCorrection ){ if( includeVdwDispersionCorrection ){
testName = "testVdwWaterWithDispersionCorrection"; testName = "testVdwWaterWithDispersionCorrection";
} else { }
else {
testName = "testVdwWater"; testName = "testVdwWater";
} }
...@@ -1299,7 +1305,8 @@ void testVdwWater( int includeVdwDispersionCorrection, FILE* log ) { ...@@ -1299,7 +1305,8 @@ void testVdwWater( int includeVdwDispersionCorrection, FILE* log ) {
double expectedEnergy; double expectedEnergy;
if( includeVdwDispersionCorrection ){ if( includeVdwDispersionCorrection ){
expectedEnergy = 4.0108819792e+03; expectedEnergy = 4.0108819792e+03;
} else { }
else {
expectedEnergy = 4.0349101e+03; expectedEnergy = 4.0349101e+03;
} }
...@@ -2036,7 +2043,8 @@ int main( int numberOfArguments, char* argv[] ) { ...@@ -2036,7 +2043,8 @@ int main( int numberOfArguments, char* argv[] ) {
includeVdwDispersionCorrection = 1; includeVdwDispersionCorrection = 1;
testVdwWater( includeVdwDispersionCorrection, log ); testVdwWater( includeVdwDispersionCorrection, log );
} catch(const std::exception& e) { }
catch(const std::exception& e) {
std::cout << "exception: " << e.what() << std::endl; std::cout << "exception: " << e.what() << std::endl;
std::cout << "FAIL - ERROR. Test failed." << std::endl; std::cout << "FAIL - ERROR. Test failed." << std::endl;
return 1; return 1;
......
...@@ -185,7 +185,8 @@ int main( int numberOfArguments, char* argv[] ) { ...@@ -185,7 +185,8 @@ int main( int numberOfArguments, char* argv[] ) {
testWcaDispersionAmmonia( log ); testWcaDispersionAmmonia( log );
} catch(const std::exception& e) { }
catch(const std::exception& e) {
std::cout << "exception: " << e.what() << std::endl; std::cout << "exception: " << e.what() << std::endl;
std::cout << "FAIL - ERROR. Test failed." << std::endl; std::cout << "FAIL - ERROR. Test failed." << std::endl;
return 1; return 1;
......
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