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
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2016-2021 The VES code team
|
|
3
|
+
(see the PEOPLE-VES file at the root of this folder for a list of names)
|
|
4
|
+
|
|
5
|
+
See http://www.ves-code.org for more information.
|
|
6
|
+
|
|
7
|
+
This file is part of VES code module.
|
|
8
|
+
|
|
9
|
+
The VES code module is free software: you can redistribute it and/or modify
|
|
10
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
11
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
(at your option) any later version.
|
|
13
|
+
|
|
14
|
+
The VES code module is distributed in the hope that it will be useful,
|
|
15
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
GNU Lesser General Public License for more details.
|
|
18
|
+
|
|
19
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
20
|
+
along with the VES code module. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
22
|
+
#ifndef __PLUMED_ves_VesBias_h
|
|
23
|
+
#define __PLUMED_ves_VesBias_h
|
|
24
|
+
|
|
25
|
+
#include "CoeffsVector.h"
|
|
26
|
+
#include "CoeffsMatrix.h"
|
|
27
|
+
|
|
28
|
+
#include "../core/ActionPilot.h"
|
|
29
|
+
#include "../core/ActionWithValue.h"
|
|
30
|
+
#include "../core/ActionWithArguments.h"
|
|
31
|
+
#include "../bias/Bias.h"
|
|
32
|
+
|
|
33
|
+
#include <vector>
|
|
34
|
+
#include <string>
|
|
35
|
+
#include <cmath>
|
|
36
|
+
#include <memory>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
#define PLUMED_VES_VESBIAS_INIT(ao) Action(ao),VesBias(ao)
|
|
40
|
+
|
|
41
|
+
namespace PLMD {
|
|
42
|
+
|
|
43
|
+
class Value;
|
|
44
|
+
|
|
45
|
+
namespace ves {
|
|
46
|
+
|
|
47
|
+
class CoeffsVector;
|
|
48
|
+
class CoeffsMatrix;
|
|
49
|
+
class BasisFunctions;
|
|
50
|
+
class Optimizer;
|
|
51
|
+
class TargetDistribution;
|
|
52
|
+
class FermiSwitchingFunction;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
\ingroup INHERIT
|
|
56
|
+
Abstract base class for implementing biases the extents the normal Bias.h class
|
|
57
|
+
to include functions related to the variational approach.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
class VesBias:
|
|
61
|
+
public bias::Bias {
|
|
62
|
+
private:
|
|
63
|
+
unsigned int ncoeffssets_;
|
|
64
|
+
std::vector<std::unique_ptr<CoeffsVector>> coeffs_pntrs_;
|
|
65
|
+
std::vector<std::unique_ptr<CoeffsVector>> targetdist_averages_pntrs_;
|
|
66
|
+
std::vector<std::unique_ptr<CoeffsVector>> gradient_pntrs_;
|
|
67
|
+
std::vector<std::unique_ptr<CoeffsMatrix>> hessian_pntrs_;
|
|
68
|
+
std::vector<std::vector<double> > sampled_averages;
|
|
69
|
+
std::vector<std::vector<double> > sampled_cross_averages;
|
|
70
|
+
bool use_multiple_coeffssets_;
|
|
71
|
+
//
|
|
72
|
+
std::vector<std::string> coeffs_fnames;
|
|
73
|
+
//
|
|
74
|
+
size_t ncoeffs_total_;
|
|
75
|
+
//
|
|
76
|
+
Optimizer* optimizer_pntr_;
|
|
77
|
+
bool optimize_coeffs_;
|
|
78
|
+
//
|
|
79
|
+
bool compute_hessian_;
|
|
80
|
+
bool diagonal_hessian_;
|
|
81
|
+
//
|
|
82
|
+
std::vector<unsigned int> aver_counters;
|
|
83
|
+
//
|
|
84
|
+
double kbt_;
|
|
85
|
+
//
|
|
86
|
+
std::vector<TargetDistribution*> targetdist_pntrs_;
|
|
87
|
+
bool dynamic_targetdist_;
|
|
88
|
+
//
|
|
89
|
+
std::vector<unsigned int> grid_bins_;
|
|
90
|
+
std::vector<double> grid_min_;
|
|
91
|
+
std::vector<double> grid_max_;
|
|
92
|
+
//
|
|
93
|
+
std::string bias_filename_;
|
|
94
|
+
std::string fes_filename_;
|
|
95
|
+
std::string targetdist_filename_;
|
|
96
|
+
std::string targetdist_averages_filename_;
|
|
97
|
+
std::string coeffs_id_prefix_;
|
|
98
|
+
//
|
|
99
|
+
std::string bias_file_fmt_;
|
|
100
|
+
std::string fes_file_fmt_;
|
|
101
|
+
std::string targetdist_file_fmt_;
|
|
102
|
+
std::string targetdist_restart_file_fmt_;
|
|
103
|
+
//
|
|
104
|
+
bool filenames_have_iteration_number_;
|
|
105
|
+
//
|
|
106
|
+
bool bias_fileoutput_active_;
|
|
107
|
+
bool fes_fileoutput_active_;
|
|
108
|
+
bool fesproj_fileoutput_active_;
|
|
109
|
+
bool dynamic_targetdist_fileoutput_active_;
|
|
110
|
+
bool static_targetdist_fileoutput_active_;
|
|
111
|
+
//
|
|
112
|
+
|
|
113
|
+
bool bias_cutoff_active_;
|
|
114
|
+
double bias_cutoff_value_;
|
|
115
|
+
double bias_current_max_value;
|
|
116
|
+
std::unique_ptr<FermiSwitchingFunction> bias_cutoff_swfunc_pntr_;
|
|
117
|
+
//
|
|
118
|
+
std::vector< std::vector<std::string> > projection_args_;
|
|
119
|
+
//
|
|
120
|
+
bool calc_reweightfactor_;
|
|
121
|
+
//
|
|
122
|
+
double optimization_threshold_;
|
|
123
|
+
private:
|
|
124
|
+
void initializeCoeffs(std::unique_ptr<CoeffsVector>);
|
|
125
|
+
std::vector<double> computeCovarianceFromAverages(const unsigned int) const;
|
|
126
|
+
void multiSimSumAverages(const unsigned int, const double walker_weight=1.0);
|
|
127
|
+
protected:
|
|
128
|
+
//
|
|
129
|
+
void checkThatTemperatureIsGiven();
|
|
130
|
+
//
|
|
131
|
+
void addCoeffsSet(const std::vector<std::string>&,const std::vector<unsigned int>&);
|
|
132
|
+
void addCoeffsSet(std::vector<Value*>&,std::vector<BasisFunctions*>&);
|
|
133
|
+
void addCoeffsSet(std::unique_ptr<CoeffsVector>);
|
|
134
|
+
//
|
|
135
|
+
std::string getCoeffsSetLabelString(const std::string&, const unsigned int coeffs_id = 0) const;
|
|
136
|
+
void clearCoeffsPntrsVector() {
|
|
137
|
+
coeffs_pntrs_.clear();
|
|
138
|
+
}
|
|
139
|
+
void addToSampledAverages(const std::vector<double>&, const unsigned int c_id = 0);
|
|
140
|
+
void setTargetDistAverages(const std::vector<double>&, const unsigned int coeffs_id = 0);
|
|
141
|
+
void setTargetDistAverages(const CoeffsVector&, const unsigned int coeffs_id= 0);
|
|
142
|
+
void setTargetDistAveragesToZero(const unsigned int coeffs_id= 0);
|
|
143
|
+
//
|
|
144
|
+
bool readCoeffsFromFiles();
|
|
145
|
+
//
|
|
146
|
+
template<class T>
|
|
147
|
+
bool parseMultipleValues(const std::string&, std::vector<T>&, unsigned int);
|
|
148
|
+
template<class T>
|
|
149
|
+
bool parseMultipleValues(const std::string&, std::vector<T>&, unsigned int, const T&);
|
|
150
|
+
//
|
|
151
|
+
public:
|
|
152
|
+
static void registerKeywords(Keywords&);
|
|
153
|
+
explicit VesBias(const ActionOptions&ao);
|
|
154
|
+
~VesBias();
|
|
155
|
+
//
|
|
156
|
+
static void useInitialCoeffsKeywords(Keywords&);
|
|
157
|
+
static void useTargetDistributionKeywords(Keywords&);
|
|
158
|
+
static void useMultipleTargetDistributionKeywords(Keywords&);
|
|
159
|
+
static void useGridBinKeywords(Keywords&);
|
|
160
|
+
static void useGridLimitsKeywords(Keywords&);
|
|
161
|
+
static void useBiasCutoffKeywords(Keywords&);
|
|
162
|
+
static void useProjectionArgKeywords(Keywords&);
|
|
163
|
+
static void useReweightFactorKeywords(Keywords&);
|
|
164
|
+
//
|
|
165
|
+
std::vector<CoeffsVector*> getCoeffsPntrs() const {
|
|
166
|
+
return Tools::unique2raw(coeffs_pntrs_);
|
|
167
|
+
}
|
|
168
|
+
std::vector<CoeffsVector*> getTargetDistAveragesPntrs() const {
|
|
169
|
+
return Tools::unique2raw(targetdist_averages_pntrs_);
|
|
170
|
+
}
|
|
171
|
+
std::vector<CoeffsVector*> getGradientPntrs()const {
|
|
172
|
+
return Tools::unique2raw(gradient_pntrs_);
|
|
173
|
+
}
|
|
174
|
+
std::vector<CoeffsMatrix*> getHessianPntrs() const {
|
|
175
|
+
return Tools::unique2raw(hessian_pntrs_);
|
|
176
|
+
}
|
|
177
|
+
std::vector<TargetDistribution*> getTargetDistributionPntrs() const {
|
|
178
|
+
return targetdist_pntrs_;
|
|
179
|
+
}
|
|
180
|
+
//
|
|
181
|
+
CoeffsVector* getCoeffsPntr(const unsigned int coeffs_id = 0) const {
|
|
182
|
+
return coeffs_pntrs_[coeffs_id].get();
|
|
183
|
+
}
|
|
184
|
+
CoeffsVector* getTargetDistAveragesPntr(const unsigned int coeffs_id = 0) const {
|
|
185
|
+
return targetdist_averages_pntrs_[coeffs_id].get();
|
|
186
|
+
}
|
|
187
|
+
CoeffsVector* getGradientPntr(const unsigned int coeffs_id = 0)const {
|
|
188
|
+
return gradient_pntrs_[coeffs_id].get();
|
|
189
|
+
}
|
|
190
|
+
CoeffsMatrix* getHessianPntr(const unsigned int coeffs_id = 0) const {
|
|
191
|
+
return hessian_pntrs_[coeffs_id].get();
|
|
192
|
+
}
|
|
193
|
+
//
|
|
194
|
+
unsigned int getNumberOfTargetDistributionPntrs() const {
|
|
195
|
+
return targetdist_pntrs_.size();
|
|
196
|
+
}
|
|
197
|
+
//
|
|
198
|
+
size_t numberOfCoeffs(const unsigned int coeffs_id = 0) const {
|
|
199
|
+
return coeffs_pntrs_[coeffs_id]->numberOfCoeffs();
|
|
200
|
+
}
|
|
201
|
+
size_t totalNumberOfCoeffs() const {
|
|
202
|
+
return ncoeffs_total_;
|
|
203
|
+
}
|
|
204
|
+
unsigned int numberOfCoeffsSets() const {
|
|
205
|
+
return ncoeffssets_;
|
|
206
|
+
}
|
|
207
|
+
double getKbT() const {
|
|
208
|
+
return kbt_;
|
|
209
|
+
}
|
|
210
|
+
double getBeta() const;
|
|
211
|
+
//
|
|
212
|
+
CoeffsVector& Coeffs(const unsigned int coeffs_id = 0) const {
|
|
213
|
+
return *coeffs_pntrs_[coeffs_id];
|
|
214
|
+
}
|
|
215
|
+
CoeffsVector& TargetDistAverages(const unsigned int coeffs_id = 0) const {
|
|
216
|
+
return *targetdist_averages_pntrs_[coeffs_id];
|
|
217
|
+
}
|
|
218
|
+
CoeffsVector& Gradient(const unsigned int coeffs_id = 0) const {
|
|
219
|
+
return *gradient_pntrs_[coeffs_id];
|
|
220
|
+
}
|
|
221
|
+
CoeffsMatrix& Hessian(const unsigned int coeffs_id = 0) const {
|
|
222
|
+
return *hessian_pntrs_[coeffs_id];
|
|
223
|
+
}
|
|
224
|
+
//
|
|
225
|
+
size_t getCoeffsIndex(const std::vector<unsigned int>& indices, const unsigned int coeffs_id = 0) const;
|
|
226
|
+
std::vector<unsigned int> getCoeffsIndices(const size_t index, const unsigned int coeffs_id = 0) const;
|
|
227
|
+
size_t getHessianIndex(const size_t index1, const size_t index2, const unsigned int coeffs_id = 0) const;
|
|
228
|
+
//
|
|
229
|
+
bool computeHessian() const {
|
|
230
|
+
return compute_hessian_;
|
|
231
|
+
}
|
|
232
|
+
bool diagonalHessian() const {
|
|
233
|
+
return diagonal_hessian_;
|
|
234
|
+
}
|
|
235
|
+
//
|
|
236
|
+
bool optimizeCoeffs() const {
|
|
237
|
+
return optimize_coeffs_;
|
|
238
|
+
}
|
|
239
|
+
Optimizer* getOptimizerPntr() const {
|
|
240
|
+
return optimizer_pntr_;
|
|
241
|
+
}
|
|
242
|
+
bool useMultipleWalkers() const;
|
|
243
|
+
//
|
|
244
|
+
unsigned int getIterationCounter() const;
|
|
245
|
+
//
|
|
246
|
+
void updateGradientAndHessian(const bool);
|
|
247
|
+
void clearGradientAndHessian() {};
|
|
248
|
+
//
|
|
249
|
+
virtual void updateTargetDistributions() {};
|
|
250
|
+
virtual void restartTargetDistributions() {};
|
|
251
|
+
//
|
|
252
|
+
void linkOptimizer(Optimizer*);
|
|
253
|
+
void enableHessian(const bool diagonal_hessian=true);
|
|
254
|
+
void disableHessian();
|
|
255
|
+
//
|
|
256
|
+
void enableMultipleCoeffsSets() {
|
|
257
|
+
use_multiple_coeffssets_=true;
|
|
258
|
+
}
|
|
259
|
+
//
|
|
260
|
+
void enableDynamicTargetDistribution() {
|
|
261
|
+
dynamic_targetdist_=true;
|
|
262
|
+
}
|
|
263
|
+
void disableDynamicTargetDistribution() {
|
|
264
|
+
dynamic_targetdist_=false;
|
|
265
|
+
}
|
|
266
|
+
bool dynamicTargetDistribution() const {
|
|
267
|
+
return dynamic_targetdist_;
|
|
268
|
+
}
|
|
269
|
+
//
|
|
270
|
+
std::vector<unsigned int> getGridBins() const {
|
|
271
|
+
return grid_bins_;
|
|
272
|
+
}
|
|
273
|
+
void setGridBins(const std::vector<unsigned int>&);
|
|
274
|
+
void setGridBins(const unsigned int);
|
|
275
|
+
std::vector<double> getGridMax() const {
|
|
276
|
+
return grid_max_;
|
|
277
|
+
}
|
|
278
|
+
void setGridMax(const std::vector<double>&);
|
|
279
|
+
std::vector<double> getGridMin() const {
|
|
280
|
+
return grid_min_;
|
|
281
|
+
}
|
|
282
|
+
void setGridMin(const std::vector<double>&);
|
|
283
|
+
//
|
|
284
|
+
bool filenamesIncludeIterationNumber() const {
|
|
285
|
+
return filenames_have_iteration_number_;
|
|
286
|
+
}
|
|
287
|
+
void enableIterationNumberInFilenames() {
|
|
288
|
+
filenames_have_iteration_number_=true;
|
|
289
|
+
}
|
|
290
|
+
//
|
|
291
|
+
std::string getIterationFilenameSuffix() const;
|
|
292
|
+
std::string getCoeffsSetFilenameSuffix(const unsigned int coeffs_id) const;
|
|
293
|
+
std::string getCurrentOutputFilename(const std::string&, const std::string& suffix="") const;
|
|
294
|
+
std::string getBiasOutputFilename() const {
|
|
295
|
+
return bias_filename_;
|
|
296
|
+
}
|
|
297
|
+
std::string getCurrentBiasOutputFilename(const std::string& suffix="") const;
|
|
298
|
+
std::string getFesOutputFilename() const {
|
|
299
|
+
return fes_filename_;
|
|
300
|
+
}
|
|
301
|
+
std::string getCurrentFesOutputFilename(const std::string& suffix="") const;
|
|
302
|
+
std::string getTargetDistOutputFilename() const {
|
|
303
|
+
return targetdist_filename_;
|
|
304
|
+
}
|
|
305
|
+
std::string getCurrentTargetDistOutputFilename(const std::string& suffix="") const;
|
|
306
|
+
//
|
|
307
|
+
void enableBiasFileOutput() {
|
|
308
|
+
bias_fileoutput_active_=true;
|
|
309
|
+
}
|
|
310
|
+
void disableBiasFileOutput() {
|
|
311
|
+
bias_fileoutput_active_=false;
|
|
312
|
+
}
|
|
313
|
+
bool isBiasFileOutputActive() const {
|
|
314
|
+
return bias_fileoutput_active_;
|
|
315
|
+
}
|
|
316
|
+
std::string getBiasFileFmt() const {
|
|
317
|
+
return bias_file_fmt_;
|
|
318
|
+
}
|
|
319
|
+
//
|
|
320
|
+
void enableFesFileOutput() {
|
|
321
|
+
fes_fileoutput_active_=true;
|
|
322
|
+
}
|
|
323
|
+
void disableFesFileOutput() {
|
|
324
|
+
fes_fileoutput_active_=false;
|
|
325
|
+
}
|
|
326
|
+
bool isFesFileOutputActive() const {
|
|
327
|
+
return fes_fileoutput_active_;
|
|
328
|
+
}
|
|
329
|
+
std::string getFesFileFmt() const {
|
|
330
|
+
return fes_file_fmt_;
|
|
331
|
+
}
|
|
332
|
+
//
|
|
333
|
+
void enableFesProjFileOutput() {
|
|
334
|
+
fesproj_fileoutput_active_=true;
|
|
335
|
+
}
|
|
336
|
+
void disableFesFileProjOutput() {
|
|
337
|
+
fesproj_fileoutput_active_=false;
|
|
338
|
+
}
|
|
339
|
+
bool isFesProjFileOutputActive() const {
|
|
340
|
+
return fesproj_fileoutput_active_;
|
|
341
|
+
}
|
|
342
|
+
//
|
|
343
|
+
void enableDynamicTargetDistFileOutput() {
|
|
344
|
+
dynamic_targetdist_fileoutput_active_=true;
|
|
345
|
+
}
|
|
346
|
+
void disableDynamicTargetDistFileOutput() {
|
|
347
|
+
dynamic_targetdist_fileoutput_active_=false;
|
|
348
|
+
}
|
|
349
|
+
bool isDynamicTargetDistFileOutputActive() const {
|
|
350
|
+
return dynamic_targetdist_fileoutput_active_;
|
|
351
|
+
}
|
|
352
|
+
std::string getTargetDistFileFmt() const {
|
|
353
|
+
return targetdist_file_fmt_;
|
|
354
|
+
}
|
|
355
|
+
std::string getTargetDistRestartFileFmt() const {
|
|
356
|
+
return targetdist_restart_file_fmt_;
|
|
357
|
+
}
|
|
358
|
+
//
|
|
359
|
+
void enableStaticTargetDistFileOutput() {
|
|
360
|
+
static_targetdist_fileoutput_active_=true;
|
|
361
|
+
}
|
|
362
|
+
void disableStaticTargetDistFileOutput() {
|
|
363
|
+
static_targetdist_fileoutput_active_=false;
|
|
364
|
+
}
|
|
365
|
+
bool isStaticTargetDistFileOutputActive() const {
|
|
366
|
+
return static_targetdist_fileoutput_active_;
|
|
367
|
+
}
|
|
368
|
+
//
|
|
369
|
+
std::vector< std::vector<std::string> > getProjectionArguments() const {
|
|
370
|
+
return projection_args_;
|
|
371
|
+
}
|
|
372
|
+
std::vector<std::string> getProjectionArgument(unsigned int i) const {
|
|
373
|
+
return projection_args_[i];
|
|
374
|
+
}
|
|
375
|
+
unsigned int getNumberOfProjectionArguments() const {
|
|
376
|
+
return projection_args_.size();
|
|
377
|
+
}
|
|
378
|
+
//
|
|
379
|
+
void setupBiasCutoff(const double, const double);
|
|
380
|
+
bool biasCutoffActive() const {
|
|
381
|
+
return bias_cutoff_active_;
|
|
382
|
+
}
|
|
383
|
+
double getBiasCutoffValue() const {
|
|
384
|
+
return bias_cutoff_value_;
|
|
385
|
+
}
|
|
386
|
+
void setCurrentBiasMaxValue(const double max_value) {
|
|
387
|
+
bias_current_max_value=max_value;
|
|
388
|
+
}
|
|
389
|
+
double getCurrentBiasMaxValue() const {
|
|
390
|
+
return bias_current_max_value;
|
|
391
|
+
}
|
|
392
|
+
double getBiasCutoffSwitchingFunction(const double, double&) const;
|
|
393
|
+
double getBiasCutoffSwitchingFunction(const double) const;
|
|
394
|
+
void applyBiasCutoff(double&, std::vector<double>&) const;
|
|
395
|
+
void applyBiasCutoff(double&, std::vector<double>&, std::vector<double>&) const;
|
|
396
|
+
//
|
|
397
|
+
std::unique_ptr<OFile> getOFile(const std::string& filename, const bool multi_sim_single_file=false, const bool enforce_backup=true);
|
|
398
|
+
//
|
|
399
|
+
virtual void setupBiasFileOutput() {};
|
|
400
|
+
virtual void writeBiasToFile() {};
|
|
401
|
+
virtual void resetBiasFileOutput() {};
|
|
402
|
+
//
|
|
403
|
+
virtual void setupFesFileOutput() {};
|
|
404
|
+
virtual void writeFesToFile() {};
|
|
405
|
+
virtual void resetFesFileOutput() {};
|
|
406
|
+
//
|
|
407
|
+
virtual void setupFesProjFileOutput() {};
|
|
408
|
+
virtual void writeFesProjToFile() {};
|
|
409
|
+
virtual void resetFesProjFileOutput() {};
|
|
410
|
+
//
|
|
411
|
+
virtual void setupTargetDistFileOutput() {};
|
|
412
|
+
virtual void writeTargetDistToFile() {};
|
|
413
|
+
virtual void resetTargetDistFileOutput() {};
|
|
414
|
+
//
|
|
415
|
+
virtual void setupTargetDistProjFileOutput() {};
|
|
416
|
+
virtual void writeTargetDistProjToFile() {};
|
|
417
|
+
virtual void resetTargetDistProjFileOutput() {};
|
|
418
|
+
//
|
|
419
|
+
void updateReweightFactor();
|
|
420
|
+
virtual double calculateReweightFactor() const;
|
|
421
|
+
bool isReweightFactorCalculated() const {
|
|
422
|
+
return calc_reweightfactor_;
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
inline
|
|
428
|
+
size_t VesBias::getCoeffsIndex(const std::vector<unsigned int>& indices, const unsigned int coeffs_id) const {
|
|
429
|
+
return coeffs_pntrs_[coeffs_id]->getIndex(indices);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
inline
|
|
433
|
+
std::vector<unsigned int> VesBias::getCoeffsIndices(const size_t index, const unsigned int coeffs_id) const {
|
|
434
|
+
return coeffs_pntrs_[coeffs_id]->getIndices(index);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
inline
|
|
438
|
+
size_t VesBias::getHessianIndex(const size_t index1, const size_t index2, const unsigned int coeffs_id) const {
|
|
439
|
+
return hessian_pntrs_[coeffs_id]->getMatrixIndex(index1,index2);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
inline
|
|
444
|
+
double VesBias::getBeta() const {
|
|
445
|
+
plumed_massert(kbt_!=0.0,"you are requesting beta=1/(kB*T) when kB*T has not been defined. You need to give the temperature using the TEMP keyword as the MD engine does not pass it to PLUMED.");
|
|
446
|
+
return 1.0/kbt_;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
inline
|
|
451
|
+
std::string VesBias::getCurrentBiasOutputFilename(const std::string& suffix) const {
|
|
452
|
+
return getCurrentOutputFilename(bias_filename_,suffix);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
inline
|
|
457
|
+
std::string VesBias::getCurrentFesOutputFilename(const std::string& suffix) const {
|
|
458
|
+
return getCurrentOutputFilename(fes_filename_,suffix);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
inline
|
|
463
|
+
double VesBias::getBiasCutoffSwitchingFunction(const double bias) const {
|
|
464
|
+
double dummy=0.0;
|
|
465
|
+
return getBiasCutoffSwitchingFunction(bias,dummy);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
inline
|
|
470
|
+
void VesBias::applyBiasCutoff(double& bias, std::vector<double>& forces) const {
|
|
471
|
+
std::vector<double> dummy(0);
|
|
472
|
+
applyBiasCutoff(bias,forces,dummy);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
inline
|
|
477
|
+
void VesBias::applyBiasCutoff(double& bias, std::vector<double>& forces, std::vector<double>& coeffsderivs_values) const {
|
|
478
|
+
double deriv_factor_sf=0.0;
|
|
479
|
+
double value_sf = getBiasCutoffSwitchingFunction(bias,deriv_factor_sf);
|
|
480
|
+
bias *= value_sf;
|
|
481
|
+
for(unsigned int i=0; i<forces.size(); i++) {
|
|
482
|
+
forces[i] *= deriv_factor_sf;
|
|
483
|
+
}
|
|
484
|
+
//
|
|
485
|
+
for(unsigned int i=0; i<coeffsderivs_values.size(); i++) {
|
|
486
|
+
coeffsderivs_values[i] *= deriv_factor_sf;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
inline
|
|
492
|
+
std::vector<double> VesBias::computeCovarianceFromAverages(const unsigned int c_id) const {
|
|
493
|
+
size_t ncoeffs = numberOfCoeffs(c_id);
|
|
494
|
+
std::vector<double> covariance(sampled_cross_averages[c_id].size(),0.0);
|
|
495
|
+
// diagonal part
|
|
496
|
+
for(size_t i=0; i<ncoeffs; i++) {
|
|
497
|
+
size_t midx = getHessianIndex(i,i,c_id);
|
|
498
|
+
covariance[midx] = sampled_cross_averages[c_id][midx] - sampled_averages[c_id][i]*sampled_averages[c_id][i];
|
|
499
|
+
}
|
|
500
|
+
if(!diagonal_hessian_) {
|
|
501
|
+
for(size_t i=0; i<ncoeffs; i++) {
|
|
502
|
+
for(size_t j=(i+1); j<ncoeffs; j++) {
|
|
503
|
+
size_t midx = getHessianIndex(i,j,c_id);
|
|
504
|
+
covariance[midx] = sampled_cross_averages[c_id][midx] - sampled_averages[c_id][i]*sampled_averages[c_id][j];
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
return covariance;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
template<class T>
|
|
513
|
+
bool VesBias::parseMultipleValues(const std::string& keyword, std::vector<T>& values, unsigned int nvalues) {
|
|
514
|
+
plumed_assert(nvalues>0);
|
|
515
|
+
plumed_assert(values.size()==0);
|
|
516
|
+
bool identical_values=false;
|
|
517
|
+
//
|
|
518
|
+
parseVector(keyword,values);
|
|
519
|
+
if(values.size()==1 && nvalues>1) {
|
|
520
|
+
values.resize(nvalues,values[0]);
|
|
521
|
+
identical_values=true;
|
|
522
|
+
}
|
|
523
|
+
if(values.size()>0 && values.size()!=nvalues) {
|
|
524
|
+
std::string s1;
|
|
525
|
+
Tools::convert(nvalues,s1);
|
|
526
|
+
plumed_merror("Error in " + keyword + " keyword: either give 1 common parameter value or " + s1 + " separate parameter values");
|
|
527
|
+
}
|
|
528
|
+
return identical_values;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
template<class T>
|
|
532
|
+
bool VesBias::parseMultipleValues(const std::string& keyword, std::vector<T>& values, unsigned int nvalues, const T& default_value) {
|
|
533
|
+
bool identical_values = parseMultipleValues(keyword,values,nvalues);
|
|
534
|
+
if(values.size()==0) {
|
|
535
|
+
values.resize(nvalues,default_value);
|
|
536
|
+
identical_values=true;
|
|
537
|
+
}
|
|
538
|
+
return identical_values;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
#endif
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2016-2021 The VES code team
|
|
3
|
+
(see the PEOPLE-VES file at the root of this folder for a list of names)
|
|
4
|
+
|
|
5
|
+
See http://www.ves-code.org for more information.
|
|
6
|
+
|
|
7
|
+
This file is part of VES code module.
|
|
8
|
+
|
|
9
|
+
The VES code module is free software: you can redistribute it and/or modify
|
|
10
|
+
it under the terms of the GNU Lesser General Public License as published by
|
|
11
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
(at your option) any later version.
|
|
13
|
+
|
|
14
|
+
The VES code module is distributed in the hope that it will be useful,
|
|
15
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
GNU Lesser General Public License for more details.
|
|
18
|
+
|
|
19
|
+
You should have received a copy of the GNU Lesser General Public License
|
|
20
|
+
along with the VES code module. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
22
|
+
#ifndef __PLUMED_ves_VesTools_h
|
|
23
|
+
#define __PLUMED_ves_VesTools_h
|
|
24
|
+
|
|
25
|
+
#include <string>
|
|
26
|
+
#include <sstream>
|
|
27
|
+
#include <iomanip>
|
|
28
|
+
#include <limits>
|
|
29
|
+
#include <vector>
|
|
30
|
+
|
|
31
|
+
#include "../core/ActionSet.h"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
namespace PLMD {
|
|
35
|
+
|
|
36
|
+
class GridBase;
|
|
37
|
+
|
|
38
|
+
namespace ves {
|
|
39
|
+
|
|
40
|
+
class VesTools {
|
|
41
|
+
public:
|
|
42
|
+
// Convert double into a string with more digits
|
|
43
|
+
static void convertDbl2Str(const double value,std::string& str, unsigned int precision);
|
|
44
|
+
static void convertDbl2Str(const double value,std::string& str);
|
|
45
|
+
// get log2 of unsigned int
|
|
46
|
+
static unsigned int log2(unsigned value);
|
|
47
|
+
// copy grid values
|
|
48
|
+
static void copyGridValues(GridBase* grid_pntr_orig, GridBase* grid_pntr_copy);
|
|
49
|
+
static unsigned int getGridFileInfo(const std::string&, std::string&, std::vector<std::string>&, std::vector<std::string>&, std::vector<std::string>&, std::vector<bool>&, std::vector<unsigned int>&, bool&);
|
|
50
|
+
//
|
|
51
|
+
template<typename T> static std::vector<std::string> getLabelsOfAvailableActions(const ActionSet&);
|
|
52
|
+
template<typename T> static T getPointerFromLabel(const std::string&, const ActionSet&, std::string&);
|
|
53
|
+
template<typename T> static std::vector<T> getPointersFromLabels(const std::vector<std::string>&, const ActionSet&, std::string&);
|
|
54
|
+
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
inline
|
|
58
|
+
void VesTools::convertDbl2Str(const double value,std::string& str, unsigned int precision) {
|
|
59
|
+
std::ostringstream ostr;
|
|
60
|
+
ostr<<std::setprecision(precision)<<value;
|
|
61
|
+
str=ostr.str();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
inline
|
|
66
|
+
void VesTools::convertDbl2Str(const double value,std::string& str) {
|
|
67
|
+
unsigned int precision = std::numeric_limits<double>::digits10 + 1;
|
|
68
|
+
convertDbl2Str(value,str,precision);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
inline
|
|
73
|
+
unsigned int log2(unsigned value) {
|
|
74
|
+
unsigned int result = 0;
|
|
75
|
+
while(value >>= 1) {
|
|
76
|
+
result++;
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
template<typename T>
|
|
83
|
+
std::vector<std::string> VesTools::getLabelsOfAvailableActions(const ActionSet& actionset) {
|
|
84
|
+
std::vector<std::string> avail_action_str(0);
|
|
85
|
+
std::vector<T> avail_action_pntrs = actionset.select<T>();
|
|
86
|
+
for(unsigned int i=0; i<avail_action_pntrs.size(); i++) {
|
|
87
|
+
avail_action_str.push_back(avail_action_pntrs[i]->getLabel());
|
|
88
|
+
}
|
|
89
|
+
return avail_action_str;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
template<typename T>
|
|
94
|
+
T VesTools::getPointerFromLabel(const std::string& action_label, const ActionSet& actionset, std::string& error_msg) {
|
|
95
|
+
std::vector<std::string> action_labels(1);
|
|
96
|
+
action_labels[0] = action_label;
|
|
97
|
+
std::vector<T> action_pntrs = getPointersFromLabels<T>(action_labels,actionset,error_msg);
|
|
98
|
+
return action_pntrs[0];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
template<typename T>
|
|
103
|
+
std::vector<T> VesTools::getPointersFromLabels(const std::vector<std::string>& action_labels, const ActionSet& actionset, std::string& error_msg) {
|
|
104
|
+
std::vector<T> action_pntrs(action_labels.size(),NULL);
|
|
105
|
+
error_msg = "";
|
|
106
|
+
std::vector<std::string> missing(0);
|
|
107
|
+
for(unsigned int i=0; i<action_labels.size(); i++) {
|
|
108
|
+
action_pntrs[i] = actionset.selectWithLabel<T>(action_labels[i]);
|
|
109
|
+
if(action_pntrs[i]==NULL) {
|
|
110
|
+
missing.push_back(action_labels[i]);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// error handling
|
|
114
|
+
if(missing.size()>0) {
|
|
115
|
+
if(missing.size()==1) {
|
|
116
|
+
error_msg = "label "+missing[0]+" does not exist\n";
|
|
117
|
+
} else if(missing.size()>1) {
|
|
118
|
+
std::string tmp="";
|
|
119
|
+
for(unsigned int j=0; j<missing.size(); j++) {
|
|
120
|
+
tmp +=missing[j]+" ";
|
|
121
|
+
}
|
|
122
|
+
error_msg = "labels "+tmp+"do not exist\n";
|
|
123
|
+
}
|
|
124
|
+
std::vector<T> avail_action_pntrs = actionset.select<T>();
|
|
125
|
+
if(avail_action_pntrs.size()>0) {
|
|
126
|
+
error_msg += " Hint! the actions defined in the input file that can be used here are: \n";
|
|
127
|
+
for(unsigned int i=0; i<avail_action_pntrs.size(); i++) {
|
|
128
|
+
error_msg += " " + avail_action_pntrs[i]->getName() + " with label " + avail_action_pntrs[i]->getLabel() + "\n";
|
|
129
|
+
}
|
|
130
|
+
} else {
|
|
131
|
+
error_msg += " Hint! no actions defined in the input file that can be used here, they should be defined before this actions\n";
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return action_pntrs;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
#endif
|