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,357 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2019 Jakub Rydzewski (jr@fizyka.umk.pl). All rights reserved.
|
|
3
|
+
|
|
4
|
+
See http://www.maze-code.github.io for more information.
|
|
5
|
+
|
|
6
|
+
This file is part of maze.
|
|
7
|
+
|
|
8
|
+
maze is free software: you can redistribute it and/or modify it under the
|
|
9
|
+
terms of the GNU Lesser General Public License as published by the Free
|
|
10
|
+
Software Foundation, either version 3 of the License, or (at your option)
|
|
11
|
+
any later version.
|
|
12
|
+
|
|
13
|
+
maze is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
14
|
+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
15
|
+
FOR A PARTICULAR PURPOSE.
|
|
16
|
+
|
|
17
|
+
See the 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 maze. If not, see <https://www.gnu.org/licenses/>.
|
|
21
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
22
|
+
#ifndef __PLUMED_maze_Optimizer_h
|
|
23
|
+
#define __PLUMED_maze_Optimizer_h
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @file Optimizer.h
|
|
27
|
+
*
|
|
28
|
+
* @author J. Rydzewski (jr@fizyka.umk.pl)
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
#include "../colvar/Colvar.h"
|
|
32
|
+
#include "../tools/Communicator.h"
|
|
33
|
+
#include "../tools/OpenMP.h"
|
|
34
|
+
#include "../tools/NeighborList.h"
|
|
35
|
+
#include "../tools/Vector.h"
|
|
36
|
+
|
|
37
|
+
#include "Core.h"
|
|
38
|
+
#include "Loss.h"
|
|
39
|
+
|
|
40
|
+
#include <memory>
|
|
41
|
+
|
|
42
|
+
#define PLUMED_OPT_INIT(ao) Action(ao), Optimizer(ao)
|
|
43
|
+
|
|
44
|
+
namespace PLMD {
|
|
45
|
+
namespace maze {
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @ingroup INHERIT
|
|
49
|
+
*
|
|
50
|
+
* @class Optimizer Optimizer.h "maze/Optimizer.h"
|
|
51
|
+
*
|
|
52
|
+
* @brief Base class for implementing optimizers for ligand unbinding.
|
|
53
|
+
*
|
|
54
|
+
* An optimizer is defined as a colvar that can be passed to Optimizer_Bias.
|
|
55
|
+
*/
|
|
56
|
+
class Optimizer: public colvar::Colvar {
|
|
57
|
+
public:
|
|
58
|
+
/**
|
|
59
|
+
* PLMD constructor.
|
|
60
|
+
*
|
|
61
|
+
* @param[in] ao PLMD::ActionOptions&
|
|
62
|
+
*/
|
|
63
|
+
explicit Optimizer(const ActionOptions&);
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Destructor.
|
|
67
|
+
*/
|
|
68
|
+
~Optimizer() { /* Nothing to do. */ }
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Registers PLMD keywords.
|
|
72
|
+
*
|
|
73
|
+
* @param[in] keys PLMD keywords
|
|
74
|
+
*/
|
|
75
|
+
static void registerKeywords(Keywords& keys);
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The pairing function needs to be overridden by a specific optimizer.
|
|
79
|
+
*
|
|
80
|
+
* @param[in] distance distance between a pair of atoms
|
|
81
|
+
*/
|
|
82
|
+
virtual double pairing(double distance) const;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Optimal values needed for biasing are computed by methods overridding the
|
|
86
|
+
* optimize function.
|
|
87
|
+
*/
|
|
88
|
+
virtual void optimize() = 0;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Calculate the optimal direction of pulling.
|
|
92
|
+
*/
|
|
93
|
+
void calculate();
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Prepare the neighbor list.
|
|
97
|
+
*/
|
|
98
|
+
void prepare();
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Score a ligand-protein configuration.
|
|
102
|
+
*
|
|
103
|
+
* @return score
|
|
104
|
+
*/
|
|
105
|
+
double score();
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Calculate sampling radius as the minimal distance between two groups in
|
|
109
|
+
* neighbors list.
|
|
110
|
+
*
|
|
111
|
+
* @return minimal distance of ligand-protein atom pairs
|
|
112
|
+
*/
|
|
113
|
+
double sampling_radius();
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Load new positions of atoms in the neighbor list.
|
|
117
|
+
*/
|
|
118
|
+
void update_nl();
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Calculate the center of mass.
|
|
122
|
+
*
|
|
123
|
+
* @return center of mass
|
|
124
|
+
*/
|
|
125
|
+
Vector center_of_mass() const;
|
|
126
|
+
|
|
127
|
+
public:
|
|
128
|
+
/**
|
|
129
|
+
* Getters and setters.
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
std::string get_label() const;
|
|
133
|
+
void set_label(const std::string&);
|
|
134
|
+
|
|
135
|
+
// Start optimizer at time = 0.
|
|
136
|
+
void start_step_0();
|
|
137
|
+
|
|
138
|
+
// Start optimizer at time = optimizer stride.
|
|
139
|
+
void start_step_stride();
|
|
140
|
+
|
|
141
|
+
Vector get_opt() const;
|
|
142
|
+
void set_opt(Vector);
|
|
143
|
+
|
|
144
|
+
double get_opt_value() const;
|
|
145
|
+
void set_opt_value(double);
|
|
146
|
+
|
|
147
|
+
unsigned int get_optimizer_stride() const;
|
|
148
|
+
void set_optimizer_stride(unsigned int);
|
|
149
|
+
|
|
150
|
+
bool is_pbc_on() const;
|
|
151
|
+
void pbc_on();
|
|
152
|
+
void pbc_off();
|
|
153
|
+
|
|
154
|
+
unsigned int get_n_iterations() const;
|
|
155
|
+
void set_n_iterations(unsigned int);
|
|
156
|
+
|
|
157
|
+
double get_sampling_radius() const;
|
|
158
|
+
void set_sampling_radius(double);
|
|
159
|
+
|
|
160
|
+
unsigned int get_rank_openmp() const;
|
|
161
|
+
void set_rank_openmp(unsigned int);
|
|
162
|
+
|
|
163
|
+
unsigned int get_stride_openmp() const;
|
|
164
|
+
void set_stride_openmp(unsigned int);
|
|
165
|
+
|
|
166
|
+
unsigned int get_n_threads_openmp() const;
|
|
167
|
+
void set_n_threads_openmp(unsigned int);
|
|
168
|
+
|
|
169
|
+
unsigned int get_nl_stride() const;
|
|
170
|
+
void set_nl_stride(unsigned int);
|
|
171
|
+
|
|
172
|
+
double get_nl_cutofff() const;
|
|
173
|
+
void set_nl_cutoff(double);
|
|
174
|
+
|
|
175
|
+
protected:
|
|
176
|
+
//! Optimizer label.
|
|
177
|
+
std::string label_;
|
|
178
|
+
|
|
179
|
+
//! Start either at time = 0 or time = optimizer stride.
|
|
180
|
+
bool first_step_;
|
|
181
|
+
|
|
182
|
+
//! Biasing direction.
|
|
183
|
+
Vector opt_;
|
|
184
|
+
|
|
185
|
+
//! Current loss function value.
|
|
186
|
+
double opt_value_;
|
|
187
|
+
|
|
188
|
+
//! Optimizer stride.
|
|
189
|
+
unsigned int optimizer_stride_;
|
|
190
|
+
|
|
191
|
+
//! Periodic boundary conditions.
|
|
192
|
+
bool pbc_;
|
|
193
|
+
|
|
194
|
+
//! Number of global iterations.
|
|
195
|
+
unsigned int n_iter_;
|
|
196
|
+
|
|
197
|
+
//! Sampling radius.
|
|
198
|
+
double sampling_r_;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* OpenMP
|
|
202
|
+
*/
|
|
203
|
+
unsigned int rank_;
|
|
204
|
+
unsigned int stride_;
|
|
205
|
+
unsigned int n_threads_;
|
|
206
|
+
|
|
207
|
+
//! Neighbor list of ligand-protein atom pairs.
|
|
208
|
+
std::unique_ptr<NeighborList> neighbor_list_;
|
|
209
|
+
|
|
210
|
+
//! Neighbor list cut-off.
|
|
211
|
+
double nl_cutoff_;
|
|
212
|
+
|
|
213
|
+
//! Neighbor list stride.
|
|
214
|
+
int nl_stride_;
|
|
215
|
+
|
|
216
|
+
private:
|
|
217
|
+
bool serial_;
|
|
218
|
+
bool validate_list_;
|
|
219
|
+
bool first_time_;
|
|
220
|
+
|
|
221
|
+
//! Pointer to the loss function.
|
|
222
|
+
Loss* loss_;
|
|
223
|
+
std::vector<Loss*> vec_loss_;
|
|
224
|
+
|
|
225
|
+
public:
|
|
226
|
+
/*
|
|
227
|
+
* Pointers to PLMD components.
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
//! Biased cv.
|
|
231
|
+
Value* value_x_;
|
|
232
|
+
Value* value_y_;
|
|
233
|
+
Value* value_z_;
|
|
234
|
+
|
|
235
|
+
//! Loss value.
|
|
236
|
+
Value* value_action_;
|
|
237
|
+
//! Sampling radiues value.
|
|
238
|
+
Value* value_sampling_radius_;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
/*
|
|
242
|
+
* Getters and setters.
|
|
243
|
+
*/
|
|
244
|
+
|
|
245
|
+
inline void Optimizer::set_nl_cutoff(double nl_cutoff) {
|
|
246
|
+
nl_cutoff_=nl_cutoff;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
inline double Optimizer::get_nl_cutofff() const {
|
|
250
|
+
return nl_cutoff_;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
inline void Optimizer::set_nl_stride(unsigned int nl_stride) {
|
|
254
|
+
nl_stride_=nl_stride;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
inline unsigned int Optimizer::get_nl_stride() const {
|
|
258
|
+
return nl_stride_;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
inline void Optimizer::set_n_threads_openmp(unsigned int n_threads) {
|
|
262
|
+
n_threads_=n_threads;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
inline unsigned int Optimizer::get_n_threads_openmp() const {
|
|
266
|
+
return n_threads_;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
inline void Optimizer::set_stride_openmp(unsigned int stride) {
|
|
270
|
+
stride_=stride;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
inline unsigned int Optimizer::get_stride_openmp() const {
|
|
274
|
+
return stride_;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
inline void Optimizer::set_rank_openmp(unsigned int rank) {
|
|
278
|
+
rank_=rank;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
inline unsigned int Optimizer::get_rank_openmp() const {
|
|
282
|
+
return rank_;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
inline void Optimizer::set_sampling_radius(double sampling_r) {
|
|
286
|
+
sampling_r_=sampling_r;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
inline double Optimizer::get_sampling_radius() const {
|
|
290
|
+
return sampling_r_;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
inline void Optimizer::set_n_iterations(unsigned int n_iter) {
|
|
294
|
+
n_iter_=n_iter;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
inline unsigned int Optimizer::get_n_iterations() const {
|
|
298
|
+
return n_iter_;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
inline void Optimizer::pbc_off() {
|
|
302
|
+
pbc_=false;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
inline void Optimizer::pbc_on() {
|
|
306
|
+
pbc_=true;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
inline bool Optimizer::is_pbc_on() const {
|
|
310
|
+
return pbc_==true;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
inline void Optimizer::set_optimizer_stride(unsigned int optimizer_stride) {
|
|
314
|
+
optimizer_stride_=optimizer_stride;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
inline unsigned int Optimizer::get_optimizer_stride() const {
|
|
318
|
+
return optimizer_stride_;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
inline void Optimizer::set_opt_value(double opt_value) {
|
|
322
|
+
opt_value_=opt_value;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
inline double Optimizer::get_opt_value() const {
|
|
326
|
+
return opt_value_;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// cppcheck-suppress passedByValue
|
|
330
|
+
inline void Optimizer::set_opt(Vector opt) {
|
|
331
|
+
opt_=opt;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
inline Vector Optimizer::get_opt() const {
|
|
335
|
+
return opt_;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
inline void Optimizer::set_label(const std::string& label) {
|
|
339
|
+
label_=label;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
inline std::string Optimizer::get_label() const {
|
|
343
|
+
return label_;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
inline void Optimizer::start_step_0() {
|
|
347
|
+
first_step_=false;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
inline void Optimizer::start_step_stride() {
|
|
351
|
+
first_step_=true;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
} // namespace maze
|
|
355
|
+
} // namespace PLMD
|
|
356
|
+
|
|
357
|
+
#endif // __PLUMED_maze_Optimizer_h
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2019 Jakub Rydzewski (jr@fizyka.umk.pl). All rights reserved.
|
|
3
|
+
|
|
4
|
+
See http://www.maze-code.github.io for more information.
|
|
5
|
+
|
|
6
|
+
This file is part of maze.
|
|
7
|
+
|
|
8
|
+
maze is free software: you can redistribute it and/or modify it under the
|
|
9
|
+
terms of the GNU Lesser General Public License as published by the Free
|
|
10
|
+
Software Foundation, either version 3 of the License, or (at your option)
|
|
11
|
+
any later version.
|
|
12
|
+
|
|
13
|
+
maze is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
14
|
+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
15
|
+
FOR A PARTICULAR PURPOSE.
|
|
16
|
+
|
|
17
|
+
See the 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 maze. If not, see <https://www.gnu.org/licenses/>.
|
|
21
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
22
|
+
#ifndef __PLUMED_maze_Random_MT_h
|
|
23
|
+
#define __PLUMED_maze_Random_MT_h
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @file Random_MT.h
|
|
27
|
+
*
|
|
28
|
+
* @author J. Rydzewski (jr@fizyka.umk.pl)
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
#include "Core.h"
|
|
32
|
+
|
|
33
|
+
namespace PLMD {
|
|
34
|
+
namespace maze {
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @class rnd Random_MT.h "maze/Random_MT.h"
|
|
38
|
+
*
|
|
39
|
+
* @brief Mersenne Twister sampler for random variables.
|
|
40
|
+
*
|
|
41
|
+
* Supports generating integers, doubles, and std::vectors and PLMD::Vectors
|
|
42
|
+
* within a given range.
|
|
43
|
+
*/
|
|
44
|
+
class rnd {
|
|
45
|
+
public:
|
|
46
|
+
/**
|
|
47
|
+
* Initialize MT sampler engine based on std::mt19937_64.
|
|
48
|
+
*/
|
|
49
|
+
static std::mt19937_64& mt_eng();
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Feed a random seed.
|
|
53
|
+
*/
|
|
54
|
+
static void randomize();
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Returns a random double from the Cauchy distribution.
|
|
58
|
+
*
|
|
59
|
+
* @param m mean
|
|
60
|
+
* @param s spread
|
|
61
|
+
*/
|
|
62
|
+
static double next_cauchy(double m, double s);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Returns a random int from the uniform distribution from a [f, e) range.
|
|
66
|
+
*
|
|
67
|
+
* @param f begin
|
|
68
|
+
* @param e end
|
|
69
|
+
*/
|
|
70
|
+
static int next_int(int f, int e);
|
|
71
|
+
static int next_int(int e);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Returns a random double from the uniform distribution from a [f, e) range.
|
|
75
|
+
*/
|
|
76
|
+
static double next_double(double f, double e);
|
|
77
|
+
static double next_double(double e);
|
|
78
|
+
static double next_double();
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Returns a random vector<double> from the uniform distribution from a [f, e)
|
|
82
|
+
* range of length n.
|
|
83
|
+
*/
|
|
84
|
+
static std::vector<double> next_double(double f, double e, std::size_t n);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Returns a random PLMD::Vector of length r.
|
|
88
|
+
*/
|
|
89
|
+
static Vector next_plmd_vector();
|
|
90
|
+
static Vector next_plmd_vector(double r);
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Returns a random std::vector of length r.
|
|
94
|
+
*/
|
|
95
|
+
static std::vector<double> next_std_vector();
|
|
96
|
+
static std::vector<double> next_std_vector(double r);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
inline Vector rnd::next_plmd_vector(double r) {
|
|
100
|
+
return next_plmd_vector() * r;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
inline std::vector<double> rnd::next_std_vector(double r) {
|
|
104
|
+
double t = next_double() * 2.0 * pi;
|
|
105
|
+
double p = next_double() * pi;
|
|
106
|
+
|
|
107
|
+
return std::vector<double> {
|
|
108
|
+
r * std::sin(p) * std::cos(t),
|
|
109
|
+
r * std::sin(t) * std::sin(p),
|
|
110
|
+
r * std::cos(p)
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
inline std::vector<double> rnd::next_double(double f, double e, size_t n) {
|
|
115
|
+
std::vector<double> t(n);
|
|
116
|
+
for (std::size_t i=0; i < n; ++i) {
|
|
117
|
+
t[i] = next_double(f, e);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return t;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
inline Vector rnd::next_plmd_vector() {
|
|
124
|
+
double t = next_double() * 2.0 * pi;
|
|
125
|
+
double p = next_double() * pi;
|
|
126
|
+
|
|
127
|
+
return Vector(
|
|
128
|
+
std::sin(p) * std::cos(t),
|
|
129
|
+
std::sin(t) * std::sin(p),
|
|
130
|
+
std::cos(p)
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
inline std::vector<double> rnd::next_std_vector() {
|
|
135
|
+
double t = next_double() * 2.0 * pi;
|
|
136
|
+
double p = next_double() * pi;
|
|
137
|
+
|
|
138
|
+
return std::vector<double> {
|
|
139
|
+
std::sin(p) * std::cos(t),
|
|
140
|
+
std::sin(t) * std::sin(p),
|
|
141
|
+
std::cos(p)
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
inline double rnd::next_double(double e) {
|
|
146
|
+
return next_double(0, e);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
inline void rnd::randomize() {
|
|
150
|
+
mt_eng().seed(time(0));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
} // namespace maze
|
|
154
|
+
} // namespace PLMD
|
|
155
|
+
|
|
156
|
+
#endif // __PLUMED_maze_Random_MT_h
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2019 Jakub Rydzewski (jr@fizyka.umk.pl). All rights reserved.
|
|
3
|
+
|
|
4
|
+
See http://www.maze-code.github.io for more information.
|
|
5
|
+
|
|
6
|
+
This file is part of maze.
|
|
7
|
+
|
|
8
|
+
maze is free software: you can redistribute it and/or modify it under the
|
|
9
|
+
terms of the GNU Lesser General Public License as published by the Free
|
|
10
|
+
Software Foundation, either version 3 of the License, or (at your option)
|
|
11
|
+
any later version.
|
|
12
|
+
|
|
13
|
+
maze is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
14
|
+
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
15
|
+
FOR A PARTICULAR PURPOSE.
|
|
16
|
+
|
|
17
|
+
See the 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 maze. If not, see <https://www.gnu.org/licenses/>.
|
|
21
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
22
|
+
#ifndef __PLUMED_maze_Tools_h
|
|
23
|
+
#define __PLUMED_maze_Tools_h
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @file Tools.h
|
|
27
|
+
*
|
|
28
|
+
* @author J. Rydzewski
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
#include "../core/ActionSet.h"
|
|
32
|
+
#include "../tools/Vector.h"
|
|
33
|
+
#include "Core.h"
|
|
34
|
+
|
|
35
|
+
namespace PLMD {
|
|
36
|
+
namespace maze {
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @class tls Tools.h "maze/Tools.h"
|
|
40
|
+
*
|
|
41
|
+
* @brief Helper functions.
|
|
42
|
+
*/
|
|
43
|
+
class tls {
|
|
44
|
+
public:
|
|
45
|
+
template<typename T> static int sgn(T val);
|
|
46
|
+
|
|
47
|
+
template<typename T>
|
|
48
|
+
static std::vector<std::string> get_labels_actions(const ActionSet&);
|
|
49
|
+
|
|
50
|
+
template<typename T>
|
|
51
|
+
static T get_pointer_label(
|
|
52
|
+
const std::string&,
|
|
53
|
+
const ActionSet&, std::string&
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
template<typename T>
|
|
57
|
+
static std::vector<T> get_pointers_labels(
|
|
58
|
+
const std::vector<std::string>&,
|
|
59
|
+
const ActionSet&, std::string&
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
template<typename T>
|
|
63
|
+
static std::vector<T> Vector2vector(const Vector&);
|
|
64
|
+
|
|
65
|
+
template<typename T>
|
|
66
|
+
static Vector vector2Vector(const std::vector<T>&);
|
|
67
|
+
|
|
68
|
+
template<typename T>
|
|
69
|
+
static T vector_l(const std::vector<T>&);
|
|
70
|
+
|
|
71
|
+
template<typename T>
|
|
72
|
+
static std::vector<T> vector_n(const std::vector<T>&);
|
|
73
|
+
|
|
74
|
+
template<typename T>
|
|
75
|
+
static T mean(const std::vector<T>&);
|
|
76
|
+
|
|
77
|
+
template<typename T>
|
|
78
|
+
static T std(const std::vector<T>&);
|
|
79
|
+
|
|
80
|
+
struct delete_ptr {
|
|
81
|
+
template<typename T> void operator()(T t) {
|
|
82
|
+
delete t;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
template<typename T>
|
|
88
|
+
T tls::std(const std::vector<T>& v) {
|
|
89
|
+
T m=mean(v);
|
|
90
|
+
T sq_sum=std::inner_product(v.begin(), v.end(), v.begin(), 0.0);
|
|
91
|
+
|
|
92
|
+
return std::sqrt(sq_sum/v.size()-m*m);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
template<typename T>
|
|
96
|
+
T tls::mean(const std::vector<T>& v) {
|
|
97
|
+
return std::accumulate(v.begin(), v.end(), 0.0)/v.size();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
template<typename T>
|
|
101
|
+
T tls::vector_l(const std::vector<T>& v) {
|
|
102
|
+
return std::sqrt(std::inner_product(v.begin(), v.end(), v.begin(), 0.0));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
template<typename T>
|
|
106
|
+
std::vector<T> tls::vector_n(const std::vector<T>& v) {
|
|
107
|
+
double l=vector_l(v);
|
|
108
|
+
std::vector<double> n;
|
|
109
|
+
for(std::size_t i=0; i<v.size(); ++i) {
|
|
110
|
+
n.push_back(v[i]/l);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return n;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
template<typename T>
|
|
117
|
+
std::vector<T> tls::Vector2vector(const Vector& v) {
|
|
118
|
+
std::vector<T> t= {v[0], v[1], v[2]};
|
|
119
|
+
|
|
120
|
+
return t;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
template<typename T>
|
|
124
|
+
Vector tls::vector2Vector(const std::vector<T>& v) {
|
|
125
|
+
Vector t(v[0], v[1], v[2]);
|
|
126
|
+
|
|
127
|
+
return t;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
template<typename T>
|
|
131
|
+
int tls::sgn(T val) {
|
|
132
|
+
return (T(0)<val)-(val<T(0));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
template<typename T>
|
|
136
|
+
std::vector<std::string> tls::get_labels_actions(const ActionSet& actionset) {
|
|
137
|
+
std::vector<std::string> action_str(0);
|
|
138
|
+
std::vector<T> action_pntrs=actionset.select<T>();
|
|
139
|
+
|
|
140
|
+
for(unsigned int i=0; i<action_pntrs.size(); i++) {
|
|
141
|
+
action_str.push_back(action_pntrs[i]->getLabel());
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return action_str;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
template<typename T> T
|
|
148
|
+
tls::get_pointer_label(
|
|
149
|
+
const std::string& action_label,
|
|
150
|
+
const ActionSet& actionset,
|
|
151
|
+
std::string& error_msg) {
|
|
152
|
+
|
|
153
|
+
std::vector<std::string> action_labels(1);
|
|
154
|
+
action_labels[0]=action_label;
|
|
155
|
+
std::vector<T> action_pntrs=get_pointers_labels<T>(action_labels, actionset, error_msg);
|
|
156
|
+
|
|
157
|
+
return action_pntrs[0];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
template<typename T>
|
|
161
|
+
std::vector<T> tls::get_pointers_labels(
|
|
162
|
+
const std::vector<std::string>& action_labels,
|
|
163
|
+
const ActionSet& actionset,
|
|
164
|
+
std::string& error_msg) {
|
|
165
|
+
|
|
166
|
+
std::vector<T> action_pntrs(action_labels.size(), NULL);
|
|
167
|
+
error_msg="";
|
|
168
|
+
std::vector<std::string> missing(0);
|
|
169
|
+
|
|
170
|
+
for(unsigned int i=0; i<action_labels.size(); i++) {
|
|
171
|
+
action_pntrs[i]=actionset.selectWithLabel<T>(action_labels[i]);
|
|
172
|
+
if(action_pntrs[i]==NULL) {
|
|
173
|
+
missing.push_back(action_labels[i]);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return action_pntrs;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
} // namespace maze
|
|
181
|
+
} // namespace PLMD
|
|
182
|
+
|
|
183
|
+
#endif // __PLUMED_maze_Tools_h
|