Unverified Commit c24c619e authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Code cleanup (#5127)

parent b1a5324c
...@@ -58,9 +58,7 @@ public: ...@@ -58,9 +58,7 @@ public:
} }
double calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups); double calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups);
std::map<std::string, double> getDefaultParameters() { std::map<std::string, double> getDefaultParameters() {
std::map<std::string, double> parameters; return {{AmoebaVdwForce::Lambda(), 1.0}};
parameters[AmoebaVdwForce::Lambda()] = 1.0;
return parameters;
} }
std::vector<std::string> getKernelNames(); std::vector<std::string> getKernelNames();
/** /**
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
} }
double calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups); double calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups);
std::map<std::string, double> getDefaultParameters() { std::map<std::string, double> getDefaultParameters() {
return std::map<std::string, double>(); // This force field doesn't define any parameters. return {}; // This force field doesn't define any parameters.
} }
std::vector<std::string> getKernelNames(); std::vector<std::string> getKernelNames();
......
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
} }
double calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups); double calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups);
std::map<std::string, double> getDefaultParameters() { std::map<std::string, double> getDefaultParameters() {
return std::map<std::string, double>(); // This force doesn't define any parameters. return {}; // This force doesn't define any parameters.
} }
std::vector<std::string> getKernelNames(); std::vector<std::string> getKernelNames();
void getLabFramePermanentDipoles(ContextImpl& context, std::vector<Vec3>& dipoles); void getLabFramePermanentDipoles(ContextImpl& context, std::vector<Vec3>& dipoles);
......
...@@ -60,9 +60,7 @@ double AmoebaGeneralizedKirkwoodForceImpl::calcForcesAndEnergy(ContextImpl& cont ...@@ -60,9 +60,7 @@ double AmoebaGeneralizedKirkwoodForceImpl::calcForcesAndEnergy(ContextImpl& cont
} }
std::vector<std::string> AmoebaGeneralizedKirkwoodForceImpl::getKernelNames() { std::vector<std::string> AmoebaGeneralizedKirkwoodForceImpl::getKernelNames() {
std::vector<std::string> names; return {CalcAmoebaGeneralizedKirkwoodForceKernel::Name()};
names.push_back(CalcAmoebaGeneralizedKirkwoodForceKernel::Name());
return names;
} }
void AmoebaGeneralizedKirkwoodForceImpl::updateParametersInContext(ContextImpl& context) { void AmoebaGeneralizedKirkwoodForceImpl::updateParametersInContext(ContextImpl& context) {
......
...@@ -150,9 +150,7 @@ double AmoebaMultipoleForceImpl::calcForcesAndEnergy(ContextImpl& context, bool ...@@ -150,9 +150,7 @@ double AmoebaMultipoleForceImpl::calcForcesAndEnergy(ContextImpl& context, bool
} }
std::vector<std::string> AmoebaMultipoleForceImpl::getKernelNames() { std::vector<std::string> AmoebaMultipoleForceImpl::getKernelNames() {
std::vector<std::string> names; return {CalcAmoebaMultipoleForceKernel::Name()};
names.push_back(CalcAmoebaMultipoleForceKernel::Name());
return names;
} }
const int* AmoebaMultipoleForceImpl::getCovalentDegrees() { const int* AmoebaMultipoleForceImpl::getCovalentDegrees() {
......
...@@ -152,8 +152,6 @@ void AmoebaTorsionTorsionForceImpl::reorderGrid(const TorsionTorsionGrid& grid, ...@@ -152,8 +152,6 @@ void AmoebaTorsionTorsionForceImpl::reorderGrid(const TorsionTorsionGrid& grid,
} }
std::vector<std::string> AmoebaTorsionTorsionForceImpl::getKernelNames() { std::vector<std::string> AmoebaTorsionTorsionForceImpl::getKernelNames() {
std::vector<std::string> names; return {CalcAmoebaTorsionTorsionForceKernel::Name()};
names.push_back(CalcAmoebaTorsionTorsionForceKernel::Name());
return names;
} }
...@@ -245,12 +245,6 @@ double AmoebaVdwForceImpl::calcDispersionCorrection(const System& system, const ...@@ -245,12 +245,6 @@ double AmoebaVdwForceImpl::calcDispersionCorrection(const System& system, const
// Compute the VdW tapering coefficients. Mostly copied from amoebaCudaGpu.cpp. // Compute the VdW tapering coefficients. Mostly copied from amoebaCudaGpu.cpp.
double cutoff = force.getCutoffDistance(); double cutoff = force.getCutoffDistance();
double vdwTaper = 0.90; // vdwTaper is a scaling factor, it is not a distance. double vdwTaper = 0.90; // vdwTaper is a scaling factor, it is not a distance.
double c0 = 0.0;
double c1 = 0.0;
double c2 = 0.0;
double c3 = 0.0;
double c4 = 0.0;
double c5 = 0.0;
double vdwCut = cutoff; double vdwCut = cutoff;
double vdwTaperCut = vdwTaper*cutoff; double vdwTaperCut = vdwTaper*cutoff;
...@@ -275,12 +269,12 @@ double AmoebaVdwForceImpl::calcDispersionCorrection(const System& system, const ...@@ -275,12 +269,12 @@ double AmoebaVdwForceImpl::calcDispersionCorrection(const System& system, const
double denom2 = denom*denom; double denom2 = denom*denom;
denom = denom * denom2*denom2; denom = denom * denom2*denom2;
c0 = vdwCut * vdwCut2 * (vdwCut2 - 5.0 * vdwCut * vdwTaperCut + 10.0 * vdwTaperCut2) * denom; double c0 = vdwCut * vdwCut2 * (vdwCut2 - 5.0 * vdwCut * vdwTaperCut + 10.0 * vdwTaperCut2) * denom;
c1 = -30.0 * vdwCut2 * vdwTaperCut2*denom; double c1 = -30.0 * vdwCut2 * vdwTaperCut2*denom;
c2 = 30.0 * (vdwCut2 * vdwTaperCut + vdwCut * vdwTaperCut2) * denom; double c2 = 30.0 * (vdwCut2 * vdwTaperCut + vdwCut * vdwTaperCut2) * denom;
c3 = -10.0 * (vdwCut2 + 4.0 * vdwCut * vdwTaperCut + vdwTaperCut2) * denom; double c3 = -10.0 * (vdwCut2 + 4.0 * vdwCut * vdwTaperCut + vdwTaperCut2) * denom;
c4 = 15.0 * (vdwCut + vdwTaperCut) * denom; double c4 = 15.0 * (vdwCut + vdwTaperCut) * denom;
c5 = -6.0 * denom; double c5 = -6.0 * denom;
// Loop over all pairs of types to compute the coefficient. // Loop over all pairs of types to compute the coefficient.
// Copied over from TINKER - numerical integration. // Copied over from TINKER - numerical integration.
...@@ -347,9 +341,7 @@ double AmoebaVdwForceImpl::calcDispersionCorrection(const System& system, const ...@@ -347,9 +341,7 @@ double AmoebaVdwForceImpl::calcDispersionCorrection(const System& system, const
} }
std::vector<std::string> AmoebaVdwForceImpl::getKernelNames() { std::vector<std::string> AmoebaVdwForceImpl::getKernelNames() {
std::vector<std::string> names; return {CalcAmoebaVdwForceKernel::Name()};
names.push_back(CalcAmoebaVdwForceKernel::Name());
return names;
} }
void AmoebaVdwForceImpl::updateParametersInContext(ContextImpl& context) { void AmoebaVdwForceImpl::updateParametersInContext(ContextImpl& context) {
......
...@@ -133,9 +133,7 @@ double AmoebaWcaDispersionForceImpl::getTotalMaximumDispersionEnergy(const Amoeb ...@@ -133,9 +133,7 @@ double AmoebaWcaDispersionForceImpl::getTotalMaximumDispersionEnergy(const Amoeb
} }
std::vector<std::string> AmoebaWcaDispersionForceImpl::getKernelNames() { std::vector<std::string> AmoebaWcaDispersionForceImpl::getKernelNames() {
std::vector<std::string> names; return {CalcAmoebaWcaDispersionForceKernel::Name()};
names.push_back(CalcAmoebaWcaDispersionForceKernel::Name());
return names;
} }
void AmoebaWcaDispersionForceImpl::updateParametersInContext(ContextImpl& context) { void AmoebaWcaDispersionForceImpl::updateParametersInContext(ContextImpl& context) {
......
...@@ -140,9 +140,7 @@ double HippoNonbondedForceImpl::calcForcesAndEnergy(ContextImpl& context, bool i ...@@ -140,9 +140,7 @@ double HippoNonbondedForceImpl::calcForcesAndEnergy(ContextImpl& context, bool i
} }
std::vector<std::string> HippoNonbondedForceImpl::getKernelNames() { std::vector<std::string> HippoNonbondedForceImpl::getKernelNames() {
std::vector<std::string> names; return {CalcHippoNonbondedForceKernel::Name()};
names.push_back(CalcHippoNonbondedForceKernel::Name());
return names;
} }
void HippoNonbondedForceImpl::getLabFramePermanentDipoles(ContextImpl& context, vector<Vec3>& dipoles) { void HippoNonbondedForceImpl::getLabFramePermanentDipoles(ContextImpl& context, vector<Vec3>& dipoles) {
......
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
} }
double calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups); double calcForcesAndEnergy(ContextImpl& context, bool includeForces, bool includeEnergy, int groups);
std::map<std::string, double> getDefaultParameters() { std::map<std::string, double> getDefaultParameters() {
return std::map<std::string, double>(); // This force field doesn't define any parameters. return {}; // This force field doesn't define any parameters.
} }
std::vector<std::string> getKernelNames(); std::vector<std::string> getKernelNames();
void updateParametersInContext(ContextImpl& context); void updateParametersInContext(ContextImpl& context);
......
...@@ -120,9 +120,7 @@ double DrudeForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeFor ...@@ -120,9 +120,7 @@ double DrudeForceImpl::calcForcesAndEnergy(ContextImpl& context, bool includeFor
} }
vector<string> DrudeForceImpl::getKernelNames() { vector<string> DrudeForceImpl::getKernelNames() {
vector<string> names; return {CalcDrudeForceKernel::Name()};
names.push_back(CalcDrudeForceKernel::Name());
return names;
} }
void DrudeForceImpl::updateParametersInContext(ContextImpl& context) { void DrudeForceImpl::updateParametersInContext(ContextImpl& context) {
......
...@@ -87,9 +87,7 @@ void DrudeLangevinIntegrator::cleanup() { ...@@ -87,9 +87,7 @@ void DrudeLangevinIntegrator::cleanup() {
} }
vector<string> DrudeLangevinIntegrator::getKernelNames() { vector<string> DrudeLangevinIntegrator::getKernelNames() {
std::vector<std::string> names; return {IntegrateDrudeLangevinStepKernel::Name()};
names.push_back(IntegrateDrudeLangevinStepKernel::Name());
return names;
} }
double DrudeLangevinIntegrator::computeKineticEnergy() { double DrudeLangevinIntegrator::computeKineticEnergy() {
......
...@@ -73,9 +73,7 @@ void DrudeSCFIntegrator::cleanup() { ...@@ -73,9 +73,7 @@ void DrudeSCFIntegrator::cleanup() {
} }
vector<string> DrudeSCFIntegrator::getKernelNames() { vector<string> DrudeSCFIntegrator::getKernelNames() {
std::vector<std::string> names; return {IntegrateDrudeSCFStepKernel::Name()};
names.push_back(IntegrateDrudeSCFStepKernel::Name());
return names;
} }
double DrudeSCFIntegrator::computeKineticEnergy() { double DrudeSCFIntegrator::computeKineticEnergy() {
......
...@@ -78,9 +78,7 @@ void RPMDIntegrator::stateChanged(State::DataType changed) { ...@@ -78,9 +78,7 @@ void RPMDIntegrator::stateChanged(State::DataType changed) {
} }
vector<string> RPMDIntegrator::getKernelNames() { vector<string> RPMDIntegrator::getKernelNames() {
std::vector<std::string> names; return {IntegrateRPMDStepKernel::Name()};
names.push_back(IntegrateRPMDStepKernel::Name());
return names;
} }
void RPMDIntegrator::setPositions(int copy, const vector<Vec3>& positions) { void RPMDIntegrator::setPositions(int copy, const vector<Vec3>& positions) {
......
...@@ -155,13 +155,9 @@ void RPMDMonteCarloBarostatImpl::updateRPMDState(ContextImpl& context) { ...@@ -155,13 +155,9 @@ void RPMDMonteCarloBarostatImpl::updateRPMDState(ContextImpl& context) {
} }
std::map<std::string, double> RPMDMonteCarloBarostatImpl::getDefaultParameters() { std::map<std::string, double> RPMDMonteCarloBarostatImpl::getDefaultParameters() {
std::map<std::string, double> parameters; return {{RPMDMonteCarloBarostat::Pressure(), getOwner().getDefaultPressure()}};
parameters[RPMDMonteCarloBarostat::Pressure()] = getOwner().getDefaultPressure();
return parameters;
} }
std::vector<std::string> RPMDMonteCarloBarostatImpl::getKernelNames() { std::vector<std::string> RPMDMonteCarloBarostatImpl::getKernelNames() {
std::vector<std::string> names; return {ApplyMonteCarloBarostatKernel::Name()};
names.push_back(ApplyMonteCarloBarostatKernel::Name());
return names;
} }
...@@ -52,21 +52,9 @@ void testHarmonicBond() { ...@@ -52,21 +52,9 @@ void testHarmonicBond() {
system.addParticle(5.0); system.addParticle(5.0);
CustomCentroidBondForce* force = new CustomCentroidBondForce(2, "k*distance(g1,g2)^2"); CustomCentroidBondForce* force = new CustomCentroidBondForce(2, "k*distance(g1,g2)^2");
force->addPerBondParameter("k"); force->addPerBondParameter("k");
vector<int> particles1; force->addGroup({0, 1});
particles1.push_back(0); force->addGroup({2, 3, 4});
particles1.push_back(1); force->addBond({0, 1}, {1.0});
vector<int> particles2;
particles2.push_back(2);
particles2.push_back(3);
particles2.push_back(4);
force->addGroup(particles1);
force->addGroup(particles2);
vector<int> groups;
groups.push_back(0);
groups.push_back(1);
vector<double> parameters;
parameters.push_back(1.0);
force->addBond(groups, parameters);
system.addForce(force); system.addForce(force);
ASSERT(!system.usesPeriodicBoundaryConditions()); ASSERT(!system.usesPeriodicBoundaryConditions());
...@@ -97,8 +85,7 @@ void testHarmonicBond() { ...@@ -97,8 +85,7 @@ void testHarmonicBond() {
// Update the per-bond parameter and see if the results change. // Update the per-bond parameter and see if the results change.
parameters[0] = 2.0; force->setBondParameters(0, {0, 1}, {2.0});
force->setBondParameters(0, groups, parameters);
force->updateParametersInContext(context); force->updateParametersInContext(context);
state = context.getState(State::Forces | State::Energy); state = context.getState(State::Forces | State::Energy);
ASSERT_EQUAL_TOL(2*2.5*2.5, state.getPotentialEnergy(), TOL); ASSERT_EQUAL_TOL(2*2.5*2.5, state.getPotentialEnergy(), TOL);
...@@ -236,11 +223,7 @@ void testCustomWeights() { ...@@ -236,11 +223,7 @@ void testCustomWeights() {
weights[0] = 2.0; weights[0] = 2.0;
weights[1] = 1.0; weights[1] = 1.0;
force->addGroup(particles, weights); force->addGroup(particles, weights);
vector<int> groups; force->addBond({0, 1});
groups.push_back(0);
groups.push_back(1);
vector<double> parameters;
force->addBond(groups, parameters);
system.addForce(force); system.addForce(force);
// The center of mass of group 0 is (0, 1, 0). // The center of mass of group 0 is (0, 1, 0).
...@@ -272,14 +255,9 @@ void testIllegalVariable() { ...@@ -272,14 +255,9 @@ void testIllegalVariable() {
system.addParticle(1.0); system.addParticle(1.0);
system.addParticle(1.0); system.addParticle(1.0);
CustomCentroidBondForce* force = new CustomCentroidBondForce(2, "1+none"); CustomCentroidBondForce* force = new CustomCentroidBondForce(2, "1+none");
vector<int> particles; force->addGroup({0});
particles.push_back(0); force->addGroup({0});
force->addGroup(particles); force->addBond({0, 1});
force->addGroup(particles);
vector<int> groups;
groups.push_back(0);
groups.push_back(1);
force->addBond(groups);
system.addForce(force); system.addForce(force);
VerletIntegrator integrator(0.001); VerletIntegrator integrator(0.001);
bool threwException = false; bool threwException = false;
...@@ -309,21 +287,9 @@ void testPeriodic(bool byGroups) { ...@@ -309,21 +287,9 @@ void testPeriodic(bool byGroups) {
expression = "k*pointdistance(x1,y1,z1,x2,y2,z2)^2"; expression = "k*pointdistance(x1,y1,z1,x2,y2,z2)^2";
CustomCentroidBondForce* force = new CustomCentroidBondForce(2, expression); CustomCentroidBondForce* force = new CustomCentroidBondForce(2, expression);
force->addPerBondParameter("k"); force->addPerBondParameter("k");
vector<int> particles1; force->addGroup({0, 1});
particles1.push_back(0); force->addGroup({2, 3, 4});
particles1.push_back(1); force->addBond({0, 1}, {1.0});
vector<int> particles2;
particles2.push_back(2);
particles2.push_back(3);
particles2.push_back(4);
force->addGroup(particles1);
force->addGroup(particles2);
vector<int> groups;
groups.push_back(0);
groups.push_back(1);
vector<double> parameters;
parameters.push_back(1.0);
force->addBond(groups, parameters);
force->setUsesPeriodicBoundaryConditions(true); force->setUsesPeriodicBoundaryConditions(true);
system.addForce(force); system.addForce(force);
...@@ -365,20 +331,9 @@ void testEnergyParameterDerivatives() { ...@@ -365,20 +331,9 @@ void testEnergyParameterDerivatives() {
force->addGlobalParameter("k", 0.0); force->addGlobalParameter("k", 0.0);
force->addEnergyParameterDerivative("r0"); force->addEnergyParameterDerivative("r0");
force->addEnergyParameterDerivative("k"); force->addEnergyParameterDerivative("k");
vector<int> particles1; force->addGroup({0, 1});
particles1.push_back(0); force->addGroup({2, 3, 4});
particles1.push_back(1); force->addBond({0, 1});
vector<int> particles2;
particles2.push_back(2);
particles2.push_back(3);
particles2.push_back(4);
force->addGroup(particles1);
force->addGroup(particles2);
vector<int> groups;
groups.push_back(0);
groups.push_back(1);
vector<double> parameters;
force->addBond(groups, parameters);
system.addForce(force); system.addForce(force);
// The center of mass of group 0 is (1.5, 0, 0). // The center of mass of group 0 is (1.5, 0, 0).
......
...@@ -342,10 +342,7 @@ void testIllegalVariable() { ...@@ -342,10 +342,7 @@ void testIllegalVariable() {
system.addParticle(1.0); system.addParticle(1.0);
system.addParticle(1.0); system.addParticle(1.0);
CustomCompoundBondForce* force = new CustomCompoundBondForce(2, "1+none"); CustomCompoundBondForce* force = new CustomCompoundBondForce(2, "1+none");
vector<int> particles; force->addBond({0, 1});
particles.push_back(0);
particles.push_back(1);
force->addBond(particles);
system.addForce(force); system.addForce(force);
VerletIntegrator integrator(0.001); VerletIntegrator integrator(0.001);
bool threwException = false; bool threwException = false;
......
...@@ -930,9 +930,7 @@ void testTabulatedFunction() { ...@@ -930,9 +930,7 @@ void testTabulatedFunction() {
integrator.addPerDofVariable("dof", 0.0); integrator.addPerDofVariable("dof", 0.0);
integrator.addComputeGlobal("global", "fn(global)"); integrator.addComputeGlobal("global", "fn(global)");
integrator.addComputePerDof("dof", "fn(x)"); integrator.addComputePerDof("dof", "fn(x)");
vector<double> table; vector<double> table = {10.0, 20.0};
table.push_back(10.0);
table.push_back(20.0);
integrator.addTabulatedFunction("fn", new Continuous1DFunction(table, 1.0, 2.0)); integrator.addTabulatedFunction("fn", new Continuous1DFunction(table, 1.0, 2.0));
Context context(system, integrator, platform); Context context(system, integrator, platform);
vector<Vec3> positions(1); vector<Vec3> positions(1);
......
...@@ -358,12 +358,7 @@ void testAllTerms() { ...@@ -358,12 +358,7 @@ void testAllTerms() {
CustomCompoundBondForce* force2 = new CustomCompoundBondForce(4, CustomCompoundBondForce* force2 = new CustomCompoundBondForce(4,
"distance(p1,p2)+angle(p1,p3,p4)+dihedral(p1,p4,p2,p3)+x1+y3+z4"); "distance(p1,p2)+angle(p1,p3,p4)+dihedral(p1,p4,p2,p3)+x1+y3+z4");
system2.addForce(force2); system2.addForce(force2);
vector<int> particles; force2->addBond({0, 1, 2, 3}, params);
particles.push_back(0);
particles.push_back(1);
particles.push_back(2);
particles.push_back(3);
force2->addBond(particles, params);
for (int i = 0; i < numParticles; i++) for (int i = 0; i < numParticles; i++)
system2.addParticle(1.0); system2.addParticle(1.0);
...@@ -462,9 +457,7 @@ void testTabulatedFunctions() { ...@@ -462,9 +457,7 @@ void testTabulatedFunctions() {
// Create two tabulated functions. // Create two tabulated functions.
vector<double> values; vector<double> values = {0.0, 50.0};
values.push_back(0.0);
values.push_back(50.0);
Continuous1DFunction* f1 = new Continuous1DFunction(values, 0, 100); Continuous1DFunction* f1 = new Continuous1DFunction(values, 0, 100);
OpenMM_SFMT::SFMT sfmt; OpenMM_SFMT::SFMT sfmt;
init_gen_rand(0, sfmt); init_gen_rand(0, sfmt);
......
...@@ -102,11 +102,7 @@ void testExclusionsAnd14() { ...@@ -102,11 +102,7 @@ void testExclusionsAnd14() {
system.addParticle(1.0); system.addParticle(1.0);
nonbonded->addParticle(0, 1.5, 0); nonbonded->addParticle(0, 1.5, 0);
} }
vector<pair<int, int> > bonds; vector<pair<int, int> > bonds = {{0, 1}, {1, 2}, {2, 3}, {3, 4}};
bonds.push_back(pair<int, int>(0, 1));
bonds.push_back(pair<int, int>(1, 2));
bonds.push_back(pair<int, int>(2, 3));
bonds.push_back(pair<int, int>(3, 4));
nonbonded->createExceptionsFromBonds(bonds, 0.0, 0.0); nonbonded->createExceptionsFromBonds(bonds, 0.0, 0.0);
int first14, second14; int first14, second14;
for (int i = 0; i < nonbonded->getNumExceptions(); i++) { for (int i = 0; i < nonbonded->getNumExceptions(); i++) {
...@@ -233,11 +229,7 @@ void testCutoff14() { ...@@ -233,11 +229,7 @@ void testCutoff14() {
nonbonded->setCutoffDistance(cutoff); nonbonded->setCutoffDistance(cutoff);
const double eps = 30.0; const double eps = 30.0;
nonbonded->setReactionFieldDielectric(eps); nonbonded->setReactionFieldDielectric(eps);
vector<pair<int, int> > bonds; vector<pair<int, int> > bonds = {{0, 1}, {1, 2}, {2, 3}, {3, 4}};
bonds.push_back(pair<int, int>(0, 1));
bonds.push_back(pair<int, int>(1, 2));
bonds.push_back(pair<int, int>(2, 3));
bonds.push_back(pair<int, int>(3, 4));
nonbonded->createExceptionsFromBonds(bonds, 0.0, 0.0); nonbonded->createExceptionsFromBonds(bonds, 0.0, 0.0);
int first14, second14; int first14, second14;
for (int i = 0; i < nonbonded->getNumExceptions(); i++) { for (int i = 0; i < nonbonded->getNumExceptions(); 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