Unverified Commit 2e2eb7af authored by peastman's avatar peastman Committed by GitHub
Browse files

Fixed check for subsystem thermostats (#2924)

parent 83dcb4e2
......@@ -82,7 +82,7 @@ int NoseHooverIntegrator::addSubsystemThermostat(const std::vector<int>& thermos
int chainLength, int numMTS, int numYoshidaSuzuki) {
int chainID = noseHooverChains.size();
// check if one thermostat already applies to all atoms or pairs
if ( (chainID > 0) && (noseHooverChains[0].getThermostatedAtoms().size()*noseHooverChains[0].getThermostatedPairs().size() == 0) ) {
if ( (chainID > 0) && (noseHooverChains[0].getThermostatedAtoms().size()+noseHooverChains[0].getThermostatedPairs().size() == 0) ) {
throw OpenMMException(
"Cannot add thermostat, since one of the thermostats already in the integrator applies to all particles. "
"To manually add thermostats, use the constructor that takes only the "
......
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