"vscode:/vscode.git/clone" did not exist on "408cfe6cf4d379b79baf97f699bb4d1299f2a92e"
Commit 085a43be authored by Mark Friedrichs's avatar Mark Friedrichs
Browse files

Check if aewald has been set; if not, then call...

Check if aewald has been set; if not, then call NonbondedForceImpl::calcPMEParameters() to set aewald and grid dimensions
parent 1e2606ec
......@@ -993,7 +993,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
static_cast<float>( force.getCutoffDistance()),
static_cast<float>( force.getAEwald()) );
if (nonbondedMethod == AmoebaMultipoleForce::PME) {
double alpha;
double alpha = force.getAEwald();
int xsize, ysize, zsize;
NonbondedForce nb;
nb.setEwaldErrorTolerance(force.getEwaldErrorTolerance());
......@@ -1001,7 +1001,7 @@ void CudaCalcAmoebaMultipoleForceKernel::initialize(const System& system, const
std::vector<int> pmeGridDimension;
force.getPmeGridDimensions( pmeGridDimension );
int pmeParametersSetBasedOnEwaldErrorTolerance;
if( pmeGridDimension[0] == 0 ){
if( pmeGridDimension[0] == 0 || alpha == 0.0 ){
NonbondedForceImpl::calcPMEParameters(system, nb, alpha, xsize, ysize, zsize);
pmeParametersSetBasedOnEwaldErrorTolerance = 1;
} else {
......
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