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,41 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2013-2017 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_symfunc_CoordinationNumbers_h
|
|
23
|
+
#define __PLUMED_symfunc_CoordinationNumbers_h
|
|
24
|
+
|
|
25
|
+
#include "../core/ActionShortcut.h"
|
|
26
|
+
|
|
27
|
+
namespace PLMD {
|
|
28
|
+
namespace symfunc {
|
|
29
|
+
|
|
30
|
+
class CoordinationNumbers : public ActionShortcut {
|
|
31
|
+
public:
|
|
32
|
+
static void shortcutKeywords( Keywords& keys );
|
|
33
|
+
static void registerKeywords( Keywords& keys );
|
|
34
|
+
static void expandMatrix( const bool& components, const std::string& lab, const std::string& sp_str,
|
|
35
|
+
const std::string& spa_str, const std::string& spb_str, ActionShortcut* action );
|
|
36
|
+
explicit CoordinationNumbers(const ActionOptions&);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
#endif
|
|
@@ -0,0 +1,52 @@
|
|
|
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_tools_Angle_h
|
|
23
|
+
#define __PLUMED_tools_Angle_h
|
|
24
|
+
|
|
25
|
+
#include "Vector.h"
|
|
26
|
+
|
|
27
|
+
namespace PLMD {
|
|
28
|
+
|
|
29
|
+
/// \ingroup TOOLBOX
|
|
30
|
+
/// Class to compute angles.
|
|
31
|
+
/// I define it as a class even if it does not contain anything. The reason
|
|
32
|
+
/// is that in the future I would like to extend it to contain options about
|
|
33
|
+
/// how the calculation should be done. So, for now use it as
|
|
34
|
+
/// Angle a;
|
|
35
|
+
/// double angle=a.compute(v1,v2);
|
|
36
|
+
/// I know it is a bit misleading. If we really do not need to store "options"
|
|
37
|
+
/// inside the Angle class, we can remove it later and write compute as
|
|
38
|
+
/// a static function.
|
|
39
|
+
class Angle {
|
|
40
|
+
// still empty, but may accommodate some options in the future
|
|
41
|
+
public:
|
|
42
|
+
/// Compute the angle between vectors v1 and v2
|
|
43
|
+
#pragma acc routine seq
|
|
44
|
+
double compute(const Vector& v1,const Vector& v2)const;
|
|
45
|
+
/// Compute the angle between vectors v1 and v2 and its derivatives wrt v1 and v2
|
|
46
|
+
#pragma acc routine seq
|
|
47
|
+
double compute(const Vector& v1,const Vector& v2,Vector& d1,Vector& d2)const;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
#endif
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2025 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_tools_AtomDistribution_h
|
|
23
|
+
#define __PLUMED_tools_AtomDistribution_h
|
|
24
|
+
|
|
25
|
+
#include "Vector.h"
|
|
26
|
+
#include "Tools.h"
|
|
27
|
+
#include "Random.h"
|
|
28
|
+
#include "TrajectoryParser.h"
|
|
29
|
+
|
|
30
|
+
#include <vector>
|
|
31
|
+
namespace PLMD {
|
|
32
|
+
///tested in regtest/tools/rt-make-AtomicDistribution
|
|
33
|
+
///Acts as a template for any distribution
|
|
34
|
+
struct AtomDistribution {
|
|
35
|
+
///Update the input vectors with the position and the box of the frame
|
|
36
|
+
virtual void frame(std::vector<Vector>& posToUpdate,
|
|
37
|
+
std::vector<double>& box,
|
|
38
|
+
unsigned /*step*/,
|
|
39
|
+
Random& /*rng*/)=0;
|
|
40
|
+
virtual ~AtomDistribution() noexcept {}
|
|
41
|
+
///If necessary changes the number of atoms, returns true if that number has been changed
|
|
42
|
+
virtual bool overrideNat(unsigned& ) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
///A wiggly line of atoms
|
|
48
|
+
struct theLine:public AtomDistribution {
|
|
49
|
+
void frame(std::vector<Vector>& posToUpdate,
|
|
50
|
+
std::vector<double>& box,
|
|
51
|
+
unsigned step,
|
|
52
|
+
Random& rng) override;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
///Atom randomly distribuited in a sphere
|
|
56
|
+
struct uniformSphere:public AtomDistribution {
|
|
57
|
+
void frame(std::vector<Vector>& posToUpdate,
|
|
58
|
+
std::vector<double>& box,
|
|
59
|
+
unsigned /*step*/,
|
|
60
|
+
Random& rng) override;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
///Atom randomly distribuited between two not overlapping a spheres
|
|
64
|
+
struct twoGlobs: public AtomDistribution {
|
|
65
|
+
void frame(std::vector<Vector>& posToUpdate,
|
|
66
|
+
std::vector<double>& box,
|
|
67
|
+
unsigned /*step*/,
|
|
68
|
+
Random&rng) override;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
struct uniformCube:public AtomDistribution {
|
|
72
|
+
void frame(std::vector<Vector>& posToUpdate,
|
|
73
|
+
std::vector<double>& box,
|
|
74
|
+
unsigned /*step*/,
|
|
75
|
+
Random& rng) override;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
struct tiledSimpleCubic:public AtomDistribution {
|
|
79
|
+
void frame(std::vector<Vector>& posToUpdate,
|
|
80
|
+
std::vector<double>& box,
|
|
81
|
+
unsigned /*step*/,
|
|
82
|
+
Random& rng) override;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/// atomic distribution from a trajectory file
|
|
86
|
+
class fileTraj:public AtomDistribution {
|
|
87
|
+
TrajectoryParser parser;
|
|
88
|
+
std::vector<double> masses{};
|
|
89
|
+
std::vector<double> charges{};
|
|
90
|
+
std::vector<Vector> coordinates{};
|
|
91
|
+
std::vector<double> cell{0.0,0.0,0.0,
|
|
92
|
+
0.0,0.0,0.0,
|
|
93
|
+
0.0,0.0,0.0};
|
|
94
|
+
bool read=false;
|
|
95
|
+
bool dont_read_pbc=false;
|
|
96
|
+
void rewind();
|
|
97
|
+
//read the next step
|
|
98
|
+
void step(bool doRewind=true);
|
|
99
|
+
public:
|
|
100
|
+
void frame(std::vector<Vector>& posToUpdate,
|
|
101
|
+
std::vector<double>& box,
|
|
102
|
+
unsigned /*step*/,
|
|
103
|
+
Random& /*rng*/) override;
|
|
104
|
+
|
|
105
|
+
fileTraj(std::string_view fmt,
|
|
106
|
+
std::string_view fname,
|
|
107
|
+
bool useMolfile,
|
|
108
|
+
int command_line_natoms);
|
|
109
|
+
bool overrideNat(unsigned& natoms) override;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
std::unique_ptr<AtomDistribution> getAtomDistribution(std::string_view atomicDistr);
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
///a decorator for replicate the atomic distribution
|
|
116
|
+
class repliedTrajectory: public AtomDistribution {
|
|
117
|
+
std::unique_ptr<AtomDistribution> distribution;
|
|
118
|
+
unsigned rX=1;
|
|
119
|
+
unsigned rY=1;
|
|
120
|
+
unsigned rZ=1;
|
|
121
|
+
std::vector<Vector> coordinates;
|
|
122
|
+
public:
|
|
123
|
+
repliedTrajectory(std::unique_ptr<AtomDistribution>&& d,
|
|
124
|
+
const unsigned repeatX,
|
|
125
|
+
const unsigned repeatY,
|
|
126
|
+
const unsigned repeatZ,
|
|
127
|
+
// I think 4294967295 maximum atoms before the multiplication is more than enough
|
|
128
|
+
const unsigned nat);
|
|
129
|
+
|
|
130
|
+
void frame(std::vector<Vector>& posToUpdate,
|
|
131
|
+
std::vector<double>& box,
|
|
132
|
+
unsigned step,
|
|
133
|
+
Random& rng) override;
|
|
134
|
+
|
|
135
|
+
bool overrideNat(unsigned& natoms) override;
|
|
136
|
+
};
|
|
137
|
+
} //namespace PLMD
|
|
138
|
+
#endif // __PLUMED_tools_AtomDistribution_h
|
|
@@ -0,0 +1,152 @@
|
|
|
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_tools_AtomNumber_h
|
|
23
|
+
#define __PLUMED_tools_AtomNumber_h
|
|
24
|
+
|
|
25
|
+
#include "Exception.h"
|
|
26
|
+
#include <limits>
|
|
27
|
+
|
|
28
|
+
namespace PLMD {
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
\ingroup TOOLBOX
|
|
32
|
+
Simple class to store the index of an atom.
|
|
33
|
+
It is just an unsigned, with all the methods inlined for better efficiency.
|
|
34
|
+
Its special thing is that it is only accessed through serial(), index(),
|
|
35
|
+
setSerial() and setIndex() methods, so that there
|
|
36
|
+
no ambiguity about using the "from 0" (index) or
|
|
37
|
+
"from 1" (serial) numbering (names as in VMD convention).
|
|
38
|
+
*/
|
|
39
|
+
class AtomNumber {
|
|
40
|
+
unsigned index_;
|
|
41
|
+
/// Construct with a given index.
|
|
42
|
+
/// This constructor is kept private to avoid implicit cast.
|
|
43
|
+
explicit AtomNumber(unsigned);
|
|
44
|
+
public:
|
|
45
|
+
/// Initialize to index=0 (serial=1)
|
|
46
|
+
AtomNumber();
|
|
47
|
+
/// Returns the serial number
|
|
48
|
+
unsigned serial()const;
|
|
49
|
+
/// Returns the index number
|
|
50
|
+
unsigned index()const;
|
|
51
|
+
/// Sets the atom number by serial, returning a reference to the AtomNumber itself.
|
|
52
|
+
AtomNumber & setSerial(unsigned);
|
|
53
|
+
/// Sets the atom number by index, returning a reference to the AtomNumber itself.
|
|
54
|
+
AtomNumber & setIndex(unsigned);
|
|
55
|
+
/// Returns an AtomNumber with a specified serial.
|
|
56
|
+
static AtomNumber serial(unsigned);
|
|
57
|
+
/// Returns an AtomNumber with a specified index.
|
|
58
|
+
static AtomNumber index(unsigned);
|
|
59
|
+
/// Comparison operators
|
|
60
|
+
friend bool operator<(const AtomNumber&,const AtomNumber&);
|
|
61
|
+
/// Comparison operators
|
|
62
|
+
friend bool operator>(const AtomNumber&,const AtomNumber&);
|
|
63
|
+
/// Comparison operators
|
|
64
|
+
friend bool operator<=(const AtomNumber&,const AtomNumber&);
|
|
65
|
+
/// Comparison operators
|
|
66
|
+
friend bool operator>=(const AtomNumber&,const AtomNumber&);
|
|
67
|
+
/// Comparison operators
|
|
68
|
+
friend bool operator==(const AtomNumber&,const AtomNumber&);
|
|
69
|
+
/// Comparison operators
|
|
70
|
+
friend bool operator!=(const AtomNumber&,const AtomNumber&);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
inline
|
|
74
|
+
AtomNumber::AtomNumber() {
|
|
75
|
+
index_=0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
inline
|
|
79
|
+
AtomNumber::AtomNumber(unsigned i) {
|
|
80
|
+
index_=i;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
inline
|
|
84
|
+
unsigned AtomNumber::serial()const {
|
|
85
|
+
return index_+1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
inline
|
|
89
|
+
unsigned AtomNumber::index()const {
|
|
90
|
+
return index_;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
inline
|
|
94
|
+
AtomNumber & AtomNumber::setSerial(unsigned i) {
|
|
95
|
+
plumed_massert(i>0,"serial of an atom cannot be zero");
|
|
96
|
+
plumed_massert(i<std::numeric_limits<unsigned>::max()/2,"serial cannot be negative");
|
|
97
|
+
index_=i-1;
|
|
98
|
+
return *this;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
inline
|
|
102
|
+
AtomNumber & AtomNumber::setIndex(unsigned i) {
|
|
103
|
+
index_=i;
|
|
104
|
+
return *this;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
inline
|
|
108
|
+
AtomNumber AtomNumber::serial(unsigned i) {
|
|
109
|
+
plumed_massert(i>0,"serial of an atom cannot be zero");
|
|
110
|
+
plumed_massert(i<std::numeric_limits<unsigned>::max()/2,"serial cannot be negative");
|
|
111
|
+
return AtomNumber(i-1);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
inline
|
|
115
|
+
AtomNumber AtomNumber::index(unsigned i) {
|
|
116
|
+
return AtomNumber(i);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
inline
|
|
120
|
+
bool operator<(const AtomNumber&a,const AtomNumber&b) {
|
|
121
|
+
return a.index_<b.index_;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
inline
|
|
125
|
+
bool operator>(const AtomNumber&a,const AtomNumber&b) {
|
|
126
|
+
return a.index_>b.index_;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
inline
|
|
130
|
+
bool operator<=(const AtomNumber&a,const AtomNumber&b) {
|
|
131
|
+
return a.index_<=b.index_;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
inline
|
|
135
|
+
bool operator>=(const AtomNumber&a,const AtomNumber&b) {
|
|
136
|
+
return a.index_>=b.index_;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
inline
|
|
140
|
+
bool operator==(const AtomNumber&a,const AtomNumber&b) {
|
|
141
|
+
return a.index_==b.index_;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
inline
|
|
145
|
+
bool operator!=(const AtomNumber&a,const AtomNumber&b) {
|
|
146
|
+
return a.index_!=b.index_;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
#endif
|
|
152
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
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_tools_BiasRepresentation_h
|
|
23
|
+
#define __PLUMED_tools_BiasRepresentation_h
|
|
24
|
+
|
|
25
|
+
#include "Exception.h"
|
|
26
|
+
#include <memory>
|
|
27
|
+
#include <vector>
|
|
28
|
+
|
|
29
|
+
namespace PLMD {
|
|
30
|
+
|
|
31
|
+
class Value;
|
|
32
|
+
class Grid;
|
|
33
|
+
class IFile;
|
|
34
|
+
class KernelFunctions;
|
|
35
|
+
class Communicator;
|
|
36
|
+
|
|
37
|
+
//+PLUMEDOC INTERNAL biasrepresentation
|
|
38
|
+
/*
|
|
39
|
+
|
|
40
|
+
*/
|
|
41
|
+
//+ENDPLUMEDOC
|
|
42
|
+
|
|
43
|
+
/// this class implements a general purpose class that aims to
|
|
44
|
+
/// provide a Grid/list
|
|
45
|
+
/// transparently add gaussians to a bias
|
|
46
|
+
|
|
47
|
+
class BiasRepresentation {
|
|
48
|
+
public:
|
|
49
|
+
/// create a bias representation from a list of pointer to values
|
|
50
|
+
BiasRepresentation(const std::vector<Value*> & tmpvalues, Communicator &cc );
|
|
51
|
+
/// create a bias using explicit sigma in input (needed for histogram building)
|
|
52
|
+
BiasRepresentation(const std::vector<Value*> & tmpvalues, Communicator &cc, const std::vector<double> & sigma);
|
|
53
|
+
/// create a bias containing a grid representation
|
|
54
|
+
BiasRepresentation(const std::vector<Value*> & tmpvalues, Communicator &cc, const std::vector<std::string> & gmin, const std::vector<std::string> & gmax,
|
|
55
|
+
const std::vector<unsigned> & nbin, bool doInt, double lowI_, double uppI_);
|
|
56
|
+
/// create a histogram with grid representation and sigmas in input
|
|
57
|
+
BiasRepresentation(const std::vector<Value*> & tmpvalues, Communicator &cc, const std::vector<std::string> & gmin, const std::vector<std::string> & gmax, const std::vector<unsigned> & nbin, const std::vector<double> & sigma);
|
|
58
|
+
/// retrieve the number of dimension of the representation
|
|
59
|
+
unsigned getNumberOfDimensions();
|
|
60
|
+
/// add the grid to the representation
|
|
61
|
+
void addGrid(const std::vector<std::string> & gmin, const std::vector<std::string> & gmax, const std::vector<unsigned> & nbin );
|
|
62
|
+
/// push a kernel on the representation (includes widths and height)
|
|
63
|
+
void pushKernel( IFile * ff);
|
|
64
|
+
/// set the flag that rescales the free energy to the bias
|
|
65
|
+
void setRescaledToBias(bool rescaled);
|
|
66
|
+
/// check if the representation is rescaled to the bias
|
|
67
|
+
const bool & isRescaledToBias();
|
|
68
|
+
/// check if the sigma values are already provided (in case of a histogram representation with input sigmas)
|
|
69
|
+
bool hasSigmaInInput();
|
|
70
|
+
/// get the names of the variables
|
|
71
|
+
std::vector<std::string> getNames();
|
|
72
|
+
/// get the pointer to the values
|
|
73
|
+
const std::vector<Value*> & getPtrToValues();
|
|
74
|
+
/// get the number of kernels contained in the representation
|
|
75
|
+
int getNumberOfKernels();
|
|
76
|
+
/// get the name of the i-th value
|
|
77
|
+
const std::string & getName(unsigned i);
|
|
78
|
+
/// get a pointer to a specific value
|
|
79
|
+
Value* getPtrToValue(unsigned i);
|
|
80
|
+
/// get the pointer to the grid
|
|
81
|
+
Grid* getGridPtr();
|
|
82
|
+
/// get a new histogram point from a file
|
|
83
|
+
std::unique_ptr<KernelFunctions> readFromPoint(IFile *ifile);
|
|
84
|
+
/// get an automatic min/max from the set so to know how to configure the grid
|
|
85
|
+
void getMinMaxBin(std::vector<double> &vmin, std::vector<double> &vmax, std::vector<unsigned> &vbin);
|
|
86
|
+
/// clear the representation (grid included)
|
|
87
|
+
void clear();
|
|
88
|
+
private:
|
|
89
|
+
int ndim;
|
|
90
|
+
bool hasgrid;
|
|
91
|
+
bool rescaledToBias;
|
|
92
|
+
bool doInt_;
|
|
93
|
+
double lowI_;
|
|
94
|
+
double uppI_;
|
|
95
|
+
std::vector<Value*> values;
|
|
96
|
+
std::vector<std::string> names;
|
|
97
|
+
std::vector<std::unique_ptr<KernelFunctions>> hills;
|
|
98
|
+
std::vector<double> biasf;
|
|
99
|
+
std::vector<double> histosigma;
|
|
100
|
+
Communicator& mycomm;
|
|
101
|
+
std::unique_ptr<Grid> BiasGrid_;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
#endif
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2024 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
|
+
|
|
23
|
+
#ifndef __PLUMED_tools_BitmaskEnum_h
|
|
24
|
+
#define __PLUMED_tools_BitmaskEnum_h
|
|
25
|
+
#include <type_traits>
|
|
26
|
+
|
|
27
|
+
namespace PLMD {
|
|
28
|
+
namespace enum_traits {
|
|
29
|
+
/** @brief struct for setting up bitmask operations on enum types
|
|
30
|
+
|
|
31
|
+
example usage: specialize with extra traits (see it in action in tools/Keywords.h)
|
|
32
|
+
Example:
|
|
33
|
+
|
|
34
|
+
Please note that in the example the `0` is not a named value (it is reserved
|
|
35
|
+
as a result of mask not matching masks) and the others values are implemented as single bit
|
|
36
|
+
@code{.cpp}
|
|
37
|
+
enum class argType {scalar=1,grid=1<<2,vector=1<<3,matrix=1<<4};
|
|
38
|
+
template<>
|
|
39
|
+
struct BitmaskEnum< argType > {
|
|
40
|
+
static constexpr bool has_valid = true;
|
|
41
|
+
static constexpr bool has_bit_or = true;
|
|
42
|
+
static constexpr bool has_bit_and = true;
|
|
43
|
+
};
|
|
44
|
+
@endcode
|
|
45
|
+
Currenlty we have implemented:
|
|
46
|
+
@code{.cpp}
|
|
47
|
+
static constexpr bool has_valid = true;
|
|
48
|
+
@endcode
|
|
49
|
+
that activates the ::valid(enumtype) function
|
|
50
|
+
@code{.cpp}
|
|
51
|
+
static constexpr bool has_bit_or = true;
|
|
52
|
+
@endcode
|
|
53
|
+
that activates the operator|(enumtype , enumtype )
|
|
54
|
+
@code{.cpp}
|
|
55
|
+
static constexpr bool has_bit_and = true;
|
|
56
|
+
@endcode
|
|
57
|
+
that activates the operator&(enumtype , enumtype )
|
|
58
|
+
|
|
59
|
+
@see valid(enumtype) for a complete example
|
|
60
|
+
@see operator&(enumtype, enumtype)
|
|
61
|
+
@see operator|(enumtype, enumtype)
|
|
62
|
+
*/
|
|
63
|
+
template< typename enum_type >
|
|
64
|
+
struct BitmaskEnum {
|
|
65
|
+
};
|
|
66
|
+
} // namespace enum_traits
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
@brief Perform a bitwise AND between two enum values.
|
|
70
|
+
|
|
71
|
+
@param a The first enum value.
|
|
72
|
+
@param b The second enum value.
|
|
73
|
+
@return The result of performing a bitwise AND between the two values.
|
|
74
|
+
|
|
75
|
+
This operator is only available for enum types that have a specialization of
|
|
76
|
+
enum_traits::BitmaskEnum with the `has_bit_and` trait enabled.
|
|
77
|
+
|
|
78
|
+
Useful for checking composed values agains masks.
|
|
79
|
+
|
|
80
|
+
Note that the value may be a 0, and if you do not have defined the 0 as a named
|
|
81
|
+
value you should use valid(enumtype) to check it.
|
|
82
|
+
|
|
83
|
+
@see valid(enumtype) for a complete example
|
|
84
|
+
@see operator|(enumtype, enumtype)
|
|
85
|
+
*/
|
|
86
|
+
template< typename enumtype > // SFINAE makes function contingent on trait
|
|
87
|
+
constexpr typename std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_bit_and,enumtype>
|
|
88
|
+
operator&( enumtype a, enumtype b ) {
|
|
89
|
+
return static_cast<enumtype>(static_cast<std::underlying_type_t<enumtype>>(a) &
|
|
90
|
+
static_cast<std::underlying_type_t<enumtype>>(b));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
@brief Perform a bitwise OR between two enum values.
|
|
95
|
+
|
|
96
|
+
@param a The first enum value.
|
|
97
|
+
@param b The second enum value.
|
|
98
|
+
@return The result of performing a bitwise OR between the two values.
|
|
99
|
+
|
|
100
|
+
This operator is only available for enum types that have a specialization of
|
|
101
|
+
enum_traits::BitmaskEnum with the `has_bit_or` trait enabled.
|
|
102
|
+
|
|
103
|
+
The principal use is to compose named enum values into masks or combined options.
|
|
104
|
+
|
|
105
|
+
@see valid(enumtype) for a complete example
|
|
106
|
+
@see operator&(enumtype, enumtype)
|
|
107
|
+
*/
|
|
108
|
+
template< typename enumtype > // SFINAE makes function contingent on trait
|
|
109
|
+
constexpr typename std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_bit_or,enumtype>
|
|
110
|
+
operator|( enumtype a, enumtype b ) {
|
|
111
|
+
return static_cast<enumtype>(static_cast<std::underlying_type_t<enumtype>>(a) |
|
|
112
|
+
static_cast<std::underlying_type_t<enumtype>>(b));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
@brief Test if an enum value is valid.
|
|
117
|
+
|
|
118
|
+
@param a The enum value to test.
|
|
119
|
+
@return true if the enum value is not equal to zero, false otherwise.
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
This operator is only available for enum types that have a specialization of
|
|
123
|
+
enum_traits::BitmaskEnum with the `has_valid` trait enabled.
|
|
124
|
+
|
|
125
|
+
@code
|
|
126
|
+
// Note: explicit declarations of the values, and
|
|
127
|
+
enum class myenum { A=1,B=1<<1,C=1<<2 };
|
|
128
|
+
//then activate the functions `&`, `|` and `valid`
|
|
129
|
+
template<>
|
|
130
|
+
struct BitmaskEnum< myenum > {
|
|
131
|
+
static constexpr bool has_valid = true;
|
|
132
|
+
static constexpr bool has_bit_or = true;
|
|
133
|
+
static constexpr bool has_bit_and = true;
|
|
134
|
+
};
|
|
135
|
+
//...code...
|
|
136
|
+
myenum val = myenum::A | myenum::C;
|
|
137
|
+
std::cout <<"val is "<< int(val) << "\n";
|
|
138
|
+
if(PLMD::valid( val & myenum::A)) {
|
|
139
|
+
std::cout << "val has A\n";
|
|
140
|
+
}
|
|
141
|
+
if(PLMD::valid(val & myenum::B)) {
|
|
142
|
+
std::cout << "val has B\n";
|
|
143
|
+
}
|
|
144
|
+
if(PLMD::valid(val & myenum::C)) {
|
|
145
|
+
std::cout << "val has C\n";
|
|
146
|
+
}
|
|
147
|
+
if(PLMD::valid(val & (myenum::A | myenum::C))) {
|
|
148
|
+
std::cout << "val has C and A\n";
|
|
149
|
+
}
|
|
150
|
+
//will produce:
|
|
151
|
+
///>val is 5
|
|
152
|
+
///>val has A
|
|
153
|
+
///>val has C
|
|
154
|
+
///>val has C and A
|
|
155
|
+
@endcode
|
|
156
|
+
|
|
157
|
+
@see operator|(enumtype, enumtype)
|
|
158
|
+
@see operator&(enumtype, enumtype)
|
|
159
|
+
*/
|
|
160
|
+
template< typename enumtype > // SFINAE makes function contingent on trait
|
|
161
|
+
constexpr typename std::enable_if_t< enum_traits::BitmaskEnum< enumtype >::has_valid,bool>
|
|
162
|
+
valid( enumtype a) {
|
|
163
|
+
return static_cast<std::underlying_type_t<enumtype>>(a)!=0;
|
|
164
|
+
}
|
|
165
|
+
} // namespace PLMD
|
|
166
|
+
|
|
167
|
+
#endif //__PLUMED_tools_BitmaskEnum_h
|