hillclimber 0.1.6__cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (475) hide show
  1. hillclimber/__init__.py +41 -0
  2. hillclimber/actions.py +53 -0
  3. hillclimber/analysis.py +590 -0
  4. hillclimber/biases.py +293 -0
  5. hillclimber/calc.py +22 -0
  6. hillclimber/cvs.py +1070 -0
  7. hillclimber/interfaces.py +133 -0
  8. hillclimber/metadynamics.py +416 -0
  9. hillclimber/nodes.py +6 -0
  10. hillclimber/opes.py +359 -0
  11. hillclimber/pycv.py +362 -0
  12. hillclimber/selectors.py +230 -0
  13. hillclimber/virtual_atoms.py +341 -0
  14. hillclimber-0.1.6.dist-info/METADATA +325 -0
  15. hillclimber-0.1.6.dist-info/RECORD +475 -0
  16. hillclimber-0.1.6.dist-info/WHEEL +6 -0
  17. hillclimber-0.1.6.dist-info/entry_points.txt +8 -0
  18. hillclimber-0.1.6.dist-info/licenses/LICENSE +165 -0
  19. hillclimber-0.1.6.dist-info/sboms/auditwheel.cdx.json +1 -0
  20. hillclimber.libs/libgomp-a49a47f9.so.1.0.0 +0 -0
  21. plumed/__init__.py +104 -0
  22. plumed/_lib/bin/plumed +0 -0
  23. plumed/_lib/bin/plumed-config +9 -0
  24. plumed/_lib/bin/plumed-patch +9 -0
  25. plumed/_lib/include/plumed/adjmat/AdjacencyMatrixBase.h +659 -0
  26. plumed/_lib/include/plumed/adjmat/ContactMatrix.h +59 -0
  27. plumed/_lib/include/plumed/asmjit/arch.h +228 -0
  28. plumed/_lib/include/plumed/asmjit/arm.h +43 -0
  29. plumed/_lib/include/plumed/asmjit/asmjit.h +69 -0
  30. plumed/_lib/include/plumed/asmjit/asmjit_apibegin.h +143 -0
  31. plumed/_lib/include/plumed/asmjit/asmjit_apiend.h +93 -0
  32. plumed/_lib/include/plumed/asmjit/asmjit_build.h +971 -0
  33. plumed/_lib/include/plumed/asmjit/assembler.h +183 -0
  34. plumed/_lib/include/plumed/asmjit/base.h +56 -0
  35. plumed/_lib/include/plumed/asmjit/codebuilder.h +944 -0
  36. plumed/_lib/include/plumed/asmjit/codecompiler.h +767 -0
  37. plumed/_lib/include/plumed/asmjit/codeemitter.h +528 -0
  38. plumed/_lib/include/plumed/asmjit/codeholder.h +777 -0
  39. plumed/_lib/include/plumed/asmjit/constpool.h +286 -0
  40. plumed/_lib/include/plumed/asmjit/cpuinfo.h +402 -0
  41. plumed/_lib/include/plumed/asmjit/func.h +1327 -0
  42. plumed/_lib/include/plumed/asmjit/globals.h +370 -0
  43. plumed/_lib/include/plumed/asmjit/inst.h +137 -0
  44. plumed/_lib/include/plumed/asmjit/logging.h +317 -0
  45. plumed/_lib/include/plumed/asmjit/misc_p.h +103 -0
  46. plumed/_lib/include/plumed/asmjit/moved_string.h +318 -0
  47. plumed/_lib/include/plumed/asmjit/operand.h +1599 -0
  48. plumed/_lib/include/plumed/asmjit/osutils.h +207 -0
  49. plumed/_lib/include/plumed/asmjit/regalloc_p.h +597 -0
  50. plumed/_lib/include/plumed/asmjit/runtime.h +227 -0
  51. plumed/_lib/include/plumed/asmjit/simdtypes.h +1104 -0
  52. plumed/_lib/include/plumed/asmjit/utils.h +1387 -0
  53. plumed/_lib/include/plumed/asmjit/vmem.h +183 -0
  54. plumed/_lib/include/plumed/asmjit/x86.h +45 -0
  55. plumed/_lib/include/plumed/asmjit/x86assembler.h +125 -0
  56. plumed/_lib/include/plumed/asmjit/x86builder.h +117 -0
  57. plumed/_lib/include/plumed/asmjit/x86compiler.h +322 -0
  58. plumed/_lib/include/plumed/asmjit/x86emitter.h +5149 -0
  59. plumed/_lib/include/plumed/asmjit/x86globals.h +535 -0
  60. plumed/_lib/include/plumed/asmjit/x86inst.h +2547 -0
  61. plumed/_lib/include/plumed/asmjit/x86instimpl_p.h +74 -0
  62. plumed/_lib/include/plumed/asmjit/x86internal_p.h +108 -0
  63. plumed/_lib/include/plumed/asmjit/x86logging_p.h +92 -0
  64. plumed/_lib/include/plumed/asmjit/x86misc.h +417 -0
  65. plumed/_lib/include/plumed/asmjit/x86operand.h +1133 -0
  66. plumed/_lib/include/plumed/asmjit/x86regalloc_p.h +734 -0
  67. plumed/_lib/include/plumed/asmjit/zone.h +1157 -0
  68. plumed/_lib/include/plumed/bias/Bias.h +82 -0
  69. plumed/_lib/include/plumed/bias/ReweightBase.h +58 -0
  70. plumed/_lib/include/plumed/blas/blas.h +253 -0
  71. plumed/_lib/include/plumed/blas/def_external.h +61 -0
  72. plumed/_lib/include/plumed/blas/def_internal.h +97 -0
  73. plumed/_lib/include/plumed/blas/real.h +49 -0
  74. plumed/_lib/include/plumed/cltools/CLTool.h +32 -0
  75. plumed/_lib/include/plumed/clusters/ClusteringBase.h +70 -0
  76. plumed/_lib/include/plumed/colvar/Colvar.h +32 -0
  77. plumed/_lib/include/plumed/colvar/ColvarInput.h +68 -0
  78. plumed/_lib/include/plumed/colvar/ColvarShortcut.h +81 -0
  79. plumed/_lib/include/plumed/colvar/CoordinationBase.h +52 -0
  80. plumed/_lib/include/plumed/colvar/MultiColvarTemplate.h +333 -0
  81. plumed/_lib/include/plumed/colvar/PathMSDBase.h +101 -0
  82. plumed/_lib/include/plumed/colvar/RMSDVector.h +78 -0
  83. plumed/_lib/include/plumed/config/Config.h +118 -0
  84. plumed/_lib/include/plumed/config/version.h +9 -0
  85. plumed/_lib/include/plumed/contour/ContourFindingObject.h +87 -0
  86. plumed/_lib/include/plumed/contour/DistanceFromContourBase.h +82 -0
  87. plumed/_lib/include/plumed/contour/FindContour.h +67 -0
  88. plumed/_lib/include/plumed/core/Action.h +540 -0
  89. plumed/_lib/include/plumed/core/ActionAnyorder.h +48 -0
  90. plumed/_lib/include/plumed/core/ActionAtomistic.h +343 -0
  91. plumed/_lib/include/plumed/core/ActionForInterface.h +99 -0
  92. plumed/_lib/include/plumed/core/ActionPilot.h +57 -0
  93. plumed/_lib/include/plumed/core/ActionRegister.h +124 -0
  94. plumed/_lib/include/plumed/core/ActionSet.h +163 -0
  95. plumed/_lib/include/plumed/core/ActionSetup.h +48 -0
  96. plumed/_lib/include/plumed/core/ActionShortcut.h +73 -0
  97. plumed/_lib/include/plumed/core/ActionToGetData.h +59 -0
  98. plumed/_lib/include/plumed/core/ActionToPutData.h +101 -0
  99. plumed/_lib/include/plumed/core/ActionWithArguments.h +140 -0
  100. plumed/_lib/include/plumed/core/ActionWithMatrix.h +87 -0
  101. plumed/_lib/include/plumed/core/ActionWithValue.h +258 -0
  102. plumed/_lib/include/plumed/core/ActionWithVector.h +94 -0
  103. plumed/_lib/include/plumed/core/ActionWithVirtualAtom.h +123 -0
  104. plumed/_lib/include/plumed/core/CLTool.h +177 -0
  105. plumed/_lib/include/plumed/core/CLToolMain.h +102 -0
  106. plumed/_lib/include/plumed/core/CLToolRegister.h +108 -0
  107. plumed/_lib/include/plumed/core/Colvar.h +115 -0
  108. plumed/_lib/include/plumed/core/DataPassingObject.h +94 -0
  109. plumed/_lib/include/plumed/core/DataPassingTools.h +54 -0
  110. plumed/_lib/include/plumed/core/DomainDecomposition.h +120 -0
  111. plumed/_lib/include/plumed/core/ExchangePatterns.h +47 -0
  112. plumed/_lib/include/plumed/core/FlexibleBin.h +63 -0
  113. plumed/_lib/include/plumed/core/GREX.h +61 -0
  114. plumed/_lib/include/plumed/core/GenericMolInfo.h +89 -0
  115. plumed/_lib/include/plumed/core/Group.h +41 -0
  116. plumed/_lib/include/plumed/core/ModuleMap.h +30 -0
  117. plumed/_lib/include/plumed/core/ParallelTaskManager.h +1023 -0
  118. plumed/_lib/include/plumed/core/PbcAction.h +61 -0
  119. plumed/_lib/include/plumed/core/PlumedMain.h +632 -0
  120. plumed/_lib/include/plumed/core/PlumedMainInitializer.h +118 -0
  121. plumed/_lib/include/plumed/core/RegisterBase.h +340 -0
  122. plumed/_lib/include/plumed/core/TargetDist.h +48 -0
  123. plumed/_lib/include/plumed/core/Value.h +547 -0
  124. plumed/_lib/include/plumed/core/WithCmd.h +93 -0
  125. plumed/_lib/include/plumed/dimred/SMACOF.h +55 -0
  126. plumed/_lib/include/plumed/drr/DRR.h +383 -0
  127. plumed/_lib/include/plumed/drr/colvar_UIestimator.h +777 -0
  128. plumed/_lib/include/plumed/fisst/legendre_rule_fast.h +44 -0
  129. plumed/_lib/include/plumed/function/Custom.h +54 -0
  130. plumed/_lib/include/plumed/function/Function.h +85 -0
  131. plumed/_lib/include/plumed/function/FunctionOfMatrix.h +368 -0
  132. plumed/_lib/include/plumed/function/FunctionOfScalar.h +135 -0
  133. plumed/_lib/include/plumed/function/FunctionOfVector.h +296 -0
  134. plumed/_lib/include/plumed/function/FunctionSetup.h +180 -0
  135. plumed/_lib/include/plumed/function/FunctionShortcut.h +130 -0
  136. plumed/_lib/include/plumed/function/FunctionWithSingleArgument.h +165 -0
  137. plumed/_lib/include/plumed/gridtools/ActionWithGrid.h +43 -0
  138. plumed/_lib/include/plumed/gridtools/EvaluateGridFunction.h +99 -0
  139. plumed/_lib/include/plumed/gridtools/FunctionOfGrid.h +295 -0
  140. plumed/_lib/include/plumed/gridtools/GridCoordinatesObject.h +179 -0
  141. plumed/_lib/include/plumed/gridtools/GridSearch.h +135 -0
  142. plumed/_lib/include/plumed/gridtools/Interpolator.h +45 -0
  143. plumed/_lib/include/plumed/gridtools/KDE.h +455 -0
  144. plumed/_lib/include/plumed/gridtools/RDF.h +40 -0
  145. plumed/_lib/include/plumed/gridtools/SumOfKernels.h +219 -0
  146. plumed/_lib/include/plumed/isdb/MetainferenceBase.h +398 -0
  147. plumed/_lib/include/plumed/lapack/def_external.h +207 -0
  148. plumed/_lib/include/plumed/lapack/def_internal.h +388 -0
  149. plumed/_lib/include/plumed/lapack/lapack.h +899 -0
  150. plumed/_lib/include/plumed/lapack/lapack_limits.h +79 -0
  151. plumed/_lib/include/plumed/lapack/real.h +50 -0
  152. plumed/_lib/include/plumed/lepton/CompiledExpression.h +164 -0
  153. plumed/_lib/include/plumed/lepton/CustomFunction.h +143 -0
  154. plumed/_lib/include/plumed/lepton/Exception.h +93 -0
  155. plumed/_lib/include/plumed/lepton/ExpressionProgram.h +137 -0
  156. plumed/_lib/include/plumed/lepton/ExpressionTreeNode.h +145 -0
  157. plumed/_lib/include/plumed/lepton/Lepton.h +85 -0
  158. plumed/_lib/include/plumed/lepton/MSVC_erfc.h +123 -0
  159. plumed/_lib/include/plumed/lepton/Operation.h +1302 -0
  160. plumed/_lib/include/plumed/lepton/ParsedExpression.h +165 -0
  161. plumed/_lib/include/plumed/lepton/Parser.h +111 -0
  162. plumed/_lib/include/plumed/lepton/windowsIncludes.h +73 -0
  163. plumed/_lib/include/plumed/mapping/Path.h +44 -0
  164. plumed/_lib/include/plumed/mapping/PathProjectionCalculator.h +57 -0
  165. plumed/_lib/include/plumed/matrixtools/MatrixOperationBase.h +54 -0
  166. plumed/_lib/include/plumed/matrixtools/MatrixTimesMatrix.h +309 -0
  167. plumed/_lib/include/plumed/matrixtools/MatrixTimesVectorBase.h +365 -0
  168. plumed/_lib/include/plumed/matrixtools/OuterProduct.h +238 -0
  169. plumed/_lib/include/plumed/maze/Core.h +65 -0
  170. plumed/_lib/include/plumed/maze/Loss.h +86 -0
  171. plumed/_lib/include/plumed/maze/Member.h +66 -0
  172. plumed/_lib/include/plumed/maze/Memetic.h +799 -0
  173. plumed/_lib/include/plumed/maze/Optimizer.h +357 -0
  174. plumed/_lib/include/plumed/maze/Random_MT.h +156 -0
  175. plumed/_lib/include/plumed/maze/Tools.h +183 -0
  176. plumed/_lib/include/plumed/metatomic/vesin.h +188 -0
  177. plumed/_lib/include/plumed/molfile/Gromacs.h +2013 -0
  178. plumed/_lib/include/plumed/molfile/endianswap.h +217 -0
  179. plumed/_lib/include/plumed/molfile/fastio.h +683 -0
  180. plumed/_lib/include/plumed/molfile/largefiles.h +78 -0
  181. plumed/_lib/include/plumed/molfile/libmolfile_plugin.h +77 -0
  182. plumed/_lib/include/plumed/molfile/molfile_plugin.h +1034 -0
  183. plumed/_lib/include/plumed/molfile/periodic_table.h +248 -0
  184. plumed/_lib/include/plumed/molfile/readpdb.h +447 -0
  185. plumed/_lib/include/plumed/molfile/vmdplugin.h +236 -0
  186. plumed/_lib/include/plumed/multicolvar/MultiColvarShortcuts.h +45 -0
  187. plumed/_lib/include/plumed/opes/ExpansionCVs.h +79 -0
  188. plumed/_lib/include/plumed/sasa/Sasa.h +32 -0
  189. plumed/_lib/include/plumed/secondarystructure/SecondaryStructureBase.h +372 -0
  190. plumed/_lib/include/plumed/setup/ActionSetup.h +25 -0
  191. plumed/_lib/include/plumed/small_vector/small_vector.h +6114 -0
  192. plumed/_lib/include/plumed/symfunc/CoordinationNumbers.h +41 -0
  193. plumed/_lib/include/plumed/tools/Angle.h +52 -0
  194. plumed/_lib/include/plumed/tools/AtomDistribution.h +138 -0
  195. plumed/_lib/include/plumed/tools/AtomNumber.h +152 -0
  196. plumed/_lib/include/plumed/tools/BiasRepresentation.h +106 -0
  197. plumed/_lib/include/plumed/tools/BitmaskEnum.h +167 -0
  198. plumed/_lib/include/plumed/tools/Brent1DRootSearch.h +159 -0
  199. plumed/_lib/include/plumed/tools/CheckInRange.h +44 -0
  200. plumed/_lib/include/plumed/tools/Citations.h +74 -0
  201. plumed/_lib/include/plumed/tools/ColvarOutput.h +118 -0
  202. plumed/_lib/include/plumed/tools/Communicator.h +316 -0
  203. plumed/_lib/include/plumed/tools/ConjugateGradient.h +80 -0
  204. plumed/_lib/include/plumed/tools/DLLoader.h +79 -0
  205. plumed/_lib/include/plumed/tools/ERMSD.h +73 -0
  206. plumed/_lib/include/plumed/tools/Exception.h +406 -0
  207. plumed/_lib/include/plumed/tools/File.h +28 -0
  208. plumed/_lib/include/plumed/tools/FileBase.h +153 -0
  209. plumed/_lib/include/plumed/tools/FileTools.h +37 -0
  210. plumed/_lib/include/plumed/tools/ForwardDecl.h +54 -0
  211. plumed/_lib/include/plumed/tools/Grid.h +638 -0
  212. plumed/_lib/include/plumed/tools/HistogramBead.h +136 -0
  213. plumed/_lib/include/plumed/tools/IFile.h +117 -0
  214. plumed/_lib/include/plumed/tools/KernelFunctions.h +113 -0
  215. plumed/_lib/include/plumed/tools/Keywords.h +380 -0
  216. plumed/_lib/include/plumed/tools/LatticeReduction.h +66 -0
  217. plumed/_lib/include/plumed/tools/LeptonCall.h +64 -0
  218. plumed/_lib/include/plumed/tools/LinkCells.h +126 -0
  219. plumed/_lib/include/plumed/tools/Log.h +41 -0
  220. plumed/_lib/include/plumed/tools/LoopUnroller.h +163 -0
  221. plumed/_lib/include/plumed/tools/Matrix.h +721 -0
  222. plumed/_lib/include/plumed/tools/MatrixSquareBracketsAccess.h +138 -0
  223. plumed/_lib/include/plumed/tools/MergeVectorTools.h +153 -0
  224. plumed/_lib/include/plumed/tools/Minimise1DBrent.h +244 -0
  225. plumed/_lib/include/plumed/tools/MinimiseBase.h +120 -0
  226. plumed/_lib/include/plumed/tools/MolDataClass.h +51 -0
  227. plumed/_lib/include/plumed/tools/NeighborList.h +112 -0
  228. plumed/_lib/include/plumed/tools/OFile.h +286 -0
  229. plumed/_lib/include/plumed/tools/OpenACC.h +180 -0
  230. plumed/_lib/include/plumed/tools/OpenMP.h +75 -0
  231. plumed/_lib/include/plumed/tools/PDB.h +154 -0
  232. plumed/_lib/include/plumed/tools/Pbc.h +139 -0
  233. plumed/_lib/include/plumed/tools/PlumedHandle.h +105 -0
  234. plumed/_lib/include/plumed/tools/RMSD.h +493 -0
  235. plumed/_lib/include/plumed/tools/Random.h +80 -0
  236. plumed/_lib/include/plumed/tools/RootFindingBase.h +79 -0
  237. plumed/_lib/include/plumed/tools/Stopwatch.h +475 -0
  238. plumed/_lib/include/plumed/tools/Subprocess.h +142 -0
  239. plumed/_lib/include/plumed/tools/SwitchingFunction.h +208 -0
  240. plumed/_lib/include/plumed/tools/Tensor.h +724 -0
  241. plumed/_lib/include/plumed/tools/TokenizedLine.h +123 -0
  242. plumed/_lib/include/plumed/tools/Tools.h +638 -0
  243. plumed/_lib/include/plumed/tools/Torsion.h +55 -0
  244. plumed/_lib/include/plumed/tools/TrajectoryParser.h +118 -0
  245. plumed/_lib/include/plumed/tools/Tree.h +61 -0
  246. plumed/_lib/include/plumed/tools/TypesafePtr.h +463 -0
  247. plumed/_lib/include/plumed/tools/Units.h +167 -0
  248. plumed/_lib/include/plumed/tools/Vector.h +433 -0
  249. plumed/_lib/include/plumed/tools/View.h +296 -0
  250. plumed/_lib/include/plumed/tools/View2D.h +100 -0
  251. plumed/_lib/include/plumed/tools/h36.h +39 -0
  252. plumed/_lib/include/plumed/vatom/ActionWithVirtualAtom.h +32 -0
  253. plumed/_lib/include/plumed/ves/BasisFunctions.h +380 -0
  254. plumed/_lib/include/plumed/ves/CoeffsBase.h +310 -0
  255. plumed/_lib/include/plumed/ves/CoeffsMatrix.h +220 -0
  256. plumed/_lib/include/plumed/ves/CoeffsVector.h +251 -0
  257. plumed/_lib/include/plumed/ves/FermiSwitchingFunction.h +74 -0
  258. plumed/_lib/include/plumed/ves/GridIntegrationWeights.h +50 -0
  259. plumed/_lib/include/plumed/ves/GridLinearInterpolation.h +81 -0
  260. plumed/_lib/include/plumed/ves/GridProjWeights.h +61 -0
  261. plumed/_lib/include/plumed/ves/LinearBasisSetExpansion.h +303 -0
  262. plumed/_lib/include/plumed/ves/Optimizer.h +444 -0
  263. plumed/_lib/include/plumed/ves/TargetDistModifer.h +53 -0
  264. plumed/_lib/include/plumed/ves/TargetDistribution.h +266 -0
  265. plumed/_lib/include/plumed/ves/VesBias.h +545 -0
  266. plumed/_lib/include/plumed/ves/VesTools.h +142 -0
  267. plumed/_lib/include/plumed/ves/WaveletGrid.h +75 -0
  268. plumed/_lib/include/plumed/volumes/ActionVolume.h +268 -0
  269. plumed/_lib/include/plumed/volumes/VolumeShortcut.h +147 -0
  270. plumed/_lib/include/plumed/wrapper/Plumed.h +5025 -0
  271. plumed/_lib/include/plumed/xdrfile/xdrfile.h +663 -0
  272. plumed/_lib/include/plumed/xdrfile/xdrfile_trr.h +89 -0
  273. plumed/_lib/include/plumed/xdrfile/xdrfile_xtc.h +90 -0
  274. plumed/_lib/lib/PythonCVInterface.so +0 -0
  275. plumed/_lib/lib/libplumed.a +0 -0
  276. plumed/_lib/lib/libplumed.so +0 -0
  277. plumed/_lib/lib/libplumedKernel.so +0 -0
  278. plumed/_lib/lib/libplumedWrapper.a +0 -0
  279. plumed/_lib/lib/pkgconfig/plumed.pc +13 -0
  280. plumed/_lib/lib/pkgconfig/plumedInternals.pc +13 -0
  281. plumed/_lib/lib/pkgconfig/plumedWrapper.pc +13 -0
  282. plumed/_lib/lib/plumed/fortran/plumed.f90 +879 -0
  283. plumed/_lib/lib/plumed/fortran/plumed_f08.f90 +2625 -0
  284. plumed/_lib/lib/plumed/modulefile +69 -0
  285. plumed/_lib/lib/plumed/patches/gromacs-2022.5.config +43 -0
  286. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt +543 -0
  287. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt.preplumed +540 -0
  288. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp +1628 -0
  289. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1590 -0
  290. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h +103 -0
  291. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h.preplumed +99 -0
  292. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp +2527 -0
  293. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2513 -0
  294. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
  295. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
  296. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +408 -0
  297. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +394 -0
  298. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp +2348 -0
  299. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2091 -0
  300. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp +3573 -0
  301. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3495 -0
  302. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1506 -0
  303. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1402 -0
  304. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
  305. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
  306. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp +997 -0
  307. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +906 -0
  308. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp +2780 -0
  309. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2738 -0
  310. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
  311. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
  312. plumed/_lib/lib/plumed/patches/gromacs-2023.5.config +43 -0
  313. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt +549 -0
  314. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt.preplumed +546 -0
  315. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
  316. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
  317. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h +104 -0
  318. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
  319. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp +2624 -0
  320. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2610 -0
  321. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
  322. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
  323. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +409 -0
  324. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +395 -0
  325. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp +2419 -0
  326. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2164 -0
  327. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp +3546 -0
  328. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3468 -0
  329. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
  330. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
  331. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
  332. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
  333. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp +991 -0
  334. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +900 -0
  335. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp +2895 -0
  336. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2849 -0
  337. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
  338. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
  339. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp +886 -0
  340. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +880 -0
  341. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +347 -0
  342. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +345 -0
  343. plumed/_lib/lib/plumed/patches/gromacs-2024.3.config +43 -0
  344. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt +575 -0
  345. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt.preplumed +572 -0
  346. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
  347. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
  348. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h +104 -0
  349. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
  350. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp +2564 -0
  351. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2550 -0
  352. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
  353. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
  354. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h +410 -0
  355. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +396 -0
  356. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp +2435 -0
  357. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp.preplumed +2187 -0
  358. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp +3592 -0
  359. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3514 -0
  360. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
  361. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
  362. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
  363. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
  364. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp +958 -0
  365. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp.preplumed +929 -0
  366. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp +2987 -0
  367. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp.preplumed +2941 -0
  368. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
  369. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
  370. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp +904 -0
  371. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +898 -0
  372. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +353 -0
  373. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +351 -0
  374. plumed/_lib/lib/plumed/patches/gromacs-2025.0.config +39 -0
  375. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake +82 -0
  376. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake.preplumed +82 -0
  377. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp +162 -0
  378. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp.preplumed +154 -0
  379. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp +107 -0
  380. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp.preplumed +99 -0
  381. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h +120 -0
  382. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h.preplumed +111 -0
  383. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp +215 -0
  384. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp.preplumed +197 -0
  385. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h +87 -0
  386. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h.preplumed +86 -0
  387. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp +2971 -0
  388. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp.preplumed +2970 -0
  389. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h +430 -0
  390. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h.preplumed +429 -0
  391. plumed/_lib/lib/plumed/patches/namd-2.12.config +30 -0
  392. plumed/_lib/lib/plumed/patches/namd-2.12.diff +267 -0
  393. plumed/_lib/lib/plumed/patches/namd-2.13.config +30 -0
  394. plumed/_lib/lib/plumed/patches/namd-2.13.diff +267 -0
  395. plumed/_lib/lib/plumed/patches/namd-2.14.config +30 -0
  396. plumed/_lib/lib/plumed/patches/namd-2.14.diff +268 -0
  397. plumed/_lib/lib/plumed/patches/patch.sh +500 -0
  398. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.config +25 -0
  399. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90 +368 -0
  400. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90.preplumed +366 -0
  401. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90 +71 -0
  402. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90.preplumed +24 -0
  403. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90 +62 -0
  404. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  405. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90 +189 -0
  406. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90.preplumed +185 -0
  407. plumed/_lib/lib/plumed/patches/qespresso-6.2.config +26 -0
  408. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90 +422 -0
  409. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90.preplumed +420 -0
  410. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90 +70 -0
  411. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
  412. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90 +62 -0
  413. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  414. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90 +233 -0
  415. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90.preplumed +230 -0
  416. plumed/_lib/lib/plumed/patches/qespresso-7.0.config +28 -0
  417. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile +175 -0
  418. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile.preplumed +171 -0
  419. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90 +486 -0
  420. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90.preplumed +484 -0
  421. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90 +74 -0
  422. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
  423. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90 +64 -0
  424. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  425. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90 +532 -0
  426. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90.preplumed +518 -0
  427. plumed/_lib/lib/plumed/patches/qespresso-7.2.config +28 -0
  428. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile +249 -0
  429. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile.preplumed +244 -0
  430. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90 +532 -0
  431. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90.preplumed +535 -0
  432. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90 +74 -0
  433. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
  434. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90 +64 -0
  435. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  436. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90 +569 -0
  437. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90.preplumed +560 -0
  438. plumed/_lib/lib/plumed/plumed-config +9 -0
  439. plumed/_lib/lib/plumed/plumed-mklib +9 -0
  440. plumed/_lib/lib/plumed/plumed-newcv +9 -0
  441. plumed/_lib/lib/plumed/plumed-partial_tempering +9 -0
  442. plumed/_lib/lib/plumed/plumed-patch +9 -0
  443. plumed/_lib/lib/plumed/plumed-runtime +0 -0
  444. plumed/_lib/lib/plumed/plumed-selector +9 -0
  445. plumed/_lib/lib/plumed/plumed-vim2html +9 -0
  446. plumed/_lib/lib/plumed/scripts/config.sh +126 -0
  447. plumed/_lib/lib/plumed/scripts/mklib.sh +175 -0
  448. plumed/_lib/lib/plumed/scripts/newcv.sh +26 -0
  449. plumed/_lib/lib/plumed/scripts/partial_tempering.sh +319 -0
  450. plumed/_lib/lib/plumed/scripts/patch.sh +4 -0
  451. plumed/_lib/lib/plumed/scripts/selector.sh +234 -0
  452. plumed/_lib/lib/plumed/scripts/vim2html.sh +190 -0
  453. plumed/_lib/lib/plumed/src/colvar/Template.cpp +116 -0
  454. plumed/_lib/lib/plumed/src/config/compile_options.sh +3 -0
  455. plumed/_lib/lib/plumed/src/config/config.txt +179 -0
  456. plumed/_lib/lib/plumed/src/lib/Plumed.cmake +8 -0
  457. plumed/_lib/lib/plumed/src/lib/Plumed.cmake.runtime +5 -0
  458. plumed/_lib/lib/plumed/src/lib/Plumed.cmake.shared +5 -0
  459. plumed/_lib/lib/plumed/src/lib/Plumed.cmake.static +5 -0
  460. plumed/_lib/lib/plumed/src/lib/Plumed.inc +8 -0
  461. plumed/_lib/lib/plumed/src/lib/Plumed.inc.runtime +5 -0
  462. plumed/_lib/lib/plumed/src/lib/Plumed.inc.shared +5 -0
  463. plumed/_lib/lib/plumed/src/lib/Plumed.inc.static +5 -0
  464. plumed/_lib/lib/plumed/vim/scripts.vim +6 -0
  465. plumed/_plumed_core.cpython-311-aarch64-linux-gnu.so +0 -0
  466. plumed/_plumed_core.cpython-312-aarch64-linux-gnu.so +0 -0
  467. plumed/_plumed_core.cpython-313-aarch64-linux-gnu.so +0 -0
  468. plumed/_plumed_core.cpython-314-aarch64-linux-gnu.so +0 -0
  469. plumed/_plumed_core.cpython-314t-aarch64-linux-gnu.so +0 -0
  470. plumedCommunications.cpython-311-aarch64-linux-gnu.so +0 -0
  471. plumedCommunications.cpython-312-aarch64-linux-gnu.so +0 -0
  472. plumedCommunications.cpython-313-aarch64-linux-gnu.so +0 -0
  473. plumedCommunications.cpython-314-aarch64-linux-gnu.so +0 -0
  474. plumedCommunications.cpython-314t-aarch64-linux-gnu.so +0 -0
  475. plumedCommunications.pyi +431 -0
