--- trunk/src/flucq/FluctuatingChargePropagator.cpp 2014/02/26 14:14:50 1969 +++ trunk/src/flucq/FluctuatingChargePropagator.cpp 2014/04/15 21:15:35 1984 @@ -83,21 +83,23 @@ namespace OpenMD { return; } - SimInfo::MoleculeIterator i; - Molecule::FluctuatingChargeIterator j; - Molecule* mol; - Atom* atom; + // SimInfo::MoleculeIterator i; + // Molecule::FluctuatingChargeIterator j; + // Molecule* mol; + // Atom* atom; + // + // For single-minima flucq, this ensures a net neutral system, but + // for multiple minima, this is no longer the right thing to do: + // + // for (mol = info_->beginMolecule(i); mol != NULL; + // mol = info_->nextMolecule(i)) { + // for (atom = mol->beginFluctuatingCharge(j); atom != NULL; + // atom = mol->nextFluctuatingCharge(j)) { + // atom->setFlucQPos(0.0); + // atom->setFlucQVel(0.0); + // } + // } - for (mol = info_->beginMolecule(i); mol != NULL; - mol = info_->nextMolecule(i)) { - for (atom = mol->beginFluctuatingCharge(j); atom != NULL; - atom = mol->nextFluctuatingCharge(j)) { - cerr << " starts with = " << atom->getFlucQPos() << "\n"; - //atom->setFlucQPos(0.0); - //atom->setFlucQVel(0.0); - } - } - FluctuatingChargeObjectiveFunction flucQobjf(info_, forceMan_, fqConstraints_);