hillclimber 0.1.6__cp313-cp313-macosx_15_0_x86_64.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 (468) 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 +468 -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. plumed/__init__.py +104 -0
  20. plumed/_lib/bin/plumed +0 -0
  21. plumed/_lib/bin/plumed-config +9 -0
  22. plumed/_lib/bin/plumed-patch +9 -0
  23. plumed/_lib/include/plumed/adjmat/AdjacencyMatrixBase.h +659 -0
  24. plumed/_lib/include/plumed/adjmat/ContactMatrix.h +59 -0
  25. plumed/_lib/include/plumed/asmjit/arch.h +228 -0
  26. plumed/_lib/include/plumed/asmjit/arm.h +43 -0
  27. plumed/_lib/include/plumed/asmjit/asmjit.h +69 -0
  28. plumed/_lib/include/plumed/asmjit/asmjit_apibegin.h +143 -0
  29. plumed/_lib/include/plumed/asmjit/asmjit_apiend.h +93 -0
  30. plumed/_lib/include/plumed/asmjit/asmjit_build.h +971 -0
  31. plumed/_lib/include/plumed/asmjit/assembler.h +183 -0
  32. plumed/_lib/include/plumed/asmjit/base.h +56 -0
  33. plumed/_lib/include/plumed/asmjit/codebuilder.h +944 -0
  34. plumed/_lib/include/plumed/asmjit/codecompiler.h +767 -0
  35. plumed/_lib/include/plumed/asmjit/codeemitter.h +528 -0
  36. plumed/_lib/include/plumed/asmjit/codeholder.h +777 -0
  37. plumed/_lib/include/plumed/asmjit/constpool.h +286 -0
  38. plumed/_lib/include/plumed/asmjit/cpuinfo.h +402 -0
  39. plumed/_lib/include/plumed/asmjit/func.h +1327 -0
  40. plumed/_lib/include/plumed/asmjit/globals.h +370 -0
  41. plumed/_lib/include/plumed/asmjit/inst.h +137 -0
  42. plumed/_lib/include/plumed/asmjit/logging.h +317 -0
  43. plumed/_lib/include/plumed/asmjit/misc_p.h +103 -0
  44. plumed/_lib/include/plumed/asmjit/moved_string.h +318 -0
  45. plumed/_lib/include/plumed/asmjit/operand.h +1599 -0
  46. plumed/_lib/include/plumed/asmjit/osutils.h +207 -0
  47. plumed/_lib/include/plumed/asmjit/regalloc_p.h +597 -0
  48. plumed/_lib/include/plumed/asmjit/runtime.h +227 -0
  49. plumed/_lib/include/plumed/asmjit/simdtypes.h +1104 -0
  50. plumed/_lib/include/plumed/asmjit/utils.h +1387 -0
  51. plumed/_lib/include/plumed/asmjit/vmem.h +183 -0
  52. plumed/_lib/include/plumed/asmjit/x86.h +45 -0
  53. plumed/_lib/include/plumed/asmjit/x86assembler.h +125 -0
  54. plumed/_lib/include/plumed/asmjit/x86builder.h +117 -0
  55. plumed/_lib/include/plumed/asmjit/x86compiler.h +322 -0
  56. plumed/_lib/include/plumed/asmjit/x86emitter.h +5149 -0
  57. plumed/_lib/include/plumed/asmjit/x86globals.h +535 -0
  58. plumed/_lib/include/plumed/asmjit/x86inst.h +2547 -0
  59. plumed/_lib/include/plumed/asmjit/x86instimpl_p.h +74 -0
  60. plumed/_lib/include/plumed/asmjit/x86internal_p.h +108 -0
  61. plumed/_lib/include/plumed/asmjit/x86logging_p.h +92 -0
  62. plumed/_lib/include/plumed/asmjit/x86misc.h +417 -0
  63. plumed/_lib/include/plumed/asmjit/x86operand.h +1133 -0
  64. plumed/_lib/include/plumed/asmjit/x86regalloc_p.h +734 -0
  65. plumed/_lib/include/plumed/asmjit/zone.h +1157 -0
  66. plumed/_lib/include/plumed/bias/Bias.h +82 -0
  67. plumed/_lib/include/plumed/bias/ReweightBase.h +58 -0
  68. plumed/_lib/include/plumed/blas/blas.h +253 -0
  69. plumed/_lib/include/plumed/blas/def_external.h +61 -0
  70. plumed/_lib/include/plumed/blas/def_internal.h +97 -0
  71. plumed/_lib/include/plumed/blas/real.h +49 -0
  72. plumed/_lib/include/plumed/cltools/CLTool.h +32 -0
  73. plumed/_lib/include/plumed/clusters/ClusteringBase.h +70 -0
  74. plumed/_lib/include/plumed/colvar/Colvar.h +32 -0
  75. plumed/_lib/include/plumed/colvar/ColvarInput.h +68 -0
  76. plumed/_lib/include/plumed/colvar/ColvarShortcut.h +81 -0
  77. plumed/_lib/include/plumed/colvar/CoordinationBase.h +52 -0
  78. plumed/_lib/include/plumed/colvar/MultiColvarTemplate.h +333 -0
  79. plumed/_lib/include/plumed/colvar/PathMSDBase.h +101 -0
  80. plumed/_lib/include/plumed/colvar/RMSDVector.h +78 -0
  81. plumed/_lib/include/plumed/config/Config.h +118 -0
  82. plumed/_lib/include/plumed/config/version.h +9 -0
  83. plumed/_lib/include/plumed/contour/ContourFindingObject.h +87 -0
  84. plumed/_lib/include/plumed/contour/DistanceFromContourBase.h +82 -0
  85. plumed/_lib/include/plumed/contour/FindContour.h +67 -0
  86. plumed/_lib/include/plumed/core/Action.h +540 -0
  87. plumed/_lib/include/plumed/core/ActionAnyorder.h +48 -0
  88. plumed/_lib/include/plumed/core/ActionAtomistic.h +343 -0
  89. plumed/_lib/include/plumed/core/ActionForInterface.h +99 -0
  90. plumed/_lib/include/plumed/core/ActionPilot.h +57 -0
  91. plumed/_lib/include/plumed/core/ActionRegister.h +124 -0
  92. plumed/_lib/include/plumed/core/ActionSet.h +163 -0
  93. plumed/_lib/include/plumed/core/ActionSetup.h +48 -0
  94. plumed/_lib/include/plumed/core/ActionShortcut.h +73 -0
  95. plumed/_lib/include/plumed/core/ActionToGetData.h +59 -0
  96. plumed/_lib/include/plumed/core/ActionToPutData.h +101 -0
  97. plumed/_lib/include/plumed/core/ActionWithArguments.h +140 -0
  98. plumed/_lib/include/plumed/core/ActionWithMatrix.h +87 -0
  99. plumed/_lib/include/plumed/core/ActionWithValue.h +258 -0
  100. plumed/_lib/include/plumed/core/ActionWithVector.h +94 -0
  101. plumed/_lib/include/plumed/core/ActionWithVirtualAtom.h +123 -0
  102. plumed/_lib/include/plumed/core/CLTool.h +177 -0
  103. plumed/_lib/include/plumed/core/CLToolMain.h +102 -0
  104. plumed/_lib/include/plumed/core/CLToolRegister.h +108 -0
  105. plumed/_lib/include/plumed/core/Colvar.h +115 -0
  106. plumed/_lib/include/plumed/core/DataPassingObject.h +94 -0
  107. plumed/_lib/include/plumed/core/DataPassingTools.h +54 -0
  108. plumed/_lib/include/plumed/core/DomainDecomposition.h +120 -0
  109. plumed/_lib/include/plumed/core/ExchangePatterns.h +47 -0
  110. plumed/_lib/include/plumed/core/FlexibleBin.h +63 -0
  111. plumed/_lib/include/plumed/core/GREX.h +61 -0
  112. plumed/_lib/include/plumed/core/GenericMolInfo.h +89 -0
  113. plumed/_lib/include/plumed/core/Group.h +41 -0
  114. plumed/_lib/include/plumed/core/ModuleMap.h +30 -0
  115. plumed/_lib/include/plumed/core/ParallelTaskManager.h +1023 -0
  116. plumed/_lib/include/plumed/core/PbcAction.h +61 -0
  117. plumed/_lib/include/plumed/core/PlumedMain.h +632 -0
  118. plumed/_lib/include/plumed/core/PlumedMainInitializer.h +118 -0
  119. plumed/_lib/include/plumed/core/RegisterBase.h +340 -0
  120. plumed/_lib/include/plumed/core/TargetDist.h +48 -0
  121. plumed/_lib/include/plumed/core/Value.h +547 -0
  122. plumed/_lib/include/plumed/core/WithCmd.h +93 -0
  123. plumed/_lib/include/plumed/dimred/SMACOF.h +55 -0
  124. plumed/_lib/include/plumed/drr/DRR.h +383 -0
  125. plumed/_lib/include/plumed/drr/colvar_UIestimator.h +777 -0
  126. plumed/_lib/include/plumed/fisst/legendre_rule_fast.h +44 -0
  127. plumed/_lib/include/plumed/function/Custom.h +54 -0
  128. plumed/_lib/include/plumed/function/Function.h +85 -0
  129. plumed/_lib/include/plumed/function/FunctionOfMatrix.h +368 -0
  130. plumed/_lib/include/plumed/function/FunctionOfScalar.h +135 -0
  131. plumed/_lib/include/plumed/function/FunctionOfVector.h +296 -0
  132. plumed/_lib/include/plumed/function/FunctionSetup.h +180 -0
  133. plumed/_lib/include/plumed/function/FunctionShortcut.h +130 -0
  134. plumed/_lib/include/plumed/function/FunctionWithSingleArgument.h +165 -0
  135. plumed/_lib/include/plumed/gridtools/ActionWithGrid.h +43 -0
  136. plumed/_lib/include/plumed/gridtools/EvaluateGridFunction.h +99 -0
  137. plumed/_lib/include/plumed/gridtools/FunctionOfGrid.h +295 -0
  138. plumed/_lib/include/plumed/gridtools/GridCoordinatesObject.h +179 -0
  139. plumed/_lib/include/plumed/gridtools/GridSearch.h +135 -0
  140. plumed/_lib/include/plumed/gridtools/Interpolator.h +45 -0
  141. plumed/_lib/include/plumed/gridtools/KDE.h +455 -0
  142. plumed/_lib/include/plumed/gridtools/RDF.h +40 -0
  143. plumed/_lib/include/plumed/gridtools/SumOfKernels.h +219 -0
  144. plumed/_lib/include/plumed/isdb/MetainferenceBase.h +398 -0
  145. plumed/_lib/include/plumed/lapack/def_external.h +207 -0
  146. plumed/_lib/include/plumed/lapack/def_internal.h +388 -0
  147. plumed/_lib/include/plumed/lapack/lapack.h +899 -0
  148. plumed/_lib/include/plumed/lapack/lapack_limits.h +79 -0
  149. plumed/_lib/include/plumed/lapack/real.h +50 -0
  150. plumed/_lib/include/plumed/lepton/CompiledExpression.h +164 -0
  151. plumed/_lib/include/plumed/lepton/CustomFunction.h +143 -0
  152. plumed/_lib/include/plumed/lepton/Exception.h +93 -0
  153. plumed/_lib/include/plumed/lepton/ExpressionProgram.h +137 -0
  154. plumed/_lib/include/plumed/lepton/ExpressionTreeNode.h +145 -0
  155. plumed/_lib/include/plumed/lepton/Lepton.h +85 -0
  156. plumed/_lib/include/plumed/lepton/MSVC_erfc.h +123 -0
  157. plumed/_lib/include/plumed/lepton/Operation.h +1302 -0
  158. plumed/_lib/include/plumed/lepton/ParsedExpression.h +165 -0
  159. plumed/_lib/include/plumed/lepton/Parser.h +111 -0
  160. plumed/_lib/include/plumed/lepton/windowsIncludes.h +73 -0
  161. plumed/_lib/include/plumed/mapping/Path.h +44 -0
  162. plumed/_lib/include/plumed/mapping/PathProjectionCalculator.h +57 -0
  163. plumed/_lib/include/plumed/matrixtools/MatrixOperationBase.h +54 -0
  164. plumed/_lib/include/plumed/matrixtools/MatrixTimesMatrix.h +309 -0
  165. plumed/_lib/include/plumed/matrixtools/MatrixTimesVectorBase.h +365 -0
  166. plumed/_lib/include/plumed/matrixtools/OuterProduct.h +238 -0
  167. plumed/_lib/include/plumed/maze/Core.h +65 -0
  168. plumed/_lib/include/plumed/maze/Loss.h +86 -0
  169. plumed/_lib/include/plumed/maze/Member.h +66 -0
  170. plumed/_lib/include/plumed/maze/Memetic.h +799 -0
  171. plumed/_lib/include/plumed/maze/Optimizer.h +357 -0
  172. plumed/_lib/include/plumed/maze/Random_MT.h +156 -0
  173. plumed/_lib/include/plumed/maze/Tools.h +183 -0
  174. plumed/_lib/include/plumed/metatomic/vesin.h +188 -0
  175. plumed/_lib/include/plumed/molfile/Gromacs.h +2013 -0
  176. plumed/_lib/include/plumed/molfile/endianswap.h +217 -0
  177. plumed/_lib/include/plumed/molfile/fastio.h +683 -0
  178. plumed/_lib/include/plumed/molfile/largefiles.h +78 -0
  179. plumed/_lib/include/plumed/molfile/libmolfile_plugin.h +77 -0
  180. plumed/_lib/include/plumed/molfile/molfile_plugin.h +1034 -0
  181. plumed/_lib/include/plumed/molfile/periodic_table.h +248 -0
  182. plumed/_lib/include/plumed/molfile/readpdb.h +447 -0
  183. plumed/_lib/include/plumed/molfile/vmdplugin.h +236 -0
  184. plumed/_lib/include/plumed/multicolvar/MultiColvarShortcuts.h +45 -0
  185. plumed/_lib/include/plumed/opes/ExpansionCVs.h +79 -0
  186. plumed/_lib/include/plumed/sasa/Sasa.h +32 -0
  187. plumed/_lib/include/plumed/secondarystructure/SecondaryStructureBase.h +372 -0
  188. plumed/_lib/include/plumed/setup/ActionSetup.h +25 -0
  189. plumed/_lib/include/plumed/small_vector/small_vector.h +6114 -0
  190. plumed/_lib/include/plumed/symfunc/CoordinationNumbers.h +41 -0
  191. plumed/_lib/include/plumed/tools/Angle.h +52 -0
  192. plumed/_lib/include/plumed/tools/AtomDistribution.h +138 -0
  193. plumed/_lib/include/plumed/tools/AtomNumber.h +152 -0
  194. plumed/_lib/include/plumed/tools/BiasRepresentation.h +106 -0
  195. plumed/_lib/include/plumed/tools/BitmaskEnum.h +167 -0
  196. plumed/_lib/include/plumed/tools/Brent1DRootSearch.h +159 -0
  197. plumed/_lib/include/plumed/tools/CheckInRange.h +44 -0
  198. plumed/_lib/include/plumed/tools/Citations.h +74 -0
  199. plumed/_lib/include/plumed/tools/ColvarOutput.h +118 -0
  200. plumed/_lib/include/plumed/tools/Communicator.h +316 -0
  201. plumed/_lib/include/plumed/tools/ConjugateGradient.h +80 -0
  202. plumed/_lib/include/plumed/tools/DLLoader.h +79 -0
  203. plumed/_lib/include/plumed/tools/ERMSD.h +73 -0
  204. plumed/_lib/include/plumed/tools/Exception.h +406 -0
  205. plumed/_lib/include/plumed/tools/File.h +28 -0
  206. plumed/_lib/include/plumed/tools/FileBase.h +153 -0
  207. plumed/_lib/include/plumed/tools/FileTools.h +37 -0
  208. plumed/_lib/include/plumed/tools/ForwardDecl.h +54 -0
  209. plumed/_lib/include/plumed/tools/Grid.h +638 -0
  210. plumed/_lib/include/plumed/tools/HistogramBead.h +136 -0
  211. plumed/_lib/include/plumed/tools/IFile.h +117 -0
  212. plumed/_lib/include/plumed/tools/KernelFunctions.h +113 -0
  213. plumed/_lib/include/plumed/tools/Keywords.h +380 -0
  214. plumed/_lib/include/plumed/tools/LatticeReduction.h +66 -0
  215. plumed/_lib/include/plumed/tools/LeptonCall.h +64 -0
  216. plumed/_lib/include/plumed/tools/LinkCells.h +126 -0
  217. plumed/_lib/include/plumed/tools/Log.h +41 -0
  218. plumed/_lib/include/plumed/tools/LoopUnroller.h +163 -0
  219. plumed/_lib/include/plumed/tools/Matrix.h +721 -0
  220. plumed/_lib/include/plumed/tools/MatrixSquareBracketsAccess.h +138 -0
  221. plumed/_lib/include/plumed/tools/MergeVectorTools.h +153 -0
  222. plumed/_lib/include/plumed/tools/Minimise1DBrent.h +244 -0
  223. plumed/_lib/include/plumed/tools/MinimiseBase.h +120 -0
  224. plumed/_lib/include/plumed/tools/MolDataClass.h +51 -0
  225. plumed/_lib/include/plumed/tools/NeighborList.h +112 -0
  226. plumed/_lib/include/plumed/tools/OFile.h +286 -0
  227. plumed/_lib/include/plumed/tools/OpenACC.h +180 -0
  228. plumed/_lib/include/plumed/tools/OpenMP.h +75 -0
  229. plumed/_lib/include/plumed/tools/PDB.h +154 -0
  230. plumed/_lib/include/plumed/tools/Pbc.h +139 -0
  231. plumed/_lib/include/plumed/tools/PlumedHandle.h +105 -0
  232. plumed/_lib/include/plumed/tools/RMSD.h +493 -0
  233. plumed/_lib/include/plumed/tools/Random.h +80 -0
  234. plumed/_lib/include/plumed/tools/RootFindingBase.h +79 -0
  235. plumed/_lib/include/plumed/tools/Stopwatch.h +475 -0
  236. plumed/_lib/include/plumed/tools/Subprocess.h +142 -0
  237. plumed/_lib/include/plumed/tools/SwitchingFunction.h +208 -0
  238. plumed/_lib/include/plumed/tools/Tensor.h +724 -0
  239. plumed/_lib/include/plumed/tools/TokenizedLine.h +123 -0
  240. plumed/_lib/include/plumed/tools/Tools.h +638 -0
  241. plumed/_lib/include/plumed/tools/Torsion.h +55 -0
  242. plumed/_lib/include/plumed/tools/TrajectoryParser.h +118 -0
  243. plumed/_lib/include/plumed/tools/Tree.h +61 -0
  244. plumed/_lib/include/plumed/tools/TypesafePtr.h +463 -0
  245. plumed/_lib/include/plumed/tools/Units.h +167 -0
  246. plumed/_lib/include/plumed/tools/Vector.h +433 -0
  247. plumed/_lib/include/plumed/tools/View.h +296 -0
  248. plumed/_lib/include/plumed/tools/View2D.h +100 -0
  249. plumed/_lib/include/plumed/tools/h36.h +39 -0
  250. plumed/_lib/include/plumed/vatom/ActionWithVirtualAtom.h +32 -0
  251. plumed/_lib/include/plumed/ves/BasisFunctions.h +380 -0
  252. plumed/_lib/include/plumed/ves/CoeffsBase.h +310 -0
  253. plumed/_lib/include/plumed/ves/CoeffsMatrix.h +220 -0
  254. plumed/_lib/include/plumed/ves/CoeffsVector.h +251 -0
  255. plumed/_lib/include/plumed/ves/FermiSwitchingFunction.h +74 -0
  256. plumed/_lib/include/plumed/ves/GridIntegrationWeights.h +50 -0
  257. plumed/_lib/include/plumed/ves/GridLinearInterpolation.h +81 -0
  258. plumed/_lib/include/plumed/ves/GridProjWeights.h +61 -0
  259. plumed/_lib/include/plumed/ves/LinearBasisSetExpansion.h +303 -0
  260. plumed/_lib/include/plumed/ves/Optimizer.h +444 -0
  261. plumed/_lib/include/plumed/ves/TargetDistModifer.h +53 -0
  262. plumed/_lib/include/plumed/ves/TargetDistribution.h +266 -0
  263. plumed/_lib/include/plumed/ves/VesBias.h +545 -0
  264. plumed/_lib/include/plumed/ves/VesTools.h +142 -0
  265. plumed/_lib/include/plumed/ves/WaveletGrid.h +75 -0
  266. plumed/_lib/include/plumed/volumes/ActionVolume.h +268 -0
  267. plumed/_lib/include/plumed/volumes/VolumeShortcut.h +147 -0
  268. plumed/_lib/include/plumed/wrapper/Plumed.h +5025 -0
  269. plumed/_lib/include/plumed/xdrfile/xdrfile.h +663 -0
  270. plumed/_lib/include/plumed/xdrfile/xdrfile_trr.h +89 -0
  271. plumed/_lib/include/plumed/xdrfile/xdrfile_xtc.h +90 -0
  272. plumed/_lib/lib/PythonCVInterface.dylib +0 -0
  273. plumed/_lib/lib/libplumed.dylib +0 -0
  274. plumed/_lib/lib/libplumedKernel.dylib +0 -0
  275. plumed/_lib/lib/libplumedWrapper.a +0 -0
  276. plumed/_lib/lib/pkgconfig/plumed.pc +13 -0
  277. plumed/_lib/lib/pkgconfig/plumedInternals.pc +13 -0
  278. plumed/_lib/lib/pkgconfig/plumedWrapper.pc +13 -0
  279. plumed/_lib/lib/plumed/fortran/plumed.f90 +879 -0
  280. plumed/_lib/lib/plumed/fortran/plumed_f08.f90 +2625 -0
  281. plumed/_lib/lib/plumed/modulefile +69 -0
  282. plumed/_lib/lib/plumed/patches/gromacs-2022.5.config +43 -0
  283. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt +543 -0
  284. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt.preplumed +540 -0
  285. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp +1628 -0
  286. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1590 -0
  287. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h +103 -0
  288. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h.preplumed +99 -0
  289. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp +2527 -0
  290. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2513 -0
  291. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
  292. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
  293. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +408 -0
  294. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +394 -0
  295. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp +2348 -0
  296. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2091 -0
  297. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp +3573 -0
  298. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3495 -0
  299. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1506 -0
  300. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1402 -0
  301. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
  302. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
  303. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp +997 -0
  304. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +906 -0
  305. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp +2780 -0
  306. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2738 -0
  307. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
  308. plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
  309. plumed/_lib/lib/plumed/patches/gromacs-2023.5.config +43 -0
  310. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt +549 -0
  311. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt.preplumed +546 -0
  312. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
  313. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
  314. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h +104 -0
  315. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
  316. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp +2624 -0
  317. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2610 -0
  318. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
  319. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
  320. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +409 -0
  321. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +395 -0
  322. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp +2419 -0
  323. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2164 -0
  324. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp +3546 -0
  325. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3468 -0
  326. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
  327. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
  328. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
  329. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
  330. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp +991 -0
  331. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +900 -0
  332. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp +2895 -0
  333. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2849 -0
  334. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
  335. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
  336. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp +886 -0
  337. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +880 -0
  338. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +347 -0
  339. plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +345 -0
  340. plumed/_lib/lib/plumed/patches/gromacs-2024.3.config +43 -0
  341. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt +575 -0
  342. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt.preplumed +572 -0
  343. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
  344. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
  345. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h +104 -0
  346. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
  347. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp +2564 -0
  348. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2550 -0
  349. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
  350. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
  351. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h +410 -0
  352. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +396 -0
  353. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp +2435 -0
  354. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp.preplumed +2187 -0
  355. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp +3592 -0
  356. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3514 -0
  357. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
  358. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
  359. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
  360. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
  361. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp +958 -0
  362. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp.preplumed +929 -0
  363. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp +2987 -0
  364. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp.preplumed +2941 -0
  365. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
  366. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
  367. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp +904 -0
  368. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +898 -0
  369. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +353 -0
  370. plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +351 -0
  371. plumed/_lib/lib/plumed/patches/gromacs-2025.0.config +39 -0
  372. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake +82 -0
  373. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake.preplumed +82 -0
  374. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp +162 -0
  375. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp.preplumed +154 -0
  376. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp +107 -0
  377. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp.preplumed +99 -0
  378. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h +120 -0
  379. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h.preplumed +111 -0
  380. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp +215 -0
  381. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp.preplumed +197 -0
  382. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h +87 -0
  383. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h.preplumed +86 -0
  384. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp +2971 -0
  385. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp.preplumed +2970 -0
  386. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h +430 -0
  387. plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h.preplumed +429 -0
  388. plumed/_lib/lib/plumed/patches/namd-2.12.config +30 -0
  389. plumed/_lib/lib/plumed/patches/namd-2.12.diff +267 -0
  390. plumed/_lib/lib/plumed/patches/namd-2.13.config +30 -0
  391. plumed/_lib/lib/plumed/patches/namd-2.13.diff +267 -0
  392. plumed/_lib/lib/plumed/patches/namd-2.14.config +30 -0
  393. plumed/_lib/lib/plumed/patches/namd-2.14.diff +268 -0
  394. plumed/_lib/lib/plumed/patches/patch.sh +500 -0
  395. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.config +25 -0
  396. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90 +368 -0
  397. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90.preplumed +366 -0
  398. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90 +71 -0
  399. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90.preplumed +24 -0
  400. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90 +62 -0
  401. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  402. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90 +189 -0
  403. plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90.preplumed +185 -0
  404. plumed/_lib/lib/plumed/patches/qespresso-6.2.config +26 -0
  405. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90 +422 -0
  406. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90.preplumed +420 -0
  407. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90 +70 -0
  408. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
  409. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90 +62 -0
  410. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  411. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90 +233 -0
  412. plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90.preplumed +230 -0
  413. plumed/_lib/lib/plumed/patches/qespresso-7.0.config +28 -0
  414. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile +175 -0
  415. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile.preplumed +171 -0
  416. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90 +486 -0
  417. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90.preplumed +484 -0
  418. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90 +74 -0
  419. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
  420. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90 +64 -0
  421. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  422. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90 +532 -0
  423. plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90.preplumed +518 -0
  424. plumed/_lib/lib/plumed/patches/qespresso-7.2.config +28 -0
  425. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile +249 -0
  426. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile.preplumed +244 -0
  427. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90 +532 -0
  428. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90.preplumed +535 -0
  429. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90 +74 -0
  430. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
  431. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90 +64 -0
  432. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
  433. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90 +569 -0
  434. plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90.preplumed +560 -0
  435. plumed/_lib/lib/plumed/plumed-config +9 -0
  436. plumed/_lib/lib/plumed/plumed-mklib +9 -0
  437. plumed/_lib/lib/plumed/plumed-newcv +9 -0
  438. plumed/_lib/lib/plumed/plumed-partial_tempering +9 -0
  439. plumed/_lib/lib/plumed/plumed-patch +9 -0
  440. plumed/_lib/lib/plumed/plumed-runtime +0 -0
  441. plumed/_lib/lib/plumed/plumed-selector +9 -0
  442. plumed/_lib/lib/plumed/plumed-vim2html +9 -0
  443. plumed/_lib/lib/plumed/scripts/config.sh +126 -0
  444. plumed/_lib/lib/plumed/scripts/mklib.sh +175 -0
  445. plumed/_lib/lib/plumed/scripts/newcv.sh +26 -0
  446. plumed/_lib/lib/plumed/scripts/partial_tempering.sh +319 -0
  447. plumed/_lib/lib/plumed/scripts/patch.sh +4 -0
  448. plumed/_lib/lib/plumed/scripts/selector.sh +234 -0
  449. plumed/_lib/lib/plumed/scripts/vim2html.sh +190 -0
  450. plumed/_lib/lib/plumed/src/colvar/Template.cpp +116 -0
  451. plumed/_lib/lib/plumed/src/config/compile_options.sh +3 -0
  452. plumed/_lib/lib/plumed/src/config/config.txt +181 -0
  453. plumed/_lib/lib/plumed/src/lib/Plumed.cmake +6 -0
  454. plumed/_lib/lib/plumed/src/lib/Plumed.cmake.runtime +5 -0
  455. plumed/_lib/lib/plumed/src/lib/Plumed.cmake.shared +5 -0
  456. plumed/_lib/lib/plumed/src/lib/Plumed.cmake.static +3 -0
  457. plumed/_lib/lib/plumed/src/lib/Plumed.inc +6 -0
  458. plumed/_lib/lib/plumed/src/lib/Plumed.inc.runtime +5 -0
  459. plumed/_lib/lib/plumed/src/lib/Plumed.inc.shared +5 -0
  460. plumed/_lib/lib/plumed/src/lib/Plumed.inc.static +3 -0
  461. plumed/_lib/lib/plumed/vim/scripts.vim +6 -0
  462. plumed/_plumed_core.cpython-311-darwin.so +0 -0
  463. plumed/_plumed_core.cpython-312-darwin.so +0 -0
  464. plumed/_plumed_core.cpython-313-darwin.so +0 -0
  465. plumedCommunications.cpython-311-darwin.so +0 -0
  466. plumedCommunications.cpython-312-darwin.so +0 -0
  467. plumedCommunications.cpython-313-darwin.so +0 -0
  468. plumedCommunications.pyi +431 -0
