hillclimber 0.1.5a8__cp314-cp314-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.
- hillclimber/__init__.py +39 -0
- hillclimber/actions.py +53 -0
- hillclimber/analysis.py +590 -0
- hillclimber/biases.py +293 -0
- hillclimber/calc.py +22 -0
- hillclimber/cvs.py +1065 -0
- hillclimber/interfaces.py +133 -0
- hillclimber/metadynamics.py +325 -0
- hillclimber/nodes.py +6 -0
- hillclimber/opes.py +359 -0
- hillclimber/selectors.py +230 -0
- hillclimber/virtual_atoms.py +341 -0
- hillclimber-0.1.5a8.dist-info/METADATA +209 -0
- hillclimber-0.1.5a8.dist-info/RECORD +469 -0
- hillclimber-0.1.5a8.dist-info/WHEEL +6 -0
- hillclimber-0.1.5a8.dist-info/entry_points.txt +8 -0
- hillclimber-0.1.5a8.dist-info/licenses/LICENSE +165 -0
- plumed/__init__.py +104 -0
- plumed/_lib/bin/plumed +0 -0
- plumed/_lib/bin/plumed-config +9 -0
- plumed/_lib/bin/plumed-patch +9 -0
- plumed/_lib/include/plumed/adjmat/AdjacencyMatrixBase.h +659 -0
- plumed/_lib/include/plumed/adjmat/ContactMatrix.h +59 -0
- plumed/_lib/include/plumed/asmjit/arch.h +228 -0
- plumed/_lib/include/plumed/asmjit/arm.h +43 -0
- plumed/_lib/include/plumed/asmjit/asmjit.h +69 -0
- plumed/_lib/include/plumed/asmjit/asmjit_apibegin.h +143 -0
- plumed/_lib/include/plumed/asmjit/asmjit_apiend.h +93 -0
- plumed/_lib/include/plumed/asmjit/asmjit_build.h +971 -0
- plumed/_lib/include/plumed/asmjit/assembler.h +183 -0
- plumed/_lib/include/plumed/asmjit/base.h +56 -0
- plumed/_lib/include/plumed/asmjit/codebuilder.h +944 -0
- plumed/_lib/include/plumed/asmjit/codecompiler.h +767 -0
- plumed/_lib/include/plumed/asmjit/codeemitter.h +528 -0
- plumed/_lib/include/plumed/asmjit/codeholder.h +777 -0
- plumed/_lib/include/plumed/asmjit/constpool.h +286 -0
- plumed/_lib/include/plumed/asmjit/cpuinfo.h +402 -0
- plumed/_lib/include/plumed/asmjit/func.h +1327 -0
- plumed/_lib/include/plumed/asmjit/globals.h +370 -0
- plumed/_lib/include/plumed/asmjit/inst.h +137 -0
- plumed/_lib/include/plumed/asmjit/logging.h +317 -0
- plumed/_lib/include/plumed/asmjit/misc_p.h +103 -0
- plumed/_lib/include/plumed/asmjit/moved_string.h +318 -0
- plumed/_lib/include/plumed/asmjit/operand.h +1599 -0
- plumed/_lib/include/plumed/asmjit/osutils.h +207 -0
- plumed/_lib/include/plumed/asmjit/regalloc_p.h +597 -0
- plumed/_lib/include/plumed/asmjit/runtime.h +227 -0
- plumed/_lib/include/plumed/asmjit/simdtypes.h +1104 -0
- plumed/_lib/include/plumed/asmjit/utils.h +1387 -0
- plumed/_lib/include/plumed/asmjit/vmem.h +183 -0
- plumed/_lib/include/plumed/asmjit/x86.h +45 -0
- plumed/_lib/include/plumed/asmjit/x86assembler.h +125 -0
- plumed/_lib/include/plumed/asmjit/x86builder.h +117 -0
- plumed/_lib/include/plumed/asmjit/x86compiler.h +322 -0
- plumed/_lib/include/plumed/asmjit/x86emitter.h +5149 -0
- plumed/_lib/include/plumed/asmjit/x86globals.h +535 -0
- plumed/_lib/include/plumed/asmjit/x86inst.h +2547 -0
- plumed/_lib/include/plumed/asmjit/x86instimpl_p.h +74 -0
- plumed/_lib/include/plumed/asmjit/x86internal_p.h +108 -0
- plumed/_lib/include/plumed/asmjit/x86logging_p.h +92 -0
- plumed/_lib/include/plumed/asmjit/x86misc.h +417 -0
- plumed/_lib/include/plumed/asmjit/x86operand.h +1133 -0
- plumed/_lib/include/plumed/asmjit/x86regalloc_p.h +734 -0
- plumed/_lib/include/plumed/asmjit/zone.h +1157 -0
- plumed/_lib/include/plumed/bias/Bias.h +82 -0
- plumed/_lib/include/plumed/bias/ReweightBase.h +58 -0
- plumed/_lib/include/plumed/blas/blas.h +253 -0
- plumed/_lib/include/plumed/blas/def_external.h +61 -0
- plumed/_lib/include/plumed/blas/def_internal.h +97 -0
- plumed/_lib/include/plumed/blas/real.h +49 -0
- plumed/_lib/include/plumed/cltools/CLTool.h +32 -0
- plumed/_lib/include/plumed/clusters/ClusteringBase.h +70 -0
- plumed/_lib/include/plumed/colvar/Colvar.h +32 -0
- plumed/_lib/include/plumed/colvar/ColvarInput.h +68 -0
- plumed/_lib/include/plumed/colvar/ColvarShortcut.h +81 -0
- plumed/_lib/include/plumed/colvar/CoordinationBase.h +52 -0
- plumed/_lib/include/plumed/colvar/MultiColvarTemplate.h +333 -0
- plumed/_lib/include/plumed/colvar/PathMSDBase.h +101 -0
- plumed/_lib/include/plumed/colvar/RMSDVector.h +78 -0
- plumed/_lib/include/plumed/config/Config.h +118 -0
- plumed/_lib/include/plumed/config/version.h +9 -0
- plumed/_lib/include/plumed/contour/ContourFindingObject.h +87 -0
- plumed/_lib/include/plumed/contour/DistanceFromContourBase.h +82 -0
- plumed/_lib/include/plumed/contour/FindContour.h +67 -0
- plumed/_lib/include/plumed/core/Action.h +540 -0
- plumed/_lib/include/plumed/core/ActionAnyorder.h +48 -0
- plumed/_lib/include/plumed/core/ActionAtomistic.h +343 -0
- plumed/_lib/include/plumed/core/ActionForInterface.h +99 -0
- plumed/_lib/include/plumed/core/ActionPilot.h +57 -0
- plumed/_lib/include/plumed/core/ActionRegister.h +124 -0
- plumed/_lib/include/plumed/core/ActionSet.h +163 -0
- plumed/_lib/include/plumed/core/ActionSetup.h +48 -0
- plumed/_lib/include/plumed/core/ActionShortcut.h +73 -0
- plumed/_lib/include/plumed/core/ActionToGetData.h +59 -0
- plumed/_lib/include/plumed/core/ActionToPutData.h +101 -0
- plumed/_lib/include/plumed/core/ActionWithArguments.h +140 -0
- plumed/_lib/include/plumed/core/ActionWithMatrix.h +87 -0
- plumed/_lib/include/plumed/core/ActionWithValue.h +258 -0
- plumed/_lib/include/plumed/core/ActionWithVector.h +94 -0
- plumed/_lib/include/plumed/core/ActionWithVirtualAtom.h +123 -0
- plumed/_lib/include/plumed/core/CLTool.h +177 -0
- plumed/_lib/include/plumed/core/CLToolMain.h +102 -0
- plumed/_lib/include/plumed/core/CLToolRegister.h +108 -0
- plumed/_lib/include/plumed/core/Colvar.h +115 -0
- plumed/_lib/include/plumed/core/DataPassingObject.h +94 -0
- plumed/_lib/include/plumed/core/DataPassingTools.h +54 -0
- plumed/_lib/include/plumed/core/DomainDecomposition.h +120 -0
- plumed/_lib/include/plumed/core/ExchangePatterns.h +47 -0
- plumed/_lib/include/plumed/core/FlexibleBin.h +63 -0
- plumed/_lib/include/plumed/core/GREX.h +61 -0
- plumed/_lib/include/plumed/core/GenericMolInfo.h +89 -0
- plumed/_lib/include/plumed/core/Group.h +41 -0
- plumed/_lib/include/plumed/core/ModuleMap.h +30 -0
- plumed/_lib/include/plumed/core/ParallelTaskManager.h +1023 -0
- plumed/_lib/include/plumed/core/PbcAction.h +61 -0
- plumed/_lib/include/plumed/core/PlumedMain.h +632 -0
- plumed/_lib/include/plumed/core/PlumedMainInitializer.h +118 -0
- plumed/_lib/include/plumed/core/RegisterBase.h +340 -0
- plumed/_lib/include/plumed/core/TargetDist.h +48 -0
- plumed/_lib/include/plumed/core/Value.h +547 -0
- plumed/_lib/include/plumed/core/WithCmd.h +93 -0
- plumed/_lib/include/plumed/dimred/SMACOF.h +55 -0
- plumed/_lib/include/plumed/drr/DRR.h +383 -0
- plumed/_lib/include/plumed/drr/colvar_UIestimator.h +777 -0
- plumed/_lib/include/plumed/fisst/legendre_rule_fast.h +44 -0
- plumed/_lib/include/plumed/function/Custom.h +54 -0
- plumed/_lib/include/plumed/function/Function.h +85 -0
- plumed/_lib/include/plumed/function/FunctionOfMatrix.h +368 -0
- plumed/_lib/include/plumed/function/FunctionOfScalar.h +135 -0
- plumed/_lib/include/plumed/function/FunctionOfVector.h +296 -0
- plumed/_lib/include/plumed/function/FunctionSetup.h +180 -0
- plumed/_lib/include/plumed/function/FunctionShortcut.h +130 -0
- plumed/_lib/include/plumed/function/FunctionWithSingleArgument.h +165 -0
- plumed/_lib/include/plumed/gridtools/ActionWithGrid.h +43 -0
- plumed/_lib/include/plumed/gridtools/EvaluateGridFunction.h +99 -0
- plumed/_lib/include/plumed/gridtools/FunctionOfGrid.h +295 -0
- plumed/_lib/include/plumed/gridtools/GridCoordinatesObject.h +179 -0
- plumed/_lib/include/plumed/gridtools/GridSearch.h +135 -0
- plumed/_lib/include/plumed/gridtools/Interpolator.h +45 -0
- plumed/_lib/include/plumed/gridtools/KDE.h +455 -0
- plumed/_lib/include/plumed/gridtools/RDF.h +40 -0
- plumed/_lib/include/plumed/gridtools/SumOfKernels.h +219 -0
- plumed/_lib/include/plumed/isdb/MetainferenceBase.h +398 -0
- plumed/_lib/include/plumed/lapack/def_external.h +207 -0
- plumed/_lib/include/plumed/lapack/def_internal.h +388 -0
- plumed/_lib/include/plumed/lapack/lapack.h +899 -0
- plumed/_lib/include/plumed/lapack/lapack_limits.h +79 -0
- plumed/_lib/include/plumed/lapack/real.h +50 -0
- plumed/_lib/include/plumed/lepton/CompiledExpression.h +164 -0
- plumed/_lib/include/plumed/lepton/CustomFunction.h +143 -0
- plumed/_lib/include/plumed/lepton/Exception.h +93 -0
- plumed/_lib/include/plumed/lepton/ExpressionProgram.h +137 -0
- plumed/_lib/include/plumed/lepton/ExpressionTreeNode.h +145 -0
- plumed/_lib/include/plumed/lepton/Lepton.h +85 -0
- plumed/_lib/include/plumed/lepton/MSVC_erfc.h +123 -0
- plumed/_lib/include/plumed/lepton/Operation.h +1302 -0
- plumed/_lib/include/plumed/lepton/ParsedExpression.h +165 -0
- plumed/_lib/include/plumed/lepton/Parser.h +111 -0
- plumed/_lib/include/plumed/lepton/windowsIncludes.h +73 -0
- plumed/_lib/include/plumed/mapping/Path.h +44 -0
- plumed/_lib/include/plumed/mapping/PathProjectionCalculator.h +57 -0
- plumed/_lib/include/plumed/matrixtools/MatrixOperationBase.h +54 -0
- plumed/_lib/include/plumed/matrixtools/MatrixTimesMatrix.h +309 -0
- plumed/_lib/include/plumed/matrixtools/MatrixTimesVectorBase.h +365 -0
- plumed/_lib/include/plumed/matrixtools/OuterProduct.h +238 -0
- plumed/_lib/include/plumed/maze/Core.h +65 -0
- plumed/_lib/include/plumed/maze/Loss.h +86 -0
- plumed/_lib/include/plumed/maze/Member.h +66 -0
- plumed/_lib/include/plumed/maze/Memetic.h +799 -0
- plumed/_lib/include/plumed/maze/Optimizer.h +357 -0
- plumed/_lib/include/plumed/maze/Random_MT.h +156 -0
- plumed/_lib/include/plumed/maze/Tools.h +183 -0
- plumed/_lib/include/plumed/metatomic/vesin.h +188 -0
- plumed/_lib/include/plumed/molfile/Gromacs.h +2013 -0
- plumed/_lib/include/plumed/molfile/endianswap.h +217 -0
- plumed/_lib/include/plumed/molfile/fastio.h +683 -0
- plumed/_lib/include/plumed/molfile/largefiles.h +78 -0
- plumed/_lib/include/plumed/molfile/libmolfile_plugin.h +77 -0
- plumed/_lib/include/plumed/molfile/molfile_plugin.h +1034 -0
- plumed/_lib/include/plumed/molfile/periodic_table.h +248 -0
- plumed/_lib/include/plumed/molfile/readpdb.h +447 -0
- plumed/_lib/include/plumed/molfile/vmdplugin.h +236 -0
- plumed/_lib/include/plumed/multicolvar/MultiColvarShortcuts.h +45 -0
- plumed/_lib/include/plumed/opes/ExpansionCVs.h +79 -0
- plumed/_lib/include/plumed/sasa/Sasa.h +32 -0
- plumed/_lib/include/plumed/secondarystructure/SecondaryStructureBase.h +372 -0
- plumed/_lib/include/plumed/setup/ActionSetup.h +25 -0
- plumed/_lib/include/plumed/small_vector/small_vector.h +6114 -0
- plumed/_lib/include/plumed/symfunc/CoordinationNumbers.h +41 -0
- plumed/_lib/include/plumed/tools/Angle.h +52 -0
- plumed/_lib/include/plumed/tools/AtomDistribution.h +138 -0
- plumed/_lib/include/plumed/tools/AtomNumber.h +152 -0
- plumed/_lib/include/plumed/tools/BiasRepresentation.h +106 -0
- plumed/_lib/include/plumed/tools/BitmaskEnum.h +167 -0
- plumed/_lib/include/plumed/tools/Brent1DRootSearch.h +159 -0
- plumed/_lib/include/plumed/tools/CheckInRange.h +44 -0
- plumed/_lib/include/plumed/tools/Citations.h +74 -0
- plumed/_lib/include/plumed/tools/ColvarOutput.h +118 -0
- plumed/_lib/include/plumed/tools/Communicator.h +316 -0
- plumed/_lib/include/plumed/tools/ConjugateGradient.h +80 -0
- plumed/_lib/include/plumed/tools/DLLoader.h +79 -0
- plumed/_lib/include/plumed/tools/ERMSD.h +73 -0
- plumed/_lib/include/plumed/tools/Exception.h +406 -0
- plumed/_lib/include/plumed/tools/File.h +28 -0
- plumed/_lib/include/plumed/tools/FileBase.h +153 -0
- plumed/_lib/include/plumed/tools/FileTools.h +37 -0
- plumed/_lib/include/plumed/tools/ForwardDecl.h +54 -0
- plumed/_lib/include/plumed/tools/Grid.h +638 -0
- plumed/_lib/include/plumed/tools/HistogramBead.h +136 -0
- plumed/_lib/include/plumed/tools/IFile.h +117 -0
- plumed/_lib/include/plumed/tools/KernelFunctions.h +113 -0
- plumed/_lib/include/plumed/tools/Keywords.h +380 -0
- plumed/_lib/include/plumed/tools/LatticeReduction.h +66 -0
- plumed/_lib/include/plumed/tools/LeptonCall.h +64 -0
- plumed/_lib/include/plumed/tools/LinkCells.h +126 -0
- plumed/_lib/include/plumed/tools/Log.h +41 -0
- plumed/_lib/include/plumed/tools/LoopUnroller.h +163 -0
- plumed/_lib/include/plumed/tools/Matrix.h +721 -0
- plumed/_lib/include/plumed/tools/MatrixSquareBracketsAccess.h +138 -0
- plumed/_lib/include/plumed/tools/MergeVectorTools.h +153 -0
- plumed/_lib/include/plumed/tools/Minimise1DBrent.h +244 -0
- plumed/_lib/include/plumed/tools/MinimiseBase.h +120 -0
- plumed/_lib/include/plumed/tools/MolDataClass.h +51 -0
- plumed/_lib/include/plumed/tools/NeighborList.h +112 -0
- plumed/_lib/include/plumed/tools/OFile.h +286 -0
- plumed/_lib/include/plumed/tools/OpenACC.h +180 -0
- plumed/_lib/include/plumed/tools/OpenMP.h +75 -0
- plumed/_lib/include/plumed/tools/PDB.h +154 -0
- plumed/_lib/include/plumed/tools/Pbc.h +139 -0
- plumed/_lib/include/plumed/tools/PlumedHandle.h +105 -0
- plumed/_lib/include/plumed/tools/RMSD.h +493 -0
- plumed/_lib/include/plumed/tools/Random.h +80 -0
- plumed/_lib/include/plumed/tools/RootFindingBase.h +79 -0
- plumed/_lib/include/plumed/tools/Stopwatch.h +475 -0
- plumed/_lib/include/plumed/tools/Subprocess.h +142 -0
- plumed/_lib/include/plumed/tools/SwitchingFunction.h +208 -0
- plumed/_lib/include/plumed/tools/Tensor.h +724 -0
- plumed/_lib/include/plumed/tools/TokenizedLine.h +123 -0
- plumed/_lib/include/plumed/tools/Tools.h +638 -0
- plumed/_lib/include/plumed/tools/Torsion.h +55 -0
- plumed/_lib/include/plumed/tools/TrajectoryParser.h +118 -0
- plumed/_lib/include/plumed/tools/Tree.h +61 -0
- plumed/_lib/include/plumed/tools/TypesafePtr.h +463 -0
- plumed/_lib/include/plumed/tools/Units.h +167 -0
- plumed/_lib/include/plumed/tools/Vector.h +433 -0
- plumed/_lib/include/plumed/tools/View.h +296 -0
- plumed/_lib/include/plumed/tools/View2D.h +100 -0
- plumed/_lib/include/plumed/tools/h36.h +39 -0
- plumed/_lib/include/plumed/vatom/ActionWithVirtualAtom.h +32 -0
- plumed/_lib/include/plumed/ves/BasisFunctions.h +380 -0
- plumed/_lib/include/plumed/ves/CoeffsBase.h +310 -0
- plumed/_lib/include/plumed/ves/CoeffsMatrix.h +220 -0
- plumed/_lib/include/plumed/ves/CoeffsVector.h +251 -0
- plumed/_lib/include/plumed/ves/FermiSwitchingFunction.h +74 -0
- plumed/_lib/include/plumed/ves/GridIntegrationWeights.h +50 -0
- plumed/_lib/include/plumed/ves/GridLinearInterpolation.h +81 -0
- plumed/_lib/include/plumed/ves/GridProjWeights.h +61 -0
- plumed/_lib/include/plumed/ves/LinearBasisSetExpansion.h +303 -0
- plumed/_lib/include/plumed/ves/Optimizer.h +444 -0
- plumed/_lib/include/plumed/ves/TargetDistModifer.h +53 -0
- plumed/_lib/include/plumed/ves/TargetDistribution.h +266 -0
- plumed/_lib/include/plumed/ves/VesBias.h +545 -0
- plumed/_lib/include/plumed/ves/VesTools.h +142 -0
- plumed/_lib/include/plumed/ves/WaveletGrid.h +75 -0
- plumed/_lib/include/plumed/volumes/ActionVolume.h +268 -0
- plumed/_lib/include/plumed/volumes/VolumeShortcut.h +147 -0
- plumed/_lib/include/plumed/wrapper/Plumed.h +5025 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile.h +663 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile_trr.h +89 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile_xtc.h +90 -0
- plumed/_lib/lib/PythonCVInterface.dylib +0 -0
- plumed/_lib/lib/libplumed.dylib +0 -0
- plumed/_lib/lib/libplumedKernel.dylib +0 -0
- plumed/_lib/lib/libplumedWrapper.a +0 -0
- plumed/_lib/lib/pkgconfig/plumed.pc +13 -0
- plumed/_lib/lib/pkgconfig/plumedInternals.pc +13 -0
- plumed/_lib/lib/pkgconfig/plumedWrapper.pc +13 -0
- plumed/_lib/lib/plumed/fortran/plumed.f90 +879 -0
- plumed/_lib/lib/plumed/fortran/plumed_f08.f90 +2625 -0
- plumed/_lib/lib/plumed/modulefile +69 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt +543 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt.preplumed +540 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp +1628 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1590 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h +103 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h.preplumed +99 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp +2527 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +408 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +394 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp +2348 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2091 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp +3573 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3495 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1506 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1402 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp +997 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +906 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp +2780 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2738 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt +549 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt.preplumed +546 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h +104 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp +2624 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2610 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +395 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp +2419 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2164 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp +3546 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3468 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp +991 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +900 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp +2895 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2849 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp +886 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +880 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +347 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +345 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt +575 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt.preplumed +572 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h +104 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp +2564 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2550 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h +410 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +396 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp +2435 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp.preplumed +2187 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp +3592 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3514 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp +958 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp.preplumed +929 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp +2987 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp.preplumed +2941 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp +904 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +898 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +353 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +351 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.config +39 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake +82 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake.preplumed +82 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp +162 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp.preplumed +154 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp +107 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp.preplumed +99 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h +120 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h.preplumed +111 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp +215 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp.preplumed +197 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h +87 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h.preplumed +86 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp +2971 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp.preplumed +2970 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h +430 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h.preplumed +429 -0
- plumed/_lib/lib/plumed/patches/namd-2.12.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.12.diff +267 -0
- plumed/_lib/lib/plumed/patches/namd-2.13.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.13.diff +267 -0
- plumed/_lib/lib/plumed/patches/namd-2.14.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.14.diff +268 -0
- plumed/_lib/lib/plumed/patches/patch.sh +500 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.config +25 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90 +368 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90.preplumed +366 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90 +71 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90.preplumed +24 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90 +62 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90 +189 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90.preplumed +185 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.config +26 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90 +422 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90.preplumed +420 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90 +70 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90 +62 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90 +233 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90.preplumed +230 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.config +28 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile +175 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile.preplumed +171 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90 +486 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90.preplumed +484 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90 +74 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90 +64 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90 +532 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90.preplumed +518 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.config +28 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile +249 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile.preplumed +244 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90 +532 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90.preplumed +535 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90 +74 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90 +64 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90 +569 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90.preplumed +560 -0
- plumed/_lib/lib/plumed/plumed-config +9 -0
- plumed/_lib/lib/plumed/plumed-mklib +9 -0
- plumed/_lib/lib/plumed/plumed-newcv +9 -0
- plumed/_lib/lib/plumed/plumed-partial_tempering +9 -0
- plumed/_lib/lib/plumed/plumed-patch +9 -0
- plumed/_lib/lib/plumed/plumed-runtime +0 -0
- plumed/_lib/lib/plumed/plumed-selector +9 -0
- plumed/_lib/lib/plumed/plumed-vim2html +9 -0
- plumed/_lib/lib/plumed/scripts/config.sh +126 -0
- plumed/_lib/lib/plumed/scripts/mklib.sh +175 -0
- plumed/_lib/lib/plumed/scripts/newcv.sh +26 -0
- plumed/_lib/lib/plumed/scripts/partial_tempering.sh +319 -0
- plumed/_lib/lib/plumed/scripts/patch.sh +4 -0
- plumed/_lib/lib/plumed/scripts/selector.sh +234 -0
- plumed/_lib/lib/plumed/scripts/vim2html.sh +190 -0
- plumed/_lib/lib/plumed/src/colvar/Template.cpp +116 -0
- plumed/_lib/lib/plumed/src/config/compile_options.sh +3 -0
- plumed/_lib/lib/plumed/src/config/config.txt +181 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake +6 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.runtime +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.shared +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.static +3 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc +6 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.runtime +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.shared +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.static +3 -0
- plumed/_lib/lib/plumed/vim/scripts.vim +6 -0
- plumed/_plumed_core.cpython-311-darwin.so +0 -0
- plumed/_plumed_core.cpython-312-darwin.so +0 -0
- plumed/_plumed_core.cpython-313-darwin.so +0 -0
- plumed/_plumed_core.cpython-314-darwin.so +0 -0
- plumedCommunications.cpython-311-darwin.so +0 -0
- plumedCommunications.cpython-312-darwin.so +0 -0
- plumedCommunications.cpython-313-darwin.so +0 -0
- plumedCommunications.cpython-314-darwin.so +0 -0
- plumedCommunications.pyi +431 -0
hillclimber/__init__.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from hillclimber.actions import PrintAction
|
|
2
|
+
from hillclimber.analysis import plot_cv_time_series, read_colvar, sum_hills
|
|
3
|
+
from hillclimber.biases import LowerWallBias, RestraintBias, UpperWallBias
|
|
4
|
+
from hillclimber.cvs import (
|
|
5
|
+
AngleCV,
|
|
6
|
+
CoordinationNumberCV,
|
|
7
|
+
DistanceCV,
|
|
8
|
+
RadiusOfGyrationCV,
|
|
9
|
+
TorsionCV,
|
|
10
|
+
)
|
|
11
|
+
from hillclimber.metadynamics import MetadBias, MetaDynamicsConfig, MetaDynamicsModel
|
|
12
|
+
from hillclimber.opes import OPESBias, OPESConfig, OPESModel
|
|
13
|
+
from hillclimber.selectors import IndexSelector, SMARTSSelector, SMILESSelector
|
|
14
|
+
from hillclimber.virtual_atoms import VirtualAtom
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"PrintAction",
|
|
18
|
+
"DistanceCV",
|
|
19
|
+
"AngleCV",
|
|
20
|
+
"CoordinationNumberCV",
|
|
21
|
+
"TorsionCV",
|
|
22
|
+
"RadiusOfGyrationCV",
|
|
23
|
+
"IndexSelector",
|
|
24
|
+
"SMILESSelector",
|
|
25
|
+
"SMARTSSelector",
|
|
26
|
+
"VirtualAtom",
|
|
27
|
+
"MetaDynamicsModel",
|
|
28
|
+
"MetadBias",
|
|
29
|
+
"MetaDynamicsConfig",
|
|
30
|
+
"OPESModel",
|
|
31
|
+
"OPESBias",
|
|
32
|
+
"OPESConfig",
|
|
33
|
+
"RestraintBias",
|
|
34
|
+
"UpperWallBias",
|
|
35
|
+
"LowerWallBias",
|
|
36
|
+
"sum_hills",
|
|
37
|
+
"read_colvar",
|
|
38
|
+
"plot_cv_time_series",
|
|
39
|
+
]
|
hillclimber/actions.py
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import dataclasses
|
|
2
|
+
|
|
3
|
+
import ase
|
|
4
|
+
|
|
5
|
+
from hillclimber.interfaces import CollectiveVariable, PlumedGenerator
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclasses.dataclass
|
|
9
|
+
class PrintAction(PlumedGenerator):
|
|
10
|
+
"""PLUMED PRINT action for outputting collective variables.
|
|
11
|
+
|
|
12
|
+
This action prints the values of collective variables to a file during
|
|
13
|
+
the simulation. Multiple CVs can be printed to the same file.
|
|
14
|
+
|
|
15
|
+
Parameters
|
|
16
|
+
----------
|
|
17
|
+
cvs : list[CollectiveVariable]
|
|
18
|
+
List of collective variables to print.
|
|
19
|
+
stride : int, optional
|
|
20
|
+
Print every N steps, by default 1.
|
|
21
|
+
file : str, optional
|
|
22
|
+
Output file name, by default "COLVAR".
|
|
23
|
+
|
|
24
|
+
Examples
|
|
25
|
+
--------
|
|
26
|
+
>>> import hillclimber as hc
|
|
27
|
+
>>> print_action = hc.PrintAction(
|
|
28
|
+
... cvs=[cv1, cv2, cv3],
|
|
29
|
+
... stride=100,
|
|
30
|
+
... file="COLVAR"
|
|
31
|
+
... )
|
|
32
|
+
|
|
33
|
+
Resources
|
|
34
|
+
---------
|
|
35
|
+
- https://www.plumed.org/doc-master/user-doc/html/PRINT/
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
cvs: list[CollectiveVariable]
|
|
39
|
+
stride: int = 1
|
|
40
|
+
file: str = "COLVAR"
|
|
41
|
+
|
|
42
|
+
def to_plumed(self, atoms: ase.Atoms) -> list[str]:
|
|
43
|
+
"""Convert the action node to a PLUMED input string."""
|
|
44
|
+
all_labels = set()
|
|
45
|
+
for cv in self.cvs:
|
|
46
|
+
labels, _ = cv.to_plumed(atoms)
|
|
47
|
+
all_labels.update(labels)
|
|
48
|
+
|
|
49
|
+
# Create the PRINT command with the unique labels
|
|
50
|
+
print_command = f"PRINT ARG={','.join(sorted(all_labels))} STRIDE={self.stride} FILE={self.file}"
|
|
51
|
+
|
|
52
|
+
# Return the command as a list
|
|
53
|
+
return [print_command]
|
hillclimber/analysis.py
ADDED
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
"""Analysis utilities for metadynamics simulations.
|
|
2
|
+
|
|
3
|
+
This module provides tools for analyzing metadynamics simulations,
|
|
4
|
+
including free energy surface reconstruction and other post-processing tasks.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import re
|
|
8
|
+
import subprocess
|
|
9
|
+
import typing as t
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
import numpy as np
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _validate_multi_cv_params(
|
|
16
|
+
min_bounds: float | list[float] | None = None,
|
|
17
|
+
max_bounds: float | list[float] | None = None,
|
|
18
|
+
bin: int | list[int] | None = None,
|
|
19
|
+
spacing: float | list[float] | None = None,
|
|
20
|
+
sigma: float | list[float] | None = None,
|
|
21
|
+
idw: str | list[str] | None = None,
|
|
22
|
+
) -> None:
|
|
23
|
+
"""Validate that multi-CV parameters have consistent dimensions.
|
|
24
|
+
|
|
25
|
+
Parameters
|
|
26
|
+
----------
|
|
27
|
+
min_bounds, max_bounds, bin, spacing, sigma, idw
|
|
28
|
+
Parameters from sum_hills that can be lists for multi-CV cases.
|
|
29
|
+
|
|
30
|
+
Raises
|
|
31
|
+
------
|
|
32
|
+
ValueError
|
|
33
|
+
If list parameters have inconsistent lengths.
|
|
34
|
+
"""
|
|
35
|
+
# Collect all list parameters and their lengths
|
|
36
|
+
list_params: dict[str, int] = {}
|
|
37
|
+
|
|
38
|
+
params_to_check = {
|
|
39
|
+
"min_bounds": min_bounds,
|
|
40
|
+
"max_bounds": max_bounds,
|
|
41
|
+
"bin": bin,
|
|
42
|
+
"spacing": spacing,
|
|
43
|
+
"sigma": sigma,
|
|
44
|
+
"idw": idw,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
for name, value in params_to_check.items():
|
|
48
|
+
if isinstance(value, (list, tuple)):
|
|
49
|
+
list_params[name] = len(value)
|
|
50
|
+
|
|
51
|
+
# If no list parameters, nothing to validate (single CV case)
|
|
52
|
+
if not list_params:
|
|
53
|
+
return
|
|
54
|
+
|
|
55
|
+
# Check that all list parameters have the same length
|
|
56
|
+
lengths = set(list_params.values())
|
|
57
|
+
if len(lengths) > 1:
|
|
58
|
+
# Build a detailed error message
|
|
59
|
+
param_details = ", ".join(
|
|
60
|
+
f"{name}={length}" for name, length in list_params.items()
|
|
61
|
+
)
|
|
62
|
+
raise ValueError(
|
|
63
|
+
f"Inconsistent number of CVs in parameters. "
|
|
64
|
+
f"All list parameters must have the same length. "
|
|
65
|
+
f"Got: {param_details}"
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def sum_hills(
|
|
70
|
+
hills_file: str | Path,
|
|
71
|
+
# Boolean flags
|
|
72
|
+
negbias: bool = False,
|
|
73
|
+
nohistory: bool = False,
|
|
74
|
+
mintozero: bool = False,
|
|
75
|
+
# File/histogram options
|
|
76
|
+
histo: str | Path | None = None,
|
|
77
|
+
# Grid parameters
|
|
78
|
+
stride: int | None = None,
|
|
79
|
+
min_bounds: float | list[float] | None = None,
|
|
80
|
+
max_bounds: float | list[float] | None = None,
|
|
81
|
+
bin: int | list[int] | None = None,
|
|
82
|
+
spacing: float | list[float] | None = None,
|
|
83
|
+
# Variable selection
|
|
84
|
+
idw: str | list[str] | None = None,
|
|
85
|
+
# Output options
|
|
86
|
+
outfile: str | Path | None = None,
|
|
87
|
+
outhisto: str | Path | None = None,
|
|
88
|
+
# Integration parameters
|
|
89
|
+
kt: float | None = None,
|
|
90
|
+
sigma: float | list[float] | None = None,
|
|
91
|
+
# Format
|
|
92
|
+
fmt: str | None = None,
|
|
93
|
+
# Additional options
|
|
94
|
+
verbose: bool = True,
|
|
95
|
+
check: bool = True,
|
|
96
|
+
) -> subprocess.CompletedProcess:
|
|
97
|
+
"""Run PLUMED sum_hills to reconstruct free energy surfaces from metadynamics.
|
|
98
|
+
|
|
99
|
+
This function wraps the PLUMED ``sum_hills`` command-line tool, which analyzes
|
|
100
|
+
HILLS files from metadynamics simulations to reconstruct the free energy surface.
|
|
101
|
+
|
|
102
|
+
Parameters
|
|
103
|
+
----------
|
|
104
|
+
hills_file : str or Path
|
|
105
|
+
Path to the HILLS file to analyze. This file is generated during
|
|
106
|
+
metadynamics simulations and contains the deposited Gaussian hills.
|
|
107
|
+
negbias : bool, default=False
|
|
108
|
+
Print the negative bias instead of the free energy.
|
|
109
|
+
nohistory : bool, default=False
|
|
110
|
+
To be used with ``stride``: splits the bias/histogram without previous history.
|
|
111
|
+
mintozero : bool, default=False
|
|
112
|
+
Translate all minimum values in bias/histogram to zero.
|
|
113
|
+
histo : str or Path, optional
|
|
114
|
+
Name of the file for histogram (a COLVAR/HILLS file is good).
|
|
115
|
+
stride : int, optional
|
|
116
|
+
Stride for integrating hills file. Default is 0 (never integrate).
|
|
117
|
+
min_bounds : float or list[float], optional
|
|
118
|
+
Lower bounds for the grid. For multi-dimensional CVs, provide a list with
|
|
119
|
+
one value per CV (e.g., ``[-3.14, -3.14]`` for two torsion angles).
|
|
120
|
+
max_bounds : float or list[float], optional
|
|
121
|
+
Upper bounds for the grid. For multi-dimensional CVs, provide a list with
|
|
122
|
+
one value per CV (e.g., ``[3.14, 3.14]`` for two torsion angles).
|
|
123
|
+
bin : int or list[int], optional
|
|
124
|
+
Number of bins for the grid. For multi-dimensional CVs, provide a list with
|
|
125
|
+
one value per CV (e.g., ``[250, 250]`` for two CVs with 250 bins each).
|
|
126
|
+
spacing : float or list[float], optional
|
|
127
|
+
Grid spacing, alternative to the number of bins. For multi-dimensional CVs,
|
|
128
|
+
provide a list with one value per CV.
|
|
129
|
+
idw : str or list[str], optional
|
|
130
|
+
Variables to be used for the free-energy/histogram. For multi-dimensional CVs,
|
|
131
|
+
provide a list with one variable name per CV (e.g., ``['phi', 'psi']``).
|
|
132
|
+
outfile : str or Path, optional
|
|
133
|
+
Output file for sum_hills. Default is ``fes.dat``.
|
|
134
|
+
outhisto : str or Path, optional
|
|
135
|
+
Output file for the histogram.
|
|
136
|
+
kt : float, optional
|
|
137
|
+
Temperature in energy units (kJ/mol) for integrating out variables.
|
|
138
|
+
sigma : float or list[float], optional
|
|
139
|
+
Sigma for binning (only needed when doing histogram). For multi-dimensional CVs,
|
|
140
|
+
provide a list with one value per CV.
|
|
141
|
+
fmt : str, optional
|
|
142
|
+
Output format specification.
|
|
143
|
+
verbose : bool, default=True
|
|
144
|
+
Print command output to stdout/stderr.
|
|
145
|
+
check : bool, default=True
|
|
146
|
+
Raise exception if command fails.
|
|
147
|
+
|
|
148
|
+
Returns
|
|
149
|
+
-------
|
|
150
|
+
subprocess.CompletedProcess
|
|
151
|
+
The completed process object from subprocess.run.
|
|
152
|
+
|
|
153
|
+
Raises
|
|
154
|
+
------
|
|
155
|
+
FileNotFoundError
|
|
156
|
+
If the HILLS file cannot be found.
|
|
157
|
+
ValueError
|
|
158
|
+
If list-based parameters (``bin``, ``min_bounds``, ``max_bounds``, etc.)
|
|
159
|
+
have inconsistent lengths when using multiple CVs.
|
|
160
|
+
subprocess.CalledProcessError
|
|
161
|
+
If the PLUMED command fails and ``check=True``.
|
|
162
|
+
|
|
163
|
+
Examples
|
|
164
|
+
--------
|
|
165
|
+
Basic usage to reconstruct a 1D free energy surface:
|
|
166
|
+
|
|
167
|
+
>>> import hillclimber as hc
|
|
168
|
+
>>> hc.sum_hills("HILLS")
|
|
169
|
+
|
|
170
|
+
With custom grid resolution and output file:
|
|
171
|
+
|
|
172
|
+
>>> hc.sum_hills(
|
|
173
|
+
... "HILLS",
|
|
174
|
+
... bin=1000,
|
|
175
|
+
... outfile="custom_fes.dat"
|
|
176
|
+
... )
|
|
177
|
+
|
|
178
|
+
For a 2D free energy surface with explicit bounds:
|
|
179
|
+
|
|
180
|
+
>>> hc.sum_hills(
|
|
181
|
+
... "HILLS",
|
|
182
|
+
... bin=[100, 100],
|
|
183
|
+
... min_bounds=[0.0, 0.0],
|
|
184
|
+
... max_bounds=[10.0, 10.0],
|
|
185
|
+
... outfile="fes_2d.dat"
|
|
186
|
+
... )
|
|
187
|
+
|
|
188
|
+
For protein backbone torsion angles (phi and psi):
|
|
189
|
+
|
|
190
|
+
>>> hc.sum_hills(
|
|
191
|
+
... "HILLS",
|
|
192
|
+
... bin=[250, 250],
|
|
193
|
+
... min_bounds=[-3.14, -3.14],
|
|
194
|
+
... max_bounds=[3.14, 3.14],
|
|
195
|
+
... idw=["phi", "psi"],
|
|
196
|
+
... outfile="ramachandran.dat"
|
|
197
|
+
... )
|
|
198
|
+
|
|
199
|
+
Resources
|
|
200
|
+
---------
|
|
201
|
+
- https://www.plumed.org/doc-master/user-doc/html/sum_hills.html
|
|
202
|
+
|
|
203
|
+
Notes
|
|
204
|
+
-----
|
|
205
|
+
The HILLS file is automatically generated during metadynamics simulations
|
|
206
|
+
when using the METAD action. Each line in the file represents a deposited
|
|
207
|
+
Gaussian hill with its position, width (sigma), and height.
|
|
208
|
+
|
|
209
|
+
The free energy surface is reconstructed by summing all deposited hills:
|
|
210
|
+
F(s) = -V(s) where V(s) is the bias potential.
|
|
211
|
+
|
|
212
|
+
**Multi-CV Consistency:**
|
|
213
|
+
When using multiple collective variables (CVs), all list-based parameters
|
|
214
|
+
must have the same length. For example, if analyzing two CVs (phi and psi),
|
|
215
|
+
then ``bin``, ``min_bounds``, ``max_bounds``, and ``idw`` (if provided as lists)
|
|
216
|
+
must all have exactly 2 elements. The function will raise a ``ValueError``
|
|
217
|
+
if inconsistent list lengths are detected.
|
|
218
|
+
"""
|
|
219
|
+
# Convert to Path object
|
|
220
|
+
hills_file = Path(hills_file)
|
|
221
|
+
|
|
222
|
+
# Verify HILLS file exists
|
|
223
|
+
if not hills_file.exists():
|
|
224
|
+
raise FileNotFoundError(f"HILLS file not found: {hills_file}")
|
|
225
|
+
|
|
226
|
+
# Validate multi-CV parameter consistency
|
|
227
|
+
_validate_multi_cv_params(
|
|
228
|
+
min_bounds=min_bounds,
|
|
229
|
+
max_bounds=max_bounds,
|
|
230
|
+
bin=bin,
|
|
231
|
+
spacing=spacing,
|
|
232
|
+
sigma=sigma,
|
|
233
|
+
idw=idw,
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
# Build command
|
|
237
|
+
cmd_parts = ["plumed", "sum_hills"]
|
|
238
|
+
|
|
239
|
+
# Add hills file
|
|
240
|
+
cmd_parts.extend(["--hills", str(hills_file)])
|
|
241
|
+
|
|
242
|
+
# Add boolean flags
|
|
243
|
+
if negbias:
|
|
244
|
+
cmd_parts.append("--negbias")
|
|
245
|
+
if nohistory:
|
|
246
|
+
cmd_parts.append("--nohistory")
|
|
247
|
+
if mintozero:
|
|
248
|
+
cmd_parts.append("--mintozero")
|
|
249
|
+
|
|
250
|
+
# Helper function to format list parameters
|
|
251
|
+
def format_param(value: t.Any) -> str:
|
|
252
|
+
if isinstance(value, (list, tuple)):
|
|
253
|
+
return ",".join(str(v) for v in value)
|
|
254
|
+
return str(value)
|
|
255
|
+
|
|
256
|
+
# Add optional parameters
|
|
257
|
+
if histo is not None:
|
|
258
|
+
cmd_parts.extend(["--histo", str(histo)])
|
|
259
|
+
if stride is not None:
|
|
260
|
+
cmd_parts.extend(["--stride", str(stride)])
|
|
261
|
+
if min_bounds is not None:
|
|
262
|
+
cmd_parts.extend(["--min", format_param(min_bounds)])
|
|
263
|
+
if max_bounds is not None:
|
|
264
|
+
cmd_parts.extend(["--max", format_param(max_bounds)])
|
|
265
|
+
if bin is not None:
|
|
266
|
+
cmd_parts.extend(["--bin", format_param(bin)])
|
|
267
|
+
if spacing is not None:
|
|
268
|
+
cmd_parts.extend(["--spacing", format_param(spacing)])
|
|
269
|
+
if idw is not None:
|
|
270
|
+
cmd_parts.extend(["--idw", format_param(idw)])
|
|
271
|
+
if outfile is not None:
|
|
272
|
+
cmd_parts.extend(["--outfile", str(outfile)])
|
|
273
|
+
if outhisto is not None:
|
|
274
|
+
cmd_parts.extend(["--outhisto", str(outhisto)])
|
|
275
|
+
if kt is not None:
|
|
276
|
+
cmd_parts.extend(["--kt", str(kt)])
|
|
277
|
+
if sigma is not None:
|
|
278
|
+
cmd_parts.extend(["--sigma", format_param(sigma)])
|
|
279
|
+
if fmt is not None:
|
|
280
|
+
cmd_parts.extend(["--fmt", str(fmt)])
|
|
281
|
+
|
|
282
|
+
# Run command
|
|
283
|
+
if verbose:
|
|
284
|
+
print(f"Running: {' '.join(cmd_parts)}")
|
|
285
|
+
|
|
286
|
+
result = subprocess.run(
|
|
287
|
+
cmd_parts,
|
|
288
|
+
capture_output=not verbose,
|
|
289
|
+
text=True,
|
|
290
|
+
check=check,
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
if verbose and result.returncode == 0:
|
|
294
|
+
print("sum_hills completed successfully")
|
|
295
|
+
|
|
296
|
+
return result
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
def read_colvar(
|
|
300
|
+
colvar_file: str | Path,
|
|
301
|
+
) -> dict[str, np.ndarray]:
|
|
302
|
+
"""Read a PLUMED COLVAR file and parse its contents.
|
|
303
|
+
|
|
304
|
+
This function reads a COLVAR file produced by PLUMED, extracts the field names
|
|
305
|
+
from the header (which starts with ``#! FIELDS``), and returns the data as a
|
|
306
|
+
dictionary mapping field names to numpy arrays.
|
|
307
|
+
|
|
308
|
+
Parameters
|
|
309
|
+
----------
|
|
310
|
+
colvar_file : str or Path
|
|
311
|
+
Path to the COLVAR file to read.
|
|
312
|
+
|
|
313
|
+
Returns
|
|
314
|
+
-------
|
|
315
|
+
dict[str, np.ndarray]
|
|
316
|
+
Dictionary mapping field names to 1D numpy arrays containing the data.
|
|
317
|
+
Keys correspond to the fields specified in the COLVAR header.
|
|
318
|
+
|
|
319
|
+
Raises
|
|
320
|
+
------
|
|
321
|
+
FileNotFoundError
|
|
322
|
+
If the COLVAR file does not exist.
|
|
323
|
+
ValueError
|
|
324
|
+
If the COLVAR file does not contain a valid ``#! FIELDS`` header.
|
|
325
|
+
|
|
326
|
+
Examples
|
|
327
|
+
--------
|
|
328
|
+
>>> import hillclimber as hc
|
|
329
|
+
>>> data = hc.read_colvar("COLVAR")
|
|
330
|
+
>>> print(data.keys())
|
|
331
|
+
dict_keys(['time', 'phi', 'psi'])
|
|
332
|
+
>>> print(data['time'][:5])
|
|
333
|
+
[0. 1. 2. 3. 4.]
|
|
334
|
+
|
|
335
|
+
Notes
|
|
336
|
+
-----
|
|
337
|
+
The COLVAR file format from PLUMED starts with a header line:
|
|
338
|
+
``#! FIELDS time cv1 cv2 ...``
|
|
339
|
+
|
|
340
|
+
All subsequent lines starting with ``#`` are treated as comments and ignored.
|
|
341
|
+
Data lines are parsed as whitespace-separated numeric values.
|
|
342
|
+
|
|
343
|
+
Resources
|
|
344
|
+
---------
|
|
345
|
+
- https://www.plumed.org/doc-master/user-doc/html/colvar.html
|
|
346
|
+
"""
|
|
347
|
+
colvar_file = Path(colvar_file)
|
|
348
|
+
|
|
349
|
+
if not colvar_file.exists():
|
|
350
|
+
raise FileNotFoundError(f"COLVAR file not found: {colvar_file}")
|
|
351
|
+
|
|
352
|
+
# Read the file
|
|
353
|
+
with open(colvar_file, "r") as f:
|
|
354
|
+
lines = f.readlines()
|
|
355
|
+
|
|
356
|
+
# Find and parse the header
|
|
357
|
+
field_names: list[str] | None = None
|
|
358
|
+
for line in lines:
|
|
359
|
+
if line.startswith("#! FIELDS"):
|
|
360
|
+
# Extract field names from the header
|
|
361
|
+
# Format: "#! FIELDS time phi psi ..."
|
|
362
|
+
fields_match = re.match(r"#!\s*FIELDS\s+(.+)", line)
|
|
363
|
+
if fields_match:
|
|
364
|
+
field_names = fields_match.group(1).split()
|
|
365
|
+
break
|
|
366
|
+
|
|
367
|
+
if field_names is None:
|
|
368
|
+
raise ValueError(
|
|
369
|
+
f"COLVAR file {colvar_file} does not contain a valid '#! FIELDS' header"
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
# Parse data lines (skip comments)
|
|
373
|
+
data_lines = []
|
|
374
|
+
for line in lines:
|
|
375
|
+
# Skip comments and empty lines
|
|
376
|
+
if line.startswith("#") or not line.strip():
|
|
377
|
+
continue
|
|
378
|
+
# Parse numeric data
|
|
379
|
+
values = line.split()
|
|
380
|
+
if len(values) == len(field_names):
|
|
381
|
+
data_lines.append([float(v) for v in values])
|
|
382
|
+
|
|
383
|
+
# Convert to numpy array
|
|
384
|
+
data_array = np.array(data_lines)
|
|
385
|
+
|
|
386
|
+
# Create dictionary mapping field names to columns
|
|
387
|
+
result = {name: data_array[:, i] for i, name in enumerate(field_names)}
|
|
388
|
+
|
|
389
|
+
return result
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
def plot_cv_time_series(
|
|
393
|
+
colvar_file: str | Path,
|
|
394
|
+
cv_names: list[str] | None = None,
|
|
395
|
+
time_unit: str = "ps",
|
|
396
|
+
exclude_patterns: list[str] | None = None,
|
|
397
|
+
figsize: tuple[float, float] = (8, 5),
|
|
398
|
+
kde_width: str = "25%",
|
|
399
|
+
colors: list[str] | None = None,
|
|
400
|
+
alpha: float = 0.5,
|
|
401
|
+
marker: str = "x",
|
|
402
|
+
marker_size: float = 10,
|
|
403
|
+
) -> tuple[t.Any, t.Any]:
|
|
404
|
+
"""Plot collective variables over time with KDE distributions.
|
|
405
|
+
|
|
406
|
+
This function creates a visualization showing CV evolution over time as scatter
|
|
407
|
+
plots, with kernel density estimation (KDE) plots displayed on the right side
|
|
408
|
+
to show the distribution of each CV.
|
|
409
|
+
|
|
410
|
+
Parameters
|
|
411
|
+
----------
|
|
412
|
+
colvar_file : str or Path
|
|
413
|
+
Path to the COLVAR file to plot.
|
|
414
|
+
cv_names : list[str], optional
|
|
415
|
+
List of CV names to plot. If None, automatically detects CVs by excluding
|
|
416
|
+
common non-CV fields like 'time', 'sigma_*', 'height', 'biasf'.
|
|
417
|
+
time_unit : str, default='ps'
|
|
418
|
+
Unit label for the time axis.
|
|
419
|
+
exclude_patterns : list[str], optional
|
|
420
|
+
Additional regex patterns for field names to exclude from auto-detection.
|
|
421
|
+
Default excludes: 'time', 'sigma_.*', 'height', 'biasf'.
|
|
422
|
+
figsize : tuple[float, float], default=(8, 5)
|
|
423
|
+
Figure size in inches (width, height).
|
|
424
|
+
kde_width : str, default='25%'
|
|
425
|
+
Width of the KDE subplot as a percentage of the main plot width.
|
|
426
|
+
colors : list[str], optional
|
|
427
|
+
List of colors to use for each CV. If None, uses default color cycle.
|
|
428
|
+
alpha : float, default=0.5
|
|
429
|
+
Transparency for scatter points.
|
|
430
|
+
marker : str, default='x'
|
|
431
|
+
Marker style for scatter points.
|
|
432
|
+
marker_size : float, default=10
|
|
433
|
+
Size of scatter markers.
|
|
434
|
+
|
|
435
|
+
Returns
|
|
436
|
+
-------
|
|
437
|
+
fig : matplotlib.figure.Figure
|
|
438
|
+
The matplotlib figure object.
|
|
439
|
+
axes : tuple
|
|
440
|
+
Tuple of (main_axis, kde_axis) matplotlib axes objects.
|
|
441
|
+
|
|
442
|
+
Raises
|
|
443
|
+
------
|
|
444
|
+
ImportError
|
|
445
|
+
If matplotlib or seaborn is not installed.
|
|
446
|
+
FileNotFoundError
|
|
447
|
+
If the COLVAR file does not exist.
|
|
448
|
+
|
|
449
|
+
Examples
|
|
450
|
+
--------
|
|
451
|
+
Basic usage with auto-detected CVs:
|
|
452
|
+
|
|
453
|
+
>>> import hillclimber as hc
|
|
454
|
+
>>> fig, axes = hc.plot_cv_time_series("COLVAR")
|
|
455
|
+
|
|
456
|
+
Plot specific CVs:
|
|
457
|
+
|
|
458
|
+
>>> fig, axes = hc.plot_cv_time_series("COLVAR", cv_names=["phi", "psi"])
|
|
459
|
+
|
|
460
|
+
Customize appearance:
|
|
461
|
+
|
|
462
|
+
>>> fig, axes = hc.plot_cv_time_series(
|
|
463
|
+
... "COLVAR",
|
|
464
|
+
... figsize=(10, 6),
|
|
465
|
+
... colors=["blue", "red"],
|
|
466
|
+
... alpha=0.7
|
|
467
|
+
... )
|
|
468
|
+
|
|
469
|
+
Notes
|
|
470
|
+
-----
|
|
471
|
+
This function requires matplotlib and seaborn to be installed.
|
|
472
|
+
|
|
473
|
+
The function automatically detects CVs by excluding common metadata fields
|
|
474
|
+
such as 'time', 'sigma_*', 'height', and 'biasf'. You can specify additional
|
|
475
|
+
exclusion patterns or explicitly provide the CV names to plot.
|
|
476
|
+
|
|
477
|
+
Resources
|
|
478
|
+
---------
|
|
479
|
+
- https://www.plumed.org/doc-master/user-doc/html/colvar.html
|
|
480
|
+
"""
|
|
481
|
+
try:
|
|
482
|
+
import matplotlib.pyplot as plt
|
|
483
|
+
import seaborn as sns
|
|
484
|
+
from mpl_toolkits.axes_grid1 import make_axes_locatable
|
|
485
|
+
except ImportError as e:
|
|
486
|
+
raise ImportError(
|
|
487
|
+
"matplotlib and seaborn are required for plotting. "
|
|
488
|
+
"Install them with: pip install matplotlib seaborn"
|
|
489
|
+
) from e
|
|
490
|
+
|
|
491
|
+
# Read the COLVAR file
|
|
492
|
+
data = read_colvar(colvar_file)
|
|
493
|
+
|
|
494
|
+
# Auto-detect CVs if not specified
|
|
495
|
+
if cv_names is None:
|
|
496
|
+
# Default exclusion patterns
|
|
497
|
+
default_exclude = [
|
|
498
|
+
r"^time$",
|
|
499
|
+
r"^sigma_.*$",
|
|
500
|
+
r"^height$",
|
|
501
|
+
r"^biasf$",
|
|
502
|
+
]
|
|
503
|
+
if exclude_patterns is not None:
|
|
504
|
+
default_exclude.extend(exclude_patterns)
|
|
505
|
+
|
|
506
|
+
# Filter field names
|
|
507
|
+
detected_cvs: list[str] = []
|
|
508
|
+
for field in data.keys():
|
|
509
|
+
# Check if field matches any exclusion pattern
|
|
510
|
+
exclude = False
|
|
511
|
+
for pattern in default_exclude:
|
|
512
|
+
if re.match(pattern, field):
|
|
513
|
+
exclude = True
|
|
514
|
+
break
|
|
515
|
+
if not exclude:
|
|
516
|
+
detected_cvs.append(field)
|
|
517
|
+
|
|
518
|
+
if not detected_cvs:
|
|
519
|
+
raise ValueError(
|
|
520
|
+
"No CVs detected in COLVAR file. "
|
|
521
|
+
"All fields were excluded by the exclusion patterns."
|
|
522
|
+
)
|
|
523
|
+
cv_names = detected_cvs
|
|
524
|
+
|
|
525
|
+
# Verify that all requested CVs exist
|
|
526
|
+
missing_cvs = [cv for cv in cv_names if cv not in data]
|
|
527
|
+
if missing_cvs:
|
|
528
|
+
raise ValueError(
|
|
529
|
+
f"CVs not found in COLVAR file: {missing_cvs}. "
|
|
530
|
+
f"Available fields: {list(data.keys())}"
|
|
531
|
+
)
|
|
532
|
+
|
|
533
|
+
# Get time data
|
|
534
|
+
if "time" not in data:
|
|
535
|
+
raise ValueError("COLVAR file must contain a 'time' field")
|
|
536
|
+
time = data["time"]
|
|
537
|
+
|
|
538
|
+
# Default colors if not provided
|
|
539
|
+
if colors is None:
|
|
540
|
+
colors = plt.cm.tab10.colors # type: ignore
|
|
541
|
+
|
|
542
|
+
# Set seaborn style
|
|
543
|
+
sns.set(style="whitegrid")
|
|
544
|
+
|
|
545
|
+
# Create figure
|
|
546
|
+
fig, ax = plt.subplots(figsize=figsize)
|
|
547
|
+
|
|
548
|
+
# Plot each CV
|
|
549
|
+
for i, cv_name in enumerate(cv_names):
|
|
550
|
+
color = colors[i % len(colors)]
|
|
551
|
+
cv_data = data[cv_name]
|
|
552
|
+
ax.scatter(
|
|
553
|
+
time,
|
|
554
|
+
cv_data,
|
|
555
|
+
c=[color],
|
|
556
|
+
label=cv_name,
|
|
557
|
+
marker=marker,
|
|
558
|
+
s=marker_size,
|
|
559
|
+
alpha=alpha,
|
|
560
|
+
)
|
|
561
|
+
|
|
562
|
+
ax.set_xlabel(f"Time / {time_unit}")
|
|
563
|
+
ax.set_ylabel("CV value")
|
|
564
|
+
ax.legend()
|
|
565
|
+
|
|
566
|
+
# Create KDE subplot on the right
|
|
567
|
+
divider = make_axes_locatable(ax)
|
|
568
|
+
ax_kde = divider.append_axes("right", size=kde_width, pad=0.1, sharey=ax)
|
|
569
|
+
|
|
570
|
+
# Plot KDE for each CV
|
|
571
|
+
for i, cv_name in enumerate(cv_names):
|
|
572
|
+
color = colors[i % len(colors)]
|
|
573
|
+
cv_data = data[cv_name]
|
|
574
|
+
sns.kdeplot(
|
|
575
|
+
y=cv_data,
|
|
576
|
+
ax=ax_kde,
|
|
577
|
+
color=color,
|
|
578
|
+
fill=True,
|
|
579
|
+
alpha=0.3,
|
|
580
|
+
linewidth=1.5,
|
|
581
|
+
label=cv_name,
|
|
582
|
+
)
|
|
583
|
+
|
|
584
|
+
# Clean up KDE axis
|
|
585
|
+
ax_kde.set_xlabel("Density")
|
|
586
|
+
ax_kde.yaxis.set_tick_params(labelleft=False)
|
|
587
|
+
|
|
588
|
+
plt.tight_layout()
|
|
589
|
+
|
|
590
|
+
return fig, (ax, ax_kde)
|