"plugins/amoeba/openmmapi/src/AmoebaAngleForceImpl.cpp" did not exist on "5003591d7bd4816a9dde89dea97fced7192b8dcf"
Commit e5cc38cf authored by peastman's avatar peastman
Browse files

Improved error messages when an invalid number of contracted beads is specified

parent bd4876cc
...@@ -123,6 +123,8 @@ void CudaIntegrateRPMDStepKernel::initialize(const System& system, const RPMDInt ...@@ -123,6 +123,8 @@ void CudaIntegrateRPMDStepKernel::initialize(const System& system, const RPMDInt
throw OpenMMException("RPMDIntegrator: Force group must be between 0 and 31"); throw OpenMMException("RPMDIntegrator: Force group must be between 0 and 31");
if (copies < 0 || copies > numCopies) if (copies < 0 || copies > numCopies)
throw OpenMMException("RPMDIntegrator: Number of copies for contraction cannot be greater than the total number of copies being simulated"); throw OpenMMException("RPMDIntegrator: Number of copies for contraction cannot be greater than the total number of copies being simulated");
if (copies != findFFTDimension(copies))
throw OpenMMException("RPMDIntegrator: Number of copies for contraction must be a multiple of powers of 2, 3, and 5.");
if (copies != numCopies) { if (copies != numCopies) {
if (groupsByCopies.find(copies) == groupsByCopies.end()) { if (groupsByCopies.find(copies) == groupsByCopies.end()) {
groupsByCopies[copies] = 1<<group; groupsByCopies[copies] = 1<<group;
......
...@@ -103,6 +103,8 @@ void OpenCLIntegrateRPMDStepKernel::initialize(const System& system, const RPMDI ...@@ -103,6 +103,8 @@ void OpenCLIntegrateRPMDStepKernel::initialize(const System& system, const RPMDI
throw OpenMMException("RPMDIntegrator: Force group must be between 0 and 31"); throw OpenMMException("RPMDIntegrator: Force group must be between 0 and 31");
if (copies < 0 || copies > numCopies) if (copies < 0 || copies > numCopies)
throw OpenMMException("RPMDIntegrator: Number of copies for contraction cannot be greater than the total number of copies being simulated"); throw OpenMMException("RPMDIntegrator: Number of copies for contraction cannot be greater than the total number of copies being simulated");
if (copies != OpenCLFFT3D::findLegalDimension(copies))
throw OpenMMException("RPMDIntegrator: Number of copies for contraction must be a multiple of powers of 2, 3, and 5.");
if (copies != numCopies) { if (copies != numCopies) {
if (groupsByCopies.find(copies) == groupsByCopies.end()) { if (groupsByCopies.find(copies) == groupsByCopies.end()) {
groupsByCopies[copies] = 1<<group; groupsByCopies[copies] = 1<<group;
......
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