@@ -0,0 +1,248 @@
1
+ /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2
+ University of Illinois Open Source License
3
+ Copyright 2003 Theoretical and Computational Biophysics Group,
4
+ All rights reserved.
5
+
6
+ Developed by: Theoretical and Computational Biophysics Group
7
+ University of Illinois at Urbana-Champaign
8
+ http://www.ks.uiuc.edu/
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
11
+ this software and associated documentation files (the Software), to deal with
12
+ the Software without restriction, including without limitation the rights to
13
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
14
+ of the Software, and to permit persons to whom the Software is furnished to
15
+ do so, subject to the following conditions:
16
+
17
+ Redistributions of source code must retain the above copyright notice,
18
+ this list of conditions and the following disclaimers.
19
+
20
+ Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimers in the documentation
22
+ and/or other materials provided with the distribution.
23
+
24
+ Neither the names of Theoretical and Computational Biophysics Group,
25
+ University of Illinois at Urbana-Champaign, nor the names of its contributors
26
+ may be used to endorse or promote products derived from this Software without
27
+ specific prior written permission.
28
+
29
+ THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32
+ THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
33
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
34
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
35
+ OTHER DEALINGS WITH THE SOFTWARE.
36
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
37
+ #ifndef __PLUMED_molfile_periodic_table_h
38
+ #define __PLUMED_molfile_periodic_table_h
39
+ /***************************************************************************
40
+ * RCS INFORMATION:
41
+ *
42
+ * $RCSfile: periodic_table.h,v $
43
+ * $Author: johns $ $Locker: $ $State: Exp $
44
+ * $Revision: 1.12 $ $Date: 2009/01/21 17:45:41 $
45
+ *
46
+ ***************************************************************************/
47
+
48
+ /*
49
+ * periodic table of elements and helper functions to convert
50
+ * ordinal numbers to labels and back.
51
+ * all tables and functions are declared static, so that it
52
+ * can be safely included by all plugins that may need it.
53
+ *
54
+ * 2002-2009 akohlmey@cmm.chem.upenn.edu, vmd@ks.uiuc.edu
55
+ */
56
+
57
+ #include <string.h>
58
+ #include <ctype.h>
59
+
60
+ namespace PLMD{
61
+ namespace molfile{
62
+ /* periodic table of elements for translation of ordinal to atom type */
63
+ static const char *pte_label[] = {
64
+ "X", "H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne",
65
+ "Na", "Mg", "Al", "Si", "P" , "S", "Cl", "Ar", "K", "Ca", "Sc",
66
+ "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge",
67
+ "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc",
68
+ "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe",
69
+ "Cs", "Ba", "La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu", "Gd", "Tb",
70
+ "Dy", "Ho", "Er", "Tm", "Yb", "Lu", "Hf", "Ta", "W", "Re", "Os",
71
+ "Ir", "Pt", "Au", "Hg", "Tl", "Pb", "Bi", "Po", "At", "Rn", "Fr",
72
+ "Ra", "Ac", "Th", "Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf",
73
+ "Es", "Fm", "Md", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt",
74
+ "Ds", "Rg"
75
+ };
76
+ static const int nr_pte_entries = sizeof(pte_label) / sizeof(char *);
77
+
78
+ /* corresponding table of masses. */
79
+ static const float pte_mass[] = {
80
+ /* X */ 0.00000, 1.00794, 4.00260, 6.941, 9.012182, 10.811,
81
+ /* C */ 12.0107, 14.0067, 15.9994, 18.9984032, 20.1797,
82
+ /* Na */ 22.989770, 24.3050, 26.981538, 28.0855, 30.973761,
83
+ /* S */ 32.065, 35.453, 39.948, 39.0983, 40.078, 44.955910,
84
+ /* Ti */ 47.867, 50.9415, 51.9961, 54.938049, 55.845, 58.9332,
85
+ /* Ni */ 58.6934, 63.546, 65.409, 69.723, 72.64, 74.92160,
86
+ /* Se */ 78.96, 79.904, 83.798, 85.4678, 87.62, 88.90585,
87
+ /* Zr */ 91.224, 92.90638, 95.94, 98.0, 101.07, 102.90550,
88
+ /* Pd */ 106.42, 107.8682, 112.411, 114.818, 118.710, 121.760,
89
+ /* Te */ 127.60, 126.90447, 131.293, 132.90545, 137.327,
90
+ /* La */ 138.9055, 140.116, 140.90765, 144.24, 145.0, 150.36,
91
+ /* Eu */ 151.964, 157.25, 158.92534, 162.500, 164.93032,
92
+ /* Er */ 167.259, 168.93421, 173.04, 174.967, 178.49, 180.9479,
93
+ /* W */ 183.84, 186.207, 190.23, 192.217, 195.078, 196.96655,
94
+ /* Hg */ 200.59, 204.3833, 207.2, 208.98038, 209.0, 210.0, 222.0,
95
+ /* Fr */ 223.0, 226.0, 227.0, 232.0381, 231.03588, 238.02891,
96
+ /* Np */ 237.0, 244.0, 243.0, 247.0, 247.0, 251.0, 252.0, 257.0,
97
+ /* Md */ 258.0, 259.0, 262.0, 261.0, 262.0, 266.0, 264.0, 269.0,
98
+ /* Mt */ 268.0, 271.0, 272.0
99
+ };
100
+
101
+ /*
102
+ * corresponding table of VDW radii.
103
+ * van der Waals radii are taken from A. Bondi,
104
+ * J. Phys. Chem., 68, 441 - 452, 1964,
105
+ * except the value for H, which is taken from R.S. Rowland & R. Taylor,
106
+ * J.Phys.Chem., 100, 7384 - 7391, 1996. Radii that are not available in
107
+ * either of these publications have RvdW = 2.00 �.
108
+ * The radii for Ions (Na, K, Cl, Ca, Mg, and Cs are based on the CHARMM27
109
+ * Rmin/2 parameters for (SOD, POT, CLA, CAL, MG, CES) by default.
110
+ */
111
+ static const float pte_vdw_radius[] = {
112
+ /* X */ 1.5, 1.2, 1.4, 1.82, 2.0, 2.0,
113
+ /* C */ 1.7, 1.55, 1.52, 1.47, 1.54,
114
+ /* Na */ 1.36, 1.18, 2.0, 2.1, 1.8,
115
+ /* S */ 1.8, 2.27, 1.88, 1.76, 1.37, 2.0,
116
+ /* Ti */ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0,
117
+ /* Ni */ 1.63, 1.4, 1.39, 1.07, 2.0, 1.85,
118
+ /* Se */ 1.9, 1.85, 2.02, 2.0, 2.0, 2.0,
119
+ /* Zr */ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0,
120
+ /* Pd */ 1.63, 1.72, 1.58, 1.93, 2.17, 2.0,
121
+ /* Te */ 2.06, 1.98, 2.16, 2.1, 2.0,
122
+ /* La */ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0,
123
+ /* Eu */ 2.0, 2.0, 2.0, 2.0, 2.0,
124
+ /* Er */ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0,
125
+ /* W */ 2.0, 2.0, 2.0, 2.0, 1.72, 1.66,
126
+ /* Hg */ 1.55, 1.96, 2.02, 2.0, 2.0, 2.0, 2.0,
127
+ /* Fr */ 2.0, 2.0, 2.0, 2.0, 2.0, 1.86,
128
+ /* Np */ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0,
129
+ /* Md */ 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0,
130
+ /* Mt */ 2.0, 2.0, 2.0
131
+ };
132
+
133
+ /* lookup functions */
134
+
135
+ static const char *get_pte_label(const int idx)
136
+ {
137
+ if ((idx < 1) || (idx >= nr_pte_entries)) return pte_label[0];
138
+
139
+ return pte_label[idx];
140
+ }
141
+
142
+ static float get_pte_mass(const int idx)
143
+ {
144
+ if ((idx < 1) || (idx >= nr_pte_entries)) return pte_mass[0];
145
+
146
+ return pte_mass[idx];
147
+ }
148
+
149
+ static float get_pte_vdw_radius(const int idx)
150
+ {
151
+ if ((idx < 1) || (idx >= nr_pte_entries)) return pte_vdw_radius[0];
152
+
153
+ #if 1
154
+ /* Replace with Hydrogen radius with an "all-atom" radius */
155
+ if (idx == 1)
156
+ return 1.0; /* H */
157
+ #else
158
+ /* Replace with old VMD atom radii values */
159
+ switch (idx) {
160
+ case 1: return 1.0; /* H */
161
+ case 6: return 1.5; /* C */
162
+ case 7: return 1.4; /* N */
163
+ case 8: return 1.3; /* O */
164
+ case 9: return 1.2; /* F */
165
+ case 15: return 1.5; /* P */
166
+ case 16: return 1.9; /* S */
167
+ }
168
+ #endif
169
+
170
+ return pte_vdw_radius[idx];
171
+ }
172
+
173
+ static int get_pte_idx(const char *label)
174
+ {
175
+ int i;
176
+ char atom[3];
177
+
178
+ /* zap string */
179
+ atom[0] = (char) 0;
180
+ atom[1] = (char) 0;
181
+ atom[2] = (char) 0;
182
+ /* if we don't have a null-pointer, there must be at least two
183
+ * chars, which is all we need. we convert to the capitalization
184
+ * convention of the table above during assignment. */
185
+ if (label != NULL) {
186
+ atom[0] = (char) toupper((int) label[0]);
187
+ atom[1] = (char) tolower((int) label[1]);
188
+ }
189
+ /* discard numbers in atom label */
190
+ if (isdigit(atom[1])) atom[1] = (char) 0;
191
+
192
+ for (i=0; i < nr_pte_entries; ++i) {
193
+ if ( (pte_label[i][0] == atom[0])
194
+ && (pte_label[i][1] == atom[1]) ) return i;
195
+ }
196
+
197
+ return 0;
198
+ }
199
+
200
+ static int get_pte_idx_from_string(const char *label) {
201
+ int i, ind;
202
+ char atom[3];
203
+
204
+ if (label != NULL) {
205
+ /* zap string */
206
+ atom[0] = atom[1] = atom[2] = '\0';
207
+
208
+ for (ind=0,i=0; (ind<2) && (label[i]!='\0'); i++) {
209
+ if (label[i] != ' ') {
210
+ atom[ind] = toupper(label[i]);
211
+ ind++;
212
+ }
213
+ }
214
+
215
+ if (ind < 1)
216
+ return 0; /* no non-whitespace characters */
217
+
218
+ for (i=0; i < nr_pte_entries; ++i) {
219
+ if ((toupper(pte_label[i][0]) == atom[0]) && (toupper(pte_label[i][1]) == atom[1]))
220
+ return i;
221
+ }
222
+ }
223
+
224
+ return 0;
225
+ }
226
+
227
+ #if 0
228
+ #include <stdio.h>
229
+
230
+ int main() {
231
+ int i;
232
+
233
+ printf("Periodic table check/dump\n");
234
+ printf(" Table contains data for %d elements\n", nr_pte_entries);
235
+ printf(" Mass table size check: %d\n", sizeof(pte_mass) / sizeof(float));
236
+ printf(" VDW table size check: %d\n", sizeof(pte_vdw_radius) / sizeof(float));
237
+ printf("\n");
238
+ printf("Symbol Num Mass rVDW\n");
239
+ for (i=0; i<nr_pte_entries; i++) {
240
+ printf(" %-2s %3d %6.2f %4.2f\n",
241
+ get_pte_label(i), i, get_pte_mass(i), get_pte_vdw_radius(i));
242
+ }
243
+ return 0;
244
+ }
245
+ #endif
246
+ }
247
+ }
248
+ #endif
@@ -0,0 +1,447 @@
1
+ /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2
+ University of Illinois Open Source License
3
+ Copyright 2003 Theoretical and Computational Biophysics Group,
4
+ All rights reserved.
5
+
6
+ Developed by: Theoretical and Computational Biophysics Group
7
+ University of Illinois at Urbana-Champaign
8
+ http://www.ks.uiuc.edu/
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
11
+ this software and associated documentation files (the Software), to deal with
12
+ the Software without restriction, including without limitation the rights to
13
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
14
+ of the Software, and to permit persons to whom the Software is furnished to
15
+ do so, subject to the following conditions:
16
+
17
+ Redistributions of source code must retain the above copyright notice,
18
+ this list of conditions and the following disclaimers.
19
+
20
+ Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimers in the documentation
22
+ and/or other materials provided with the distribution.
23
+
24
+ Neither the names of Theoretical and Computational Biophysics Group,
25
+ University of Illinois at Urbana-Champaign, nor the names of its contributors
26
+ may be used to endorse or promote products derived from this Software without
27
+ specific prior written permission.
28
+
29
+ THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
32
+ THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
33
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
34
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
35
+ OTHER DEALINGS WITH THE SOFTWARE.
36
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
37
+ #ifndef __PLUMED_molfile_readpdb_h
38
+ #define __PLUMED_molfile_readpdb_h
39
+ /***************************************************************************
40
+ *cr
41
+ *cr (C) Copyright 1995-2016 The Board of Trustees of the
42
+ *cr University of Illinois
43
+ *cr All Rights Reserved
44
+ *cr
45
+ ***************************************************************************/
46
+
47
+ /***************************************************************************
48
+ * RCS INFORMATION:
49
+ *
50
+ * $RCSfile: readpdb.h,v $
51
+ * $Author: johns $ $Locker: $ $State: Exp $
52
+ * $Revision: 1.43 $ $Date: 2016/11/28 05:01:54 $
53
+ *
54
+ ***************************************************************************/
55
+
56
+ #ifndef READ_PDB_H
57
+ #define READ_PDB_H
58
+
59
+ #include <stdio.h>
60
+ #include <stdlib.h>
61
+ #include <string.h>
62
+
63
+ namespace PLMD{
64
+ namespace molfile{
65
+
66
+ #define PDB_RECORD_LENGTH 80 /* actual record size */
67
+ #define PDB_BUFFER_LENGTH 83 /* size need to buffer + CR, LF, and NUL */
68
+
69
+ #define VMDUSECONECTRECORDS 1
70
+
71
+ /* record type defines */
72
+ enum {
73
+ PDB_HEADER, PDB_REMARK, PDB_ATOM, PDB_CONECT, PDB_UNKNOWN, PDB_END, PDB_EOF, PDB_CRYST1
74
+ };
75
+
76
+ /* read the next record from the specified pdb file, and put the string found
77
+ in the given string pointer (the caller must provide adequate (81 chars)
78
+ buffer space); return the type of record found
79
+ */
80
+ static int read_pdb_record(FILE *f, char *retStr) {
81
+ int ch;
82
+ char inbuf[PDB_BUFFER_LENGTH]; /* space for line + cr + lf + NUL */
83
+ int recType = PDB_UNKNOWN;
84
+
85
+ /* XXX This PDB record reading code breaks with files that use
86
+ * Mac or DOS style line breaks with ctrl-M characters. We need
87
+ * to replace the use of fgets() and comparisons against \n with
88
+ * code that properly handles the other cases.
89
+ */
90
+
91
+ /* read the next line, including any ending cr/lf char */
92
+ if (inbuf != fgets(inbuf, PDB_RECORD_LENGTH + 2, f)) {
93
+ retStr[0] = '\0';
94
+ recType = PDB_EOF;
95
+ } else {
96
+ #if 0
97
+ /* XXX disabled this code since \n chars are desirable in remarks */
98
+ /* and to make the behavior consistent with webpdbplugin */
99
+
100
+ /* remove the newline character, if there is one */
101
+ if (inbuf[strlen(inbuf)-1] == '\n')
102
+ inbuf[strlen(inbuf)-1] = '\0';
103
+ #endif
104
+
105
+ /* atom records are the most common */
106
+ if (!strncmp(inbuf, "ATOM ", 5) || !strncmp(inbuf, "HETATM", 6)) {
107
+ /* Note that by only comparing 5 chars for "ATOM " rather than 6, */
108
+ /* we allow PDB files containing > 99,999 atoms generated by AMBER */
109
+ /* to load which would otherwise fail. Not needed for HETATM since */
110
+ /* those aren't going to show up in files produced for/by MD engines. */
111
+ recType = PDB_ATOM;
112
+ } else if (!strncmp(inbuf, "CONECT", 6)) {
113
+ recType = PDB_CONECT;
114
+ } else if (!strncmp(inbuf, "REMARK", 6)) {
115
+ recType = PDB_REMARK;
116
+ } else if (!strncmp(inbuf, "CRYST1", 6)) {
117
+ recType = PDB_CRYST1;
118
+ } else if (!strncmp(inbuf, "HEADER", 6)) {
119
+ recType = PDB_HEADER;
120
+ } else if (!strncmp(inbuf, "END", 3)) { /* very permissive */
121
+ /* XXX we treat any "ENDxxx" record as an end, to simplify testing */
122
+ /* since we don't remove trailing '\n' chars */
123
+
124
+ /* the only two legal END records are "END " and "ENDMDL" */
125
+ recType = PDB_END;
126
+ }
127
+
128
+ #if 0
129
+ /* XXX disable record type checking for now */
130
+ if (recType == PDB_ATOM ||
131
+ recType == PDB_CONECT ||
132
+ recType == PDB_REMARK ||
133
+ recType == PDB_HEADER ||
134
+ recType == PDB_CRYST1) {
135
+ strcpy(retStr, inbuf);
136
+ } else {
137
+ retStr[0] = '\0';
138
+ }
139
+ #else
140
+ strcpy(retStr, inbuf);
141
+ #endif
142
+ }
143
+
144
+ /* read the '\r', if there was one */
145
+ ch = fgetc(f);
146
+ if (ch != '\r')
147
+ ungetc(ch, f);
148
+
149
+ return recType;
150
+ }
151
+
152
+
153
+ /* Extract the alpha/beta/gamma a/b/c unit cell info from a CRYST1 record */
154
+ static void get_pdb_cryst1(const char *record,
155
+ float *alpha, float *beta, float *gamma,
156
+ float *a, float *b, float *c) {
157
+ char tmp[PDB_RECORD_LENGTH+3]; /* space for line + cr + lf + NUL */
158
+ char ch, *s;
159
+ memset(tmp, 0, sizeof(tmp));
160
+ strncpy(tmp, record, PDB_RECORD_LENGTH);
161
+
162
+ s = tmp+6 ; ch = tmp[15]; tmp[15] = 0;
163
+ *a = (float) atof(s);
164
+ s = tmp+15; *s = ch; ch = tmp[24]; tmp[24] = 0;
165
+ *b = (float) atof(s);
166
+ s = tmp+24; *s = ch; ch = tmp[33]; tmp[33] = 0;
167
+ *c = (float) atof(s);
168
+ s = tmp+33; *s = ch; ch = tmp[40]; tmp[40] = 0;
169
+ *alpha = (float) atof(s);
170
+ s = tmp+40; *s = ch; ch = tmp[47]; tmp[47] = 0;
171
+ *beta = (float) atof(s);
172
+ s = tmp+47; *s = ch; ch = tmp[54]; tmp[54] = 0;
173
+ *gamma = (float) atof(s);
174
+ }
175
+
176
+
177
+ /* Extract the x,y,z coords, occupancy, and beta from an ATOM record */
178
+ static void get_pdb_coordinates(const char *record,
179
+ float *x, float *y, float *z,
180
+ float *occup, float *beta) {
181
+ char numstr[50]; /* store all fields in one array to save memset calls */
182
+ memset(numstr, 0, sizeof(numstr));
183
+
184
+ if (x != NULL) {
185
+ strncpy(numstr, record + 30, 8);
186
+ *x = (float) atof(numstr);
187
+ }
188
+
189
+ if (y != NULL) {
190
+ strncpy(numstr+10, record + 38, 8);
191
+ *y = (float) atof(numstr+10);
192
+ }
193
+
194
+ if (z != NULL) {
195
+ strncpy(numstr+20, record + 46, 8);
196
+ *z = (float) atof(numstr+20);
197
+ }
198
+
199
+ if (occup != NULL) {
200
+ strncpy(numstr+30, record + 54, 6);
201
+ *occup = (float) atof(numstr+30);
202
+ }
203
+
204
+ if (beta != NULL) {
205
+ strncpy(numstr+40, record + 60, 6);
206
+ *beta = (float) atof(numstr+40);
207
+ }
208
+ }
209
+
210
+
211
+ /* remove leading and trailing spaces from PDB fields */
212
+ static void adjust_pdb_field_string(char *field) {
213
+ int i, len;
214
+
215
+ len = strlen(field);
216
+ while (len > 0 && field[len-1] == ' ') {
217
+ field[len-1] = '\0';
218
+ len--;
219
+ }
220
+
221
+ while (len > 0 && field[0] == ' ') {
222
+ for (i=0; i < len; i++)
223
+ field[i] = field[i+1];
224
+ len--;
225
+ }
226
+ }
227
+
228
+ static void get_pdb_header(const char *record, char *pdbcode, char *date,
229
+ char *classification) {
230
+ if (date != NULL) {
231
+ strncpy(date, record + 50, 9);
232
+ date[9] = '\0';
233
+ }
234
+
235
+ if (classification != NULL) {
236
+ strncpy(classification, record + 10, 40);
237
+ classification[40] = '\0';
238
+ }
239
+
240
+ if (pdbcode != NULL) {
241
+ strncpy(pdbcode, record + 62, 4);
242
+ pdbcode[4] = '\0';
243
+ adjust_pdb_field_string(pdbcode); /* remove spaces from accession code */
244
+ }
245
+ }
246
+
247
+
248
+ static void get_pdb_conect(const char *record, int natoms, int *idxmap,
249
+ int *maxbnum, int *nbonds, int **from, int **to) {
250
+ int bondto[11], numbonds, i;
251
+
252
+ int reclen = strlen(record);
253
+ for (numbonds=0, i=0; i<11; i++) {
254
+ char bondstr[6];
255
+ const int fieldwidth = 5;
256
+ int start = 6 + i*fieldwidth;
257
+ int end = start + fieldwidth;
258
+
259
+ if (end >= reclen)
260
+ break;
261
+
262
+ memcpy(bondstr, record + start, fieldwidth);
263
+ bondstr[5] = '\0';
264
+ if (sscanf(bondstr, "%d", &bondto[numbonds]) < 0)
265
+ break;
266
+ numbonds++;
267
+ }
268
+
269
+ for (i=0; i<numbonds; i++) {
270
+ /* only add one bond per pair, PDBs list them redundantly */
271
+ if (bondto[i] > bondto[0]) {
272
+ int newnbonds = *nbonds + 1; /* add a new bond */
273
+
274
+ /* allocate more bondlist space if necessary */
275
+ if (newnbonds >= *maxbnum) {
276
+ int newmax;
277
+ int *newfromlist, *newtolist;
278
+ newmax = (newnbonds + 11) * 1.25;
279
+
280
+ newfromlist = (int *) realloc(*from, newmax * sizeof(int));
281
+ newtolist = (int *) realloc(*to, newmax * sizeof(int));
282
+
283
+ if (newfromlist != NULL || newtolist != NULL) {
284
+ *maxbnum = newmax;
285
+ *from = newfromlist;
286
+ *to = newtolist;
287
+ } else {
288
+ printf("readpdb) failed to allocate memory for bondlists\n");
289
+ return; /* abort */
290
+ }
291
+ }
292
+
293
+ *nbonds = newnbonds;
294
+ (*from)[newnbonds-1] = idxmap[bondto[0]] + 1;
295
+ (*to)[newnbonds-1] = idxmap[bondto[i]] + 1;
296
+ }
297
+ }
298
+ }
299
+
300
+ /* ATOM field format according to PDB standard v2.2
301
+ COLUMNS DATA TYPE FIELD DEFINITION
302
+ ---------------------------------------------------------------------------------
303
+ 1 - 6 Record name "ATOM "
304
+ 7 - 11 Integer serial Atom serial number.
305
+ 13 - 16 Atom name Atom name.
306
+ 17 Character altLoc Alternate location indicator.
307
+ 18 - 20 Residue name resName Residue name.
308
+ 22 Character chainID Chain identifier.
309
+ 23 - 26 Integer resSeq Residue sequence number.
310
+ 27 AChar iCode Code for insertion of residues.
311
+ 31 - 38 Real(8.3) x Orthogonal coordinates for X in Angstroms.
312
+ 39 - 46 Real(8.3) y Orthogonal coordinates for Y in Angstroms.
313
+ 47 - 54 Real(8.3) z Orthogonal coordinates for Z in Angstroms.
314
+ 55 - 60 Real(6.2) occupancy Occupancy.
315
+ 61 - 66 Real(6.2) tempFactor Temperature factor.
316
+ 73 - 76 LString(4) segID Segment identifier, left-justified.
317
+ 77 - 78 LString(2) element Element symbol, right-justified.
318
+ 79 - 80 LString(2) charge Charge on the atom.
319
+ */
320
+
321
+ /* Break a pdb ATOM record into its fields. The user must provide the
322
+ necessary space to store the atom name, residue name, and segment name.
323
+ Character strings will be null-terminated.
324
+ */
325
+ static void get_pdb_fields(const char *record, int reclength, int *serial,
326
+ char *name, char *resname, char *chain,
327
+ char *segname, char *resid, char *insertion,
328
+ char *altloc, char *elementsymbol,
329
+ float *x, float *y, float *z,
330
+ float *occup, float *beta) {
331
+ char serialbuf[6];
332
+
333
+ /* get atom serial number */
334
+ strncpy(serialbuf, record + 6, 5);
335
+ serialbuf[5] = '\0';
336
+ *serial = 0;
337
+ sscanf(serialbuf, "%5d", serial);
338
+
339
+ /* get atom name */
340
+ strncpy(name, record + 12, 4);
341
+ name[4] = '\0';
342
+ adjust_pdb_field_string(name); /* remove spaces from the name */
343
+
344
+ /* get alternate location identifier */
345
+ strncpy(altloc, record + 16, 1);
346
+ altloc[1] = '\0';
347
+
348
+ /* get residue name */
349
+ strncpy(resname, record + 17, 4);
350
+ resname[4] = '\0';
351
+ adjust_pdb_field_string(resname); /* remove spaces from the resname */
352
+
353
+ /* get chain name */
354
+ chain[0] = record[21];
355
+ chain[1] = '\0';
356
+
357
+ /* get residue id number */
358
+ strncpy(resid, record + 22, 4);
359
+ resid[4] = '\0';
360
+ adjust_pdb_field_string(resid); /* remove spaces from the resid */
361
+
362
+ /* get the insertion code */
363
+ insertion[0] = record[26];
364
+ insertion[1] = '\0';
365
+
366
+ /* get x, y, and z coordinates */
367
+ get_pdb_coordinates(record, x, y, z, occup, beta);
368
+
369
+ /* get segment name */
370
+ if (reclength >= 73) {
371
+ strncpy(segname, record + 72, 4);
372
+ segname[4] = '\0';
373
+ adjust_pdb_field_string(segname); /* remove spaces from the segname */
374
+ } else {
375
+ segname[0] = '\0';
376
+ }
377
+
378
+ /* get the atomic element symbol */
379
+ if (reclength >= 77) {
380
+ strncpy(elementsymbol, record + 76, 2);
381
+ elementsymbol[2] = '\0';
382
+ } else {
383
+ elementsymbol[0] = '\0';
384
+ }
385
+ }
386
+
387
+
388
+ /* Write PDB data to given file descriptor; return success. */
389
+ static int write_raw_pdb_record(FILE *fd, const char *recordname,
390
+ int index,const char *atomname, const char *resname,int resid,
391
+ const char *insertion, const char *altloc, const char *elementsymbol,
392
+ float x, float y, float z, float occ, float beta,
393
+ const char *chain, const char *segname) {
394
+ int rc;
395
+ char indexbuf[32];
396
+ char residbuf[32];
397
+ char segnamebuf[5];
398
+ char resnamebuf[5];
399
+ char altlocchar;
400
+
401
+ /* XXX */
402
+ /* if the atom or residue indices exceed the legal PDB spec, we */
403
+ /* start emitting asterisks or hexadecimal strings rather than */
404
+ /* aborting. This is not really legal, but is an accepted hack */
405
+ /* among various other programs that deal with large PDB files */
406
+ /* If we run out of hexadecimal indices, then we just print */
407
+ /* asterisks. */
408
+ if (index < 100000) {
409
+ snprintf(indexbuf, 32, "%5d", index);
410
+ } else if (index < 1048576) {
411
+ snprintf(indexbuf, 32, "%05x", index);
412
+ } else {
413
+ snprintf(indexbuf, 32, "*****");
414
+ }
415
+
416
+ if (resid < 10000) {
417
+ snprintf(residbuf, 32, "%4d", resid);
418
+ } else if (resid < 65536) {
419
+ snprintf(residbuf, 32, "%04x", resid);
420
+ } else {
421
+ snprintf(residbuf, 32, "****");
422
+ }
423
+
424
+ altlocchar = altloc[0];
425
+ if (altlocchar == '\0') {
426
+ altlocchar = ' ';
427
+ }
428
+
429
+ /* make sure the segname or resname do not overflow the format */
430
+ strncpy(segnamebuf,segname,4);
431
+ segnamebuf[4] = '\0';
432
+ strncpy(resnamebuf,resname,4);
433
+ resnamebuf[4] = '\0';
434
+
435
+
436
+ rc = fprintf(fd,
437
+ "%-6s%5s %4s%c%-4s%c%4s%c %8.3f%8.3f%8.3f%6.2f%6.2f %-4s%2s\n",
438
+ recordname, indexbuf, atomname, altlocchar, resnamebuf, chain[0],
439
+ residbuf, insertion[0], x, y, z, occ, beta, segnamebuf, elementsymbol);
440
+
441
+ return (rc > 0);
442
+ }
443
+
444
+ }
445
+ }
446
+ #endif
447
+ #endif