67 |
|
hasFlucQ_ = true; |
68 |
|
Globals* simParams = info_->getSimParams(); |
69 |
|
fqParams_ = simParams->getFluctuatingChargeParameters(); |
70 |
+ |
fqConstraints_ = new FluctuatingChargeConstraints(info_); |
71 |
|
|
72 |
|
} |
73 |
|
} |
100 |
|
EndCriteria endCriteria(1000, 100, 1e-5, 1e-5, 1e-5); |
101 |
|
OptimizationMethod* minim = OptimizationFactory::getInstance()->createOptimization("SD", info_); |
102 |
|
|
103 |
+ |
DumpStatusFunction dsf(info_); // we want a dump file written every iteration |
104 |
+ |
|
105 |
|
minim->minimize(problem, endCriteria); |
106 |
+ |
cerr << "Finished minimization\n"; |
107 |
+ |
for (mol = info_->beginMolecule(i); mol != NULL; |
108 |
+ |
mol = info_->nextMolecule(i)) { |
109 |
+ |
for (atom = mol->beginFluctuatingCharge(j); atom != NULL; |
110 |
+ |
atom = mol->nextFluctuatingCharge(j)) { |
111 |
+ |
cerr << atom->getType() << "\tQ Pos: " << atom->getFlucQPos() << "\n"; |
112 |
+ |
} |
113 |
+ |
} |
114 |
+ |
// std::cerr << "after minim\n"; |
115 |
+ |
// for (mol = info_->beginMolecule(i); mol != NULL; |
116 |
+ |
// mol = info_->nextMolecule(i)) { |
117 |
+ |
// for (atom = mol->beginFluctuatingCharge(j); atom != NULL; |
118 |
+ |
// atom = mol->nextFluctuatingCharge(j)) { |
119 |
+ |
// cerr << "q = " << atom->getFlucQPos(0.0) << "\n"; |
120 |
+ |
// } |
121 |
+ |
// } |
122 |
|
|
123 |
+ |
|
124 |
|
} |
125 |
|
|
126 |
|
|