@@ -0,0 +1,997 @@
1
+ /*
2
+ * This file is part of the GROMACS molecular simulation package.
3
+ *
4
+ * Copyright 2018- The GROMACS Authors
5
+ * and the project initiators Erik Lindahl, Berk Hess and David van der Spoel.
6
+ * Consult the AUTHORS/COPYING files and https://www.gromacs.org for details.
7
+ *
8
+ * GROMACS is free software; you can redistribute it and/or
9
+ * modify it under the terms of the GNU Lesser General Public License
10
+ * as published by the Free Software Foundation; either version 2.1
11
+ * of the License, or (at your option) any later version.
12
+ *
13
+ * GROMACS is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
+ * Lesser General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Lesser General Public
19
+ * License along with GROMACS; if not, see
20
+ * https://www.gnu.org/licenses, or write to the Free Software Foundation,
21
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
+ *
23
+ * If you want to redistribute modifications to GROMACS, please
24
+ * consider that scientific software is very special. Version
25
+ * control is crucial - bugs must be traceable. We will be happy to
26
+ * consider code for inclusion in the official distribution, but
27
+ * derived work must not be called official GROMACS. Details are found
28
+ * in the README & COPYING files - if they are missing, get the
29
+ * official version at https://www.gromacs.org.
30
+ *
31
+ * To help us fund GROMACS development, we humbly ask that you cite
32
+ * the research papers on the package. Check out https://www.gromacs.org.
33
+ */
34
+ /*! \internal \file
35
+ *
36
+ * \brief Implements the loop for simulation reruns
37
+ *
38
+ * \author Pascal Merz <pascal.merz@colorado.edu>
39
+ * \ingroup module_mdrun
40
+ */
41
+ #include "gmxpre.h"
42
+
43
+ #include <cinttypes>
44
+ #include <cmath>
45
+ #include <cstdio>
46
+ #include <cstdlib>
47
+
48
+ #include <algorithm>
49
+ #include <memory>
50
+
51
+ #include "gromacs/applied_forces/awh/awh.h"
52
+ #include "gromacs/commandline/filenm.h"
53
+ #include "gromacs/domdec/collect.h"
54
+ #include "gromacs/domdec/dlbtiming.h"
55
+ #include "gromacs/domdec/domdec.h"
56
+ #include "gromacs/domdec/domdec_network.h"
57
+ #include "gromacs/domdec/domdec_struct.h"
58
+ #include "gromacs/domdec/localtopologychecker.h"
59
+ #include "gromacs/domdec/mdsetup.h"
60
+ #include "gromacs/domdec/partition.h"
61
+ #include "gromacs/essentialdynamics/edsam.h"
62
+ #include "gromacs/ewald/pme_load_balancing.h"
63
+ #include "gromacs/ewald/pme_pp.h"
64
+ #include "gromacs/fileio/trxio.h"
65
+ #include "gromacs/gmxlib/network.h"
66
+ #include "gromacs/gmxlib/nrnb.h"
67
+ #include "gromacs/gpu_utils/gpu_utils.h"
68
+ #include "gromacs/math/units.h"
69
+ #include "gromacs/listed_forces/listed_forces.h"
70
+ #include "gromacs/math/functions.h"
71
+ #include "gromacs/math/utilities.h"
72
+ #include "gromacs/math/vec.h"
73
+ #include "gromacs/math/vectypes.h"
74
+ #include "gromacs/mdlib/checkpointhandler.h"
75
+ #include "gromacs/mdlib/constr.h"
76
+ #include "gromacs/mdlib/ebin.h"
77
+ #include "gromacs/mdlib/enerdata_utils.h"
78
+ #include "gromacs/mdlib/energyoutput.h"
79
+ #include "gromacs/mdlib/expanded.h"
80
+ #include "gromacs/mdlib/force.h"
81
+ #include "gromacs/mdlib/force_flags.h"
82
+ #include "gromacs/mdlib/forcerec.h"
83
+ #include "gromacs/mdlib/freeenergyparameters.h"
84
+ #include "gromacs/mdlib/md_support.h"
85
+ #include "gromacs/mdlib/mdatoms.h"
86
+ #include "gromacs/mdlib/mdoutf.h"
87
+ #include "gromacs/mdlib/membed.h"
88
+ #include "gromacs/mdlib/resethandler.h"
89
+ #include "gromacs/mdlib/sighandler.h"
90
+ #include "gromacs/mdlib/simulationsignal.h"
91
+ #include "gromacs/mdlib/stat.h"
92
+ #include "gromacs/mdlib/stophandler.h"
93
+ #include "gromacs/mdlib/tgroup.h"
94
+ #include "gromacs/mdlib/trajectory_writing.h"
95
+ #include "gromacs/mdlib/update.h"
96
+ #include "gromacs/mdlib/vcm.h"
97
+ #include "gromacs/mdlib/vsite.h"
98
+ #include "gromacs/mdrunutility/handlerestart.h"
99
+ #include "gromacs/mdrunutility/multisim.h"
100
+ #include "gromacs/mdrunutility/printtime.h"
101
+ #include "gromacs/mdtypes/awh_history.h"
102
+ #include "gromacs/mdtypes/awh_params.h"
103
+ #include "gromacs/mdtypes/commrec.h"
104
+ #include "gromacs/mdtypes/df_history.h"
105
+ #include "gromacs/mdtypes/energyhistory.h"
106
+ #include "gromacs/mdtypes/forcebuffers.h"
107
+ #include "gromacs/mdtypes/forcerec.h"
108
+ #include "gromacs/mdtypes/group.h"
109
+ #include "gromacs/mdtypes/inputrec.h"
110
+ #include "gromacs/mdtypes/interaction_const.h"
111
+ #include "gromacs/mdtypes/md_enums.h"
112
+ #include "gromacs/mdtypes/mdatom.h"
113
+ #include "gromacs/mdtypes/mdrunoptions.h"
114
+ #include "gromacs/mdtypes/observableshistory.h"
115
+ #include "gromacs/mdtypes/observablesreducer.h"
116
+ #include "gromacs/mdtypes/simulation_workload.h"
117
+ #include "gromacs/mdtypes/state.h"
118
+ #include "gromacs/mimic/utilities.h"
119
+ #include "gromacs/pbcutil/pbc.h"
120
+ #include "gromacs/pulling/output.h"
121
+ #include "gromacs/pulling/pull.h"
122
+ #include "gromacs/swap/swapcoords.h"
123
+ #include "gromacs/timing/wallcycle.h"
124
+ #include "gromacs/timing/walltime_accounting.h"
125
+ #include "gromacs/topology/atoms.h"
126
+ #include "gromacs/topology/idef.h"
127
+ #include "gromacs/topology/mtop_util.h"
128
+ #include "gromacs/topology/topology.h"
129
+ #include "gromacs/trajectory/trajectoryframe.h"
130
+ #include "gromacs/utility/basedefinitions.h"
131
+ #include "gromacs/utility/cstringutil.h"
132
+ #include "gromacs/utility/exceptions.h"
133
+ #include "gromacs/utility/fatalerror.h"
134
+ #include "gromacs/utility/logger.h"
135
+ #include "gromacs/utility/real.h"
136
+
137
+ #include "legacysimulator.h"
138
+ #include "replicaexchange.h"
139
+ #include "shellfc.h"
140
+
141
+ /* PLUMED */
142
+ #include "../../../Plumed.h"
143
+ extern int plumedswitch;
144
+ extern plumed plumedmain;
145
+ /* END PLUMED */
146
+
147
+ using gmx::SimulationSignaller;
148
+ using gmx::VirtualSitesHandler;
149
+
150
+ /*! \brief Copy the state from \p rerunFrame to \p globalState and, if requested, construct vsites
151
+ *
152
+ * \param[in] rerunFrame The trajectory frame to compute energy/forces for
153
+ * \param[in,out] globalState The global state container
154
+ * \param[in] constructVsites When true, vsite coordinates are constructed
155
+ * \param[in] vsite Vsite setup, can be nullptr when \p constructVsites = false
156
+ */
157
+ static void prepareRerunState(const t_trxframe& rerunFrame,
158
+ t_state* globalState,
159
+ bool constructVsites,
160
+ const VirtualSitesHandler* vsite)
161
+ {
162
+ auto x = makeArrayRef(globalState->x);
163
+ auto rerunX = arrayRefFromArray(reinterpret_cast<gmx::RVec*>(rerunFrame.x), globalState->natoms);
164
+ std::copy(rerunX.begin(), rerunX.end(), x.begin());
165
+ copy_mat(rerunFrame.box, globalState->box);
166
+
167
+ if (constructVsites)
168
+ {
169
+ GMX_ASSERT(vsite, "Need valid vsite for constructing vsites");
170
+
171
+ vsite->construct(globalState->x, globalState->v, globalState->box, gmx::VSiteOperation::PositionsAndVelocities);
172
+ }
173
+ }
174
+
175
+ void gmx::LegacySimulator::do_rerun()
176
+ {
177
+ // TODO Historically, the EM and MD "integrators" used different
178
+ // names for the t_inputrec *parameter, but these must have the
179
+ // same name, now that it's a member of a struct. We use this ir
180
+ // alias to avoid a large ripple of nearly useless changes.
181
+ // t_inputrec is being replaced by IMdpOptionsProvider, so this
182
+ // will go away eventually.
183
+ const t_inputrec* ir = inputrec;
184
+ double t;
185
+ bool isLastStep = false;
186
+ bool doFreeEnergyPerturbation = false;
187
+ unsigned int force_flags;
188
+ tensor force_vir, shake_vir, total_vir, pres;
189
+ t_trxstatus* status = nullptr;
190
+ rvec mu_tot;
191
+ t_trxframe rerun_fr;
192
+ ForceBuffers f;
193
+ gmx_global_stat_t gstat;
194
+ gmx_shellfc_t* shellfc;
195
+
196
+ double cycles;
197
+
198
+ SimulationSignals signals;
199
+ /* PLUMED */
200
+ int plumedNeedsEnergy=0;
201
+ int plumedWantsToStop=0;
202
+ matrix plumed_vir;
203
+ real lambdaForce=0;
204
+ real realFepState=0;
205
+ /* END PLUMED */
206
+
207
+ // Most global communnication stages don't propagate mdrun
208
+ // signals, and will use this object to achieve that.
209
+ SimulationSignaller nullSignaller(nullptr, nullptr, nullptr, false, false);
210
+
211
+ GMX_LOG(mdlog.info)
212
+ .asParagraph()
213
+ .appendText(
214
+ "Note that it is planned that the command gmx mdrun -rerun will "
215
+ "be available in a different form in a future version of GROMACS, "
216
+ "e.g. gmx rerun -f.");
217
+
218
+ if (ir->efep != FreeEnergyPerturbationType::No
219
+ && (mdAtoms->mdatoms()->nMassPerturbed > 0 || (constr && constr->havePerturbedConstraints())))
220
+ {
221
+ gmx_fatal(FARGS,
222
+ "Perturbed masses or constraints are not supported by rerun. "
223
+ "Either make a .tpr without mass and constraint perturbation, "
224
+ "or use GROMACS 2018.4, 2018.5 or later 2018 version.");
225
+ }
226
+ if (ir->bExpanded)
227
+ {
228
+ gmx_fatal(FARGS, "Expanded ensemble not supported by rerun.");
229
+ }
230
+ if (ir->bSimTemp)
231
+ {
232
+ gmx_fatal(FARGS, "Simulated tempering not supported by rerun.");
233
+ }
234
+ if (ir->bDoAwh)
235
+ {
236
+ gmx_fatal(FARGS, "AWH not supported by rerun.");
237
+ }
238
+ if (replExParams.exchangeInterval > 0)
239
+ {
240
+ gmx_fatal(FARGS, "Replica exchange not supported by rerun.");
241
+ }
242
+ if (opt2bSet("-ei", nfile, fnm) || observablesHistory->edsamHistory != nullptr)
243
+ {
244
+ gmx_fatal(FARGS, "Essential dynamics not supported by rerun.");
245
+ }
246
+ if (ir->bIMD)
247
+ {
248
+ gmx_fatal(FARGS, "Interactive MD not supported by rerun.");
249
+ }
250
+ if (isMultiSim(ms))
251
+ {
252
+ gmx_fatal(FARGS, "Multiple simulations not supported by rerun.");
253
+ }
254
+ if (std::any_of(ir->opts.annealing, ir->opts.annealing + ir->opts.ngtc, [](SimulatedAnnealing i) {
255
+ return i != SimulatedAnnealing::No;
256
+ }))
257
+ {
258
+ gmx_fatal(FARGS, "Simulated annealing not supported by rerun.");
259
+ }
260
+
261
+ /* Rerun can't work if an output file name is the same as the input file name.
262
+ * If this is the case, the user will get an error telling them what the issue is.
263
+ */
264
+ if (strcmp(opt2fn("-rerun", nfile, fnm), opt2fn("-o", nfile, fnm)) == 0
265
+ || strcmp(opt2fn("-rerun", nfile, fnm), opt2fn("-x", nfile, fnm)) == 0)
266
+ {
267
+ gmx_fatal(FARGS,
268
+ "When using mdrun -rerun, the name of the input trajectory file "
269
+ "%s cannot be identical to the name of an output file (whether "
270
+ "given explicitly with -o or -x, or by default)",
271
+ opt2fn("-rerun", nfile, fnm));
272
+ }
273
+
274
+ /* Settings for rerun */
275
+ {
276
+ // TODO: Avoid changing inputrec (#3854)
277
+ auto* nonConstInputrec = const_cast<t_inputrec*>(inputrec);
278
+ nonConstInputrec->nstlist = 1;
279
+ nonConstInputrec->nstcalcenergy = 1;
280
+ nonConstInputrec->nstxout_compressed = 0;
281
+ }
282
+ int nstglobalcomm = 1;
283
+ const bool bNS = true;
284
+
285
+ ObservablesReducer observablesReducer = observablesReducerBuilder->build();
286
+
287
+ const SimulationGroups* groups = &top_global.groups;
288
+ if (ir->eI == IntegrationAlgorithm::Mimic)
289
+ {
290
+ auto* nonConstGlobalTopology = const_cast<gmx_mtop_t*>(&top_global);
291
+ nonConstGlobalTopology->intermolecularExclusionGroup = genQmmmIndices(top_global);
292
+ }
293
+ int* fep_state = MASTER(cr) ? &state_global->fep_state : nullptr;
294
+ gmx::ArrayRef<real> lambda = MASTER(cr) ? state_global->lambda : gmx::ArrayRef<real>();
295
+ initialize_lambdas(fplog,
296
+ ir->efep,
297
+ ir->bSimTemp,
298
+ *ir->fepvals,
299
+ ir->simtempvals->temperatures,
300
+ gmx::arrayRefFromArray(ir->opts.ref_t, ir->opts.ngtc),
301
+ MASTER(cr),
302
+ fep_state,
303
+ lambda);
304
+ const bool simulationsShareState = false;
305
+ gmx_mdoutf* outf = init_mdoutf(fplog,
306
+ nfile,
307
+ fnm,
308
+ mdrunOptions,
309
+ cr,
310
+ outputProvider,
311
+ mdModulesNotifiers,
312
+ ir,
313
+ top_global,
314
+ oenv,
315
+ wcycle,
316
+ StartingBehavior::NewSimulation,
317
+ simulationsShareState,
318
+ ms);
319
+ gmx::EnergyOutput energyOutput(mdoutf_get_fp_ene(outf),
320
+ top_global,
321
+ *ir,
322
+ pull_work,
323
+ mdoutf_get_fp_dhdl(outf),
324
+ true,
325
+ StartingBehavior::NewSimulation,
326
+ simulationsShareState,
327
+ mdModulesNotifiers);
328
+
329
+ gstat = global_stat_init(ir);
330
+
331
+ /* Check for polarizable models and flexible constraints */
332
+ shellfc = init_shell_flexcon(fplog,
333
+ top_global,
334
+ constr ? constr->numFlexibleConstraints() : 0,
335
+ ir->nstcalcenergy,
336
+ haveDDAtomOrdering(*cr),
337
+ runScheduleWork->simulationWork.useGpuPme);
338
+
339
+ if (haveDDAtomOrdering(*cr))
340
+ {
341
+ // Local state only becomes valid now.
342
+ dd_init_local_state(*cr->dd, state_global, state);
343
+
344
+ /* Distribute the charge groups over the nodes from the master node */
345
+ dd_partition_system(fplog,
346
+ mdlog,
347
+ ir->init_step,
348
+ cr,
349
+ TRUE,
350
+ 1,
351
+ state_global,
352
+ top_global,
353
+ *ir,
354
+ imdSession,
355
+ pull_work,
356
+ state,
357
+ &f,
358
+ mdAtoms,
359
+ top,
360
+ fr,
361
+ vsite,
362
+ constr,
363
+ nrnb,
364
+ nullptr,
365
+ FALSE);
366
+ }
367
+ else
368
+ {
369
+ state_change_natoms(state_global, state_global->natoms);
370
+ /* Copy the pointer to the global state */
371
+ state = state_global;
372
+
373
+ mdAlgorithmsSetupAtomData(cr, *ir, top_global, top, fr, &f, mdAtoms, constr, vsite, shellfc);
374
+ }
375
+
376
+ auto* mdatoms = mdAtoms->mdatoms();
377
+ fr->longRangeNonbondeds->updateAfterPartition(*mdatoms);
378
+
379
+ // NOTE: The global state is no longer used at this point.
380
+ // But state_global is still used as temporary storage space for writing
381
+ // the global state to file and potentially for replica exchange.
382
+ // (Global topology should persist.)
383
+
384
+ update_mdatoms(mdatoms, state->lambda[FreeEnergyPerturbationCouplingType::Mass]);
385
+
386
+ if (ir->efep != FreeEnergyPerturbationType::No && ir->fepvals->nstdhdl != 0)
387
+ {
388
+ doFreeEnergyPerturbation = true;
389
+ }
390
+
391
+ int64_t step = ir->init_step;
392
+ int64_t step_rel = 0;
393
+
394
+ {
395
+ int cglo_flags = CGLO_GSTAT;
396
+ bool bSumEkinhOld = false;
397
+ t_vcm* vcm = nullptr;
398
+ compute_globals(gstat,
399
+ cr,
400
+ ir,
401
+ fr,
402
+ ekind,
403
+ makeConstArrayRef(state->x),
404
+ makeConstArrayRef(state->v),
405
+ state->box,
406
+ mdatoms,
407
+ nrnb,
408
+ vcm,
409
+ nullptr,
410
+ enerd,
411
+ force_vir,
412
+ shake_vir,
413
+ total_vir,
414
+ pres,
415
+ &nullSignaller,
416
+ state->box,
417
+ &bSumEkinhOld,
418
+ cglo_flags,
419
+ step,
420
+ &observablesReducer);
421
+ // Clean up after pre-step use of compute_globals()
422
+ observablesReducer.markAsReadyToReduce();
423
+ }
424
+
425
+ if (MASTER(cr))
426
+ {
427
+ fprintf(stderr,
428
+ "starting md rerun '%s', reading coordinates from"
429
+ " input trajectory '%s'\n\n",
430
+ *(top_global.name),
431
+ opt2fn("-rerun", nfile, fnm));
432
+ if (mdrunOptions.verbose)
433
+ {
434
+ fprintf(stderr,
435
+ "Calculated time to finish depends on nsteps from "
436
+ "run input file,\nwhich may not correspond to the time "
437
+ "needed to process input trajectory.\n\n");
438
+ }
439
+ fprintf(fplog, "\n");
440
+ }
441
+
442
+ /* PLUMED */
443
+ if(plumedswitch){
444
+ /* detect plumed API version */
445
+ int pversion=0;
446
+ plumed_cmd(plumedmain,"getApiVersion",&pversion);
447
+ /* setting kbT is only implemented with api>1) */
448
+ real kbT=ir->opts.ref_t[0]*gmx::c_boltz;
449
+ if(pversion>1) plumed_cmd(plumedmain,"setKbT",&kbT);
450
+ if(pversion>2){
451
+ int res=1;
452
+ if( (startingBehavior != StartingBehavior::NewSimulation) ) plumed_cmd(plumedmain,"setRestart",&res);
453
+ }
454
+
455
+ if(PAR(cr)){
456
+ if(haveDDAtomOrdering(*cr)) {
457
+ plumed_cmd(plumedmain,"setMPIComm",&cr->dd->mpi_comm_all);
458
+ }
459
+ }
460
+ plumed_cmd(plumedmain,"setNatoms",top_global.natoms);
461
+ plumed_cmd(plumedmain,"setMDEngine","gromacs");
462
+ plumed_cmd(plumedmain,"setLog",fplog);
463
+ real real_delta_t=ir->delta_t;
464
+ plumed_cmd(plumedmain,"setTimestep",&real_delta_t);
465
+ plumed_cmd(plumedmain,"init",nullptr);
466
+
467
+ if(haveDDAtomOrdering(*cr)) {
468
+ int nat_home = dd_numHomeAtoms(*cr->dd);
469
+ plumed_cmd(plumedmain,"setAtomsNlocal",&nat_home);
470
+ plumed_cmd(plumedmain,"setAtomsGatindex",cr->dd->globalAtomIndices.data());
471
+ }
472
+ realFepState = state->fep_state;
473
+ plumed_cmd(plumedmain, "setExtraCV lambda", &realFepState);
474
+ plumed_cmd(plumedmain, "setExtraCVForce lambda", &lambdaForce);
475
+ }
476
+ /* END PLUMED */
477
+
478
+ walltime_accounting_start_time(walltime_accounting);
479
+ wallcycle_start(wcycle, WallCycleCounter::Run);
480
+ print_start(fplog, cr, walltime_accounting, "mdrun");
481
+
482
+ /***********************************************************
483
+ *
484
+ * Loop over MD steps
485
+ *
486
+ ************************************************************/
487
+
488
+ if (constr)
489
+ {
490
+ GMX_LOG(mdlog.info)
491
+ .asParagraph()
492
+ .appendText("Simulations has constraints. Rerun does not recalculate constraints.");
493
+ }
494
+
495
+ rerun_fr.natoms = 0;
496
+ if (MASTER(cr))
497
+ {
498
+ isLastStep = !read_first_frame(oenv, &status, opt2fn("-rerun", nfile, fnm), &rerun_fr, TRX_NEED_X);
499
+ if (rerun_fr.natoms != top_global.natoms)
500
+ {
501
+ gmx_fatal(FARGS,
502
+ "Number of atoms in trajectory (%d) does not match the "
503
+ "run input file (%d)\n",
504
+ rerun_fr.natoms,
505
+ top_global.natoms);
506
+ }
507
+
508
+ if (ir->pbcType != PbcType::No)
509
+ {
510
+ if (!rerun_fr.bBox)
511
+ {
512
+ gmx_fatal(FARGS,
513
+ "Rerun trajectory frame step %" PRId64
514
+ " time %f "
515
+ "does not contain a box, while pbc is used",
516
+ rerun_fr.step,
517
+ rerun_fr.time);
518
+ }
519
+ if (max_cutoff2(ir->pbcType, rerun_fr.box) < gmx::square(fr->rlist))
520
+ {
521
+ gmx_fatal(FARGS,
522
+ "Rerun trajectory frame step %" PRId64
523
+ " time %f "
524
+ "has too small box dimensions",
525
+ rerun_fr.step,
526
+ rerun_fr.time);
527
+ }
528
+ }
529
+ }
530
+
531
+ GMX_LOG(mdlog.info)
532
+ .asParagraph()
533
+ .appendText(
534
+ "Rerun does not report kinetic energy, total energy, temperature, virial and "
535
+ "pressure.");
536
+
537
+ if (PAR(cr))
538
+ {
539
+ rerun_parallel_comm(cr, &rerun_fr, &isLastStep);
540
+ }
541
+
542
+ if (ir->pbcType != PbcType::No)
543
+ {
544
+ /* Set the shift vectors.
545
+ * Necessary here when have a static box different from the tpr box.
546
+ */
547
+ calc_shifts(rerun_fr.box, fr->shift_vec);
548
+ }
549
+
550
+ auto stopHandler = stopHandlerBuilder->getStopHandlerMD(
551
+ compat::not_null<SimulationSignal*>(&signals[eglsSTOPCOND]),
552
+ false,
553
+ MASTER(cr),
554
+ ir->nstlist,
555
+ mdrunOptions.reproducible,
556
+ nstglobalcomm,
557
+ mdrunOptions.maximumHoursToRun,
558
+ ir->nstlist == 0,
559
+ fplog,
560
+ step,
561
+ bNS,
562
+ walltime_accounting);
563
+
564
+ // we don't do counter resetting in rerun - finish will always be valid
565
+ walltime_accounting_set_valid_finish(walltime_accounting);
566
+
567
+ const DDBalanceRegionHandler ddBalanceRegionHandler(cr);
568
+
569
+ /* and stop now if we should */
570
+ isLastStep = (isLastStep || (ir->nsteps >= 0 && step_rel > ir->nsteps));
571
+ while (!isLastStep)
572
+ {
573
+ wallcycle_start(wcycle, WallCycleCounter::Step);
574
+
575
+ if (rerun_fr.bStep)
576
+ {
577
+ step = rerun_fr.step;
578
+ step_rel = step - ir->init_step;
579
+ }
580
+ if (rerun_fr.bTime)
581
+ {
582
+ t = rerun_fr.time;
583
+ }
584
+ else
585
+ {
586
+ t = step;
587
+ }
588
+
589
+ if (ir->efep != FreeEnergyPerturbationType::No && MASTER(cr))
590
+ {
591
+ if (rerun_fr.bLambda)
592
+ {
593
+ ir->fepvals->init_lambda = rerun_fr.lambda;
594
+ }
595
+ else
596
+ {
597
+ if (rerun_fr.bFepState)
598
+ {
599
+ state->fep_state = rerun_fr.fep_state;
600
+ }
601
+ }
602
+
603
+ state_global->lambda = currentLambdas(step, *(ir->fepvals), state->fep_state);
604
+ }
605
+
606
+ if (MASTER(cr))
607
+ {
608
+ const bool constructVsites = ((vsite != nullptr) && mdrunOptions.rerunConstructVsites);
609
+ if (constructVsites && haveDDAtomOrdering(*cr))
610
+ {
611
+ gmx_fatal(FARGS,
612
+ "Vsite recalculation with -rerun is not implemented with domain "
613
+ "decomposition, "
614
+ "use a single rank");
615
+ }
616
+ prepareRerunState(rerun_fr, state_global, constructVsites, vsite);
617
+ }
618
+
619
+ isLastStep = isLastStep || stopHandler->stoppingAfterCurrentStep(bNS);
620
+
621
+ if (haveDDAtomOrdering(*cr))
622
+ {
623
+ /* Repartition the domain decomposition */
624
+ const bool bMasterState = true;
625
+ dd_partition_system(fplog,
626
+ mdlog,
627
+ step,
628
+ cr,
629
+ bMasterState,
630
+ nstglobalcomm,
631
+ state_global,
632
+ top_global,
633
+ *ir,
634
+ imdSession,
635
+ pull_work,
636
+ state,
637
+ &f,
638
+ mdAtoms,
639
+ top,
640
+ fr,
641
+ vsite,
642
+ constr,
643
+ nrnb,
644
+ wcycle,
645
+ mdrunOptions.verbose);
646
+ /* PLUMED */
647
+ if(plumedswitch){
648
+ int nat_home = dd_numHomeAtoms(*cr->dd);
649
+ plumed_cmd(plumedmain,"setAtomsNlocal",&nat_home);
650
+ plumed_cmd(plumedmain,"setAtomsGatindex",cr->dd->globalAtomIndices.data());
651
+ }
652
+ /* END PLUMED */
653
+ }
654
+
655
+ if (MASTER(cr))
656
+ {
657
+ EnergyOutput::printHeader(fplog, step, t); /* can we improve the information printed here? */
658
+ }
659
+
660
+ if (ir->efep != FreeEnergyPerturbationType::No)
661
+ {
662
+ update_mdatoms(mdatoms, state->lambda[FreeEnergyPerturbationCouplingType::Mass]);
663
+ }
664
+
665
+ fr->longRangeNonbondeds->updateAfterPartition(*mdatoms);
666
+
667
+ force_flags = (GMX_FORCE_STATECHANGED | GMX_FORCE_DYNAMICBOX | GMX_FORCE_ALLFORCES
668
+ | GMX_FORCE_VIRIAL | // TODO: Get rid of this once #2649 and #3400 are solved
669
+ GMX_FORCE_ENERGY | (doFreeEnergyPerturbation ? GMX_FORCE_DHDL : 0));
670
+
671
+ if (shellfc)
672
+ {
673
+ /* Now is the time to relax the shells */
674
+ relax_shell_flexcon(fplog,
675
+ cr,
676
+ ms,
677
+ mdrunOptions.verbose,
678
+ enforcedRotation,
679
+ step,
680
+ ir,
681
+ imdSession,
682
+ pull_work,
683
+ bNS,
684
+ force_flags,
685
+ top,
686
+ constr,
687
+ enerd,
688
+ state->natoms,
689
+ state->x.arrayRefWithPadding(),
690
+ state->v.arrayRefWithPadding(),
691
+ state->box,
692
+ state->lambda,
693
+ &state->hist,
694
+ &f.view(),
695
+ force_vir,
696
+ *mdatoms,
697
+ fr->longRangeNonbondeds.get(),
698
+ nrnb,
699
+ wcycle,
700
+ shellfc,
701
+ fr,
702
+ runScheduleWork,
703
+ t,
704
+ mu_tot,
705
+ vsite,
706
+ ddBalanceRegionHandler);
707
+ }
708
+ else
709
+ {
710
+ /* The coordinates (x) are shifted (to get whole molecules)
711
+ * in do_force.
712
+ * This is parallellized as well, and does communication too.
713
+ * Check comments in sim_util.c
714
+ */
715
+ Awh* awh = nullptr;
716
+ gmx_edsam* ed = nullptr;
717
+ /* PLUMED */
718
+ plumedNeedsEnergy=0;
719
+ if(plumedswitch){
720
+ int pversion=0;
721
+ plumed_cmd(plumedmain,"getApiVersion",&pversion);
722
+ long int lstep=step; plumed_cmd(plumedmain,"setStepLong",&lstep);
723
+ plumed_cmd(plumedmain,"setPositions",&state->x[0][0]);
724
+ plumed_cmd(plumedmain,"setMasses",&mdatoms->massT[0]);
725
+ plumed_cmd(plumedmain,"setCharges",&mdatoms->chargeA[0]);
726
+ plumed_cmd(plumedmain,"setBox",&state->box[0][0]);
727
+ plumed_cmd(plumedmain,"prepareCalc",nullptr);
728
+ plumed_cmd(plumedmain,"setStopFlag",&plumedWantsToStop);
729
+ plumed_cmd(plumedmain,"setForces",&f.view().force()[0][0]);
730
+ plumed_cmd(plumedmain,"isEnergyNeeded",&plumedNeedsEnergy);
731
+ if(plumedNeedsEnergy) force_flags |= GMX_FORCE_ENERGY | GMX_FORCE_VIRIAL;
732
+ clear_mat(plumed_vir);
733
+ plumed_cmd(plumedmain,"setVirial",&plumed_vir[0][0]);
734
+ }
735
+ /* END PLUMED */
736
+ try
737
+ {
738
+ do_force(fplog,
739
+ cr,
740
+ ms,
741
+ *ir,
742
+ awh,
743
+ enforcedRotation,
744
+ imdSession,
745
+ pull_work,
746
+ step,
747
+ nrnb,
748
+ wcycle,
749
+ top,
750
+ state->box,
751
+ state->x.arrayRefWithPadding(),
752
+ &state->hist,
753
+ &f.view(),
754
+ force_vir,
755
+ mdatoms,
756
+ enerd,
757
+ state->lambda,
758
+ fr,
759
+ runScheduleWork,
760
+ vsite,
761
+ mu_tot,
762
+ t,
763
+ ed,
764
+ fr->longRangeNonbondeds.get(),
765
+ GMX_FORCE_NS | force_flags,
766
+ ddBalanceRegionHandler);
767
+ }
768
+ catch (const gmx::InternalError&)
769
+ {
770
+ GMX_LOG(mdlog.warning)
771
+ .asParagraph()
772
+ .appendText(
773
+ "Continuing with next frame after catching invalid force in "
774
+ "previous frame");
775
+ };
776
+ /* PLUMED */
777
+ if(plumedswitch){
778
+ if(plumedNeedsEnergy){
779
+ msmul(force_vir,2.0,plumed_vir);
780
+ plumed_cmd(plumedmain,"setEnergy",&enerd->term[F_EPOT]);
781
+ plumed_cmd(plumedmain,"performCalc",nullptr);
782
+ msmul(plumed_vir,0.5,force_vir);
783
+ } else {
784
+ msmul(plumed_vir,0.5,plumed_vir);
785
+ m_add(force_vir,plumed_vir,force_vir);
786
+ }
787
+ if(plumedWantsToStop) isLastStep = true;
788
+ }
789
+ /* END PLUMED */
790
+ }
791
+
792
+ /* Now we have the energies and forces corresponding to the
793
+ * coordinates at time t.
794
+ */
795
+ {
796
+ const bool isCheckpointingStep = false;
797
+ const bool doRerun = true;
798
+ do_md_trajectory_writing(fplog,
799
+ cr,
800
+ nfile,
801
+ fnm,
802
+ step,
803
+ step_rel,
804
+ t,
805
+ ir,
806
+ state,
807
+ state_global,
808
+ observablesHistory,
809
+ top_global,
810
+ fr,
811
+ outf,
812
+ energyOutput,
813
+ ekind,
814
+ f.view().force(),
815
+ isCheckpointingStep,
816
+ doRerun,
817
+ isLastStep,
818
+ mdrunOptions.writeConfout,
819
+ EkindataState::NotUsed);
820
+ }
821
+
822
+ stopHandler->setSignal();
823
+
824
+ {
825
+ const bool doInterSimSignal = false;
826
+ const bool doIntraSimSignal = true;
827
+ bool bSumEkinhOld = false;
828
+ t_vcm* vcm = nullptr;
829
+ SimulationSignaller signaller(&signals, cr, ms, doInterSimSignal, doIntraSimSignal);
830
+
831
+ int cglo_flags = CGLO_GSTAT | CGLO_ENERGY;
832
+ compute_globals(gstat,
833
+ cr,
834
+ ir,
835
+ fr,
836
+ ekind,
837
+ makeConstArrayRef(state->x),
838
+ makeConstArrayRef(state->v),
839
+ state->box,
840
+ mdatoms,
841
+ nrnb,
842
+ vcm,
843
+ wcycle,
844
+ enerd,
845
+ force_vir,
846
+ shake_vir,
847
+ total_vir,
848
+ pres,
849
+ &signaller,
850
+ state->box,
851
+ &bSumEkinhOld,
852
+ cglo_flags,
853
+ step,
854
+ &observablesReducer);
855
+ // Clean up after pre-step use of compute_globals()
856
+ observablesReducer.markAsReadyToReduce();
857
+ }
858
+
859
+ /* Note: this is OK, but there are some numerical precision issues with using the convergence of
860
+ the virial that should probably be addressed eventually. state->veta has better properies,
861
+ but what we actually need entering the new cycle is the new shake_vir value. Ideally, we could
862
+ generate the new shake_vir, but test the veta value for convergence. This will take some thought. */
863
+
864
+ /* Output stuff */
865
+ if (MASTER(cr))
866
+ {
867
+ const bool bCalcEnerStep = true;
868
+ energyOutput.addDataAtEnergyStep(doFreeEnergyPerturbation,
869
+ bCalcEnerStep,
870
+ t,
871
+ mdatoms->tmass,
872
+ enerd,
873
+ ir->fepvals.get(),
874
+ state->box,
875
+ PTCouplingArrays({ state->boxv,
876
+ state->nosehoover_xi,
877
+ state->nosehoover_vxi,
878
+ state->nhpres_xi,
879
+ state->nhpres_vxi }),
880
+ state->fep_state,
881
+ total_vir,
882
+ pres,
883
+ ekind,
884
+ mu_tot,
885
+ constr);
886
+
887
+ const bool do_ene = true;
888
+ const bool do_log = true;
889
+ Awh* awh = nullptr;
890
+ const bool do_dr = ir->nstdisreout != 0;
891
+ const bool do_or = ir->nstorireout != 0;
892
+
893
+ EnergyOutput::printAnnealingTemperatures(do_log ? fplog : nullptr, groups, &(ir->opts));
894
+ energyOutput.printStepToEnergyFile(mdoutf_get_fp_ene(outf),
895
+ do_ene,
896
+ do_dr,
897
+ do_or,
898
+ do_log ? fplog : nullptr,
899
+ step,
900
+ t,
901
+ fr->fcdata.get(),
902
+ awh);
903
+
904
+ if (ir->bPull)
905
+ {
906
+ pull_print_output(pull_work, step, t);
907
+ }
908
+
909
+ if (do_per_step(step, ir->nstlog))
910
+ {
911
+ if (fflush(fplog) != 0)
912
+ {
913
+ gmx_fatal(FARGS, "Cannot flush logfile - maybe you are out of disk space?");
914
+ }
915
+ }
916
+ }
917
+
918
+ /* Print the remaining wall clock time for the run */
919
+ if (isMasterSimMasterRank(ms, MASTER(cr)) && (mdrunOptions.verbose || gmx_got_usr_signal()))
920
+ {
921
+ if (shellfc)
922
+ {
923
+ fprintf(stderr, "\n");
924
+ }
925
+ print_time(stderr, walltime_accounting, step, ir, cr);
926
+ }
927
+
928
+ /* Ion/water position swapping.
929
+ * Not done in last step since trajectory writing happens before this call
930
+ * in the MD loop and exchanges would be lost anyway. */
931
+ if ((ir->eSwapCoords != SwapType::No) && (step > 0) && !isLastStep
932
+ && do_per_step(step, ir->swap->nstswap))
933
+ {
934
+ const bool doRerun = true;
935
+ do_swapcoords(cr,
936
+ step,
937
+ t,
938
+ ir,
939
+ swap,
940
+ wcycle,
941
+ rerun_fr.x,
942
+ rerun_fr.box,
943
+ MASTER(cr) && mdrunOptions.verbose,
944
+ doRerun);
945
+ }
946
+
947
+ if (MASTER(cr))
948
+ {
949
+ /* read next frame from input trajectory */
950
+ isLastStep = !read_next_frame(oenv, status, &rerun_fr);
951
+ }
952
+
953
+ if (PAR(cr))
954
+ {
955
+ rerun_parallel_comm(cr, &rerun_fr, &isLastStep);
956
+ }
957
+
958
+ cycles = wallcycle_stop(wcycle, WallCycleCounter::Step);
959
+ if (haveDDAtomOrdering(*cr) && wcycle)
960
+ {
961
+ dd_cycles_add(cr->dd, cycles, ddCyclStep);
962
+ }
963
+
964
+ if (!rerun_fr.bStep)
965
+ {
966
+ /* increase the MD step number */
967
+ step++;
968
+ step_rel++;
969
+ }
970
+ observablesReducer.markAsReadyToReduce();
971
+ }
972
+ /* End of main MD loop */
973
+
974
+ /* Closing TNG files can include compressing data. Therefore it is good to do that
975
+ * before stopping the time measurements. */
976
+ mdoutf_tng_close(outf);
977
+
978
+ /* Stop measuring walltime */
979
+ walltime_accounting_end_time(walltime_accounting);
980
+
981
+ if (MASTER(cr))
982
+ {
983
+ close_trx(status);
984
+ }
985
+
986
+ if (!thisRankHasDuty(cr, DUTY_PME))
987
+ {
988
+ /* Tell the PME only node to finish */
989
+ gmx_pme_send_finish(cr);
990
+ }
991
+
992
+ done_mdoutf(outf);
993
+
994
+ done_shellfc(fplog, shellfc, step_rel);
995
+
996
+ walltime_accounting_set_nsteps_done(walltime_accounting, step_rel);
997
+ }