| 48 |
|
#include "optimization/StatusFunction.hpp" |
| 49 |
|
#include "optimization/OptimizationFactory.hpp" |
| 50 |
|
|
| 51 |
– |
|
| 52 |
– |
|
| 51 |
|
#ifdef IS_MPI |
| 52 |
|
#include <mpi.h> |
| 53 |
|
#endif |
| 60 |
|
|
| 61 |
|
Globals* simParams = info_->getSimParams(); |
| 62 |
|
fqParams_ = simParams->getFluctuatingChargeParameters(); |
| 65 |
– |
|
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
void FluctuatingChargePropagator::setForceManager(ForceManager* forceMan) { |
| 90 |
|
atom->setFlucQVel(0.0); |
| 91 |
|
} |
| 92 |
|
} |
| 96 |
– |
|
| 97 |
– |
std::cerr << "doing a minimization\n"; |
| 93 |
|
|
| 94 |
|
fqConstraints_ = new FluctuatingChargeConstraints(info_); |
| 95 |
|
FluctuatingChargeObjectiveFunction flucQobjf(info_, forceMan_, fqConstraints_); |
| 101 |
|
DumpStatusFunction dsf(info_); // we want a dump file written every iteration |
| 102 |
|
|
| 103 |
|
minim->minimize(problem, endCriteria); |
| 109 |
– |
cerr << "Finished minimization\n"; |
| 110 |
– |
for (mol = info_->beginMolecule(i); mol != NULL; |
| 111 |
– |
mol = info_->nextMolecule(i)) { |
| 112 |
– |
for (atom = mol->beginFluctuatingCharge(j); atom != NULL; |
| 113 |
– |
atom = mol->nextFluctuatingCharge(j)) { |
| 114 |
– |
cerr << atom->getType() << "\tQ Pos: " << atom->getFlucQPos() << "\n"; |
| 115 |
– |
} |
| 116 |
– |
} |
| 104 |
|
} |
| 105 |
|
|
| 119 |
– |
|
| 106 |
|
void FluctuatingChargePropagator::applyConstraints() { |
| 107 |
|
if (!hasFlucQ_) return; |
| 122 |
– |
|
| 108 |
|
fqConstraints_->applyConstraints(); |
| 109 |
|
} |
| 110 |
|
} |