45#include "integrators/SPFDynamics.hpp"
50#include "rnemd/SPFForceManager.hpp"
51#include "utils/Constants.hpp"
55 void SPFDynamics::postStep() {
58 if (needVelocityScaling) {
59 difference = snap->getTime() - currThermal;
61 if (difference > 0 || fabs(difference) <= OpenMD::epsilon) {
62 velocitizer_->randomize(targetScalingTemp);
63 currThermal += thermalTime;
68 difference = snap->getTime() - currRNEMD;
70 if (difference > 0 || fabs(difference) <= OpenMD::epsilon) {
72 currRNEMD += RNEMD_exchangeTime;
75 if (RNEMD::SPFForceManager* spfForceManager =
76 dynamic_cast<RNEMD::SPFForceManager*
>(forceMan_)) {
77 if (rnemd_->failedLastKick()) {
80 spfForceManager->combineForcesAndTorques();
81 spfForceManager->updatePotentials();
82 spfForceManager->updateVirialTensor();
85 spfForceManager->getTemporarySourceSnapshot();
100 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
101 "SPFDynamics cannot be used with the "
102 "default ForceManager.\n");
103 painCave.isFatal = 1;
104 painCave.severity = OPENMD_ERROR;
108 rnemd_->collectData();
111 saveConservedQuantity();
113 difference = snap->getTime() - currSample;
115 if (difference > 0 || fabs(difference) <= OpenMD::epsilon) {
116 dumpWriter->writeDumpAndEor();
117 currSample += sampleTime;
120 difference = snap->getTime() - currStatus;
122 if (difference > 0 || fabs(difference) <= OpenMD::epsilon) {
123 stats->collectStats();
125 statWriter->writeStat();
127 progressBar->setStatus(snap->getTime(), runTime);
128 progressBar->update();
130 needPotential =
false;
132 currStatus += statusTime;
136 if (useRNEMD) { rnemd_->writeOutputFile(); }
138 difference = snap->getTime() - currReset;
140 if (needReset && (difference > 0 || fabs(difference) <= OpenMD::epsilon)) {
142 currReset += resetTime;
149 snap->increaseTime(dt);
vector< Vector3d > velocity
position array
vector< Vector3d > angularMomentum
rotation matrix array
SnapshotManager * getSnapshotManager()
Returns the snapshot manager.
The Snapshot class is a repository storing dynamic data during a Simulation.
void clearDerivedProperties()
sets the state of the computed properties to false
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.