58 |
|
#include "primitives/Torsion.hpp" |
59 |
|
#include "primitives/Inversion.hpp" |
60 |
|
#include "nonbonded/NonBondedInteraction.hpp" |
61 |
+ |
#include "perturbations/ElectricField.hpp" |
62 |
|
#include "parallel/ForceMatrixDecomposition.hpp" |
63 |
|
|
64 |
|
#include <cstdio> |
424 |
|
electrostaticScale_[2] = fopts.getelectrostatic13scale(); |
425 |
|
electrostaticScale_[3] = fopts.getelectrostatic14scale(); |
426 |
|
|
427 |
+ |
if (info_->getSimParams()->haveElectricField()) { |
428 |
+ |
ElectricField* eField = new ElectricField(info_); |
429 |
+ |
perturbations_.push_back(eField); |
430 |
+ |
} |
431 |
+ |
|
432 |
|
fDecomp_->distributeInitialData(); |
433 |
|
|
434 |
|
initialized_ = true; |
910 |
|
|
911 |
|
|
912 |
|
void ForceManager::postCalculation() { |
913 |
+ |
|
914 |
+ |
vector<Perturbation*>::iterator pi; |
915 |
+ |
for (pi = perturbations_.begin(); pi != perturbations_.end(); ++pi) { |
916 |
+ |
(*pi)->applyPerturbation(); |
917 |
+ |
} |
918 |
+ |
|
919 |
|
SimInfo::MoleculeIterator mi; |
920 |
|
Molecule* mol; |
921 |
|
Molecule::RigidBodyIterator rbIter; |
940 |
|
curSnapshot->setStressTensor(stressTensor); |
941 |
|
|
942 |
|
} |
931 |
– |
|
943 |
|
} //end namespace OpenMD |