hillclimber 0.1.5__cp313-cp313-musllinux_1_2_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +1070 -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.5.dist-info/METADATA +210 -0
- hillclimber-0.1.5.dist-info/RECORD +472 -0
- hillclimber-0.1.5.dist-info/WHEEL +5 -0
- hillclimber-0.1.5.dist-info/entry_points.txt +8 -0
- hillclimber-0.1.5.dist-info/licenses/LICENSE +165 -0
- hillclimber-0.1.5.dist-info/sboms/auditwheel.cdx.json +1 -0
- hillclimber.libs/libgcc_s-2d945d6c.so.1 +0 -0
- hillclimber.libs/libgomp-1ede7ee7.so.1.0.0 +0 -0
- hillclimber.libs/libstdc++-85f2cd6d.so.6.0.33 +0 -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.so +0 -0
- plumed/_lib/lib/libplumed.a +0 -0
- plumed/_lib/lib/libplumed.so +0 -0
- plumed/_lib/lib/libplumedKernel.so +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 +179 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake +8 -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 +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc +8 -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 +5 -0
- plumed/_lib/lib/plumed/vim/scripts.vim +6 -0
- plumed/_plumed_core.cpython-311-aarch64-linux-musl.so +0 -0
- plumed/_plumed_core.cpython-312-aarch64-linux-musl.so +0 -0
- plumed/_plumed_core.cpython-313-aarch64-linux-musl.so +0 -0
- plumedCommunications.cpython-311-aarch64-linux-musl.so +0 -0
- plumedCommunications.cpython-312-aarch64-linux-musl.so +0 -0
- plumedCommunications.cpython-313-aarch64-linux-musl.so +0 -0
- plumedCommunications.pyi +431 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2011-2023 The plumed team
|
|
3
|
+
(see the PEOPLE file at the root of the distribution for a list of names)
|
|
4
|
+
|
|
5
|
+
See http://www.plumed.org for more information.
|
|
6
|
+
|
|
7
|
+
This file is part of plumed, version 2.
|
|
8
|
+
|
|
9
|
+
plumed 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
|
+
plumed 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 plumed. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
22
|
+
#ifndef __PLUMED_core_ActionWithValue_h
|
|
23
|
+
#define __PLUMED_core_ActionWithValue_h
|
|
24
|
+
|
|
25
|
+
#include "Action.h"
|
|
26
|
+
#include "Value.h"
|
|
27
|
+
#include "../tools/Exception.h"
|
|
28
|
+
#include <vector>
|
|
29
|
+
#include <memory>
|
|
30
|
+
#include <cstring>
|
|
31
|
+
|
|
32
|
+
namespace PLMD {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
\ingroup MULTIINHERIT
|
|
36
|
+
Used to create a PLMD::Action that has some scalar or vectorial output that may or may not have some derivatives.
|
|
37
|
+
This is used for PLMD::Bias, PLMD::Colvar and PLMD::Function
|
|
38
|
+
|
|
39
|
+
The vast majority of the PLMD::Action objects that are implemented in
|
|
40
|
+
plumed calculate some quantity or a set of quantities. This could be
|
|
41
|
+
the value of a CV, the value of a function or the potential due to a bias.
|
|
42
|
+
PLMD::ActionWithValue provides the functionality for storing these quantities
|
|
43
|
+
and (in tandem with PLMD::ActionWithArguments) the functionality for passing
|
|
44
|
+
quantities between PLMD::Actions. When you are deciding what quantities
|
|
45
|
+
your new PLMD::Action will need to store using PLMD::ActionWithValue you must
|
|
46
|
+
ask yourself the following two questions:
|
|
47
|
+
|
|
48
|
+
- Do I need to differentiate my output quantities
|
|
49
|
+
- Is my PLMD::Action calculating a single thing or does the output have multiple components
|
|
50
|
+
|
|
51
|
+
If the answer to the first of these questions is yes then you must setup your values
|
|
52
|
+
you using either PLMD::ActionWithValue::addValueWithDerivatives() or
|
|
53
|
+
PLMD::ActionWithValue::addComponentWithDerivatives. If the answer is no you
|
|
54
|
+
can set up values using PLMD::ActionWithValue::addValue() or PLMD::ActionWithValue::addComponent().
|
|
55
|
+
The precise routine you use to setup your values will depend on your answer to the
|
|
56
|
+
second question. As you are probably aware if the output of your PLMD::Action is a
|
|
57
|
+
single quantity you can reference that quantity in the input file using the label of the
|
|
58
|
+
PLMD::Action it was calculated in. If your action <b> outputs only one quantity </b>
|
|
59
|
+
we call that quantity the <b> value </b> of the Action. To set the <b> value </b> and get pointers to it
|
|
60
|
+
you should <b> use the set of routines that have the word value in the name </b>. If, by contrast,
|
|
61
|
+
your PLMD::Action calculates multiple quantities then these quantities are referenced in input using the
|
|
62
|
+
label.component syntax. We refer to these <b> multiple quantities </b> the <b> components </b>
|
|
63
|
+
of the PLMD::Action. Perhaps unsurprisingly, when you manipulate the <b> components </b> of an
|
|
64
|
+
PLMD::Action you should use <b> the routines with the word component in the name. </b>
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
class ActionWithValue :
|
|
68
|
+
public virtual Action {
|
|
69
|
+
friend class ActionWithVector;
|
|
70
|
+
friend class ActionWithArguments;
|
|
71
|
+
private:
|
|
72
|
+
/// This finishes setup on first step to check if actions are calculated during update
|
|
73
|
+
bool firststep;
|
|
74
|
+
/// An array containing the values for this action
|
|
75
|
+
std::vector<std::unique_ptr<Value>> values;
|
|
76
|
+
/// A vector that is used to hold the forces that we will apply on the input quantities
|
|
77
|
+
std::vector<double> forcesForApply;
|
|
78
|
+
std::vector<unsigned> valsToForce;
|
|
79
|
+
/// Are we skipping the calculation of the derivatives
|
|
80
|
+
bool noderiv;
|
|
81
|
+
/// Are we using numerical derivatives to differentiate
|
|
82
|
+
bool numericalDerivatives;
|
|
83
|
+
/// Return the index for the component named name
|
|
84
|
+
int getComponent( const std::string& valname ) const;
|
|
85
|
+
public:
|
|
86
|
+
|
|
87
|
+
// -------- The action has one value only ---------------- //
|
|
88
|
+
|
|
89
|
+
/// Add a value with the name label
|
|
90
|
+
void addValue( const std::vector<std::size_t>& shape=std::vector<std::size_t>() );
|
|
91
|
+
/// Add a value with the name label that has derivatives
|
|
92
|
+
virtual void addValueWithDerivatives( const std::vector<std::size_t>& shape=std::vector<std::size_t>() );
|
|
93
|
+
/// Set your default value to have no periodicity
|
|
94
|
+
void setNotPeriodic();
|
|
95
|
+
/// Set the value to be periodic with a particular domain
|
|
96
|
+
void setPeriodic( const std::string& min, const std::string& max );
|
|
97
|
+
protected:
|
|
98
|
+
/// Get a pointer to the default value
|
|
99
|
+
Value* getPntrToValue();
|
|
100
|
+
/// Set the default value (the one without name)
|
|
101
|
+
void setValue(const double& d);
|
|
102
|
+
|
|
103
|
+
// -------- The action has multiple components ---------- //
|
|
104
|
+
|
|
105
|
+
public:
|
|
106
|
+
/// Add a value with a name like label.name
|
|
107
|
+
void addComponent( const std::string& valname, const std::vector<std::size_t>& shape=std::vector<std::size_t>() );
|
|
108
|
+
/// Add a value with a name like label.name that has derivatives
|
|
109
|
+
virtual void addComponentWithDerivatives( const std::string& valname, const std::vector<std::size_t>& shape=std::vector<std::size_t>() );
|
|
110
|
+
/// Set your value component to have no periodicity
|
|
111
|
+
void componentIsNotPeriodic( const std::string& valname );
|
|
112
|
+
/// Set the value to be periodic with a particular domain
|
|
113
|
+
void componentIsPeriodic( const std::string& valname, const std::string& min, const std::string& max );
|
|
114
|
+
/// Get the description of this component
|
|
115
|
+
virtual std::string getOutputComponentDescription( const std::string& cname, const Keywords& keys ) const ;
|
|
116
|
+
/// Get a const pointer to the ith component
|
|
117
|
+
const Value* getConstPntrToComponent(unsigned i) const;
|
|
118
|
+
protected:
|
|
119
|
+
/// Return a pointer to the component by index
|
|
120
|
+
Value* getPntrToComponent(unsigned i);
|
|
121
|
+
/// Return a pointer to the value by name
|
|
122
|
+
Value* getPntrToComponent(const std::string& valname);
|
|
123
|
+
/// Accumulate the forces from the Values
|
|
124
|
+
bool checkForForces();
|
|
125
|
+
/// Get the forces to apply
|
|
126
|
+
const std::vector<double>& getForcesToApply() const;
|
|
127
|
+
public:
|
|
128
|
+
explicit ActionWithValue(const ActionOptions&ao);
|
|
129
|
+
~ActionWithValue();
|
|
130
|
+
|
|
131
|
+
/// Register all the relevant keywords for the action
|
|
132
|
+
static void registerKeywords( Keywords& keys );
|
|
133
|
+
/// Insist that numerical derivatives should always be used for an action and make this fact appear in the manual
|
|
134
|
+
static void noAnalyticalDerivatives(Keywords& keys);
|
|
135
|
+
/// The components in the action will depend on the user
|
|
136
|
+
static void useCustomisableComponents(Keywords& keys);
|
|
137
|
+
/// Are we not calculating derivatives
|
|
138
|
+
virtual bool doNotCalculateDerivatives() const ;
|
|
139
|
+
/// Get the value of one of the components of the PLMD::Action
|
|
140
|
+
double getOutputQuantity( const unsigned j ) const ;
|
|
141
|
+
/// Get the value with a specific name (N.B. if there is no such value this returns zero)
|
|
142
|
+
double getOutputQuantity( const std::string& valname ) const ;
|
|
143
|
+
|
|
144
|
+
// --- Routines for passing stuff to ActionWithArguments -- //
|
|
145
|
+
|
|
146
|
+
/// Check if a value with a particular name is present. This is only used in PLMD::ActionWithArguments.
|
|
147
|
+
/// You should not use it when manipulating components.
|
|
148
|
+
bool exists( const std::string& valname ) const;
|
|
149
|
+
/// Return a pointer to the value with name (this is used to retrieve values in other PLMD::Actions)
|
|
150
|
+
/// You should NEVER use this routine to refer to the components of your PLMD::Action. Use
|
|
151
|
+
/// getPntrToComponent instead.
|
|
152
|
+
Value* copyOutput( const std::string& valname ) const;
|
|
153
|
+
/// Return a pointer to the value with this number (this is used to retrieve values in other PLMD::Actions)
|
|
154
|
+
/// You should NEVER use this routine to refer to the components of your PLMD::Action. Use
|
|
155
|
+
/// getPntrToComponent instead.
|
|
156
|
+
Value* copyOutput( const unsigned& n ) const;
|
|
157
|
+
/// get a string that contains all the available components
|
|
158
|
+
std::string getComponentsList( ) const ;
|
|
159
|
+
/// get a vector that contains the label for all the components
|
|
160
|
+
std::vector<std::string> getComponentsVector( ) const ;
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
// -- Routines for everything else -- //
|
|
164
|
+
|
|
165
|
+
/// Returns the number of values defined
|
|
166
|
+
std::size_t getNumberOfComponents() const ;
|
|
167
|
+
/// Clear the forces on the values
|
|
168
|
+
virtual void clearInputForces( const bool& force=false );
|
|
169
|
+
/// Clear the derivatives of values wrt parameters
|
|
170
|
+
virtual void clearDerivatives( const bool& force=false );
|
|
171
|
+
/// Calculate the gradients and store them for all the values (need for projections)
|
|
172
|
+
virtual void setGradientsIfNeeded();
|
|
173
|
+
/// Set the value
|
|
174
|
+
void setValue(Value*,double);
|
|
175
|
+
/// Check if numerical derivatives should be used
|
|
176
|
+
bool checkNumericalDerivatives() const override;
|
|
177
|
+
/// This forces the class to use numerical derivatives
|
|
178
|
+
void useNumericalDerivatives();
|
|
179
|
+
// These are things for using vectors of values as fields
|
|
180
|
+
virtual void checkFieldsAllowed() {
|
|
181
|
+
error("cannot use this action as a field");
|
|
182
|
+
}
|
|
183
|
+
virtual unsigned getNumberOfDerivatives()=0;
|
|
184
|
+
/// Activate the calculation of derivatives
|
|
185
|
+
virtual void turnOnDerivatives();
|
|
186
|
+
/// Get the titles to use for the columns of the matrix
|
|
187
|
+
virtual void getMatrixColumnTitles( std::vector<std::string>& argnames ) const ;
|
|
188
|
+
/// This is used to check if we run calculate during the update step
|
|
189
|
+
virtual bool calculateOnUpdate();
|
|
190
|
+
ActionWithValue* castToActionWithValue() noexcept final {
|
|
191
|
+
return this;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
inline
|
|
196
|
+
double ActionWithValue::getOutputQuantity(const unsigned j) const {
|
|
197
|
+
plumed_massert(j<values.size(),"index requested is out of bounds");
|
|
198
|
+
return values[j]->get();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
inline
|
|
202
|
+
double ActionWithValue::getOutputQuantity( const std::string& quantityName ) const {
|
|
203
|
+
auto offset=getLabel().size();
|
|
204
|
+
for(unsigned i=0; i<values.size(); ++i) {
|
|
205
|
+
const std::string & valname=values[i]->name;
|
|
206
|
+
if(valname.size()>offset+1 && valname[offset]=='.' ) {
|
|
207
|
+
plumed_dbg_assert(Tools::startWith(valname,getLabel()));
|
|
208
|
+
if(!std::strcmp(valname.c_str()+offset+1,quantityName.c_str())) {
|
|
209
|
+
return values[i]->get();
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return 0.0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
inline
|
|
217
|
+
void ActionWithValue::setValue(const double& d) {
|
|
218
|
+
plumed_massert(values.size()==1, "cannot use setValue in multi-component actions");
|
|
219
|
+
plumed_massert(values[0]->name==getLabel(), "The value you are trying to set is not the default");
|
|
220
|
+
values[0]->set(d);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
inline
|
|
224
|
+
std::size_t ActionWithValue::getNumberOfComponents() const {
|
|
225
|
+
return values.size();
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
inline
|
|
229
|
+
void ActionWithValue::useNumericalDerivatives() {
|
|
230
|
+
plumed_massert( keywords.exists("NUMERICAL_DERIVATIVES"), "numerical derivatives are not permitted for this action" );
|
|
231
|
+
numericalDerivatives=true;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
inline
|
|
235
|
+
bool ActionWithValue::checkNumericalDerivatives() const {
|
|
236
|
+
return numericalDerivatives;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
inline
|
|
240
|
+
bool ActionWithValue::doNotCalculateDerivatives() const {
|
|
241
|
+
return noderiv;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
inline
|
|
245
|
+
const std::vector<double>& ActionWithValue::getForcesToApply() const {
|
|
246
|
+
return forcesForApply;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
inline
|
|
250
|
+
Value* ActionWithValue::getPntrToValue() {
|
|
251
|
+
plumed_dbg_massert(values.size()==1,"The number of components is not equal to one");
|
|
252
|
+
plumed_dbg_massert(values[0]->name==getLabel(), "The value you are trying to retrieve is not the default");
|
|
253
|
+
return values[0].get();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
#endif
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2011-2023 The plumed team
|
|
3
|
+
(see the PEOPLE file at the root of the distribution for a list of names)
|
|
4
|
+
|
|
5
|
+
See http://www.plumed.org for more information.
|
|
6
|
+
|
|
7
|
+
This file is part of plumed, version 2.
|
|
8
|
+
|
|
9
|
+
plumed 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
|
+
plumed 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 plumed. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
22
|
+
#ifndef __PLUMED_core_ActionWithVector_h
|
|
23
|
+
#define __PLUMED_core_ActionWithVector_h
|
|
24
|
+
|
|
25
|
+
#include "ActionWithValue.h"
|
|
26
|
+
#include "ActionAtomistic.h"
|
|
27
|
+
#include "ActionWithArguments.h"
|
|
28
|
+
#include <limits>
|
|
29
|
+
#include <vector>
|
|
30
|
+
|
|
31
|
+
namespace PLMD {
|
|
32
|
+
|
|
33
|
+
class ActionWithVector:
|
|
34
|
+
public ActionAtomistic,
|
|
35
|
+
public ActionWithValue,
|
|
36
|
+
public ActionWithArguments {
|
|
37
|
+
friend class Value;
|
|
38
|
+
private:
|
|
39
|
+
static constexpr int NoMasksUsed =-1;
|
|
40
|
+
/// Check if there is a mask value
|
|
41
|
+
int nmask=NoMasksUsed;
|
|
42
|
+
/// The list of active tasks
|
|
43
|
+
std::vector<unsigned> active_tasks;
|
|
44
|
+
protected:
|
|
45
|
+
/// Turn off the flag that says this action has a masked input
|
|
46
|
+
void ignoreMaskArguments();
|
|
47
|
+
/// Accumulate the forces from the Values
|
|
48
|
+
bool checkForForces();
|
|
49
|
+
public:
|
|
50
|
+
static void registerKeywords( Keywords& keys );
|
|
51
|
+
explicit ActionWithVector(const ActionOptions&);
|
|
52
|
+
virtual ~ActionWithVector() {}
|
|
53
|
+
void lockRequests() override;
|
|
54
|
+
void unlockRequests() override;
|
|
55
|
+
virtual void prepare() override;
|
|
56
|
+
/// Check if a mask has been set
|
|
57
|
+
int getNumberOfMasks() const ;
|
|
58
|
+
void calculateNumericalDerivatives(ActionWithValue* av) override;
|
|
59
|
+
/// Get the list of tasks that are active
|
|
60
|
+
virtual std::vector<unsigned>& getListOfActiveTasks( ActionWithVector* action );
|
|
61
|
+
/// Find out how many tasks we need to perform in this loop
|
|
62
|
+
virtual void getNumberOfTasks( unsigned& ntasks );
|
|
63
|
+
/// Determine if a particular task is active based on the values of the input argument
|
|
64
|
+
virtual int checkTaskIsActive( const unsigned& itask ) const ;
|
|
65
|
+
/// This is so we can parallelize with GPU
|
|
66
|
+
virtual void getInputData( std::vector<double>& inputdata ) const ;
|
|
67
|
+
/// This is so we an transfer data gathered in the parallel task manager to the underlying values
|
|
68
|
+
virtual void transferStashToValues( const std::vector<unsigned>& partialTaskList, const std::vector<double>& stash );
|
|
69
|
+
/// This is so we can transfer forces from the values to the parallel task manager
|
|
70
|
+
virtual void transferForcesToStash( const std::vector<unsigned>& partialTaskList, std::vector<double>& stash ) const ;
|
|
71
|
+
/// Get the number of forces to use
|
|
72
|
+
unsigned getNumberOfForceDerivatives() const ;
|
|
73
|
+
/// Apply the forces on this data
|
|
74
|
+
void apply() override;
|
|
75
|
+
/// Apply the forces on non-zero rank objects
|
|
76
|
+
virtual void applyNonZeroRankForces( std::vector<double>& outforces ) {
|
|
77
|
+
plumed_error();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
inline
|
|
82
|
+
int ActionWithVector::getNumberOfMasks() const {
|
|
83
|
+
return nmask;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
inline
|
|
87
|
+
void ActionWithVector::ignoreMaskArguments() {
|
|
88
|
+
plumed_assert( nmask<=0 );
|
|
89
|
+
nmask=NoMasksUsed;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
#endif
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2011-2023 The plumed team
|
|
3
|
+
(see the PEOPLE file at the root of the distribution for a list of names)
|
|
4
|
+
|
|
5
|
+
See http://www.plumed.org for more information.
|
|
6
|
+
|
|
7
|
+
This file is part of plumed, version 2.
|
|
8
|
+
|
|
9
|
+
plumed 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
|
+
plumed 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 plumed. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
22
|
+
#ifndef __PLUMED_core_ActionWithVirtualAtom_h
|
|
23
|
+
#define __PLUMED_core_ActionWithVirtualAtom_h
|
|
24
|
+
|
|
25
|
+
#include "ActionAtomistic.h"
|
|
26
|
+
#include "ActionWithValue.h"
|
|
27
|
+
#include "../tools/AtomNumber.h"
|
|
28
|
+
#include "../tools/Vector.h"
|
|
29
|
+
#include "../tools/Tensor.h"
|
|
30
|
+
|
|
31
|
+
namespace PLMD {
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
\ingroup INHERIT
|
|
35
|
+
Inherit from here if you are calculating the position of a virtual atom (eg a center of mass)
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/// Class to add a single virtual atom to the system.
|
|
39
|
+
/// (it might be extended to add multiple virtual atoms).
|
|
40
|
+
class ActionWithVirtualAtom:
|
|
41
|
+
public ActionAtomistic,
|
|
42
|
+
public ActionWithValue {
|
|
43
|
+
protected:
|
|
44
|
+
/// Set position of the virtual atom
|
|
45
|
+
void setPosition(const Vector &);
|
|
46
|
+
/// Set its mass
|
|
47
|
+
void setMass(double);
|
|
48
|
+
/// Set its charge
|
|
49
|
+
void setCharge(double);
|
|
50
|
+
/// Request the atoms on which the calculation demands
|
|
51
|
+
void requestAtoms(const std::vector<AtomNumber> & a);
|
|
52
|
+
/// Set the derivatives of virtual atom coordinate wrt atoms on which it dependes
|
|
53
|
+
void setAtomsDerivatives(const std::vector<Tensor> &d);
|
|
54
|
+
/// Set the box derivatives.
|
|
55
|
+
/// This should be a vector of size 3. First index corresponds
|
|
56
|
+
/// to the components of the virtual atom.
|
|
57
|
+
/// Notice that this routine subtract the trivial term coming from cell deformation
|
|
58
|
+
/// since this term is already implicitly included. Indeed, if the vatom
|
|
59
|
+
/// position is a linear function of atomic coordinates it is not necessary
|
|
60
|
+
/// to call this function (implicit term is fine) (e.g. vatom::COM and vatom::Center).
|
|
61
|
+
/// On the other hand if the vatom position is a non-linear function of atomic coordinates this
|
|
62
|
+
/// should be called (see vatom::Ghost).
|
|
63
|
+
void setBoxDerivatives(const std::vector<Tensor> &d);
|
|
64
|
+
/// Set box derivatives automatically.
|
|
65
|
+
/// It should be called after the settomsDerivatives has been used for all
|
|
66
|
+
/// single atoms.
|
|
67
|
+
/// \warning It only works for virtual atoms NOT using PBCs!
|
|
68
|
+
/// This implies that all atoms used + the new virtual atom should be
|
|
69
|
+
/// in the same periodic image.
|
|
70
|
+
void setBoxDerivativesNoPbc();
|
|
71
|
+
public:
|
|
72
|
+
/// Return the atom id of the corresponding virtual atom
|
|
73
|
+
AtomNumber getIndex()const;
|
|
74
|
+
explicit ActionWithVirtualAtom(const ActionOptions&ao);
|
|
75
|
+
static void registerKeywords(Keywords& keys);
|
|
76
|
+
virtual unsigned getNumberOfDerivatives();
|
|
77
|
+
virtual void apply();
|
|
78
|
+
ActionWithVirtualAtom* castToActionWithVirtualAtom() noexcept final {
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
inline
|
|
84
|
+
unsigned ActionWithVirtualAtom::getNumberOfDerivatives() {
|
|
85
|
+
return 3*getNumberOfAtoms()+9;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
inline
|
|
89
|
+
void ActionWithVirtualAtom::setPosition(const Vector & pos) {
|
|
90
|
+
for(unsigned i=0; i<3; ++i) {
|
|
91
|
+
getPntrToComponent(i)->set(pos[i]);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
inline
|
|
96
|
+
void ActionWithVirtualAtom::setMass(double m) {
|
|
97
|
+
getPntrToComponent(3)->set(m);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
inline
|
|
101
|
+
void ActionWithVirtualAtom::setCharge(double c) {
|
|
102
|
+
getPntrToComponent(4)->set(c);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
inline
|
|
106
|
+
void ActionWithVirtualAtom::setAtomsDerivatives(const std::vector<Tensor> &d) {
|
|
107
|
+
unsigned jj=0;
|
|
108
|
+
Value* xval=getPntrToComponent(0);
|
|
109
|
+
Value* yval=getPntrToComponent(1);
|
|
110
|
+
Value* zval=getPntrToComponent(2);
|
|
111
|
+
for(unsigned j=0; j<getNumberOfAtoms(); ++j) {
|
|
112
|
+
for(unsigned k=0; k<3; ++k) {
|
|
113
|
+
xval->setDerivative( jj, d[j][k][0] );
|
|
114
|
+
yval->setDerivative( jj, d[j][k][1] );
|
|
115
|
+
zval->setDerivative( jj, d[j][k][2] );
|
|
116
|
+
jj++;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
#endif
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2012-2023 The plumed team
|
|
3
|
+
(see the PEOPLE file at the root of the distribution for a list of names)
|
|
4
|
+
|
|
5
|
+
See http://www.plumed.org for more information.
|
|
6
|
+
|
|
7
|
+
This file is part of plumed, version 2.
|
|
8
|
+
|
|
9
|
+
plumed 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
|
+
plumed 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 plumed. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
|
|
22
|
+
#ifndef __PLUMED_core_CLTool_h
|
|
23
|
+
#define __PLUMED_core_CLTool_h
|
|
24
|
+
#include <cstdio>
|
|
25
|
+
#include <vector>
|
|
26
|
+
#include <string>
|
|
27
|
+
#include <cstdio>
|
|
28
|
+
#include "../tools/Tools.h"
|
|
29
|
+
#include "../tools/Keywords.h"
|
|
30
|
+
|
|
31
|
+
namespace PLMD {
|
|
32
|
+
|
|
33
|
+
class Communicator;
|
|
34
|
+
|
|
35
|
+
class CLToolOptions {
|
|
36
|
+
friend class CLTool;
|
|
37
|
+
friend class CLToolRegister;
|
|
38
|
+
private:
|
|
39
|
+
std::vector<std::string> line;
|
|
40
|
+
/// The documentation for this command line tool
|
|
41
|
+
const Keywords& keys;
|
|
42
|
+
static Keywords emptyKeys;
|
|
43
|
+
public:
|
|
44
|
+
explicit CLToolOptions(const std::string &name);
|
|
45
|
+
CLToolOptions(const CLToolOptions& co, const Keywords& k);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
\ingroup INHERIT
|
|
50
|
+
This is the abstract base class to use for implementing new command line tool, within it there
|
|
51
|
+
is \ref AddingACLTool "information" as to how to go about implemneting a new tool.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
class CLTool {
|
|
55
|
+
private:
|
|
56
|
+
/// The name of this command line tool
|
|
57
|
+
const std::string name;
|
|
58
|
+
/// The list of keywords for this CLTool
|
|
59
|
+
const Keywords& keywords;
|
|
60
|
+
/// The data read in from the command line stored in a map with the keywords
|
|
61
|
+
std::map<std::string,std::string> inputData;
|
|
62
|
+
/// Read the arguments from the command line
|
|
63
|
+
bool readCommandLineArgs( int argc, char**argv, FILE*out );
|
|
64
|
+
/// Read the arguments from an input file specified on the command line
|
|
65
|
+
bool readInputFile( int argc, char**argv, FILE* in, FILE*out );
|
|
66
|
+
/// Set arguments from the default options provided to Keywords
|
|
67
|
+
void setRemainingToDefault(FILE* out);
|
|
68
|
+
public:
|
|
69
|
+
/// Set the input data:
|
|
70
|
+
void setInputData(const std::map<std::string,std::string>&newInputData) {
|
|
71
|
+
inputData=newInputData;
|
|
72
|
+
}
|
|
73
|
+
const std::map<std::string,std::string>&getInputData() {
|
|
74
|
+
return inputData;
|
|
75
|
+
}
|
|
76
|
+
protected:
|
|
77
|
+
/// Get the value of one of the command line arguments
|
|
78
|
+
template<class T>
|
|
79
|
+
bool parse(const std::string&key,T&t);
|
|
80
|
+
/// Find out whether one of the command line flags is present or not
|
|
81
|
+
void parseFlag(const std::string&key,bool&t);
|
|
82
|
+
/// Crash the command line tool with an error
|
|
83
|
+
[[noreturn]] void error(const std::string& msg);
|
|
84
|
+
template<class T>
|
|
85
|
+
bool parseVector(const std::string&key,std::vector<T>&t);
|
|
86
|
+
public:
|
|
87
|
+
/// How is the input specified on the command line or in an input file
|
|
88
|
+
enum class inputType {unset,commandline,ifile} inputdata;
|
|
89
|
+
/// Create the help keywords
|
|
90
|
+
static void registerKeywords( Keywords& keys );
|
|
91
|
+
explicit CLTool(const CLToolOptions& co );
|
|
92
|
+
/// Read the arguments from the command line
|
|
93
|
+
bool readInput( int argc, char**argv, FILE* in, FILE*out );
|
|
94
|
+
/// virtual function mapping to the specific main for each tool
|
|
95
|
+
virtual int main( FILE* in, FILE*out, Communicator&pc )=0;
|
|
96
|
+
/// virtual function returning a one-line descriptor for the tool
|
|
97
|
+
virtual std::string description()const {
|
|
98
|
+
return "(no description available)";
|
|
99
|
+
}
|
|
100
|
+
/// virtual destructor to allow inheritance
|
|
101
|
+
virtual ~CLTool() {}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
template<class T>
|
|
105
|
+
bool CLTool::parse(const std::string&key,T&t) {
|
|
106
|
+
plumed_massert(keywords.exists(key),"keyword " + key + " has not been registered");
|
|
107
|
+
if(keywords.style(key,"compulsory") ) {
|
|
108
|
+
if(inputData.count(key)==0) {
|
|
109
|
+
error("missing data for keyword " + key);
|
|
110
|
+
}
|
|
111
|
+
bool check=Tools::convertNoexcept(inputData[key],t);
|
|
112
|
+
if(!check) {
|
|
113
|
+
error("data input for keyword " + key + " has wrong type");
|
|
114
|
+
}
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
if( inputData.count(key)==0 ) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
Tools::convert(inputData[key],t);
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
// very limited support and check: take more from core/Action.h parseVector
|
|
124
|
+
template<class T>
|
|
125
|
+
bool CLTool::parseVector(const std::string&key,std::vector<T>&t) {
|
|
126
|
+
|
|
127
|
+
// Check keyword has been registered
|
|
128
|
+
plumed_massert(keywords.exists(key), "keyword " + key + " has not been registered");
|
|
129
|
+
// initial size
|
|
130
|
+
unsigned size=t.size();
|
|
131
|
+
bool skipcheck=false;
|
|
132
|
+
if(size==0) {
|
|
133
|
+
skipcheck=true; // if the vector in input has size zero, skip the check if size of input vector is the same of argument read
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// check if there is some value
|
|
137
|
+
|
|
138
|
+
plumed_massert(inputData[key]!="false","compulsory keyword "+std::string(key)+"has no data");
|
|
139
|
+
std::vector<std::string> words=Tools::getWords(inputData[key],"\t\n ,");
|
|
140
|
+
t.resize(0);
|
|
141
|
+
if(words.size()==0) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
for(unsigned i=0; i<words.size(); ++i) {
|
|
146
|
+
T v;
|
|
147
|
+
Tools::convert(words[i],v);
|
|
148
|
+
t.push_back(v);
|
|
149
|
+
}
|
|
150
|
+
// check the size
|
|
151
|
+
if( !skipcheck && t.size()!=size ) {
|
|
152
|
+
plumed_merror("vector read in for keyword "+key+" has wrong size" );
|
|
153
|
+
}
|
|
154
|
+
std::string def;
|
|
155
|
+
T val;
|
|
156
|
+
if ( keywords.style(key,"compulsory") && t.size()==0 ) {
|
|
157
|
+
if( keywords.getDefaultValue(key,def) ) {
|
|
158
|
+
if( def.length()==0 || !Tools::convertNoexcept(def,val) ) {
|
|
159
|
+
plumed_merror("ERROR in keyword "+key+ " has weird default value" );
|
|
160
|
+
} else {
|
|
161
|
+
// GB: before it was like this, but clearly if t.size()==0 this was not doing anything
|
|
162
|
+
// for(unsigned i=0; i<t.size(); ++i) t[i]=val;
|
|
163
|
+
t.resize(1);
|
|
164
|
+
t[0]=val;
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
plumed_merror("keyword " + key + " is compulsory for this action");
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
#endif
|