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,343 @@
|
|
|
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_ActionAtomistic_h
|
|
23
|
+
#define __PLUMED_core_ActionAtomistic_h
|
|
24
|
+
|
|
25
|
+
#include "Action.h"
|
|
26
|
+
#include "../tools/Tensor.h"
|
|
27
|
+
#include "../tools/Pbc.h"
|
|
28
|
+
#include "../tools/ForwardDecl.h"
|
|
29
|
+
#include "Value.h"
|
|
30
|
+
#include <vector>
|
|
31
|
+
#include <map>
|
|
32
|
+
|
|
33
|
+
namespace PLMD {
|
|
34
|
+
|
|
35
|
+
class Pbc;
|
|
36
|
+
class PDB;
|
|
37
|
+
class GenericMolInfo;
|
|
38
|
+
class Tree;
|
|
39
|
+
|
|
40
|
+
namespace colvar {
|
|
41
|
+
class SelectMassCharge;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/// \ingroup MULTIINHERIT
|
|
45
|
+
/// Action used to create objects that access the positions of the atoms from the MD code
|
|
46
|
+
class ActionAtomistic :
|
|
47
|
+
virtual public Action {
|
|
48
|
+
friend class Group;
|
|
49
|
+
friend class DomainDecomposition;
|
|
50
|
+
friend class colvar::SelectMassCharge;
|
|
51
|
+
friend class ActionWithVirtualAtom;
|
|
52
|
+
|
|
53
|
+
std::vector<AtomNumber> indexes; // the set of needed atoms
|
|
54
|
+
std::vector<std::size_t> value_depends; // The list of values that are being used
|
|
55
|
+
std::vector<std::pair<std::size_t, std::size_t > > atom_value_ind; // The list of values and indices for the atoms that are being used
|
|
56
|
+
std::vector<std::pair<std::size_t,std::vector<std::size_t>>> atom_value_ind_grouped;
|
|
57
|
+
/// unique should be an ordered set since we later create a vector containing the corresponding indexes
|
|
58
|
+
std::vector<AtomNumber> unique;
|
|
59
|
+
/// unique_local should be an ordered set since we later create a vector containing the corresponding indexes
|
|
60
|
+
bool unique_local_needs_update;
|
|
61
|
+
std::vector<AtomNumber> unique_local;
|
|
62
|
+
std::vector<Vector> actionPositions; // positions of the needed atoms
|
|
63
|
+
double energy;
|
|
64
|
+
Value* boxValue;
|
|
65
|
+
ForwardDecl<Pbc> pbc_fwd;
|
|
66
|
+
Pbc& actionPbc=*pbc_fwd;
|
|
67
|
+
std::vector<double> masses;
|
|
68
|
+
std::vector<double> charges;
|
|
69
|
+
|
|
70
|
+
std::vector<Vector> forces; // forces on the needed atoms
|
|
71
|
+
double forceOnEnergy;
|
|
72
|
+
|
|
73
|
+
double forceOnExtraCV;
|
|
74
|
+
|
|
75
|
+
bool lockRequestAtoms; // forbid changes to request atoms
|
|
76
|
+
|
|
77
|
+
bool donotretrieve;
|
|
78
|
+
bool donotforce;
|
|
79
|
+
|
|
80
|
+
// EMST
|
|
81
|
+
GenericMolInfo* actionMoldat{nullptr};
|
|
82
|
+
std::unique_ptr<Tree> tree;
|
|
83
|
+
|
|
84
|
+
/// Values that hold information about atom positions and charges
|
|
85
|
+
std::vector<Value*> xpos, ypos, zpos, masv, chargev;
|
|
86
|
+
void updateUniqueLocal( const bool& useunique, const std::vector<int>& g2l );
|
|
87
|
+
protected:
|
|
88
|
+
bool massesWereSet;
|
|
89
|
+
bool chargesWereSet;
|
|
90
|
+
void setExtraCV(const std::string &name);
|
|
91
|
+
/// Used to interpret whether this index is a virtual atom or a real atom
|
|
92
|
+
std::pair<std::size_t, std::size_t> getValueIndices( const AtomNumber& i ) const ;
|
|
93
|
+
public:
|
|
94
|
+
/// Request an array of atoms.
|
|
95
|
+
/// This method is used to ask for a list of atoms. Atoms
|
|
96
|
+
/// should be asked for by number. If this routine is called
|
|
97
|
+
/// during the simulation, atoms will be available at the next step
|
|
98
|
+
/// MAYBE WE HAVE TO FIND SOMETHING MORE CLEAR FOR DYNAMIC
|
|
99
|
+
/// LISTS OF ATOMS
|
|
100
|
+
void requestAtoms(const std::vector<AtomNumber> & a, const bool clearDep=true);
|
|
101
|
+
/// Get position of i-th atom (access by relative index)
|
|
102
|
+
const Vector & getPosition(int)const;
|
|
103
|
+
/// Get position of i-th atom (access by absolute AtomNumber).
|
|
104
|
+
/// With direct access to the global atom array.
|
|
105
|
+
/// \warning Should be only used by actions that need to read the shared position array.
|
|
106
|
+
/// This array is insensitive to local changes such as makeWhole(), numerical derivatives, etc.
|
|
107
|
+
Vector getGlobalPosition(const std::pair<std::size_t,std::size_t>& ) const ;
|
|
108
|
+
/// Modify position of i-th atom (access by absolute AtomNumber).
|
|
109
|
+
/// \warning Should be only used by actions that need to modify the shared position array.
|
|
110
|
+
/// This array is insensitive to local changes such as makeWhole(), numerical derivatives, etc.
|
|
111
|
+
void setGlobalPosition(const std::pair<std::size_t,std::size_t>&, const Vector& pos);
|
|
112
|
+
/// Get total number of atoms, including virtual ones.
|
|
113
|
+
/// Can be used to make a loop on modifyGlobalPosition or getGlobalPosition.
|
|
114
|
+
unsigned getTotAtoms()const;
|
|
115
|
+
/// Get box shape
|
|
116
|
+
const Tensor & getBox()const;
|
|
117
|
+
/// Get the array of all positions
|
|
118
|
+
const std::vector<Vector> & getPositions()const;
|
|
119
|
+
/// Get the array of all masses
|
|
120
|
+
const std::vector<double>& getMasses()const;
|
|
121
|
+
/// Get the array of all charges
|
|
122
|
+
const std::vector<double>& getCharges( const bool allowempty=false )const;
|
|
123
|
+
/// Get the virial that is acting
|
|
124
|
+
Tensor getVirial() const ;
|
|
125
|
+
/// Get energy
|
|
126
|
+
const double & getEnergy()const;
|
|
127
|
+
/// Get mass of i-th atom
|
|
128
|
+
double getMass(int i)const;
|
|
129
|
+
/// Get charge of i-th atom
|
|
130
|
+
double getCharge(int i)const;
|
|
131
|
+
/// Get the force acting on a particular atom
|
|
132
|
+
Vector getForce( const std::pair<std::size_t, std::size_t>& a ) const ;
|
|
133
|
+
/// Add force to an atom
|
|
134
|
+
void addForce( const std::pair<std::size_t, std::size_t>& a, const Vector& f );
|
|
135
|
+
/// Get a reference to force on energy
|
|
136
|
+
double & modifyForceOnEnergy();
|
|
137
|
+
/// Get number of available atoms
|
|
138
|
+
unsigned getNumberOfAtoms()const {
|
|
139
|
+
return indexes.size();
|
|
140
|
+
}
|
|
141
|
+
/// Compute the pbc distance between two positions
|
|
142
|
+
Vector pbcDistance(const Vector&,const Vector&)const;
|
|
143
|
+
/// Applies PBCs to a seriens of positions or distances
|
|
144
|
+
void pbcApply(std::vector<Vector>& dlist, unsigned max_index=0) const;
|
|
145
|
+
/// Get the vector of absolute indexes
|
|
146
|
+
virtual const std::vector<AtomNumber> & getAbsoluteIndexes()const;
|
|
147
|
+
/// Get the absolute index of an atom
|
|
148
|
+
AtomNumber getAbsoluteIndex(int i)const;
|
|
149
|
+
/// Parse a list of atoms without a numbered keyword
|
|
150
|
+
void parseAtomList(const std::string&key,std::vector<AtomNumber> &t);
|
|
151
|
+
/// Parse an list of atom with a numbred keyword
|
|
152
|
+
void parseAtomList(const std::string&key,const int num, std::vector<AtomNumber> &t);
|
|
153
|
+
/// Interpret the atom selection. Just a wrapper to the static function with four arguments called interpretAtomList that passes xpos and this.
|
|
154
|
+
void interpretAtomList( std::vector<std::string>& strings, std::vector<AtomNumber> &t);
|
|
155
|
+
/// Convert a set of read in strings into an atom list (this is used in parseAtomList)
|
|
156
|
+
static void interpretAtomList( std::vector<std::string>& strings, const std::vector<Value*>& xpos, Action* action, std::vector<AtomNumber> &t);
|
|
157
|
+
/// This gets std::vector that contain the PLMD::Value objects that contain xpositions, ypositions, zpositions, masses and charges
|
|
158
|
+
static void getAtomValuesFromPlumedObject( const PlumedMain& plumed, std::vector<Value*>& xpos, std::vector<Value*>& ypos, std::vector<Value*>& zpos, std::vector<Value*>& masv, std::vector<Value*>& chargev );
|
|
159
|
+
/// Change the box shape
|
|
160
|
+
void changeBox( const Tensor& newbox );
|
|
161
|
+
/// Get reference to Pbc
|
|
162
|
+
const Pbc & getPbc() const;
|
|
163
|
+
/// Add the forces to the atoms
|
|
164
|
+
void setForcesOnAtoms( const std::vector<double>& forcesToApply, unsigned& ind );
|
|
165
|
+
/// Add the virial forces
|
|
166
|
+
void setForcesOnCell(const std::vector<double>& forcesToApply, unsigned& ind);
|
|
167
|
+
/// Add the virial forces (span-like syntax)
|
|
168
|
+
void setForcesOnCell(const double* forcesToApply, std::size_t size, unsigned& ind);
|
|
169
|
+
/// Skip atom retrieval - use with care.
|
|
170
|
+
/// If this function is called during initialization, then atoms are
|
|
171
|
+
/// not going to be retrieved. Can be used for optimization. Notice that
|
|
172
|
+
/// calling getPosition(int) in an Action where DoNotRetrieve() was called might
|
|
173
|
+
/// lead to undefined behavior.
|
|
174
|
+
void doNotRetrieve() {
|
|
175
|
+
donotretrieve=true;
|
|
176
|
+
}
|
|
177
|
+
/// Skip atom forces - use with care.
|
|
178
|
+
/// If this function is called during initialization, then forces are
|
|
179
|
+
/// not going to be propagated. Can be used for optimization.
|
|
180
|
+
void doNotForce() {
|
|
181
|
+
donotforce=true;
|
|
182
|
+
}
|
|
183
|
+
/// Make atoms whole, assuming they are in the proper order
|
|
184
|
+
void makeWhole();
|
|
185
|
+
public:
|
|
186
|
+
|
|
187
|
+
// virtual functions:
|
|
188
|
+
|
|
189
|
+
explicit ActionAtomistic(const ActionOptions&ao);
|
|
190
|
+
~ActionAtomistic();
|
|
191
|
+
static void registerKeywords( Keywords& keys );
|
|
192
|
+
|
|
193
|
+
/// N.B. only pass an ActionWithValue to this routine if you know exactly what you
|
|
194
|
+
/// are doing. The default will be correct for the vast majority of cases
|
|
195
|
+
void calculateNumericalDerivatives( ActionWithValue* a=NULL ) override;
|
|
196
|
+
/// Numerical derivative routine to use when using Actions that inherit from BOTH
|
|
197
|
+
/// ActionWithArguments and ActionAtomistic
|
|
198
|
+
void calculateAtomicNumericalDerivatives( ActionWithValue* a, const unsigned& startnum );
|
|
199
|
+
|
|
200
|
+
virtual void retrieveAtoms( const bool& force=false );
|
|
201
|
+
void lockRequests() override;
|
|
202
|
+
void unlockRequests() override;
|
|
203
|
+
const std::vector<AtomNumber> & getUnique()const;
|
|
204
|
+
const std::vector<AtomNumber> & getUniqueLocal()const;
|
|
205
|
+
/// Read in an input file containing atom positions and calculate the action for the atomic
|
|
206
|
+
/// configuration therin
|
|
207
|
+
void readAtomsFromPDB( const PDB& pdb ) override;
|
|
208
|
+
/// Transfer the gradients
|
|
209
|
+
void getGradient( const unsigned& ind, Vector& deriv, std::map<AtomNumber,Vector>& gradients ) const ;
|
|
210
|
+
ActionAtomistic* castToActionAtomistic() noexcept final {
|
|
211
|
+
return this;
|
|
212
|
+
}
|
|
213
|
+
virtual bool actionHasForces();
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
inline
|
|
217
|
+
const Vector & ActionAtomistic::getPosition(int i)const {
|
|
218
|
+
return actionPositions[i];
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
inline
|
|
222
|
+
double ActionAtomistic::getMass(int i)const {
|
|
223
|
+
if( !massesWereSet ) {
|
|
224
|
+
log.printf("WARNING: masses were not passed to plumed\n");
|
|
225
|
+
}
|
|
226
|
+
return masses[i];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
inline
|
|
230
|
+
double ActionAtomistic::getCharge(int i) const {
|
|
231
|
+
if( !chargesWereSet ) {
|
|
232
|
+
error("charges were not passed to plumed");
|
|
233
|
+
}
|
|
234
|
+
return charges[i];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
inline
|
|
238
|
+
const std::vector<AtomNumber> & ActionAtomistic::getAbsoluteIndexes()const {
|
|
239
|
+
return indexes;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
inline
|
|
243
|
+
AtomNumber ActionAtomistic::getAbsoluteIndex(int i)const {
|
|
244
|
+
return indexes[i];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
inline
|
|
248
|
+
const std::vector<Vector> & ActionAtomistic::getPositions()const {
|
|
249
|
+
return actionPositions;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
inline
|
|
253
|
+
const std::vector<double> & ActionAtomistic::getMasses()const {
|
|
254
|
+
return masses;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
inline
|
|
258
|
+
const std::vector<double> & ActionAtomistic::getCharges( const bool allowempty )const {
|
|
259
|
+
if( !allowempty && !chargesWereSet ) {
|
|
260
|
+
error("charges were not passed to plumed");
|
|
261
|
+
}
|
|
262
|
+
return charges;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
inline
|
|
266
|
+
const double & ActionAtomistic::getEnergy()const {
|
|
267
|
+
return energy;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
inline
|
|
271
|
+
const Tensor & ActionAtomistic::getBox()const {
|
|
272
|
+
return actionPbc.getBox();
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
inline
|
|
276
|
+
double & ActionAtomistic::modifyForceOnEnergy() {
|
|
277
|
+
return forceOnEnergy;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
inline
|
|
281
|
+
const Pbc & ActionAtomistic::getPbc() const {
|
|
282
|
+
return actionPbc;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
inline
|
|
286
|
+
void ActionAtomistic::lockRequests() {
|
|
287
|
+
lockRequestAtoms=true;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
inline
|
|
291
|
+
void ActionAtomistic::unlockRequests() {
|
|
292
|
+
lockRequestAtoms=false;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
inline
|
|
296
|
+
const std::vector<AtomNumber> & ActionAtomistic::getUnique()const {
|
|
297
|
+
return unique;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
inline
|
|
301
|
+
const std::vector<AtomNumber> & ActionAtomistic::getUniqueLocal() const {
|
|
302
|
+
return unique_local;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
inline
|
|
306
|
+
Vector ActionAtomistic::getGlobalPosition(const std::pair<std::size_t,std::size_t>& a) const {
|
|
307
|
+
Vector pos;
|
|
308
|
+
pos[0]=xpos[a.first]->data[a.second];
|
|
309
|
+
pos[1]=ypos[a.first]->data[a.second];
|
|
310
|
+
pos[2]=zpos[a.first]->data[a.second];
|
|
311
|
+
return pos;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
inline
|
|
315
|
+
void ActionAtomistic::setGlobalPosition(const std::pair<std::size_t, std::size_t>& a, const Vector& pos ) {
|
|
316
|
+
xpos[a.first]->data[a.second]=pos[0];
|
|
317
|
+
ypos[a.first]->data[a.second]=pos[1];
|
|
318
|
+
zpos[a.first]->data[a.second]=pos[2];
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
inline
|
|
322
|
+
Vector ActionAtomistic::getForce( const std::pair<std::size_t, std::size_t>& a ) const {
|
|
323
|
+
Vector f;
|
|
324
|
+
f[0]=xpos[a.first]->getForce(a.second);
|
|
325
|
+
f[1]=ypos[a.first]->getForce(a.second);
|
|
326
|
+
f[2]=zpos[a.first]->getForce(a.second);
|
|
327
|
+
return f;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
inline
|
|
331
|
+
void ActionAtomistic::addForce( const std::pair<std::size_t, std::size_t>& a, const Vector& f ) {
|
|
332
|
+
xpos[a.first]->addForce( a.second, f[0] );
|
|
333
|
+
ypos[a.first]->addForce( a.second, f[1] );
|
|
334
|
+
zpos[a.first]->addForce( a.second, f[2] );
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
inline
|
|
338
|
+
Vector ActionAtomistic::pbcDistance(const Vector &v1,const Vector &v2)const {
|
|
339
|
+
return actionPbc.distance(v1,v2);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
}
|
|
343
|
+
#endif
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2017-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_ActionForInterface_h
|
|
23
|
+
#define __PLUMED_core_ActionForInterface_h
|
|
24
|
+
|
|
25
|
+
#include "../tools/TypesafePtr.h"
|
|
26
|
+
#include "ActionWithValue.h"
|
|
27
|
+
|
|
28
|
+
namespace PLMD {
|
|
29
|
+
|
|
30
|
+
class ActionForInterface : public ActionWithValue {
|
|
31
|
+
friend class Atoms;
|
|
32
|
+
friend class PlumedMain;
|
|
33
|
+
protected:
|
|
34
|
+
// Is this the first step
|
|
35
|
+
bool firststep;
|
|
36
|
+
/// Have the forces in this action been scaled by another action
|
|
37
|
+
bool wasscaled;
|
|
38
|
+
/// Action has been set
|
|
39
|
+
bool wasset;
|
|
40
|
+
/// The role this plays
|
|
41
|
+
std::string role;
|
|
42
|
+
public:
|
|
43
|
+
static void registerKeywords(Keywords& keys);
|
|
44
|
+
explicit ActionForInterface(const ActionOptions&ao);
|
|
45
|
+
/// Override clear the input data
|
|
46
|
+
void clearDerivatives(const bool& force=false) override {}
|
|
47
|
+
/// Override the need to deal with gradients
|
|
48
|
+
void setGradientsIfNeeded() override {}
|
|
49
|
+
/// Check if the value has been set
|
|
50
|
+
bool hasBeenSet() const ;
|
|
51
|
+
/// The number of derivatives
|
|
52
|
+
unsigned getNumberOfDerivatives() override {
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
///
|
|
56
|
+
virtual void resetForStepStart() = 0;
|
|
57
|
+
/// Set the start point for the memory if needed
|
|
58
|
+
virtual void setStart( const std::string& name, const unsigned& sss) = 0;
|
|
59
|
+
/// Set the stride for the memory if needed
|
|
60
|
+
virtual void setStride( const std::string& name, const unsigned& sss) = 0;
|
|
61
|
+
/// Set the pointer to the value that contains this data
|
|
62
|
+
virtual bool setValuePointer( const std::string& name, const TypesafePtr & ) = 0;
|
|
63
|
+
/// Set the force to the value that contains this data
|
|
64
|
+
virtual bool setForcePointer( const std::string& name, const TypesafePtr & ) = 0;
|
|
65
|
+
/// This get the number of forces that need to be rescaled in rescale forces
|
|
66
|
+
virtual unsigned getNumberOfForcesToRescale() const {
|
|
67
|
+
plumed_merror("no method for rescaling forces for this type of input");
|
|
68
|
+
}
|
|
69
|
+
/// Overriding this method from ActionWithValue ensures that taskLists that are set during share are not updated during calculate loop
|
|
70
|
+
// void setupForCalculation( const bool& force=false ) override {}
|
|
71
|
+
/// Get the data
|
|
72
|
+
virtual void share() = 0;
|
|
73
|
+
virtual void shareAll() = 0;
|
|
74
|
+
/// Get the data to share
|
|
75
|
+
virtual void wait() = 0;
|
|
76
|
+
/// Actually set the values for the output
|
|
77
|
+
void calculate() override {
|
|
78
|
+
firststep=false;
|
|
79
|
+
wasscaled=false;
|
|
80
|
+
}
|
|
81
|
+
virtual void reset() {}
|
|
82
|
+
virtual void Set_comm(Communicator& comm) = 0;
|
|
83
|
+
/// For replica exchange
|
|
84
|
+
virtual void writeBinary(std::ostream&o) = 0;
|
|
85
|
+
virtual void readBinary(std::istream&i) = 0;
|
|
86
|
+
virtual bool onStep() const = 0;
|
|
87
|
+
std::string getRole() const ;
|
|
88
|
+
ActionForInterface* castToActionForInterface() noexcept final {
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
inline
|
|
94
|
+
bool ActionForInterface::hasBeenSet() const {
|
|
95
|
+
return wasset;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
#endif
|
|
@@ -0,0 +1,57 @@
|
|
|
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_ActionPilot_h
|
|
23
|
+
#define __PLUMED_core_ActionPilot_h
|
|
24
|
+
|
|
25
|
+
#include "Action.h"
|
|
26
|
+
|
|
27
|
+
namespace PLMD {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
\ingroup MULTIINHERIT
|
|
31
|
+
This is used to create PLMD::Action objects that are run with some set frequency.
|
|
32
|
+
Any PLMD::Action
|
|
33
|
+
that does not inherit from PLMD::Action is only run when some other Action requires the output from
|
|
34
|
+
it in order to run. This class is used in PLMD::Bias
|
|
35
|
+
Action which drives the execution of other Action's.
|
|
36
|
+
Action's of this kind are executed with a fixed stride
|
|
37
|
+
which is specified on the directive line with a STRIDE= keyword
|
|
38
|
+
*/
|
|
39
|
+
class ActionPilot:
|
|
40
|
+
public virtual Action {
|
|
41
|
+
unsigned actionStride=1; // multiple time step
|
|
42
|
+
public:
|
|
43
|
+
explicit ActionPilot(const ActionOptions&);
|
|
44
|
+
/// Create the keywords for actionPilot
|
|
45
|
+
static void registerKeywords(Keywords& keys);
|
|
46
|
+
/// Check if the action is active on this step
|
|
47
|
+
virtual bool onStep()const;
|
|
48
|
+
/// Set the value of the stride
|
|
49
|
+
void setStride(unsigned n);
|
|
50
|
+
/// Get the stride
|
|
51
|
+
unsigned getStride()const;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#endif
|
|
57
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
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_ActionRegister_h
|
|
23
|
+
#define __PLUMED_core_ActionRegister_h
|
|
24
|
+
|
|
25
|
+
#include "RegisterBase.h"
|
|
26
|
+
|
|
27
|
+
#include "../tools/Keywords.h"
|
|
28
|
+
|
|
29
|
+
namespace PLMD {
|
|
30
|
+
|
|
31
|
+
class Action;
|
|
32
|
+
class ActionOptions;
|
|
33
|
+
|
|
34
|
+
struct ActionRegisterPointers {
|
|
35
|
+
/// Pointer to a function which, given the options, create an Action
|
|
36
|
+
typedef std::unique_ptr<Action>(*creator_pointer)(const ActionOptions&);
|
|
37
|
+
/// Pointer to a function which, returns the keywords allowed
|
|
38
|
+
typedef void(*keywords_pointer)(Keywords&);
|
|
39
|
+
creator_pointer create;
|
|
40
|
+
keywords_pointer keys;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/// Register holding all the allowed keywords.
|
|
44
|
+
/// This is a register which holds a map between strings (directives) and function pointers.
|
|
45
|
+
/// The function pointers are pointing to functions which create an object of
|
|
46
|
+
/// the corresponding class given the corresponding options (ActionOptions).
|
|
47
|
+
/// There should be only one of there objects allocated.
|
|
48
|
+
/// Actions should be registered here at the beginning of execution
|
|
49
|
+
///
|
|
50
|
+
class ActionRegister:
|
|
51
|
+
public RegisterBase<ActionRegisterPointers> {
|
|
52
|
+
|
|
53
|
+
typedef ActionRegisterPointers::creator_pointer creator_pointer;
|
|
54
|
+
typedef ActionRegisterPointers::keywords_pointer keywords_pointer;
|
|
55
|
+
typedef ActionRegisterPointers Pointers;
|
|
56
|
+
|
|
57
|
+
public:
|
|
58
|
+
ID add(std::string key,creator_pointer cp,keywords_pointer kp);
|
|
59
|
+
/// Create an Action of the type indicated in the options
|
|
60
|
+
/// \param ao object containing information for initialization, such as the full input line, a pointer to PlumedMain, etc
|
|
61
|
+
std::unique_ptr<Action> create(const ActionOptions&ao);
|
|
62
|
+
std::unique_ptr<Action> create(const std::vector<void*> & images,const ActionOptions&ao);
|
|
63
|
+
/// Print out the keywords for an action in html/vim ready for input into the manual
|
|
64
|
+
bool printManual(const std::string& action, const bool& vimout, const bool& spellout);
|
|
65
|
+
/// Retrieve a keywords object for a particular action
|
|
66
|
+
bool getKeywords( const std::string& action, Keywords& keys );
|
|
67
|
+
void getKeywords(const std::vector<void*> & images, const std::string& action, Keywords& keys);
|
|
68
|
+
/// Print out a template command for an action
|
|
69
|
+
bool printTemplate(const std::string& action, bool include_optional);
|
|
70
|
+
std::vector<std::string> getActionNames() const;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/// Function returning a reference to the ActionRegister.
|
|
74
|
+
/// \relates ActionRegister
|
|
75
|
+
/// To avoid problems with order of initialization, this function contains
|
|
76
|
+
/// a static ActionRegister which is built the first time the function is called.
|
|
77
|
+
/// In this manner, it is always initialized before it's used
|
|
78
|
+
ActionRegister& actionRegister();
|
|
79
|
+
|
|
80
|
+
template<typename T>
|
|
81
|
+
inline constexpr bool isActionType = std::is_base_of<Action, T>::value;
|
|
82
|
+
//in C++20 you we'll make this a concept
|
|
83
|
+
//template<typename T>
|
|
84
|
+
//concept ActionType = std::is_base_of<::PLMD::Action, T>::value;
|
|
85
|
+
//so the template will be template<ActionType ActionType>class ActionRegistration{...}
|
|
86
|
+
//without the explicit need of the static assert
|
|
87
|
+
|
|
88
|
+
///Each instance of this specialized class represents an action that can be called
|
|
89
|
+
///with the specified directive.
|
|
90
|
+
///As soon it goes out of scope it will deregister the directive from the singleton ActionRegister
|
|
91
|
+
template<typename ActionClass>
|
|
92
|
+
class ActionRegistration {
|
|
93
|
+
ActionRegister::ID id;
|
|
94
|
+
static std::unique_ptr<Action> create(const ActionOptions&ao) {
|
|
95
|
+
return std::make_unique<ActionClass>(ao);
|
|
96
|
+
}
|
|
97
|
+
public:
|
|
98
|
+
///On construction register the ActionClass with the wanted directive
|
|
99
|
+
ActionRegistration(std::string_view directive):
|
|
100
|
+
id(actionRegister().add(directive.data(),create,ActionClass::registerKeywords)) {
|
|
101
|
+
static_assert(isActionType<ActionClass>,
|
|
102
|
+
"ActionRegistration accepts only class that inherit from Action");
|
|
103
|
+
}
|
|
104
|
+
///On destruction deregister the ActionClass (useful when you unload a shared object)
|
|
105
|
+
~ActionRegistration() {
|
|
106
|
+
actionRegister().remove(id);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
} //PLMD
|
|
110
|
+
|
|
111
|
+
#define PLUMED_CONCATENATE_DIRECT(s1, s2) s1##s2
|
|
112
|
+
#define PLUMED_CONCATENATE(s1, s2) PLUMED_CONCATENATE_DIRECT(s1, s2)
|
|
113
|
+
|
|
114
|
+
/// Shortcut for Action registration
|
|
115
|
+
/// \relates PLMD::ActionRegister
|
|
116
|
+
/// For easier registration, this file also provides a macro PLUMED_REGISTER_ACTION.
|
|
117
|
+
/// \param classname the name of the class to be registered
|
|
118
|
+
/// \param directive a string containing the corresponding directive
|
|
119
|
+
/// This macro should be used in the .cpp file of the corresponding class
|
|
120
|
+
#define PLUMED_REGISTER_ACTION(classname,directive) \
|
|
121
|
+
namespace {::PLMD::ActionRegistration<classname> \
|
|
122
|
+
PLUMED_CONCATENATE(classname##Registerer,__LINE__)(directive);}
|
|
123
|
+
#endif
|
|
124
|
+
|