Commit c701af73 authored by Chengwen Liu's avatar Chengwen Liu
Browse files

Updated TestReferenceAmoebaVdwForce.cpp

parent 2e970e9f
...@@ -411,13 +411,6 @@ void testVdwAmmoniaCubicMeanWH() { ...@@ -411,13 +411,6 @@ void testVdwAmmoniaCubicMeanWH() {
std::string testName = "testVdwAmmoniaCubicMeanWH"; std::string testName = "testVdwAmmoniaCubicMeanWH";
// test alchemical VDW
void testVdwAlchemical(int power, double alpha, double lambda, AmoebaVdwForce::AlchemicalMethod method) {
std::string testName = "testVdwAlchemical";
int numberOfParticles = 8; int numberOfParticles = 8;
double boxDimension = -1.0; double boxDimension = -1.0;
double cutoff = 9000000.0; double cutoff = 9000000.0;
...@@ -437,7 +430,16 @@ void testVdwAlchemical(int power, double alpha, double lambda, AmoebaVdwForce::A ...@@ -437,7 +430,16 @@ void testVdwAlchemical(int power, double alpha, double lambda, AmoebaVdwForce::A
expectedForces[5] = Vec3( 1.4153288e+00, -2.7130186e-01, -1.5480591e-01); expectedForces[5] = Vec3( 1.4153288e+00, -2.7130186e-01, -1.5480591e-01);
expectedForces[6] = Vec3(-1.8544507e+02, 8.4027272e-03, 6.0950274e+00); expectedForces[6] = Vec3(-1.8544507e+02, 8.4027272e-03, 6.0950274e+00);
expectedForces[7] = Vec3( 1.4159723e+00, 2.7168386e-01, -1.5376786e-01); expectedForces[7] = Vec3( 1.4159723e+00, 2.7168386e-01, -1.5376786e-01);
double tolerance = 1.0e-04;
compareForcesEnergy(testName, expectedEnergy, energy, expectedForces, forces, tolerance);
}
// test alchemical VDW
void testVdwAlchemical(int power, double alpha, double lambda, AmoebaVdwForce::AlchemicalMethod method) {
std::string testName = "testVdwAlchemical";
setupAndGetForcesEnergyVdwAmmonia2("CUBIC-MEAN", "HHG", cutoff, boxDimension, forces, energy, setupAndGetForcesEnergyVdwAmmonia2("CUBIC-MEAN", "HHG", cutoff, boxDimension, forces, energy,
method, power, alpha, lambda); method, power, alpha, lambda);
std::vector<Vec3> expectedForces(numberOfParticles); std::vector<Vec3> expectedForces(numberOfParticles);
...@@ -457,10 +459,6 @@ void testVdwAlchemical(int power, double alpha, double lambda, AmoebaVdwForce::A ...@@ -457,10 +459,6 @@ void testVdwAlchemical(int power, double alpha, double lambda, AmoebaVdwForce::A
for (int i=0; i<8; i++) { for (int i=0; i<8; i++) {
expectedForces[i] *= scale; expectedForces[i] *= scale;
} }
double tolerance = 1.0e-04;
compareForcesEnergy(testName, expectedEnergy, energy, expectedForces, forces, tolerance);
} }
// test VDW w/ sigmaRule=Arithmetic and epsilonRule=Arithmetic // test VDW w/ sigmaRule=Arithmetic and epsilonRule=Arithmetic
......
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