| 45 |
|
#include "io/StatWriter.hpp" |
| 46 |
|
#include "minimizers/Minimizer.hpp" |
| 47 |
|
#include "primitives/Molecule.hpp" |
| 48 |
+ |
#ifdef IS_MPI |
| 49 |
+ |
#include <mpi.h> |
| 50 |
+ |
#endif |
| 51 |
|
namespace OpenMD { |
| 52 |
|
RealType dotProduct(const std::vector<RealType>& v1, const std::vector<RealType>& v2) { |
| 53 |
|
if (v1.size() != v2.size()) { |
| 832 |
|
int convgStatus; |
| 833 |
|
int stepStatus; |
| 834 |
|
int maxIter; |
| 835 |
< |
int writeFrq; |
| 835 |
> |
int writeFreq; |
| 836 |
|
int nextWriteIter; |
| 837 |
|
Snapshot* curSnapshot =info->getSnapshotManager()->getCurrentSnapshot(); |
| 838 |
|
DumpWriter dumpWriter(info); |
| 843 |
|
|
| 844 |
|
init(); |
| 845 |
|
|
| 846 |
< |
writeFrq = paramSet->getWriteFrq(); |
| 846 |
> |
writeFreq = paramSet->getWriteFreq(); |
| 847 |
|
|
| 848 |
< |
nextWriteIter = writeFrq; |
| 848 |
> |
nextWriteIter = writeFreq; |
| 849 |
|
|
| 850 |
|
maxIter = paramSet->getMaxIteration(); |
| 851 |
|
|
| 873 |
|
curSnapshot->increaseTime(1); |
| 874 |
|
|
| 875 |
|
if (curIter == nextWriteIter) { |
| 876 |
< |
nextWriteIter += writeFrq; |
| 876 |
> |
nextWriteIter += writeFreq; |
| 877 |
|
calcF(); |
| 878 |
|
dumpWriter.writeDumpAndEor(); |
| 879 |
|
statWriter.writeStat(curSnapshot->statData); |
| 905 |
|
|
| 906 |
|
|
| 907 |
|
RealType Minimizer::calcPotential() { |
| 908 |
< |
forceMan->calcForces(true, false); |
| 908 |
> |
forceMan->calcForces(); |
| 909 |
|
|
| 910 |
|
Snapshot* curSnapshot = info->getSnapshotManager()->getCurrentSnapshot(); |
| 911 |
|
RealType potential_local = curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] + |