hillclimber 0.1.5a8__cp314-cp314-macosx_15_0_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hillclimber/__init__.py +39 -0
- hillclimber/actions.py +53 -0
- hillclimber/analysis.py +590 -0
- hillclimber/biases.py +293 -0
- hillclimber/calc.py +22 -0
- hillclimber/cvs.py +1065 -0
- hillclimber/interfaces.py +133 -0
- hillclimber/metadynamics.py +325 -0
- hillclimber/nodes.py +6 -0
- hillclimber/opes.py +359 -0
- hillclimber/selectors.py +230 -0
- hillclimber/virtual_atoms.py +341 -0
- hillclimber-0.1.5a8.dist-info/METADATA +209 -0
- hillclimber-0.1.5a8.dist-info/RECORD +469 -0
- hillclimber-0.1.5a8.dist-info/WHEEL +6 -0
- hillclimber-0.1.5a8.dist-info/entry_points.txt +8 -0
- hillclimber-0.1.5a8.dist-info/licenses/LICENSE +165 -0
- plumed/__init__.py +104 -0
- plumed/_lib/bin/plumed +0 -0
- plumed/_lib/bin/plumed-config +9 -0
- plumed/_lib/bin/plumed-patch +9 -0
- plumed/_lib/include/plumed/adjmat/AdjacencyMatrixBase.h +659 -0
- plumed/_lib/include/plumed/adjmat/ContactMatrix.h +59 -0
- plumed/_lib/include/plumed/asmjit/arch.h +228 -0
- plumed/_lib/include/plumed/asmjit/arm.h +43 -0
- plumed/_lib/include/plumed/asmjit/asmjit.h +69 -0
- plumed/_lib/include/plumed/asmjit/asmjit_apibegin.h +143 -0
- plumed/_lib/include/plumed/asmjit/asmjit_apiend.h +93 -0
- plumed/_lib/include/plumed/asmjit/asmjit_build.h +971 -0
- plumed/_lib/include/plumed/asmjit/assembler.h +183 -0
- plumed/_lib/include/plumed/asmjit/base.h +56 -0
- plumed/_lib/include/plumed/asmjit/codebuilder.h +944 -0
- plumed/_lib/include/plumed/asmjit/codecompiler.h +767 -0
- plumed/_lib/include/plumed/asmjit/codeemitter.h +528 -0
- plumed/_lib/include/plumed/asmjit/codeholder.h +777 -0
- plumed/_lib/include/plumed/asmjit/constpool.h +286 -0
- plumed/_lib/include/plumed/asmjit/cpuinfo.h +402 -0
- plumed/_lib/include/plumed/asmjit/func.h +1327 -0
- plumed/_lib/include/plumed/asmjit/globals.h +370 -0
- plumed/_lib/include/plumed/asmjit/inst.h +137 -0
- plumed/_lib/include/plumed/asmjit/logging.h +317 -0
- plumed/_lib/include/plumed/asmjit/misc_p.h +103 -0
- plumed/_lib/include/plumed/asmjit/moved_string.h +318 -0
- plumed/_lib/include/plumed/asmjit/operand.h +1599 -0
- plumed/_lib/include/plumed/asmjit/osutils.h +207 -0
- plumed/_lib/include/plumed/asmjit/regalloc_p.h +597 -0
- plumed/_lib/include/plumed/asmjit/runtime.h +227 -0
- plumed/_lib/include/plumed/asmjit/simdtypes.h +1104 -0
- plumed/_lib/include/plumed/asmjit/utils.h +1387 -0
- plumed/_lib/include/plumed/asmjit/vmem.h +183 -0
- plumed/_lib/include/plumed/asmjit/x86.h +45 -0
- plumed/_lib/include/plumed/asmjit/x86assembler.h +125 -0
- plumed/_lib/include/plumed/asmjit/x86builder.h +117 -0
- plumed/_lib/include/plumed/asmjit/x86compiler.h +322 -0
- plumed/_lib/include/plumed/asmjit/x86emitter.h +5149 -0
- plumed/_lib/include/plumed/asmjit/x86globals.h +535 -0
- plumed/_lib/include/plumed/asmjit/x86inst.h +2547 -0
- plumed/_lib/include/plumed/asmjit/x86instimpl_p.h +74 -0
- plumed/_lib/include/plumed/asmjit/x86internal_p.h +108 -0
- plumed/_lib/include/plumed/asmjit/x86logging_p.h +92 -0
- plumed/_lib/include/plumed/asmjit/x86misc.h +417 -0
- plumed/_lib/include/plumed/asmjit/x86operand.h +1133 -0
- plumed/_lib/include/plumed/asmjit/x86regalloc_p.h +734 -0
- plumed/_lib/include/plumed/asmjit/zone.h +1157 -0
- plumed/_lib/include/plumed/bias/Bias.h +82 -0
- plumed/_lib/include/plumed/bias/ReweightBase.h +58 -0
- plumed/_lib/include/plumed/blas/blas.h +253 -0
- plumed/_lib/include/plumed/blas/def_external.h +61 -0
- plumed/_lib/include/plumed/blas/def_internal.h +97 -0
- plumed/_lib/include/plumed/blas/real.h +49 -0
- plumed/_lib/include/plumed/cltools/CLTool.h +32 -0
- plumed/_lib/include/plumed/clusters/ClusteringBase.h +70 -0
- plumed/_lib/include/plumed/colvar/Colvar.h +32 -0
- plumed/_lib/include/plumed/colvar/ColvarInput.h +68 -0
- plumed/_lib/include/plumed/colvar/ColvarShortcut.h +81 -0
- plumed/_lib/include/plumed/colvar/CoordinationBase.h +52 -0
- plumed/_lib/include/plumed/colvar/MultiColvarTemplate.h +333 -0
- plumed/_lib/include/plumed/colvar/PathMSDBase.h +101 -0
- plumed/_lib/include/plumed/colvar/RMSDVector.h +78 -0
- plumed/_lib/include/plumed/config/Config.h +118 -0
- plumed/_lib/include/plumed/config/version.h +9 -0
- plumed/_lib/include/plumed/contour/ContourFindingObject.h +87 -0
- plumed/_lib/include/plumed/contour/DistanceFromContourBase.h +82 -0
- plumed/_lib/include/plumed/contour/FindContour.h +67 -0
- plumed/_lib/include/plumed/core/Action.h +540 -0
- plumed/_lib/include/plumed/core/ActionAnyorder.h +48 -0
- plumed/_lib/include/plumed/core/ActionAtomistic.h +343 -0
- plumed/_lib/include/plumed/core/ActionForInterface.h +99 -0
- plumed/_lib/include/plumed/core/ActionPilot.h +57 -0
- plumed/_lib/include/plumed/core/ActionRegister.h +124 -0
- plumed/_lib/include/plumed/core/ActionSet.h +163 -0
- plumed/_lib/include/plumed/core/ActionSetup.h +48 -0
- plumed/_lib/include/plumed/core/ActionShortcut.h +73 -0
- plumed/_lib/include/plumed/core/ActionToGetData.h +59 -0
- plumed/_lib/include/plumed/core/ActionToPutData.h +101 -0
- plumed/_lib/include/plumed/core/ActionWithArguments.h +140 -0
- plumed/_lib/include/plumed/core/ActionWithMatrix.h +87 -0
- plumed/_lib/include/plumed/core/ActionWithValue.h +258 -0
- plumed/_lib/include/plumed/core/ActionWithVector.h +94 -0
- plumed/_lib/include/plumed/core/ActionWithVirtualAtom.h +123 -0
- plumed/_lib/include/plumed/core/CLTool.h +177 -0
- plumed/_lib/include/plumed/core/CLToolMain.h +102 -0
- plumed/_lib/include/plumed/core/CLToolRegister.h +108 -0
- plumed/_lib/include/plumed/core/Colvar.h +115 -0
- plumed/_lib/include/plumed/core/DataPassingObject.h +94 -0
- plumed/_lib/include/plumed/core/DataPassingTools.h +54 -0
- plumed/_lib/include/plumed/core/DomainDecomposition.h +120 -0
- plumed/_lib/include/plumed/core/ExchangePatterns.h +47 -0
- plumed/_lib/include/plumed/core/FlexibleBin.h +63 -0
- plumed/_lib/include/plumed/core/GREX.h +61 -0
- plumed/_lib/include/plumed/core/GenericMolInfo.h +89 -0
- plumed/_lib/include/plumed/core/Group.h +41 -0
- plumed/_lib/include/plumed/core/ModuleMap.h +30 -0
- plumed/_lib/include/plumed/core/ParallelTaskManager.h +1023 -0
- plumed/_lib/include/plumed/core/PbcAction.h +61 -0
- plumed/_lib/include/plumed/core/PlumedMain.h +632 -0
- plumed/_lib/include/plumed/core/PlumedMainInitializer.h +118 -0
- plumed/_lib/include/plumed/core/RegisterBase.h +340 -0
- plumed/_lib/include/plumed/core/TargetDist.h +48 -0
- plumed/_lib/include/plumed/core/Value.h +547 -0
- plumed/_lib/include/plumed/core/WithCmd.h +93 -0
- plumed/_lib/include/plumed/dimred/SMACOF.h +55 -0
- plumed/_lib/include/plumed/drr/DRR.h +383 -0
- plumed/_lib/include/plumed/drr/colvar_UIestimator.h +777 -0
- plumed/_lib/include/plumed/fisst/legendre_rule_fast.h +44 -0
- plumed/_lib/include/plumed/function/Custom.h +54 -0
- plumed/_lib/include/plumed/function/Function.h +85 -0
- plumed/_lib/include/plumed/function/FunctionOfMatrix.h +368 -0
- plumed/_lib/include/plumed/function/FunctionOfScalar.h +135 -0
- plumed/_lib/include/plumed/function/FunctionOfVector.h +296 -0
- plumed/_lib/include/plumed/function/FunctionSetup.h +180 -0
- plumed/_lib/include/plumed/function/FunctionShortcut.h +130 -0
- plumed/_lib/include/plumed/function/FunctionWithSingleArgument.h +165 -0
- plumed/_lib/include/plumed/gridtools/ActionWithGrid.h +43 -0
- plumed/_lib/include/plumed/gridtools/EvaluateGridFunction.h +99 -0
- plumed/_lib/include/plumed/gridtools/FunctionOfGrid.h +295 -0
- plumed/_lib/include/plumed/gridtools/GridCoordinatesObject.h +179 -0
- plumed/_lib/include/plumed/gridtools/GridSearch.h +135 -0
- plumed/_lib/include/plumed/gridtools/Interpolator.h +45 -0
- plumed/_lib/include/plumed/gridtools/KDE.h +455 -0
- plumed/_lib/include/plumed/gridtools/RDF.h +40 -0
- plumed/_lib/include/plumed/gridtools/SumOfKernels.h +219 -0
- plumed/_lib/include/plumed/isdb/MetainferenceBase.h +398 -0
- plumed/_lib/include/plumed/lapack/def_external.h +207 -0
- plumed/_lib/include/plumed/lapack/def_internal.h +388 -0
- plumed/_lib/include/plumed/lapack/lapack.h +899 -0
- plumed/_lib/include/plumed/lapack/lapack_limits.h +79 -0
- plumed/_lib/include/plumed/lapack/real.h +50 -0
- plumed/_lib/include/plumed/lepton/CompiledExpression.h +164 -0
- plumed/_lib/include/plumed/lepton/CustomFunction.h +143 -0
- plumed/_lib/include/plumed/lepton/Exception.h +93 -0
- plumed/_lib/include/plumed/lepton/ExpressionProgram.h +137 -0
- plumed/_lib/include/plumed/lepton/ExpressionTreeNode.h +145 -0
- plumed/_lib/include/plumed/lepton/Lepton.h +85 -0
- plumed/_lib/include/plumed/lepton/MSVC_erfc.h +123 -0
- plumed/_lib/include/plumed/lepton/Operation.h +1302 -0
- plumed/_lib/include/plumed/lepton/ParsedExpression.h +165 -0
- plumed/_lib/include/plumed/lepton/Parser.h +111 -0
- plumed/_lib/include/plumed/lepton/windowsIncludes.h +73 -0
- plumed/_lib/include/plumed/mapping/Path.h +44 -0
- plumed/_lib/include/plumed/mapping/PathProjectionCalculator.h +57 -0
- plumed/_lib/include/plumed/matrixtools/MatrixOperationBase.h +54 -0
- plumed/_lib/include/plumed/matrixtools/MatrixTimesMatrix.h +309 -0
- plumed/_lib/include/plumed/matrixtools/MatrixTimesVectorBase.h +365 -0
- plumed/_lib/include/plumed/matrixtools/OuterProduct.h +238 -0
- plumed/_lib/include/plumed/maze/Core.h +65 -0
- plumed/_lib/include/plumed/maze/Loss.h +86 -0
- plumed/_lib/include/plumed/maze/Member.h +66 -0
- plumed/_lib/include/plumed/maze/Memetic.h +799 -0
- plumed/_lib/include/plumed/maze/Optimizer.h +357 -0
- plumed/_lib/include/plumed/maze/Random_MT.h +156 -0
- plumed/_lib/include/plumed/maze/Tools.h +183 -0
- plumed/_lib/include/plumed/metatomic/vesin.h +188 -0
- plumed/_lib/include/plumed/molfile/Gromacs.h +2013 -0
- plumed/_lib/include/plumed/molfile/endianswap.h +217 -0
- plumed/_lib/include/plumed/molfile/fastio.h +683 -0
- plumed/_lib/include/plumed/molfile/largefiles.h +78 -0
- plumed/_lib/include/plumed/molfile/libmolfile_plugin.h +77 -0
- plumed/_lib/include/plumed/molfile/molfile_plugin.h +1034 -0
- plumed/_lib/include/plumed/molfile/periodic_table.h +248 -0
- plumed/_lib/include/plumed/molfile/readpdb.h +447 -0
- plumed/_lib/include/plumed/molfile/vmdplugin.h +236 -0
- plumed/_lib/include/plumed/multicolvar/MultiColvarShortcuts.h +45 -0
- plumed/_lib/include/plumed/opes/ExpansionCVs.h +79 -0
- plumed/_lib/include/plumed/sasa/Sasa.h +32 -0
- plumed/_lib/include/plumed/secondarystructure/SecondaryStructureBase.h +372 -0
- plumed/_lib/include/plumed/setup/ActionSetup.h +25 -0
- plumed/_lib/include/plumed/small_vector/small_vector.h +6114 -0
- plumed/_lib/include/plumed/symfunc/CoordinationNumbers.h +41 -0
- plumed/_lib/include/plumed/tools/Angle.h +52 -0
- plumed/_lib/include/plumed/tools/AtomDistribution.h +138 -0
- plumed/_lib/include/plumed/tools/AtomNumber.h +152 -0
- plumed/_lib/include/plumed/tools/BiasRepresentation.h +106 -0
- plumed/_lib/include/plumed/tools/BitmaskEnum.h +167 -0
- plumed/_lib/include/plumed/tools/Brent1DRootSearch.h +159 -0
- plumed/_lib/include/plumed/tools/CheckInRange.h +44 -0
- plumed/_lib/include/plumed/tools/Citations.h +74 -0
- plumed/_lib/include/plumed/tools/ColvarOutput.h +118 -0
- plumed/_lib/include/plumed/tools/Communicator.h +316 -0
- plumed/_lib/include/plumed/tools/ConjugateGradient.h +80 -0
- plumed/_lib/include/plumed/tools/DLLoader.h +79 -0
- plumed/_lib/include/plumed/tools/ERMSD.h +73 -0
- plumed/_lib/include/plumed/tools/Exception.h +406 -0
- plumed/_lib/include/plumed/tools/File.h +28 -0
- plumed/_lib/include/plumed/tools/FileBase.h +153 -0
- plumed/_lib/include/plumed/tools/FileTools.h +37 -0
- plumed/_lib/include/plumed/tools/ForwardDecl.h +54 -0
- plumed/_lib/include/plumed/tools/Grid.h +638 -0
- plumed/_lib/include/plumed/tools/HistogramBead.h +136 -0
- plumed/_lib/include/plumed/tools/IFile.h +117 -0
- plumed/_lib/include/plumed/tools/KernelFunctions.h +113 -0
- plumed/_lib/include/plumed/tools/Keywords.h +380 -0
- plumed/_lib/include/plumed/tools/LatticeReduction.h +66 -0
- plumed/_lib/include/plumed/tools/LeptonCall.h +64 -0
- plumed/_lib/include/plumed/tools/LinkCells.h +126 -0
- plumed/_lib/include/plumed/tools/Log.h +41 -0
- plumed/_lib/include/plumed/tools/LoopUnroller.h +163 -0
- plumed/_lib/include/plumed/tools/Matrix.h +721 -0
- plumed/_lib/include/plumed/tools/MatrixSquareBracketsAccess.h +138 -0
- plumed/_lib/include/plumed/tools/MergeVectorTools.h +153 -0
- plumed/_lib/include/plumed/tools/Minimise1DBrent.h +244 -0
- plumed/_lib/include/plumed/tools/MinimiseBase.h +120 -0
- plumed/_lib/include/plumed/tools/MolDataClass.h +51 -0
- plumed/_lib/include/plumed/tools/NeighborList.h +112 -0
- plumed/_lib/include/plumed/tools/OFile.h +286 -0
- plumed/_lib/include/plumed/tools/OpenACC.h +180 -0
- plumed/_lib/include/plumed/tools/OpenMP.h +75 -0
- plumed/_lib/include/plumed/tools/PDB.h +154 -0
- plumed/_lib/include/plumed/tools/Pbc.h +139 -0
- plumed/_lib/include/plumed/tools/PlumedHandle.h +105 -0
- plumed/_lib/include/plumed/tools/RMSD.h +493 -0
- plumed/_lib/include/plumed/tools/Random.h +80 -0
- plumed/_lib/include/plumed/tools/RootFindingBase.h +79 -0
- plumed/_lib/include/plumed/tools/Stopwatch.h +475 -0
- plumed/_lib/include/plumed/tools/Subprocess.h +142 -0
- plumed/_lib/include/plumed/tools/SwitchingFunction.h +208 -0
- plumed/_lib/include/plumed/tools/Tensor.h +724 -0
- plumed/_lib/include/plumed/tools/TokenizedLine.h +123 -0
- plumed/_lib/include/plumed/tools/Tools.h +638 -0
- plumed/_lib/include/plumed/tools/Torsion.h +55 -0
- plumed/_lib/include/plumed/tools/TrajectoryParser.h +118 -0
- plumed/_lib/include/plumed/tools/Tree.h +61 -0
- plumed/_lib/include/plumed/tools/TypesafePtr.h +463 -0
- plumed/_lib/include/plumed/tools/Units.h +167 -0
- plumed/_lib/include/plumed/tools/Vector.h +433 -0
- plumed/_lib/include/plumed/tools/View.h +296 -0
- plumed/_lib/include/plumed/tools/View2D.h +100 -0
- plumed/_lib/include/plumed/tools/h36.h +39 -0
- plumed/_lib/include/plumed/vatom/ActionWithVirtualAtom.h +32 -0
- plumed/_lib/include/plumed/ves/BasisFunctions.h +380 -0
- plumed/_lib/include/plumed/ves/CoeffsBase.h +310 -0
- plumed/_lib/include/plumed/ves/CoeffsMatrix.h +220 -0
- plumed/_lib/include/plumed/ves/CoeffsVector.h +251 -0
- plumed/_lib/include/plumed/ves/FermiSwitchingFunction.h +74 -0
- plumed/_lib/include/plumed/ves/GridIntegrationWeights.h +50 -0
- plumed/_lib/include/plumed/ves/GridLinearInterpolation.h +81 -0
- plumed/_lib/include/plumed/ves/GridProjWeights.h +61 -0
- plumed/_lib/include/plumed/ves/LinearBasisSetExpansion.h +303 -0
- plumed/_lib/include/plumed/ves/Optimizer.h +444 -0
- plumed/_lib/include/plumed/ves/TargetDistModifer.h +53 -0
- plumed/_lib/include/plumed/ves/TargetDistribution.h +266 -0
- plumed/_lib/include/plumed/ves/VesBias.h +545 -0
- plumed/_lib/include/plumed/ves/VesTools.h +142 -0
- plumed/_lib/include/plumed/ves/WaveletGrid.h +75 -0
- plumed/_lib/include/plumed/volumes/ActionVolume.h +268 -0
- plumed/_lib/include/plumed/volumes/VolumeShortcut.h +147 -0
- plumed/_lib/include/plumed/wrapper/Plumed.h +5025 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile.h +663 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile_trr.h +89 -0
- plumed/_lib/include/plumed/xdrfile/xdrfile_xtc.h +90 -0
- plumed/_lib/lib/PythonCVInterface.dylib +0 -0
- plumed/_lib/lib/libplumed.dylib +0 -0
- plumed/_lib/lib/libplumedKernel.dylib +0 -0
- plumed/_lib/lib/libplumedWrapper.a +0 -0
- plumed/_lib/lib/pkgconfig/plumed.pc +13 -0
- plumed/_lib/lib/pkgconfig/plumedInternals.pc +13 -0
- plumed/_lib/lib/pkgconfig/plumedWrapper.pc +13 -0
- plumed/_lib/lib/plumed/fortran/plumed.f90 +879 -0
- plumed/_lib/lib/plumed/fortran/plumed_f08.f90 +2625 -0
- plumed/_lib/lib/plumed/modulefile +69 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt +543 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/CMakeLists.txt.preplumed +540 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp +1628 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1590 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h +103 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/expanded.h.preplumed +99 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp +2527 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +408 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +394 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp +2348 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2091 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp +3573 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3495 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1506 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1402 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp +997 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +906 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp +2780 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2738 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2022.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt +549 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/CMakeLists.txt.preplumed +546 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h +104 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp +2624 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2610 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h +409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +395 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp +2419 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/md.cpp.preplumed +2164 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp +3546 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3468 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp +991 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/rerun.cpp.preplumed +900 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp +2895 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/mdrun/runner.cpp.preplumed +2849 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp +886 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +880 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +347 -0
- plumed/_lib/lib/plumed/patches/gromacs-2023.5.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +345 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.config +43 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt +575 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/CMakeLists.txt.preplumed +572 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp +1632 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.cpp.preplumed +1594 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h +104 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/expanded.h.preplumed +100 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp +2564 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdlib/sim_util.cpp.preplumed +2550 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp +208 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.cpp.preplumed +175 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h +410 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/legacymdrunoptions.h.preplumed +396 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp +2435 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/md.cpp.preplumed +2187 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp +3592 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/minimize.cpp.preplumed +3514 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp +1513 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.cpp.preplumed +1409 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h +114 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/replicaexchange.h.preplumed +106 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp +958 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/rerun.cpp.preplumed +929 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp +2987 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/mdrun/runner.cpp.preplumed +2941 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp +224 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/modularsimulator/expandedensembleelement.cpp.preplumed +222 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp +904 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/decidegpuusage.cpp.preplumed +898 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h +353 -0
- plumed/_lib/lib/plumed/patches/gromacs-2024.3.diff/src/gromacs/taskassignment/include/gromacs/taskassignment/decidegpuusage.h.preplumed +351 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.config +39 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake +82 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/cmake/gmxManagePlumed.cmake.preplumed +82 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp +162 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedMDModule.cpp.preplumed +154 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp +107 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.cpp.preplumed +99 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h +120 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedOptions.h.preplumed +111 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp +215 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.cpp.preplumed +197 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h +87 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/applied_forces/plumed/plumedforceprovider.h.preplumed +86 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp +2971 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrun/runner.cpp.preplumed +2970 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h +430 -0
- plumed/_lib/lib/plumed/patches/gromacs-2025.0.diff/src/gromacs/mdrunutility/mdmodulesnotifiers.h.preplumed +429 -0
- plumed/_lib/lib/plumed/patches/namd-2.12.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.12.diff +267 -0
- plumed/_lib/lib/plumed/patches/namd-2.13.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.13.diff +267 -0
- plumed/_lib/lib/plumed/patches/namd-2.14.config +30 -0
- plumed/_lib/lib/plumed/patches/namd-2.14.diff +268 -0
- plumed/_lib/lib/plumed/patches/patch.sh +500 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.config +25 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90 +368 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/forces.f90.preplumed +366 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90 +71 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_forces.f90.preplumed +24 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90 +62 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90 +189 -0
- plumed/_lib/lib/plumed/patches/qespresso-5.0.2.diff/PW/src/pwscf.f90.preplumed +185 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.config +26 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90 +422 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/forces.f90.preplumed +420 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90 +70 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90 +62 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90 +233 -0
- plumed/_lib/lib/plumed/patches/qespresso-6.2.diff/PW/src/run_pwscf.f90.preplumed +230 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.config +28 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile +175 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/Modules/Makefile.preplumed +171 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90 +486 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/forces.f90.preplumed +484 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90 +74 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90 +64 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90 +532 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.0.diff/PW/src/run_pwscf.f90.preplumed +518 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.config +28 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile +249 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/Modules/Makefile.preplumed +244 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90 +532 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/forces.f90.preplumed +535 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90 +74 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_ext_forces.f90.preplumed +23 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90 +64 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/plugin_initialization.f90.preplumed +21 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90 +569 -0
- plumed/_lib/lib/plumed/patches/qespresso-7.2.diff/PW/src/run_pwscf.f90.preplumed +560 -0
- plumed/_lib/lib/plumed/plumed-config +9 -0
- plumed/_lib/lib/plumed/plumed-mklib +9 -0
- plumed/_lib/lib/plumed/plumed-newcv +9 -0
- plumed/_lib/lib/plumed/plumed-partial_tempering +9 -0
- plumed/_lib/lib/plumed/plumed-patch +9 -0
- plumed/_lib/lib/plumed/plumed-runtime +0 -0
- plumed/_lib/lib/plumed/plumed-selector +9 -0
- plumed/_lib/lib/plumed/plumed-vim2html +9 -0
- plumed/_lib/lib/plumed/scripts/config.sh +126 -0
- plumed/_lib/lib/plumed/scripts/mklib.sh +175 -0
- plumed/_lib/lib/plumed/scripts/newcv.sh +26 -0
- plumed/_lib/lib/plumed/scripts/partial_tempering.sh +319 -0
- plumed/_lib/lib/plumed/scripts/patch.sh +4 -0
- plumed/_lib/lib/plumed/scripts/selector.sh +234 -0
- plumed/_lib/lib/plumed/scripts/vim2html.sh +190 -0
- plumed/_lib/lib/plumed/src/colvar/Template.cpp +116 -0
- plumed/_lib/lib/plumed/src/config/compile_options.sh +3 -0
- plumed/_lib/lib/plumed/src/config/config.txt +181 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake +6 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.runtime +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.shared +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.cmake.static +3 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc +6 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.runtime +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.shared +5 -0
- plumed/_lib/lib/plumed/src/lib/Plumed.inc.static +3 -0
- plumed/_lib/lib/plumed/vim/scripts.vim +6 -0
- plumed/_plumed_core.cpython-311-darwin.so +0 -0
- plumed/_plumed_core.cpython-312-darwin.so +0 -0
- plumed/_plumed_core.cpython-313-darwin.so +0 -0
- plumed/_plumed_core.cpython-314-darwin.so +0 -0
- plumedCommunications.cpython-311-darwin.so +0 -0
- plumedCommunications.cpython-312-darwin.so +0 -0
- plumedCommunications.cpython-313-darwin.so +0 -0
- plumedCommunications.cpython-314-darwin.so +0 -0
- plumedCommunications.pyi +431 -0
|
@@ -0,0 +1,659 @@
|
|
|
1
|
+
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
2
|
+
Copyright (c) 2015-2020 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_adjmat_AdjacencyMatrixBase_h
|
|
23
|
+
#define __PLUMED_adjmat_AdjacencyMatrixBase_h
|
|
24
|
+
|
|
25
|
+
#include <vector>
|
|
26
|
+
#include "../core/ParallelTaskManager.h"
|
|
27
|
+
#include "../core/ActionWithMatrix.h"
|
|
28
|
+
#include "../core/PlumedMain.h"
|
|
29
|
+
#include "../tools/LinkCells.h"
|
|
30
|
+
|
|
31
|
+
namespace PLMD {
|
|
32
|
+
namespace adjmat {
|
|
33
|
+
|
|
34
|
+
template <class T>
|
|
35
|
+
struct AdjacencyMatrixData {
|
|
36
|
+
T matrixdata;
|
|
37
|
+
bool usepbc{true};
|
|
38
|
+
bool components{false};
|
|
39
|
+
std::size_t nlists{0};
|
|
40
|
+
unsigned natoms_per_list{0};
|
|
41
|
+
std::vector<std::size_t> nlist_v;
|
|
42
|
+
std::size_t *nlist{nullptr};
|
|
43
|
+
unsigned natoms_per_three_list{0};
|
|
44
|
+
std::vector<std::size_t> nlist_three_v;
|
|
45
|
+
std::size_t* nlist_three{nullptr};
|
|
46
|
+
void update() {
|
|
47
|
+
nlist=nlist_v.data();
|
|
48
|
+
nlist_three=nlist_three_v.data();
|
|
49
|
+
}
|
|
50
|
+
#ifdef __PLUMED_USE_OPENACC
|
|
51
|
+
void toACCDevice() const {
|
|
52
|
+
#pragma acc enter data copyin(this[0:1],usepbc,components,nlists, \
|
|
53
|
+
natoms_per_list,nlist[0:nlist_v.size()], \
|
|
54
|
+
natoms_per_three_list, \
|
|
55
|
+
nlist_three[0:nlist_three_v.size()])
|
|
56
|
+
matrixdata.toACCDevice();
|
|
57
|
+
}
|
|
58
|
+
void removeFromACCDevice() const {
|
|
59
|
+
matrixdata.removeFromACCDevice();
|
|
60
|
+
#pragma acc exit data delete(nlist_three[0:nlist_three_v.size()], \
|
|
61
|
+
natoms_per_three_list, \
|
|
62
|
+
nlist[0:nlist_v.size()], natoms_per_list, \
|
|
63
|
+
nlists, components, usepbc, this[0:1])
|
|
64
|
+
}
|
|
65
|
+
#endif //__PLUMED_USE_OPENACC
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
struct AdjacencyMatrixInput {
|
|
69
|
+
bool noderiv{false};
|
|
70
|
+
const Pbc* pbc;
|
|
71
|
+
Vector pos;
|
|
72
|
+
std::size_t natoms{0};
|
|
73
|
+
VectorView extra_positions;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
struct MatrixOutput {
|
|
77
|
+
View<double,1> val;
|
|
78
|
+
View<double> deriv;
|
|
79
|
+
|
|
80
|
+
///doing t= Tensor(v1,v2); deriv[x:x+9]=t with no extra memory allocation
|
|
81
|
+
template <typename Iterable1, typename Iterable2>
|
|
82
|
+
void assignOuterProduct(const std::size_t startingIndex,
|
|
83
|
+
const Iterable1& v1,
|
|
84
|
+
const Iterable2& v2 ) {
|
|
85
|
+
deriv[startingIndex + 0] = v1[0] * v2[0];
|
|
86
|
+
deriv[startingIndex + 1] = v1[0] * v2[1];
|
|
87
|
+
deriv[startingIndex + 2] = v1[0] * v2[2];
|
|
88
|
+
deriv[startingIndex + 3] = v1[1] * v2[0];
|
|
89
|
+
deriv[startingIndex + 4] = v1[1] * v2[1];
|
|
90
|
+
deriv[startingIndex + 5] = v1[1] * v2[2];
|
|
91
|
+
deriv[startingIndex + 6] = v1[2] * v2[0];
|
|
92
|
+
deriv[startingIndex + 7] = v1[2] * v2[1];
|
|
93
|
+
deriv[startingIndex + 8] = v1[2] * v2[2];
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
template <class T>
|
|
98
|
+
class AdjacencyMatrixBase : public ActionWithMatrix {
|
|
99
|
+
public:
|
|
100
|
+
using input_type = AdjacencyMatrixData<T>;
|
|
101
|
+
using PTM = ParallelTaskManager<AdjacencyMatrixBase<T>>;
|
|
102
|
+
private:
|
|
103
|
+
PTM taskmanager;
|
|
104
|
+
bool nopbc, read_one_group;
|
|
105
|
+
LinkCells linkcells, threecells;
|
|
106
|
+
std::vector<unsigned> ablocks, threeblocks;
|
|
107
|
+
double nl_cut, nl_cut2;
|
|
108
|
+
unsigned nl_stride;
|
|
109
|
+
void setupThirdAtomBlock( const std::vector<AtomNumber>& tc,
|
|
110
|
+
std::vector<AtomNumber>& t );
|
|
111
|
+
public:
|
|
112
|
+
static constexpr size_t virialSize = 9;
|
|
113
|
+
static void registerKeywords( Keywords& keys );
|
|
114
|
+
explicit AdjacencyMatrixBase(const ActionOptions&);
|
|
115
|
+
unsigned getNumberOfDerivatives() override ;
|
|
116
|
+
void calculate() override ;
|
|
117
|
+
void applyNonZeroRankForces( std::vector<double>& outforces ) override ;
|
|
118
|
+
void getInputData( std::vector<double>& inputdata ) const override;
|
|
119
|
+
std::string writeInGraph() const override {
|
|
120
|
+
if( getName()=="CONTACT_MATRIX_PROPER" ) {
|
|
121
|
+
return "CONTACT_MATRIX";
|
|
122
|
+
}
|
|
123
|
+
return getName();
|
|
124
|
+
}
|
|
125
|
+
void setLinkCellCutoff( const bool& symmetric, const double& lcut, double tcut=-1.0 );
|
|
126
|
+
static void performTask( std::size_t task_index,
|
|
127
|
+
const AdjacencyMatrixData<T>& actiondata,
|
|
128
|
+
ParallelActionsInput& input,
|
|
129
|
+
ParallelActionsOutput output );
|
|
130
|
+
static int getNumberOfValuesPerTask( std::size_t task_index,
|
|
131
|
+
const AdjacencyMatrixData<T>& actiondata );
|
|
132
|
+
static void getForceIndices( std::size_t task_index,
|
|
133
|
+
std::size_t colno,
|
|
134
|
+
std::size_t ntotal_force,
|
|
135
|
+
const AdjacencyMatrixData<T>& actiondata,
|
|
136
|
+
const ParallelActionsInput& input,
|
|
137
|
+
ForceIndexHolder force_indices );
|
|
138
|
+
void getMatrixColumnTitles( std::vector<std::string>& argnames ) const override ;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
template <class T>
|
|
142
|
+
void AdjacencyMatrixBase<T>::registerKeywords( Keywords& keys ) {
|
|
143
|
+
ActionWithMatrix::registerKeywords( keys );
|
|
144
|
+
keys.addInputKeyword("optional","MASK","vector","a vector that is used to used to determine which rows of the adjancency matrix to compute");
|
|
145
|
+
keys.add("atoms","GROUP","the atoms for which you would like to calculate the adjacency matrix");
|
|
146
|
+
keys.add("atoms","GROUPA","when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB");
|
|
147
|
+
keys.add("atoms","GROUPB","when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA");
|
|
148
|
+
keys.addDeprecatedKeyword("ATOMS","GROUP");
|
|
149
|
+
keys.reserve("atoms","GROUPC","a group of atoms that must be summed over when calculating each element of the adjacency matrix");
|
|
150
|
+
keys.addFlag("COMPONENTS",false,"also calculate the components of the vector connecting the atoms in the contact matrix");
|
|
151
|
+
keys.addFlag("NOPBC",false,"don't use pbc");
|
|
152
|
+
keys.add("compulsory","NL_CUTOFF","0.0","The cutoff for the neighbor list. A value of 0 means we are not using a neighbor list");
|
|
153
|
+
keys.add("compulsory","NL_STRIDE","1","The frequency with which we are updating the atoms in the neighbor list");
|
|
154
|
+
T::registerKeywords( keys );
|
|
155
|
+
PTM::registerKeywords( keys );
|
|
156
|
+
keys.addOutputComponent("w","COMPONENTS","matrix","a matrix containing the weights for the bonds between each pair of atoms");
|
|
157
|
+
keys.addOutputComponent("x","COMPONENTS","matrix","the projection of the bond on the x axis");
|
|
158
|
+
keys.addOutputComponent("y","COMPONENTS","matrix","the projection of the bond on the y axis");
|
|
159
|
+
keys.addOutputComponent("z","COMPONENTS","matrix","the projection of the bond on the z axis");
|
|
160
|
+
keys.setValueDescription("matrix","a matrix containing the weights for the bonds between each pair of atoms");
|
|
161
|
+
keys.addDOI("10.1021/acs.jctc.6b01073");
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
template <class T>
|
|
165
|
+
AdjacencyMatrixBase<T>::AdjacencyMatrixBase(const ActionOptions& ao):
|
|
166
|
+
Action(ao),
|
|
167
|
+
ActionWithMatrix(ao),
|
|
168
|
+
taskmanager(this),
|
|
169
|
+
read_one_group(false),
|
|
170
|
+
linkcells(comm),
|
|
171
|
+
threecells(comm) {
|
|
172
|
+
std::vector<std::size_t> shape(2);
|
|
173
|
+
std::vector<AtomNumber> t;
|
|
174
|
+
parseAtomList("GROUP", t );
|
|
175
|
+
if( getName()!="HBOND_MATRIX" ) {
|
|
176
|
+
if( t.size()==0 ) {
|
|
177
|
+
parseAtomList("ATOMS", t);
|
|
178
|
+
if( t.size()>0 ) {
|
|
179
|
+
warning("using depracated syntax for contact matrix. You are strongly recommended to use GROUP instead of ATOMS");
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
} else if( t.size()>0 ) {
|
|
183
|
+
warning("GROUP keyword has been deprecated for HBOND_MATRIX as it may lead users to wrongly assume that the matrices calculated by this action are symmetric. We strongly recommend using DONORS/ACCEPTORS instead");
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if( t.size()==0 ) {
|
|
187
|
+
std::vector<AtomNumber> ta;
|
|
188
|
+
if( getName()=="HBOND_MATRIX") {
|
|
189
|
+
parseAtomList("DONORS",ta);
|
|
190
|
+
} else {
|
|
191
|
+
parseAtomList("GROUPA",ta);
|
|
192
|
+
}
|
|
193
|
+
std::vector<AtomNumber> tb;
|
|
194
|
+
if( getName()=="HBOND_MATRIX") {
|
|
195
|
+
parseAtomList("ACCEPTORS",tb);
|
|
196
|
+
} else {
|
|
197
|
+
parseAtomList("GROUPB",tb);
|
|
198
|
+
}
|
|
199
|
+
if( ta.size()==0 || tb.size()==0 ) {
|
|
200
|
+
error("no atoms have been specified in input");
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Create list of tasks
|
|
204
|
+
log.printf(" atoms in GROUPA ");
|
|
205
|
+
for(unsigned i=0; i<ta.size(); ++i) {
|
|
206
|
+
log.printf("%d ", ta[i].serial());
|
|
207
|
+
t.push_back(ta[i]);
|
|
208
|
+
}
|
|
209
|
+
log.printf("\n");
|
|
210
|
+
log.printf(" atoms in GROUPB ");
|
|
211
|
+
ablocks.resize( tb.size() );
|
|
212
|
+
unsigned n=0;
|
|
213
|
+
for(unsigned i=0; i<tb.size(); ++i) {
|
|
214
|
+
log.printf("%d ", tb[i].serial());
|
|
215
|
+
ablocks[i]=ta.size()+n;
|
|
216
|
+
t.push_back(tb[i]);
|
|
217
|
+
n++;
|
|
218
|
+
}
|
|
219
|
+
log.printf("\n");
|
|
220
|
+
shape[0]=ta.size();
|
|
221
|
+
shape[1]=tb.size();
|
|
222
|
+
} else {
|
|
223
|
+
// Create list of tasks
|
|
224
|
+
log.printf(" atoms in GROUP ");
|
|
225
|
+
ablocks.resize( t.size() );
|
|
226
|
+
for(unsigned i=0; i<t.size(); ++i) {
|
|
227
|
+
log.printf("%d ", t[i].serial());
|
|
228
|
+
ablocks[i]=i;
|
|
229
|
+
}
|
|
230
|
+
log.printf("\n");
|
|
231
|
+
shape[0]=shape[1]=t.size();
|
|
232
|
+
read_one_group=true;
|
|
233
|
+
}
|
|
234
|
+
if( keywords.exists("GROUPC") ) {
|
|
235
|
+
std::vector<AtomNumber> tc;
|
|
236
|
+
parseAtomList("GROUPC",tc);
|
|
237
|
+
if( tc.size()==0 ) {
|
|
238
|
+
error("no atoms in GROUPC specified");
|
|
239
|
+
}
|
|
240
|
+
log.printf(" atoms in GROUPC ");
|
|
241
|
+
setupThirdAtomBlock( tc, t );
|
|
242
|
+
} else if( keywords.exists("BRIDGING_ATOMS") ) {
|
|
243
|
+
std::vector<AtomNumber> tc;
|
|
244
|
+
parseAtomList("BRIDGING_ATOMS",tc);
|
|
245
|
+
if( tc.size()==0 ) {
|
|
246
|
+
error("no BRIDGING_ATOMS specified");
|
|
247
|
+
}
|
|
248
|
+
log.printf(" bridging atoms are ");
|
|
249
|
+
setupThirdAtomBlock( tc, t );
|
|
250
|
+
} else if( keywords.exists("HYDROGENS") ) {
|
|
251
|
+
std::vector<AtomNumber> tc;
|
|
252
|
+
parseAtomList("HYDROGENS",tc);
|
|
253
|
+
if( tc.size()==0 ) {
|
|
254
|
+
error("no HYDROGEN atoms specified");
|
|
255
|
+
}
|
|
256
|
+
log.printf(" hydrogen atoms are ");
|
|
257
|
+
setupThirdAtomBlock( tc, t );
|
|
258
|
+
} else if( keywords.exists("BACKGROUND_ATOMS") ) {
|
|
259
|
+
std::vector<AtomNumber> tc;
|
|
260
|
+
parseAtomList("BACKGROUND_ATOMS",tc);
|
|
261
|
+
if( tc.size()==0 ) {
|
|
262
|
+
error("no ATOMS atoms specified");
|
|
263
|
+
}
|
|
264
|
+
log.printf(" atoms for background density are ");
|
|
265
|
+
setupThirdAtomBlock( tc, t );
|
|
266
|
+
}
|
|
267
|
+
// Request the atoms from the ActionAtomistic
|
|
268
|
+
requestAtoms( t, false );
|
|
269
|
+
bool components;
|
|
270
|
+
parseFlag("COMPONENTS",components);
|
|
271
|
+
parseFlag("NOPBC",nopbc);
|
|
272
|
+
if( !components ) {
|
|
273
|
+
addValue( shape );
|
|
274
|
+
setNotPeriodic();
|
|
275
|
+
} else {
|
|
276
|
+
addComponent( "w", shape );
|
|
277
|
+
componentIsNotPeriodic("w");
|
|
278
|
+
}
|
|
279
|
+
getPntrToComponent(0)->setDerivativeIsZeroWhenValueIsZero();
|
|
280
|
+
// Stuff for neighbor list
|
|
281
|
+
parse("NL_CUTOFF",nl_cut);
|
|
282
|
+
nl_cut2=nl_cut*nl_cut;
|
|
283
|
+
parse("NL_STRIDE",nl_stride);
|
|
284
|
+
if( nl_cut==0 && nl_stride>1 ) {
|
|
285
|
+
error("NL_CUTOFF must be set if NL_STRIDE is set greater than 1");
|
|
286
|
+
}
|
|
287
|
+
if( nl_cut>0 ) {
|
|
288
|
+
log.printf(" using neighbor list with cutoff %f. List is updated every %u steps.\n",nl_cut,nl_stride);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
if( components ) {
|
|
292
|
+
addComponent( "x", shape );
|
|
293
|
+
componentIsNotPeriodic("x");
|
|
294
|
+
addComponent( "y", shape );
|
|
295
|
+
componentIsNotPeriodic("y");
|
|
296
|
+
addComponent( "z", shape );
|
|
297
|
+
componentIsNotPeriodic("z");
|
|
298
|
+
}
|
|
299
|
+
log<<" Bibliography "<<plumed.cite("Tribello, Giberti, Sosso, Salvalaglio and Parrinello, J. Chem. Theory Comput. 13, 1317 (2017)")<<"\n";
|
|
300
|
+
AdjacencyMatrixData<T> matdata;
|
|
301
|
+
matdata.usepbc = !nopbc;
|
|
302
|
+
matdata.components = components;
|
|
303
|
+
matdata.nlists = getPntrToComponent(0)->getShape()[0];
|
|
304
|
+
matdata.matrixdata.parseInput( this );
|
|
305
|
+
taskmanager.setActionInput( matdata );
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
template <class T>
|
|
309
|
+
unsigned AdjacencyMatrixBase<T>::getNumberOfDerivatives() {
|
|
310
|
+
return 3*getNumberOfAtoms() + 9;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
template <class T>
|
|
314
|
+
void AdjacencyMatrixBase<T>::setupThirdAtomBlock( const std::vector<AtomNumber>& tc,
|
|
315
|
+
std::vector<AtomNumber>& t ) {
|
|
316
|
+
threeblocks.resize( tc.size() );
|
|
317
|
+
unsigned base=t.size();
|
|
318
|
+
for(unsigned i=0; i<tc.size(); ++i) {
|
|
319
|
+
log.printf("%d ", tc[i].serial());
|
|
320
|
+
t.push_back(tc[i]);
|
|
321
|
+
threeblocks[i]=base+i;
|
|
322
|
+
}
|
|
323
|
+
log.printf("\n");
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
template <class T>
|
|
327
|
+
void AdjacencyMatrixBase<T>::setLinkCellCutoff( const bool& symmetric,
|
|
328
|
+
const double& lcut,
|
|
329
|
+
double tcut ) {
|
|
330
|
+
if( read_one_group && symmetric ) {
|
|
331
|
+
getPntrToComponent(0)->setSymmetric( true );
|
|
332
|
+
}
|
|
333
|
+
if( nl_cut>0 && lcut>nl_cut ) {
|
|
334
|
+
error("D_MAX for switching functions should be shorter than neighbor list cutoff");
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if( tcut<0 ) {
|
|
338
|
+
tcut=lcut;
|
|
339
|
+
}
|
|
340
|
+
if( nl_cut>0 ) {
|
|
341
|
+
linkcells.setCutoff( nl_cut );
|
|
342
|
+
} else {
|
|
343
|
+
linkcells.setCutoff( lcut );
|
|
344
|
+
}
|
|
345
|
+
if( linkcells.getCutoff()<std::numeric_limits<double>::max() ) {
|
|
346
|
+
log.printf(" set link cell cutoff to %f \n", linkcells.getCutoff() );
|
|
347
|
+
}
|
|
348
|
+
threecells.setCutoff( tcut );
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
template <class T>
|
|
352
|
+
void AdjacencyMatrixBase<T>::getInputData( std::vector<double>& inputdata ) const {
|
|
353
|
+
if( inputdata.size()!=3*getNumberOfAtoms() ) {
|
|
354
|
+
inputdata.resize( 3*getNumberOfAtoms() );
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
std::size_t k=0;
|
|
358
|
+
for(unsigned i=0; i<getNumberOfAtoms(); ++i) {
|
|
359
|
+
Vector mypos( ActionAtomistic::getPosition(i) );
|
|
360
|
+
inputdata[k] = mypos[0];
|
|
361
|
+
k++;
|
|
362
|
+
inputdata[k] = mypos[1];
|
|
363
|
+
k++;
|
|
364
|
+
inputdata[k] = mypos[2];
|
|
365
|
+
k++;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
template <class T>
|
|
370
|
+
void AdjacencyMatrixBase<T>::getMatrixColumnTitles( std::vector<std::string>& argnames ) const {
|
|
371
|
+
std::string num;
|
|
372
|
+
for(unsigned i=0; i<getConstPntrToComponent(0)->getShape()[1]; ++i) {
|
|
373
|
+
Tools::convert( i+1, num );
|
|
374
|
+
argnames.push_back( num );
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
template <class T>
|
|
379
|
+
void AdjacencyMatrixBase<T>::calculate() {
|
|
380
|
+
Value* myval = getPntrToComponent(0);
|
|
381
|
+
// Retrieve the task list
|
|
382
|
+
std::vector<unsigned> & pTaskList( getListOfActiveTasks(this) );
|
|
383
|
+
// Get the number of tasks we have to deal with
|
|
384
|
+
unsigned ntasks=myval->getShape()[0];
|
|
385
|
+
if( nl_stride==1 ) {
|
|
386
|
+
ntasks=pTaskList.size();
|
|
387
|
+
} else {
|
|
388
|
+
error("neighbour list non updates are not actually implemented or tested");
|
|
389
|
+
}
|
|
390
|
+
unsigned fbsize=0;
|
|
391
|
+
unsigned lstart = getConstPntrToComponent(0)->getShape()[0];
|
|
392
|
+
// This is triggered if you have GROUPA/GROUPB
|
|
393
|
+
// in that case the second index for the matrix is recovered from the neighbour list
|
|
394
|
+
// by subtracting the number of atoms in GROUPA as we do here.
|
|
395
|
+
if( ablocks[0]>=lstart ) {
|
|
396
|
+
fbsize = lstart;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// Get the atoms
|
|
400
|
+
std::vector<Vector> ltmp_pos2( ntasks );
|
|
401
|
+
for(unsigned i=0; i<ntasks; ++i) {
|
|
402
|
+
ltmp_pos2[i] = ActionAtomistic::getPosition(pTaskList[i]);
|
|
403
|
+
}
|
|
404
|
+
auto & matdata = taskmanager.getActionInput();
|
|
405
|
+
// Now update the neighbor lists
|
|
406
|
+
if( getStep()%nl_stride==0 ) {
|
|
407
|
+
// Build the link cells
|
|
408
|
+
std::vector<Vector> ltmp_pos( ablocks.size() );
|
|
409
|
+
for(unsigned i=0; i<ablocks.size(); ++i) {
|
|
410
|
+
ltmp_pos[i]=ActionAtomistic::getPosition( ablocks[i] );
|
|
411
|
+
}
|
|
412
|
+
linkcells.createNeighborList( getConstPntrToComponent(0)->getShape()[0],
|
|
413
|
+
make_const_view(ltmp_pos2),
|
|
414
|
+
make_const_view(pTaskList),
|
|
415
|
+
make_const_view(pTaskList),
|
|
416
|
+
make_const_view(ltmp_pos),
|
|
417
|
+
make_const_view(ablocks),
|
|
418
|
+
getPbc(),
|
|
419
|
+
matdata.natoms_per_list,
|
|
420
|
+
matdata.nlist_v );
|
|
421
|
+
if( threeblocks.size()>0 ) {
|
|
422
|
+
std::vector<Vector> ltmp_pos3( threeblocks.size() );
|
|
423
|
+
for(unsigned i=0; i<threeblocks.size(); ++i) {
|
|
424
|
+
ltmp_pos3[i]=ActionAtomistic::getPosition( threeblocks[i] );
|
|
425
|
+
}
|
|
426
|
+
threecells.createNeighborList( getConstPntrToComponent(0)->getShape()[0],
|
|
427
|
+
make_const_view(ltmp_pos2),
|
|
428
|
+
make_const_view(pTaskList),
|
|
429
|
+
make_const_view(pTaskList),
|
|
430
|
+
make_const_view(ltmp_pos3),
|
|
431
|
+
make_const_view(threeblocks),
|
|
432
|
+
getPbc(),
|
|
433
|
+
matdata.natoms_per_three_list,
|
|
434
|
+
matdata.nlist_three_v);
|
|
435
|
+
}
|
|
436
|
+
matdata.update();
|
|
437
|
+
} else {
|
|
438
|
+
error("neighbour list non updates are not actually implemented or tested");
|
|
439
|
+
}
|
|
440
|
+
// And finally work out maximum number of columns to use
|
|
441
|
+
unsigned maxcol = matdata.nlist[0];
|
|
442
|
+
for(unsigned i=1; i<getConstPntrToComponent(0)->getShape()[0]; ++i) {
|
|
443
|
+
if( matdata.nlist[i]>maxcol ) {
|
|
444
|
+
maxcol = matdata.nlist[i];
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
// The first element returned by the neighbour list is the central atom. The
|
|
448
|
+
// neighbour list thus always has one more atom in it than there are atoms in the
|
|
449
|
+
// neighbourhood of the central atom
|
|
450
|
+
maxcol = maxcol-1;
|
|
451
|
+
|
|
452
|
+
// Reshape the matrix store if the number of columns has changed
|
|
453
|
+
if( maxcol!=myval->getNumberOfColumns() ) {
|
|
454
|
+
for(unsigned i=0; i<getNumberOfComponents(); ++i) {
|
|
455
|
+
getPntrToComponent(i)->reshapeMatrixStore( maxcol );
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
// Clear the bookeeping array
|
|
459
|
+
for(unsigned i=0; i<lstart; ++i) {
|
|
460
|
+
myval->setMatrixBookeepingElement( i*(1+maxcol), 0 );
|
|
461
|
+
}
|
|
462
|
+
// Transfer neighbor list data to the bookeeping arrays
|
|
463
|
+
for(unsigned i=0; i<ntasks; ++i) {
|
|
464
|
+
unsigned bstart = pTaskList[i]*(1+maxcol);
|
|
465
|
+
unsigned rstart = lstart + pTaskList[i]*(1+matdata.natoms_per_list);
|
|
466
|
+
myval->setMatrixBookeepingElement( bstart, matdata.nlist[pTaskList[i]] - 1 );
|
|
467
|
+
for(unsigned j=1; j<matdata.nlist[pTaskList[i]]; ++j) {
|
|
468
|
+
myval->setMatrixBookeepingElement( bstart+j, matdata.nlist[rstart+j] - fbsize );
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
for(unsigned i=1; i<getNumberOfComponents(); ++i) {
|
|
472
|
+
getPntrToComponent(i)->copyBookeepingArrayFromArgument( getPntrToComponent(0) );
|
|
473
|
+
}
|
|
474
|
+
// We need to setup the task manager here because at this point we know the size of the sparse matrices
|
|
475
|
+
unsigned nder = 6 + 3*matdata.natoms_per_three_list + virialSize;
|
|
476
|
+
//there was an if on `matdata.components` but both branches were calling the next line
|
|
477
|
+
taskmanager.setupParallelTaskManager( nder, getNumberOfDerivatives() );
|
|
478
|
+
// Create the workspace that we use in performTask
|
|
479
|
+
taskmanager.setWorkspaceSize(3*(maxcol + 2 + matdata.natoms_per_three_list) );
|
|
480
|
+
// And run all the tasks
|
|
481
|
+
taskmanager.runAllTasks();
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
template <class T>
|
|
485
|
+
void AdjacencyMatrixBase<T>::performTask( std::size_t task_index,
|
|
486
|
+
const AdjacencyMatrixData<T>& actiondata,
|
|
487
|
+
ParallelActionsInput& input,
|
|
488
|
+
ParallelActionsOutput output ) {
|
|
489
|
+
const unsigned nneigh=actiondata.nlist[task_index];
|
|
490
|
+
const unsigned n3neigh=(actiondata.natoms_per_three_list>0) ?
|
|
491
|
+
actiondata.nlist_three[task_index]:0;
|
|
492
|
+
VectorView atoms(output.buffer.data(), nneigh + n3neigh );
|
|
493
|
+
|
|
494
|
+
const unsigned fstart = actiondata.nlists + task_index*(1+actiondata.natoms_per_list);
|
|
495
|
+
const View<double,3> pos0( input.inputdata + 3 * task_index);
|
|
496
|
+
for(unsigned i=0; i<nneigh; ++i) {
|
|
497
|
+
atoms[i][0] = input.inputdata[3*actiondata.nlist[fstart+i]+0] - pos0[0];
|
|
498
|
+
atoms[i][1] = input.inputdata[3*actiondata.nlist[fstart+i]+1] - pos0[1];
|
|
499
|
+
atoms[i][2] = input.inputdata[3*actiondata.nlist[fstart+i]+2] - pos0[2];
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
if( actiondata.natoms_per_three_list>0 ) {
|
|
503
|
+
// Retrieve the set of third atoms
|
|
504
|
+
unsigned fstart3 = actiondata.nlists
|
|
505
|
+
+ task_index*(1+actiondata.natoms_per_three_list);
|
|
506
|
+
for(unsigned i=1; i<n3neigh; ++i) {
|
|
507
|
+
atoms[nneigh+i-1][0] =
|
|
508
|
+
input.inputdata[3*actiondata.nlist_three[fstart3+i]+0] - pos0[0];
|
|
509
|
+
atoms[nneigh+i-1][1] =
|
|
510
|
+
input.inputdata[3*actiondata.nlist_three[fstart3+i]+1] - pos0[1];
|
|
511
|
+
atoms[nneigh+i-1][2] =
|
|
512
|
+
input.inputdata[3*actiondata.nlist_three[fstart3+i]+2] - pos0[2];
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
// Apply periodic boundary conditions to all the atoms
|
|
518
|
+
if( actiondata.usepbc ) {
|
|
519
|
+
input.pbc->apply( atoms, atoms.size() );
|
|
520
|
+
}
|
|
521
|
+
AdjacencyMatrixInput adjinp {input.noderiv,
|
|
522
|
+
input.pbc,
|
|
523
|
+
Vector{0.0,0.0,0.0},
|
|
524
|
+
0,
|
|
525
|
+
VectorView{ atoms.data() + 3*nneigh,n3neigh}};
|
|
526
|
+
|
|
527
|
+
if( n3neigh>1 ) {
|
|
528
|
+
adjinp.natoms = n3neigh-1;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// And calculate this row of the matrices
|
|
532
|
+
std::size_t nderiv(6 + 3*adjinp.natoms + virialSize);
|
|
533
|
+
const unsigned ncomponents =(actiondata.components) ? 4 : 1;
|
|
534
|
+
|
|
535
|
+
// Must clear the derivatives here as otherwise sparsity pattern
|
|
536
|
+
// of derivatives does not match sparsity pattern for forces
|
|
537
|
+
if( !input.noderiv ) {
|
|
538
|
+
for(unsigned i=0; i<output.derivatives.size(); ++i) {
|
|
539
|
+
output.derivatives[i] = 0.0;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
for(unsigned i=1; i<nneigh; ++i ) {
|
|
544
|
+
adjinp.pos = Vector(atoms[i][0],atoms[i][1],atoms[i][2]);
|
|
545
|
+
const std::size_t valpos = (i-1)*ncomponents;
|
|
546
|
+
MatrixOutput adjout{View<double,1>{&output.values[ valpos]},
|
|
547
|
+
View{output.derivatives.data() + valpos*nderiv,nderiv}};
|
|
548
|
+
T::calculateWeight( actiondata.matrixdata, adjinp, adjout );
|
|
549
|
+
if( !actiondata.components ) {
|
|
550
|
+
continue ;
|
|
551
|
+
}
|
|
552
|
+
output.values[valpos+1] = atoms[i][0];
|
|
553
|
+
output.values[valpos+2] = atoms[i][1];
|
|
554
|
+
output.values[valpos+3] = atoms[i][2];
|
|
555
|
+
if( input.noderiv ) {
|
|
556
|
+
continue ;
|
|
557
|
+
}
|
|
558
|
+
//sugar for not having to repeat [valpos*nderiv+something]
|
|
559
|
+
for(int ii=1; ii<4; ++ii) {
|
|
560
|
+
auto derivs = output.derivatives.subview_n<5>(valpos*nderiv+ii*nderiv);
|
|
561
|
+
derivs[0] = -1.0;
|
|
562
|
+
derivs[1] = 1.0;
|
|
563
|
+
derivs[2] = -atoms[i][0];
|
|
564
|
+
derivs[3] = -atoms[i][1];
|
|
565
|
+
derivs[4] = -atoms[i][2];
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
template <class T>
|
|
572
|
+
void AdjacencyMatrixBase<T>::applyNonZeroRankForces( std::vector<double>& outforces ) {
|
|
573
|
+
taskmanager.applyForces( outforces );
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
template <class T>
|
|
577
|
+
int AdjacencyMatrixBase<T>::getNumberOfValuesPerTask( std::size_t task_index,
|
|
578
|
+
const AdjacencyMatrixData<T>& actiondata ) {
|
|
579
|
+
return actiondata.nlist[task_index] - 1;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
template <class T>
|
|
583
|
+
void AdjacencyMatrixBase<T>::getForceIndices( const std::size_t task_index,
|
|
584
|
+
const std::size_t colno,
|
|
585
|
+
const std::size_t ntotal_force,
|
|
586
|
+
const AdjacencyMatrixData<T>& actiondata,
|
|
587
|
+
const ParallelActionsInput& /*input*/,
|
|
588
|
+
ForceIndexHolder force_indices ) {
|
|
589
|
+
|
|
590
|
+
const unsigned fstart = actiondata.nlists
|
|
591
|
+
+ task_index*(1 + actiondata.natoms_per_list);
|
|
592
|
+
|
|
593
|
+
const auto three_task_index= 3 * task_index;
|
|
594
|
+
force_indices.indices[0][0] = three_task_index;
|
|
595
|
+
force_indices.indices[0][1] = three_task_index + 1;
|
|
596
|
+
force_indices.indices[0][2] = three_task_index + 2;
|
|
597
|
+
|
|
598
|
+
const unsigned myatom = 3 * actiondata.nlist[fstart + 1 + colno];
|
|
599
|
+
force_indices.indices[0][3] = myatom;
|
|
600
|
+
force_indices.indices[0][4] = myatom + 1;
|
|
601
|
+
force_indices.indices[0][5] = myatom + 2;
|
|
602
|
+
if( actiondata.components ) {
|
|
603
|
+
force_indices.indices[1][0] = three_task_index;
|
|
604
|
+
force_indices.indices[1][1] = myatom;
|
|
605
|
+
force_indices.indices[2][0] = three_task_index + 1;
|
|
606
|
+
force_indices.indices[2][1] = myatom + 1;
|
|
607
|
+
force_indices.indices[3][0] = three_task_index + 2;
|
|
608
|
+
force_indices.indices[3][1] = myatom + 2;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
force_indices.threadsafe_derivatives_end[0] = 0;
|
|
612
|
+
unsigned n = 6;
|
|
613
|
+
if( actiondata.natoms_per_three_list>0 ) {
|
|
614
|
+
const unsigned n3neigh = actiondata.nlist_three[task_index];
|
|
615
|
+
const unsigned fstart3 = actiondata.nlists
|
|
616
|
+
+ task_index*(1 + actiondata.natoms_per_three_list);
|
|
617
|
+
for(unsigned j=1; j<n3neigh; ++j) {
|
|
618
|
+
unsigned my3atom = 3 * actiondata.nlist_three[fstart3 + j];
|
|
619
|
+
force_indices.indices[0][n ] = my3atom;
|
|
620
|
+
force_indices.indices[0][n+1] = my3atom + 1;
|
|
621
|
+
force_indices.indices[0][n+2] = my3atom + 2;
|
|
622
|
+
n += 3;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
const unsigned virstart = ntotal_force - 9;
|
|
626
|
+
force_indices.indices[0][n ] = virstart + 0;
|
|
627
|
+
force_indices.indices[0][n+1] = virstart + 1;
|
|
628
|
+
force_indices.indices[0][n+2] = virstart + 2;
|
|
629
|
+
force_indices.indices[0][n+3] = virstart + 3;
|
|
630
|
+
force_indices.indices[0][n+4] = virstart + 4;
|
|
631
|
+
force_indices.indices[0][n+5] = virstart + 5;
|
|
632
|
+
force_indices.indices[0][n+6] = virstart + 6;
|
|
633
|
+
force_indices.indices[0][n+7] = virstart + 7;
|
|
634
|
+
force_indices.indices[0][n+8] = virstart + 8;
|
|
635
|
+
|
|
636
|
+
force_indices.tot_indices[0] = n + 9;
|
|
637
|
+
if( actiondata.components ) {
|
|
638
|
+
force_indices.threadsafe_derivatives_end[1] = 0;
|
|
639
|
+
force_indices.threadsafe_derivatives_end[2] = 0;
|
|
640
|
+
force_indices.threadsafe_derivatives_end[3] = 0;
|
|
641
|
+
force_indices.indices[1][2] = virstart;
|
|
642
|
+
force_indices.indices[1][3] = virstart + 1;
|
|
643
|
+
force_indices.indices[1][4] = virstart + 2;
|
|
644
|
+
force_indices.indices[2][2] = virstart + 3;
|
|
645
|
+
force_indices.indices[2][3] = virstart + 4;
|
|
646
|
+
force_indices.indices[2][4] = virstart + 5;
|
|
647
|
+
force_indices.indices[3][2] = virstart + 6;
|
|
648
|
+
force_indices.indices[3][3] = virstart + 7;
|
|
649
|
+
force_indices.indices[3][4] = virstart + 8;
|
|
650
|
+
force_indices.tot_indices[1] = 5;
|
|
651
|
+
force_indices.tot_indices[2] = 5;
|
|
652
|
+
force_indices.tot_indices[3] = 5;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
} // namespace adjmat
|
|
657
|
+
} // namespace PLMD
|
|
658
|
+
|
|
659
|
+
#endif //__PLUMED_adjmat_AdjacencyMatrixBase_h
|