Commit 49cb91c5 authored by peastman's avatar peastman
Browse files

Merge pull request #64 from peastman/bugs

Minor bug fixes
parents fdce64f7 1c6bea76
......@@ -30,6 +30,7 @@ for i in range(numPlatforms):
simulation = Simulation(pdb.topology, system, integrator, platform)
simulation.context.setPositions(pdb.positions)
forces[i] = simulation.context.getState(getForces=True).getForces()
del simulation
print "- Successfully computed forces"
except:
print "- Error computing forces with", platform.getName(), "platform"
......
......@@ -640,11 +640,11 @@ int CpuCalcPmeReciprocalForceKernel::findFFTDimension(int minimum) {
// Attempt to factor the current value.
int unfactored = minimum;
for (int factor = 2; factor < 12; factor++) {
for (int factor = 2; factor < 8; factor++) {
while (unfactored > 1 && unfactored%factor == 0)
unfactored /= factor;
}
if (unfactored == 1)
if (unfactored == 1 || unfactored == 11 || unfactored == 13)
return minimum;
minimum++;
}
......
......@@ -124,6 +124,10 @@ void testPME() {
int main(int argc, char* argv[]) {
try {
if (!CpuCalcPmeReciprocalForceKernel::isProcessorSupported()) {
cout << "CPU is not supported. Exiting." << endl;
return 0;
}
testPME();
}
catch(const exception& e) {
......
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