| 63 |
|
} |
| 64 |
|
|
| 65 |
|
FluctuatingChargePropagator::~FluctuatingChargePropagator() { |
| 66 |
– |
if (fqConstraints_ != NULL) delete fqConstraints_; |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
void FluctuatingChargePropagator::setForceManager(ForceManager* forceMan) { |
| 88 |
|
Molecule* mol; |
| 89 |
|
Atom* atom; |
| 90 |
|
|
| 91 |
< |
for (mol = info_->beginMolecule(i); mol != NULL; |
| 92 |
< |
mol = info_->nextMolecule(i)) { |
| 93 |
< |
for (atom = mol->beginFluctuatingCharge(j); atom != NULL; |
| 94 |
< |
atom = mol->nextFluctuatingCharge(j)) { |
| 95 |
< |
atom->setFlucQPos(0.0); |
| 96 |
< |
atom->setFlucQVel(0.0); |
| 97 |
< |
} |
| 98 |
< |
} |
| 91 |
> |
// For single-minima flucq, this ensures a net neutral system, but |
| 92 |
> |
// for multiple minima, this is no longer the right thing to do: |
| 93 |
> |
// |
| 94 |
> |
// for (mol = info_->beginMolecule(i); mol != NULL; |
| 95 |
> |
// mol = info_->nextMolecule(i)) { |
| 96 |
> |
// for (atom = mol->beginFluctuatingCharge(j); atom != NULL; |
| 97 |
> |
// atom = mol->nextFluctuatingCharge(j)) { |
| 98 |
> |
// atom->setFlucQPos(0.0); |
| 99 |
> |
// atom->setFlucQVel(0.0); |
| 100 |
> |
// } |
| 101 |
> |
// } |
| 102 |
|
|
| 103 |
|
FluctuatingChargeObjectiveFunction flucQobjf(info_, forceMan_, |
| 104 |
|
fqConstraints_); |
| 114 |
|
DumpStatusFunction dsf(info_); // we want a dump file written |
| 115 |
|
// every iteration |
| 116 |
|
minim->minimize(problem, endCriteria); |
| 117 |
+ |
cerr << "back from minim\n"; |
| 118 |
|
initialized_ = true; |
| 119 |
|
} |
| 120 |
|
|