Commit 7629ea48 authored by Michael Sherman's avatar Michael Sherman
Browse files

Minor fixes to some recent changes that prevented compilation (Mark looked at...

Minor fixes to some recent changes that prevented compilation (Mark looked at these). This code still has never been tested, at least on Windows.
parent 5d3447eb
...@@ -176,7 +176,7 @@ void BrookCalcNonbondedForceKernel::initialize( const System& system, const Nonb ...@@ -176,7 +176,7 @@ void BrookCalcNonbondedForceKernel::initialize( const System& system, const Nonb
// Go through the exclusions. // Go through the exclusions.
std::vector<std::set<int> >& exclusions(_numberOfParticles); std::vector<std::set<int> > exclusions(_numberOfParticles);
std::vector<int> nb14s; std::vector<int> nb14s;
for (int i = 0; i < force.getNumExceptions(); i++) { for (int i = 0; i < force.getNumExceptions(); i++) {
int particle1, particle2; int particle1, particle2;
...@@ -184,7 +184,6 @@ void BrookCalcNonbondedForceKernel::initialize( const System& system, const Nonb ...@@ -184,7 +184,6 @@ void BrookCalcNonbondedForceKernel::initialize( const System& system, const Nonb
force.getExceptionParameters(i, particle1, particle2, chargeProd, sigma, epsilon); force.getExceptionParameters(i, particle1, particle2, chargeProd, sigma, epsilon);
exclusions[particle1].insert(particle2); exclusions[particle1].insert(particle2);
exclusions[particle2].insert(particle1); exclusions[particle2].insert(particle1);
exclusions.push_back(pair<int, int>(particle1, particle2));
if (chargeProd != 0.0 || epsilon != 0.0) if (chargeProd != 0.0 || epsilon != 0.0)
nb14s.push_back(i); nb14s.push_back(i);
} }
...@@ -212,7 +211,7 @@ void BrookCalcNonbondedForceKernel::initialize( const System& system, const Nonb ...@@ -212,7 +211,7 @@ void BrookCalcNonbondedForceKernel::initialize( const System& system, const Nonb
* *
* @param system System reference * @param system System reference
* @param force HarmonicLJ14Force reference * @param force HarmonicLJ14Force reference
* * @param nb14s which of the exceptions need to be calculated
*/ */
void BrookCalcNonbondedForceKernel::initialize14Interactions( const System& system, const NonbondedForce& force, const std::vector<int>& nb14s ){ void BrookCalcNonbondedForceKernel::initialize14Interactions( const System& system, const NonbondedForce& force, const std::vector<int>& nb14s ){
......
...@@ -63,9 +63,10 @@ class BrookCalcNonbondedForceKernel : public CalcNonbondedForceKernel { ...@@ -63,9 +63,10 @@ class BrookCalcNonbondedForceKernel : public CalcNonbondedForceKernel {
* *
* @param system the System this kernel will be applied to * @param system the System this kernel will be applied to
* @param force the NonbondedForce this kernel will be used for * @param force the NonbondedForce this kernel will be used for
* @param nb14s which of the exceptions need to be calculated
*/ */
void initialize14Interactions( const System& system, const NonbondedForce& force ); void initialize14Interactions( const System& system, const NonbondedForce& force, const std::vector<int>& nb14s );
/** /**
* Execute the kernel to calculate the forces. * Execute the kernel to calculate the forces.
......
...@@ -215,7 +215,7 @@ void testBrookExclusionsAnd14( FILE* log ){ ...@@ -215,7 +215,7 @@ void testBrookExclusionsAnd14( FILE* log ){
NonbondedForce* nonbonded = new NonbondedForce(); NonbondedForce* nonbonded = new NonbondedForce();
for (int i = 0; i < numberOfParticles; i++) { for (int i = 0; i < numberOfParticles; i++) {
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;
bonds.push_back(pair<int, int>(0, 1)); bonds.push_back(pair<int, int>(0, 1));
......
...@@ -156,7 +156,7 @@ static OpenMMContext* testObcForceSetup( int numParticles, int brookContext, FIL ...@@ -156,7 +156,7 @@ static OpenMMContext* testObcForceSetup( int numParticles, int brookContext, FIL
System* system = new System(); System* system = new System();
for (int i = 0; i < numParticles; i++) for (int i = 0; i < numParticles; i++)
system.addParticle(1.0); system->addParticle(1.0);
LangevinIntegrator* integrator = new LangevinIntegrator(0, 0.1, 0.01); LangevinIntegrator* integrator = new LangevinIntegrator(0, 0.1, 0.01);
GBSAOBCForce* forceField = new GBSAOBCForce(); GBSAOBCForce* forceField = new GBSAOBCForce();
...@@ -284,7 +284,7 @@ static OpenMMContext* testObcForceFileSetup( std::string fileName, int brookCont ...@@ -284,7 +284,7 @@ static OpenMMContext* testObcForceFileSetup( std::string fileName, int brookCont
System* system = new System(); System* system = new System();
for (int i = 0; i < numberOfParticles; i++) for (int i = 0; i < numberOfParticles; i++)
system.addParticle(1.0); system->addParticle(1.0);
GBSAOBCForce* forceField = new GBSAOBCForce(); GBSAOBCForce* forceField = new GBSAOBCForce();
vector<Vec3> positions(numberOfParticles); vector<Vec3> positions(numberOfParticles);
......
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