hillclimber 0.1.6__cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_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 +41 -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 +416 -0
- hillclimber/nodes.py +6 -0
- hillclimber/opes.py +359 -0
- hillclimber/pycv.py +362 -0
- hillclimber/selectors.py +230 -0
- hillclimber/virtual_atoms.py +341 -0
- hillclimber-0.1.6.dist-info/METADATA +325 -0
- hillclimber-0.1.6.dist-info/RECORD +475 -0
- hillclimber-0.1.6.dist-info/WHEEL +6 -0
- hillclimber-0.1.6.dist-info/entry_points.txt +8 -0
- hillclimber-0.1.6.dist-info/licenses/LICENSE +165 -0
- hillclimber-0.1.6.dist-info/sboms/auditwheel.cdx.json +1 -0
- hillclimber.libs/libgomp-a49a47f9.so.1.0.0 +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-gnu.so +0 -0
- plumed/_plumed_core.cpython-312-aarch64-linux-gnu.so +0 -0
- plumed/_plumed_core.cpython-313-aarch64-linux-gnu.so +0 -0
- plumed/_plumed_core.cpython-314-aarch64-linux-gnu.so +0 -0
- plumed/_plumed_core.cpython-314t-aarch64-linux-gnu.so +0 -0
- plumedCommunications.cpython-311-aarch64-linux-gnu.so +0 -0
- plumedCommunications.cpython-312-aarch64-linux-gnu.so +0 -0
- plumedCommunications.cpython-313-aarch64-linux-gnu.so +0 -0
- plumedCommunications.cpython-314-aarch64-linux-gnu.so +0 -0
- plumedCommunications.cpython-314t-aarch64-linux-gnu.so +0 -0
- plumedCommunications.pyi +431 -0
|
@@ -0,0 +1,167 @@
|
|
|
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_Units_h
|
|
23
|
+
#define __PLUMED_tools_Units_h
|
|
24
|
+
|
|
25
|
+
#include <string>
|
|
26
|
+
|
|
27
|
+
namespace PLMD {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
\ingroup TOOLBOX
|
|
31
|
+
Small utility class that contains information about units.
|
|
32
|
+
|
|
33
|
+
This class can be used to contain in a single place all the
|
|
34
|
+
information about units. Units are expressed in terms of
|
|
35
|
+
standard PLUMED units, i.e. kj/mol, nm, and ps.
|
|
36
|
+
Units can be set as double or as string. In the latter case,
|
|
37
|
+
one can also use strings such as kcal/mol.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
*/
|
|
41
|
+
class Units {
|
|
42
|
+
/// Units for energy, expressed in kj/mol (e.g. 4.184 means kcal/mol)
|
|
43
|
+
double energy;
|
|
44
|
+
std::string energyString;
|
|
45
|
+
/// Units for length, expressed in nm (e.g. 0.1 means A)
|
|
46
|
+
double length;
|
|
47
|
+
std::string lengthString;
|
|
48
|
+
/// Units for time, expressed in ps (e.g. 0.001 means fs)
|
|
49
|
+
double time;
|
|
50
|
+
std::string timeString;
|
|
51
|
+
/// Units for charges, expressed in proton charge (e.g. 1./18.2223 are sqrt(kcal/mol*A), as used in Amber)
|
|
52
|
+
double charge;
|
|
53
|
+
std::string chargeString;
|
|
54
|
+
/// Units for masses, expressed in amu
|
|
55
|
+
double mass;
|
|
56
|
+
std::string massString;
|
|
57
|
+
public:
|
|
58
|
+
/// Constructor, setting default values (1.0)
|
|
59
|
+
Units();
|
|
60
|
+
/// Set energy units from string.
|
|
61
|
+
/// Also understands the following strings:
|
|
62
|
+
/// kj/mol, kcal/mol, j/mol, eV, and Ha.
|
|
63
|
+
void setEnergy(const std::string &);
|
|
64
|
+
/// Set time units from string.
|
|
65
|
+
/// Also understands the following strings:
|
|
66
|
+
/// ps, ns, fs, and atomic.
|
|
67
|
+
void setTime(const std::string &);
|
|
68
|
+
/// Set length units from string.
|
|
69
|
+
/// Also understands the following strings:
|
|
70
|
+
/// nm, A, um, and Bohr.
|
|
71
|
+
void setLength(const std::string &);
|
|
72
|
+
/// Set charge units from string.
|
|
73
|
+
void setCharge(const std::string &);
|
|
74
|
+
/// Set mass units from string.
|
|
75
|
+
void setMass(const std::string &);
|
|
76
|
+
/// Set energy units from double.
|
|
77
|
+
/// Should be specified in units of kj/mol (e.g. 4.184 means kcal/mol)
|
|
78
|
+
void setEnergy(double);
|
|
79
|
+
/// Set time units from double.
|
|
80
|
+
/// Should be specified in units of ps (e.g. 0.001 means fs)
|
|
81
|
+
void setTime(double);
|
|
82
|
+
/// Set length units from double.
|
|
83
|
+
/// Should be specified in units of nm (e.g. 0.1 means A)
|
|
84
|
+
void setLength(double);
|
|
85
|
+
/// Set charge units from double.
|
|
86
|
+
/// Should be specified in units of proton charge.
|
|
87
|
+
void setCharge(double);
|
|
88
|
+
/// Set mass units from double.
|
|
89
|
+
/// Should be specified in units of amu.
|
|
90
|
+
void setMass(double);
|
|
91
|
+
/// Get energy units as double.
|
|
92
|
+
const double & getEnergy()const;
|
|
93
|
+
/// Get length units as double.
|
|
94
|
+
const double & getLength()const;
|
|
95
|
+
/// Get time units as double.
|
|
96
|
+
const double & getTime()const;
|
|
97
|
+
/// Get charge units as double.
|
|
98
|
+
const double & getCharge()const;
|
|
99
|
+
/// Get mass units as double.
|
|
100
|
+
const double & getMass()const;
|
|
101
|
+
/// Get energy units as string.
|
|
102
|
+
const std::string & getEnergyString()const;
|
|
103
|
+
/// Get length units as string.
|
|
104
|
+
const std::string & getLengthString()const;
|
|
105
|
+
/// Get time units as string.
|
|
106
|
+
const std::string & getTimeString()const;
|
|
107
|
+
/// Get charge units as string.
|
|
108
|
+
const std::string & getChargeString()const;
|
|
109
|
+
/// Get mass units as string.
|
|
110
|
+
const std::string & getMassString()const;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
inline
|
|
114
|
+
const double & Units::getEnergy()const {
|
|
115
|
+
return energy;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
inline
|
|
119
|
+
const double & Units::getLength()const {
|
|
120
|
+
return length;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
inline
|
|
124
|
+
const double & Units::getTime()const {
|
|
125
|
+
return time;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
inline
|
|
129
|
+
const double & Units::getCharge()const {
|
|
130
|
+
return charge;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
inline
|
|
134
|
+
const double & Units::getMass()const {
|
|
135
|
+
return mass;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
inline
|
|
139
|
+
const std::string & Units::getEnergyString()const {
|
|
140
|
+
return energyString;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
inline
|
|
144
|
+
const std::string & Units::getLengthString()const {
|
|
145
|
+
return lengthString;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
inline
|
|
149
|
+
const std::string & Units::getTimeString()const {
|
|
150
|
+
return timeString;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
inline
|
|
154
|
+
const std::string & Units::getChargeString()const {
|
|
155
|
+
return chargeString;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
inline
|
|
159
|
+
const std::string & Units::getMassString()const {
|
|
160
|
+
return massString;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
#endif
|
|
@@ -0,0 +1,433 @@
|
|
|
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_Vector_h
|
|
23
|
+
#define __PLUMED_tools_Vector_h
|
|
24
|
+
|
|
25
|
+
#include <cmath>
|
|
26
|
+
#include <initializer_list>
|
|
27
|
+
#include <iosfwd>
|
|
28
|
+
#include <array>
|
|
29
|
+
#include <type_traits>
|
|
30
|
+
#include "LoopUnroller.h"
|
|
31
|
+
|
|
32
|
+
namespace PLMD {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
\ingroup TOOLBOX
|
|
36
|
+
Class implementing fixed size vectors of doubles
|
|
37
|
+
|
|
38
|
+
\tparam n The number of elements of the vector.
|
|
39
|
+
|
|
40
|
+
This class implements a vector of doubles with size fixed at
|
|
41
|
+
compile time. It is useful for small fixed size objects (e.g.
|
|
42
|
+
3d vectors) as it does not waste space to store the vector size.
|
|
43
|
+
Moreover, as the compiler knows the size, it can be completely
|
|
44
|
+
opimized inline.
|
|
45
|
+
All the methods are inlined for better optimization and
|
|
46
|
+
all the loops are explicitly unrolled using PLMD::LoopUnroller class.
|
|
47
|
+
Vector elements are initialized to zero by default. Notice that
|
|
48
|
+
this means that constructor is a bit slow. This point might change
|
|
49
|
+
in future if we find performance issues.
|
|
50
|
+
Accepts both [] and () syntax for access.
|
|
51
|
+
Several functions are declared as friends even if not necessary so as to
|
|
52
|
+
properly appear in Doxygen documentation.
|
|
53
|
+
|
|
54
|
+
Aliases are defined to simplify common declarations (Vector, Vector2d, Vector3d, Vector4d).
|
|
55
|
+
Also notice that some operations are only available for 3 dimensional vectors.
|
|
56
|
+
|
|
57
|
+
Example of usage
|
|
58
|
+
\verbatim
|
|
59
|
+
#include "Vector.h"
|
|
60
|
+
|
|
61
|
+
using namespace PLMD;
|
|
62
|
+
|
|
63
|
+
int main(){
|
|
64
|
+
VectorGeneric<3> v1;
|
|
65
|
+
v1[0]=3.0;
|
|
66
|
+
// use equivalently () and [] syntax:
|
|
67
|
+
v1(1)=5.0;
|
|
68
|
+
// initialize with components
|
|
69
|
+
VectorGeneric<3> v2=VectorGeneric<3>(1.0,2.0,3.0);
|
|
70
|
+
VectorGeneric<3> v3=crossProduct(v1,v2);
|
|
71
|
+
double d=dotProduct(v1,v2);
|
|
72
|
+
v3+=v1;
|
|
73
|
+
v2=v1+2.0*v3;
|
|
74
|
+
}
|
|
75
|
+
\endverbatim
|
|
76
|
+
|
|
77
|
+
*/
|
|
78
|
+
template<typename T, unsigned n> class VectorTyped;
|
|
79
|
+
|
|
80
|
+
template<typename T, unsigned n>
|
|
81
|
+
constexpr VectorTyped<T, n> delta(const VectorTyped<T, n>&,const VectorTyped<T, n>&);
|
|
82
|
+
|
|
83
|
+
template<typename T, unsigned n>
|
|
84
|
+
constexpr T dotProduct(const VectorTyped<T, n>&,const VectorTyped<T, n>&);
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
template<typename T, unsigned n>
|
|
88
|
+
std::ostream & operator<<(std::ostream &os, const VectorTyped<T, n>& v);
|
|
89
|
+
template<typename T, unsigned n>
|
|
90
|
+
class VectorTyped {
|
|
91
|
+
std::array<T,n> d;
|
|
92
|
+
/// Auxiliary private function for constructor
|
|
93
|
+
void auxiliaryConstructor();
|
|
94
|
+
/// Auxiliary private function for constructor
|
|
95
|
+
template<typename... Args>
|
|
96
|
+
void auxiliaryConstructor(T first,Args... arg);
|
|
97
|
+
public:
|
|
98
|
+
template<unsigned m=n,typename=std::enable_if_t<m==3,void>>
|
|
99
|
+
constexpr VectorTyped(T first, T second, T third):d{first,second,third} {}
|
|
100
|
+
/// Constructor accepting n T parameters.
|
|
101
|
+
/// Can be used as Vector<3>(1.0,2.0,3.0) or Vector<2>(2.0,3.0).
|
|
102
|
+
/// In case a wrong number of parameters is given, a static assertion will fail.
|
|
103
|
+
template<typename... Args,unsigned m=n,typename=std::enable_if_t<m!=3,void>>
|
|
104
|
+
VectorTyped(T first,Args... arg);
|
|
105
|
+
/// create it null
|
|
106
|
+
constexpr VectorTyped();
|
|
107
|
+
/// Returns a pointer to the underlying array serving as element storage.
|
|
108
|
+
constexpr T* data() noexcept;
|
|
109
|
+
/// Returns a pointer to the underlying array serving as element storage.
|
|
110
|
+
constexpr const T* data() const noexcept;
|
|
111
|
+
/// set it to zero
|
|
112
|
+
constexpr void zero();
|
|
113
|
+
/// array-like access [i]
|
|
114
|
+
constexpr T & operator[](unsigned i);
|
|
115
|
+
/// array-like access [i]
|
|
116
|
+
constexpr const T & operator[](unsigned i)const;
|
|
117
|
+
/// parenthesis access (i)
|
|
118
|
+
constexpr T & operator()(unsigned i);
|
|
119
|
+
/// parenthesis access (i)
|
|
120
|
+
constexpr const T & operator()(unsigned i)const;
|
|
121
|
+
/// increment
|
|
122
|
+
constexpr VectorTyped& operator +=(const VectorTyped& b);
|
|
123
|
+
/// decrement
|
|
124
|
+
constexpr VectorTyped& operator -=(const VectorTyped& b);
|
|
125
|
+
/// multiply
|
|
126
|
+
constexpr VectorTyped& operator *=(T s);
|
|
127
|
+
/// divide
|
|
128
|
+
constexpr VectorTyped& operator /=(T s);
|
|
129
|
+
/// sign +
|
|
130
|
+
constexpr VectorTyped operator +()const;
|
|
131
|
+
/// sign -
|
|
132
|
+
constexpr VectorTyped operator -()const;
|
|
133
|
+
/// return v1+v2
|
|
134
|
+
template<typename U, unsigned m>
|
|
135
|
+
friend constexpr VectorTyped<U, m> operator+(const VectorTyped<U, m>&,const VectorTyped<U, m>&);
|
|
136
|
+
/// return v1-v2
|
|
137
|
+
template<typename U, unsigned m>
|
|
138
|
+
friend constexpr VectorTyped<U, m> operator-(VectorTyped<U, m>,const VectorTyped<U, m>&);
|
|
139
|
+
/// return s*v
|
|
140
|
+
template<typename U, typename J, unsigned m>
|
|
141
|
+
friend constexpr VectorTyped<U, m> operator*(J,VectorTyped<U, m>);
|
|
142
|
+
/// return v*s
|
|
143
|
+
template<typename U, typename J, unsigned m>
|
|
144
|
+
friend constexpr VectorTyped<U, m> operator*(VectorTyped<U, m>,J);
|
|
145
|
+
/// return v/s
|
|
146
|
+
template<typename U, typename J, unsigned m>
|
|
147
|
+
friend constexpr VectorTyped<U, m> operator/(const VectorTyped<U, m>&,J);
|
|
148
|
+
/// return v2-v1
|
|
149
|
+
friend constexpr VectorTyped delta<>(const VectorTyped&v1,const VectorTyped&v2);
|
|
150
|
+
/// return v1 .scalar. v2
|
|
151
|
+
friend constexpr T dotProduct<>(const VectorTyped&,const VectorTyped&);
|
|
152
|
+
//this bad boy produces a warning (in fact becasue declrare the crossproduc as a friend for ALL thhe possible combinations of n and T)
|
|
153
|
+
/// return v1 .vector. v2
|
|
154
|
+
/// Only available for size 3
|
|
155
|
+
template<typename U>
|
|
156
|
+
friend constexpr VectorTyped<U, 3> crossProduct(const VectorTyped<U, 3>&,const VectorTyped<U, 3>&);
|
|
157
|
+
/// compute the squared modulo
|
|
158
|
+
constexpr T modulo2()const;
|
|
159
|
+
/// Compute the modulo.
|
|
160
|
+
/// Shortcut for sqrt(v.modulo2())
|
|
161
|
+
constexpr T modulo()const;
|
|
162
|
+
/// friend version of modulo2 (to simplify some syntax)
|
|
163
|
+
template<typename U, unsigned m>
|
|
164
|
+
friend constexpr U modulo2(const VectorTyped<U, m>&);
|
|
165
|
+
/// friend version of modulo (to simplify some syntax)
|
|
166
|
+
template<typename U, unsigned m>
|
|
167
|
+
friend constexpr U modulo(const VectorTyped<U, m>&);
|
|
168
|
+
///conversion to another type
|
|
169
|
+
template<typename TT>
|
|
170
|
+
constexpr VectorTyped<TT,n> convert()const;
|
|
171
|
+
/// << operator.
|
|
172
|
+
/// Allows printing vector `v` with `std::cout<<v;`
|
|
173
|
+
friend std::ostream & operator<< <>(std::ostream &os, const VectorTyped&);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
template<typename T, unsigned n>
|
|
177
|
+
void VectorTyped<T, n>::auxiliaryConstructor()
|
|
178
|
+
{}
|
|
179
|
+
|
|
180
|
+
template<typename T, unsigned n>
|
|
181
|
+
template<typename... Args>
|
|
182
|
+
void VectorTyped<T, n>::auxiliaryConstructor(T first,Args... arg) {
|
|
183
|
+
d[n-(sizeof...(Args))-1]=first;
|
|
184
|
+
auxiliaryConstructor(arg...);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
template<typename T, unsigned n>
|
|
188
|
+
template<typename... Args, unsigned,typename >
|
|
189
|
+
VectorTyped<T, n>::VectorTyped(T first,Args... arg) {
|
|
190
|
+
static_assert((sizeof...(Args))+1==n,"you are trying to initialize a Vector with the wrong number of arguments");
|
|
191
|
+
auxiliaryConstructor(first,arg...);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
template<typename T, unsigned n>
|
|
195
|
+
constexpr T* VectorTyped<T, n>::data() noexcept {
|
|
196
|
+
return d.data();
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
template<typename T, unsigned n>
|
|
200
|
+
constexpr const T* VectorTyped<T, n>::data() const noexcept {
|
|
201
|
+
return d.data();
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
template<typename T, unsigned n>
|
|
205
|
+
constexpr void VectorTyped<T, n>::zero() {
|
|
206
|
+
LoopUnroller<n>::_zero(d.data());
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
template<typename T, unsigned n>
|
|
210
|
+
constexpr VectorTyped<T, n>::VectorTyped() {
|
|
211
|
+
LoopUnroller<n>::_zero(d.data());
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
template<typename T, unsigned n>
|
|
215
|
+
constexpr T & VectorTyped<T, n>::operator[](unsigned i) {
|
|
216
|
+
return d[i];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
template<typename T, unsigned n>
|
|
220
|
+
constexpr const T & VectorTyped<T, n>::operator[](unsigned i)const {
|
|
221
|
+
return d[i];
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
template<typename T, unsigned n>
|
|
225
|
+
constexpr T & VectorTyped<T, n>::operator()(unsigned i) {
|
|
226
|
+
return d[i];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
template<typename T, unsigned n>
|
|
230
|
+
constexpr const T & VectorTyped<T, n>::operator()(unsigned i)const {
|
|
231
|
+
return d[i];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
template<typename T, unsigned n>
|
|
235
|
+
constexpr VectorTyped<T, n>& VectorTyped<T, n>::operator +=(const VectorTyped<T, n>& b) {
|
|
236
|
+
LoopUnroller<n>::_add(d.data(),b.d.data());
|
|
237
|
+
return *this;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
template<typename T, unsigned n>
|
|
241
|
+
constexpr VectorTyped<T, n>& VectorTyped<T, n>::operator -=(const VectorTyped<T, n>& b) {
|
|
242
|
+
LoopUnroller<n>::_sub(d.data(),b.d.data());
|
|
243
|
+
return *this;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
template<typename T, unsigned n>
|
|
247
|
+
constexpr VectorTyped<T, n>& VectorTyped<T, n>::operator *=(T s) {
|
|
248
|
+
LoopUnroller<n>::_mul(d.data(),s);
|
|
249
|
+
return *this;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
template<typename T, unsigned n>
|
|
253
|
+
constexpr VectorTyped<T, n>& VectorTyped<T, n>::operator /=(T s) {
|
|
254
|
+
LoopUnroller<n>::_mul(d.data(),1.0/s);
|
|
255
|
+
return *this;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
template<typename T, unsigned n>
|
|
259
|
+
constexpr VectorTyped<T, n> VectorTyped<T, n>::operator +()const {
|
|
260
|
+
return *this;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
template<typename T, unsigned n>
|
|
264
|
+
constexpr VectorTyped<T, n> VectorTyped<T, n>::operator -()const {
|
|
265
|
+
VectorTyped<T, n> r;
|
|
266
|
+
LoopUnroller<n>::_neg(r.d.data(),d.data());
|
|
267
|
+
return r;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
template<typename T, unsigned n>
|
|
271
|
+
constexpr VectorTyped<T, n> operator+(const VectorTyped<T, n>&v1,const VectorTyped<T, n>&v2) {
|
|
272
|
+
VectorTyped<T, n> v(v1);
|
|
273
|
+
return v+=v2;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
template<typename T, typename TT, unsigned n>
|
|
277
|
+
constexpr VectorTyped<T, n> sumT(const VectorTyped<T, n>&v1,const VectorTyped<TT, n>&v2) {
|
|
278
|
+
VectorTyped<T, n> v(v1);
|
|
279
|
+
LoopUnroller<n>::_add(v.data(),v2.data());
|
|
280
|
+
return v;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
template<typename T, unsigned n>
|
|
284
|
+
constexpr VectorTyped<T, n> operator-(VectorTyped<T, n>v1,const VectorTyped<T, n>&v2) {
|
|
285
|
+
return v1-=v2;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
template<typename T, typename J, unsigned n>
|
|
289
|
+
constexpr VectorTyped<T, n> operator*(J s,VectorTyped<T, n>v) {
|
|
290
|
+
return v*=s;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
template<typename T, typename J, unsigned n>
|
|
294
|
+
constexpr VectorTyped<T, n> operator*(VectorTyped<T, n> v,J s) {
|
|
295
|
+
return v*=s;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
template<typename T, typename J, unsigned n>
|
|
299
|
+
constexpr VectorTyped<T, n> operator/(const VectorTyped<T, n>&v,J s) {
|
|
300
|
+
return v*(T(1.0)/s);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
template<typename T, unsigned n>
|
|
304
|
+
constexpr VectorTyped<T, n> delta(const VectorTyped<T, n>&v1,const VectorTyped<T, n>&v2) {
|
|
305
|
+
return v2-v1;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
template<typename T, unsigned n>
|
|
309
|
+
constexpr T VectorTyped<T, n>::modulo2()const {
|
|
310
|
+
return LoopUnroller<n>::_sum2(d.data());
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
template<typename T, unsigned n>
|
|
314
|
+
constexpr T dotProduct(const VectorTyped<T, n>& v1,const VectorTyped<T, n>& v2) {
|
|
315
|
+
return LoopUnroller<n>::_dot(v1.d.data(),v2.d.data());
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
template<typename T>
|
|
319
|
+
constexpr inline
|
|
320
|
+
VectorTyped<T, 3> crossProduct(const VectorTyped<T, 3>& v1,const VectorTyped<T, 3>& v2) {
|
|
321
|
+
return VectorTyped<T, 3>(
|
|
322
|
+
v1[1]*v2[2]-v1[2]*v2[1],
|
|
323
|
+
v1[2]*v2[0]-v1[0]*v2[2],
|
|
324
|
+
v1[0]*v2[1]-v1[1]*v2[0]);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
template<typename T, unsigned n>
|
|
328
|
+
constexpr T VectorTyped<T, n>::modulo()const {
|
|
329
|
+
return sqrt(modulo2());
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
template<typename T, unsigned n>
|
|
333
|
+
constexpr T modulo2(const VectorTyped<T, n>&v) {
|
|
334
|
+
return v.modulo2();
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
template<typename T, unsigned n>
|
|
338
|
+
constexpr T modulo(const VectorTyped<T, n>&v) {
|
|
339
|
+
return v.modulo();
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
template<typename T, unsigned n>
|
|
343
|
+
template<typename TT>
|
|
344
|
+
constexpr VectorTyped<TT,n> VectorTyped<T,n>::convert()const {
|
|
345
|
+
VectorTyped<TT,n> target;
|
|
346
|
+
LoopUnroller<n>::_copy(target.data(),d.data());
|
|
347
|
+
return target;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
template<typename T, unsigned n>
|
|
351
|
+
std::ostream & operator<<(std::ostream &os, const VectorTyped<T, n>& v) {
|
|
352
|
+
for(unsigned i=0; i<n-1; i++) {
|
|
353
|
+
os<<v(i)<<" ";
|
|
354
|
+
}
|
|
355
|
+
os<<v(n-1);
|
|
356
|
+
return os;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
template<unsigned n>
|
|
360
|
+
using VectorGeneric=VectorTyped<double, n>;
|
|
361
|
+
|
|
362
|
+
/// \ingroup TOOLBOX
|
|
363
|
+
/// Alias for one dimensional vectors
|
|
364
|
+
typedef VectorGeneric<1> Vector1d;
|
|
365
|
+
/// \ingroup TOOLBOX
|
|
366
|
+
/// Alias for two dimensional vectors
|
|
367
|
+
typedef VectorGeneric<2> Vector2d;
|
|
368
|
+
/// \ingroup TOOLBOX
|
|
369
|
+
/// Alias for three dimensional vectors
|
|
370
|
+
typedef VectorGeneric<3> Vector3d;
|
|
371
|
+
/// \ingroup TOOLBOX
|
|
372
|
+
/// Alias for four dimensional vectors
|
|
373
|
+
typedef VectorGeneric<4> Vector4d;
|
|
374
|
+
/// \ingroup TOOLBOX
|
|
375
|
+
/// Alias for five dimensional vectors
|
|
376
|
+
typedef VectorGeneric<5> Vector5d;
|
|
377
|
+
/// \ingroup TOOLBOX
|
|
378
|
+
/// Alias for three dimensional vectors
|
|
379
|
+
typedef Vector3d Vector;
|
|
380
|
+
|
|
381
|
+
/// \ingroup TOOLBOX
|
|
382
|
+
/// Alias for one dimensional vectors
|
|
383
|
+
typedef VectorTyped<float,1> Vector1f;
|
|
384
|
+
/// \ingroup TOOLBOX
|
|
385
|
+
/// Alias for two dimensional vectors
|
|
386
|
+
typedef VectorTyped<float,2> Vector2f;
|
|
387
|
+
/// \ingroup TOOLBOX
|
|
388
|
+
/// Alias for three dimensional vectors
|
|
389
|
+
typedef VectorTyped<float,3> Vector3f;
|
|
390
|
+
/// \ingroup TOOLBOX
|
|
391
|
+
/// Alias for four dimensional vectors
|
|
392
|
+
typedef VectorTyped<float,4> Vector4f;
|
|
393
|
+
/// \ingroup TOOLBOX
|
|
394
|
+
/// Alias for five dimensional vectors
|
|
395
|
+
typedef VectorTyped<float,5> Vector5f;
|
|
396
|
+
|
|
397
|
+
/// \ingroup TOOLBOX
|
|
398
|
+
/// Alias for three dimensional vectors of any type:
|
|
399
|
+
template <typename T>
|
|
400
|
+
using VectorT=VectorTyped<T,3>;
|
|
401
|
+
|
|
402
|
+
static_assert(sizeof(VectorGeneric<2>)==2*sizeof(double), "code cannot work if this is not satisfied");
|
|
403
|
+
static_assert(sizeof(VectorGeneric<3>)==3*sizeof(double), "code cannot work if this is not satisfied");
|
|
404
|
+
static_assert(sizeof(VectorGeneric<4>)==4*sizeof(double), "code cannot work if this is not satisfied");
|
|
405
|
+
namespace Versors {
|
|
406
|
+
template <typename T>
|
|
407
|
+
constexpr auto xp= PLMD::VectorTyped<T,3>( {
|
|
408
|
+
T( 1),T( 0),T( 0)
|
|
409
|
+
});
|
|
410
|
+
template <typename T>
|
|
411
|
+
constexpr auto xm= PLMD::VectorTyped<T,3>( {
|
|
412
|
+
T(-1),T( 0),T( 0)
|
|
413
|
+
});
|
|
414
|
+
template <typename T>
|
|
415
|
+
constexpr auto yp= PLMD::VectorTyped<T,3>( {
|
|
416
|
+
T( 0),T( 1),T( 0)
|
|
417
|
+
});
|
|
418
|
+
template <typename T>
|
|
419
|
+
constexpr auto ym= PLMD::VectorTyped<T,3>( {
|
|
420
|
+
T( 0),T(-1),T( 0)
|
|
421
|
+
});
|
|
422
|
+
template <typename T>
|
|
423
|
+
constexpr auto zp= PLMD::VectorTyped<T,3>( {
|
|
424
|
+
T( 0),T( 0),T( 1)
|
|
425
|
+
});
|
|
426
|
+
template <typename T>
|
|
427
|
+
constexpr auto zm= PLMD::VectorTyped<T,3>( {
|
|
428
|
+
T( 0),T( 0),T(-1)
|
|
429
|
+
});
|
|
430
|
+
} // namespace Versors
|
|
431
|
+
} //PLMD
|
|
432
|
+
|
|
433
|
+
#endif //__PLUMED_tools_Vector_h
|