From 79bb309872658e240c7f5d9e189b9b5fe0d3d094 Mon Sep 17 00:00:00 2001
From: Daniele Rapetti <5535617+Iximiel@users.noreply.github.com>
Date: Mon, 15 Sep 2025 14:42:43 +0200
Subject: [PATCH 1/2] Separating the PTM openACC implementation from the
mpi+openMP
preparing distance for the new plugin
Setting up the new ptm in the new plugin
deactivating a check in ActionShortcut::readInputLine
setting up USEGPU for distance_vector
Templatization of Angle and Torsion
Mixed precision in Pbcs
Mixed precision for GetInputData
moved the multicolvar with openacc in a plugin
Starting the migration of multicolvars to a template
adding some templatization to the PTM
updating the PTM accelerated
now multicolvar is ready to be compiled in the openacc plugin
adding the plugins to the modulemap
setting up secondaryStructure for the plugin
setting up secondary structure to target the plugin
addressing some codecheck problems
moving some of the volume kw in the headers
moved Volumes to the plugin
added the spherical harmonic to the plugin
adding the matrixtimes family
fixing a warning
added Combine
Between and <= and >=
setting up contact matrix
separating the GPU from the PTM
moved the openACC tests
updating some tests
adding a way to get the dl handles in the actions
addressed some codechek problems
now checkin if an action is registered do note expose the vector of
LOADed handles
now the tests for existing GPU implementation pass, added fccubic, and
better test
compler guard to fccubic
removing an unecessary shadowed variable
now also the gpu-torsion test is checked against the CPU
deactivated the quaternion tests
small changes after the rebase
deleted a support file
---
plugins/openaccPTM/.gitignore | 4 +
plugins/openaccPTM/ACCParallelTaskManager.h | 364 ++++++++++++++++
plugins/openaccPTM/Angle.cpp | 30 ++
plugins/openaccPTM/Between.cpp | 37 ++
plugins/openaccPTM/Combine.cpp | 38 ++
plugins/openaccPTM/ContactMatrix.cpp | 34 ++
plugins/openaccPTM/DihedralCorrelation.cpp | 30 ++
plugins/openaccPTM/Dipole.cpp | 30 ++
plugins/openaccPTM/Distance.cpp | 30 ++
plugins/openaccPTM/Fccubic.cpp | 34 ++
plugins/openaccPTM/LessThan.cpp | 38 ++
plugins/openaccPTM/Makefile | 62 +++
plugins/openaccPTM/MatrixTimesMatrix.cpp | 37 ++
plugins/openaccPTM/MatrixTimesVectorBase.cpp | 35 ++
plugins/openaccPTM/MoreThan.cpp | 39 ++
plugins/openaccPTM/Plane.cpp | 30 ++
plugins/openaccPTM/Position.cpp | 30 ++
.../openaccPTM/SecondaryStructureDRMSD.cpp | 33 ++
plugins/openaccPTM/SphericalHarmonic.cpp | 36 ++
plugins/openaccPTM/Torsion.cpp | 30 ++
plugins/openaccPTM/VolumeAround.cpp | 31 ++
plugins/openaccPTM/VolumeInCylinder.cpp | 36 ++
plugins/openaccPTM/VolumeInSphere.cpp | 33 ++
plugins/openaccPTM/configure.sh | 32 ++
plugins/openaccPTM/module.type | 0
plugins/openaccPTM/plumed | 1 +
plugins/openaccPTM/regtest/.gitignore | 2 +
plugins/openaccPTM/regtest/Makefile | 1 +
plugins/openaccPTM/regtest/scripts | 1 +
plugins/openaccPTM/regtest/targetGPU/Makefile | 2 +
.../targetGPU/rt-GPU-DISTANCE/Makefile | 0
.../rt-GPU-DISTANCE/colvar.reference | 0
.../regtest/targetGPU/rt-GPU-DISTANCE}/config | 5 +-
.../targetGPU/rt-GPU-DISTANCE/diff.reference | 18 +
.../targetGPU/rt-GPU-DISTANCE/dists.reference | 0
.../rt-GPU-DISTANCE/forces.reference | 0
.../targetGPU/rt-GPU-DISTANCE/plumed.dat | 15 +
.../targetGPU/rt-GPU-PLANE-bias/Makefile | 0
.../targetGPU/rt-GPU-PLANE-bias/config | 3 +-
.../rt-GPU-PLANE-bias/forces.reference | 0
.../rt-GPU-PLANE-bias/planes.reference | 0
.../targetGPU/rt-GPU-PLANE-bias/plumed.dat | 1 +
.../rt-GPU-TORSION-biasIsSUM/Makefile | 0
.../rt-GPU-TORSION-biasIsSUM}/config | 4 +-
.../rt-GPU-TORSION-biasIsSUM/diff.reference | 20 +
.../rt-GPU-TORSION-biasIsSUM/forces.reference | 234 +++++-----
.../rt-GPU-TORSION-biasIsSUM/plumed.dat | 11 +
.../rt-GPU-TORSION-biasIsSUM/tors.reference | 20 +
.../rt-GPU-multicolvar-print/Makefile | 0
.../rt-GPU-multicolvar-print/angles.reference | 0
.../cdipoles.reference | 0
.../rt-GPU-multicolvar-print/cdists.reference | 0
.../targetGPU/rt-GPU-multicolvar-print/config | 0
.../ctorsions.reference | 0
.../ctorsions2.reference | 0
.../dipoles.reference | 0
.../rt-GPU-multicolvar-print/dists.reference | 0
.../rt-GPU-multicolvar-print/plumed.dat | 1 +
.../rt-GPU-multicolvar-print/pos.reference | 0
.../scdists.reference | 0
.../rt-GPU-multicolvar-print/spos.reference | 0
.../rt-GPU-multicolvar-print/test.pdb | 0
.../torsions.reference | 0
.../Makefile | 0
.../colvar.reference | 0
.../config | 2 +-
.../forces.reference | 0
.../plumed.dat | 1 +
.../Makefile | 0
.../colvar.reference | 0
.../config | 2 +-
.../forces.reference | 0
.../plumed.dat | 1 +
.../rt-GPU-quaternion-bond-product/Makefile | 0
.../colvar.reference | 0
.../rt-GPU-quaternion-bond-product/config | 2 +-
.../forces.reference | 0
.../rt-GPU-quaternion-bond-product/plumed.dat | 1 +
.../rt-GPU-secondarystructure-DRMSD/Makefile | 0
.../ala12_trajectory.xyz | 0
.../colvar.reference | 0
.../colvar10.reference | 0
.../rt-GPU-secondarystructure-DRMSD/config | 2 +-
.../forces.reference | 0
.../rt-GPU-secondarystructure-DRMSD/helix.pdb | 0
.../plumed.dat | 1 +
.../rt-GPU-secondarystructure/Makefile | 0
.../ala12_trajectory.xyz | 0
.../colvar.reference | 0
.../colvar10.reference | 0
.../rt-GPU-secondarystructure/config | 0
.../forces.reference | 0
.../rt-GPU-secondarystructure/helix.pdb | 0
.../rt-GPU-secondarystructure/plumed.dat | 1 +
.../rt-adjmat-basic-matrix-mtv/Makefile | 0
.../colvar.reference | 0
.../rt-adjmat-basic-matrix-mtv/config | 0
.../rt-adjmat-basic-matrix-mtv/diff.reference | 18 +
.../fcolvar.reference | 0
.../forces.reference | 272 ++++++++++++
.../rt-adjmat-basic-matrix-mtv/isomers.xyz | 0
.../rt-adjmat-basic-matrix-mtv/plumed.dat | 11 +
.../targetGPU/rt-adjmat-basic-matrix/Makefile | 0
.../rt-adjmat-basic-matrix/colvar.reference | 0
.../targetGPU/rt-adjmat-basic-matrix/config | 0
.../rt-adjmat-basic-matrix}/coords.reference | 0
.../rt-adjmat-basic-matrix/fcolvar.reference | 0
.../rt-adjmat-basic-matrix}/forces.reference | 0
.../rt-adjmat-basic-matrix/isomers.xyz | 0
.../rt-adjmat-basic-matrix/plumed.dat | 1 +
.../rt-adjmat-basic-matrix2/Makefile | 0
.../rt-adjmat-basic-matrix2/colvar.reference | 0
.../targetGPU/rt-adjmat-basic-matrix2/config | 0
.../rt-adjmat-basic-matrix2/coords.reference | 0
.../rt-adjmat-basic-matrix2/fcolvar.reference | 0
.../rt-adjmat-basic-matrix2/forces.reference | 0
.../rt-adjmat-basic-matrix2/plumed.dat | 1 +
.../rt-adjmat-basic-matrix3/Makefile | 0
.../rt-adjmat-basic-matrix3/colvar.reference | 0
.../targetGPU/rt-adjmat-basic-matrix3/config | 0
.../rt-adjmat-basic-matrix3/coords.reference | 0
.../rt-adjmat-basic-matrix3/fcolvar.reference | 0
.../rt-adjmat-basic-matrix3/forces.reference | 0
.../rt-adjmat-basic-matrix3/gas-one.xyz | 0
.../rt-adjmat-basic-matrix3/plumed.dat | 1 +
.../rt-adjmat-basic-matrix4/Makefile | 0
.../cmcolvar.reference | 0
.../targetGPU/rt-adjmat-basic-matrix4/config | 0
.../rt-adjmat-basic-matrix4/fcolvar.reference | 0
.../rt-adjmat-basic-matrix4/forces.reference | 0
.../rt-adjmat-basic-matrix4/gas-one.xyz | 0
.../rt-adjmat-basic-matrix4/plumed.dat | 1 +
.../targetGPU/rt-adjmat-eigvals/Makefile | 0
.../rt-adjmat-eigvals/colvar.reference | 0
.../targetGPU/rt-adjmat-eigvals/config | 0
.../rt-adjmat-eigvals/forces.reference | 0
.../targetGPU/rt-adjmat-eigvals/plumed.dat | 1 +
.../targetGPU/rt-adjmat-eigvecs/Makefile | 0
.../rt-adjmat-eigvecs/colvar.reference | 0
.../targetGPU/rt-adjmat-eigvecs/config | 0
.../rt-adjmat-eigvecs/forces.reference | 0
.../targetGPU/rt-adjmat-eigvecs/plumed.dat | 3 +-
.../targetGPU/rt-adjmat-join-eigvals/Makefile | 0
.../rt-adjmat-join-eigvals/colvar.reference | 0
.../targetGPU/rt-adjmat-join-eigvals/config | 0
.../rt-adjmat-join-eigvals/forces.reference | 0
.../rt-adjmat-join-eigvals/plumed.dat | 1 +
.../targetGPU/rt-adjmat-join-eigvecs/Makefile | 0
.../rt-adjmat-join-eigvecs/colvar.reference | 0
.../targetGPU/rt-adjmat-join-eigvecs/config | 0
.../rt-adjmat-join-eigvecs/forces.reference | 0
.../rt-adjmat-join-eigvecs/plumed.dat | 1 +
.../targetGPU/rt-adjmat-matmult/Makefile | 0
.../rt-adjmat-matmult/colvar.reference | 0
.../targetGPU/rt-adjmat-matmult/config | 0
.../rt-adjmat-matmult/forces.reference | 0
.../targetGPU/rt-adjmat-matmult/isomers.xyz | 0
.../targetGPU/rt-adjmat-matmult/plumed.dat | 1 +
.../targetGPU/rt-adjmat-prod/Makefile | 0
.../targetGPU/rt-adjmat-prod/colvar.reference | 0
.../regtest}/targetGPU/rt-adjmat-prod/config | 2 +-
.../targetGPU/rt-adjmat-prod/forces.reference | 0
.../targetGPU/rt-adjmat-prod/plumed.dat | 1 +
.../rt-coordination-insphere-nochain/Makefile | 0
.../colvar.reference | 0
.../rt-coordination-insphere-nochain/config | 0
.../forces.reference | 0
.../plumed.dat | 1 +
.../rt-coordination-insphere/Makefile | 0
.../rt-coordination-insphere/colvar.reference | 0
.../targetGPU/rt-coordination-insphere/config | 0
.../rt-coordination-insphere/forces.reference | 0
.../rt-coordination-insphere/plumed.dat | 1 +
.../regtest}/targetGPU/rt-cylinder/Makefile | 0
.../targetGPU/rt-cylinder/colvar.reference | 0
.../regtest}/targetGPU/rt-cylinder/config | 0
.../targetGPU/rt-cylinder/forces.reference | 0
.../targetGPU/rt-cylinder/gentraj.cpp | 0
.../regtest}/targetGPU/rt-cylinder/plumed.dat | 1 +
.../targetGPU/rt-cylinder/trajectory.xyz | 0
.../rt-landmarks-calc-dissims/Makefile | 0
.../analysis.1.mymatrix3.dat.reference | 0
.../rt-landmarks-calc-dissims/colv_in | 0
.../rt-landmarks-calc-dissims/config | 0
.../mymatrix.dat.reference | 0
.../mymatrix2.dat.reference | 0
.../mymatrix3.dat.reference | 0
.../output-fps.pdb.reference | 0
.../output-stride.pdb.reference | 0
.../rt-landmarks-calc-dissims/plumed.dat | 1 +
.../targetGPU/rt-multicolvar-filters/Makefile | 0
.../rt-multicolvar-filters/colvar.reference | 0
.../targetGPU/rt-multicolvar-filters/config | 0
.../rt-multicolvar-filters/forces.reference | 0
.../rt-multicolvar-filters/plumed.dat | 1 +
.../rt-symfunc-averaged-q6-spAspB/Makefile | 0
.../colvar_aq6.reference | 0
.../rt-symfunc-averaged-q6-spAspB/config | 0
.../forces.reference | 0
.../rt-symfunc-averaged-q6-spAspB/plumed.dat | 1 +
.../traj_md-10.xyz | 0
.../targetGPU/rt-symfunc-averaged-q6/Makefile | 0
.../rt-symfunc-averaged-q6/colv.reference | 0
.../rt-symfunc-averaged-q6/colv3.reference | 0
.../targetGPU/rt-symfunc-averaged-q6/config | 0
.../rt-symfunc-averaged-q6/forces.reference | 0
.../rt-symfunc-averaged-q6/plumed.dat | 1 +
.../rt-symfunc-nbonds-one-q6/Makefile | 0
.../rt-symfunc-nbonds-one-q6/colv1.reference | 2 +
.../targetGPU/rt-symfunc-nbonds-one-q6/config | 0
.../rt-symfunc-nbonds-one-q6/forces.reference | 66 +++
.../rt-symfunc-nbonds-one-q6/plumed.dat | 33 ++
.../targetGPU/rt-symfunc-nbonds-q6/Makefile | 0
.../rt-symfunc-nbonds-q6/colv1.reference | 2 +
.../rt-symfunc-nbonds-q6/colv2.reference | 2 +
.../targetGPU/rt-symfunc-nbonds-q6/config | 2 +-
.../rt-symfunc-nbonds-q6/forces.reference | 66 +++
.../targetGPU/rt-symfunc-nbonds-q6/plumed.dat | 71 +++
.../targetGPU/rt-symfunc-ntwo-lq6/Makefile | 0
.../rt-symfunc-ntwo-lq6/colvar.reference | 0
.../targetGPU/rt-symfunc-ntwo-lq6/config | 0
.../rt-symfunc-ntwo-lq6/forces.reference | 0
.../targetGPU/rt-symfunc-ntwo-lq6/plumed.dat | 1 +
.../targetGPU/rt-symfunc-q6-nochain/Makefile | 0
.../rt-symfunc-q6-nochain/colv.reference | 0
.../rt-symfunc-q6-nochain/colv3.reference | 0
.../targetGPU/rt-symfunc-q6-nochain/config | 0
.../rt-symfunc-q6-nochain/forces.reference | 0
.../rt-symfunc-q6-nochain/plumed.dat | 1 +
.../targetGPU/rt-symfunc-q6-subset/Makefile | 0
.../rt-symfunc-q6-subset/colv3.reference | 0
.../targetGPU/rt-symfunc-q6-subset/config | 0
.../rt-symfunc-q6-subset/forces.reference | 0
.../targetGPU/rt-symfunc-q6-subset/plumed.dat | 1 +
.../regtest}/targetGPU/rt-symfunc-q6/Makefile | 0
.../targetGPU/rt-symfunc-q6/colv.reference | 0
.../targetGPU/rt-symfunc-q6/colv2.reference | 0
.../targetGPU/rt-symfunc-q6/colv3.reference | 0
.../targetGPU/rt-symfunc-q6/colv4.reference | 0
.../regtest}/targetGPU/rt-symfunc-q6/config | 0
.../targetGPU/rt-symfunc-q6/forces.reference | 0
.../targetGPU/rt-symfunc-q6/plumed.dat | 1 +
.../targetGPU/rt-symfunc-simplecubic/Makefile | 0
.../rt-symfunc-simplecubic/colv.reference | 0
.../rt-symfunc-simplecubic/colv2.reference | 0
.../rt-symfunc-simplecubic/colv3.reference | 0
.../rt-symfunc-simplecubic/colv4.reference | 0
.../targetGPU/rt-symfunc-simplecubic/config | 0
.../rt-symfunc-simplecubic/forces.reference | 0
.../rt-symfunc-simplecubic/plumed.dat | 1 +
.../targetGPU/rt-symfunc-small-lq6/Makefile | 0
.../rt-symfunc-small-lq6/colvar.reference | 0
.../targetGPU/rt-symfunc-small-lq6/config | 0
.../rt-symfunc-small-lq6/forces.reference | 0
.../targetGPU/rt-symfunc-small-lq6/plumed.dat | 1 +
.../targetGPU/rt-symfunc-small-q6/Makefile | 0
.../rt-symfunc-small-q6/colvar.reference | 0
.../targetGPU/rt-symfunc-small-q6/config | 0
.../rt-symfunc-small-q6/forces.reference | 0
.../targetGPU/rt-symfunc-small-q6/plumed.dat | 1 +
.../targetGPU/rt-symfunc-two-lq6/Makefile | 0
.../rt-symfunc-two-lq6/colvar.reference | 0
.../targetGPU/rt-symfunc-two-lq6/config | 0
.../rt-symfunc-two-lq6/forces.reference | 0
.../targetGPU/rt-symfunc-two-lq6/plumed.dat | 1 +
.../targetGPU/rt-symfunc-two-q6/Makefile | 0
.../rt-symfunc-two-q6/colvar.reference | 0
.../targetGPU/rt-symfunc-two-q6/config | 0
.../rt-symfunc-two-q6/forces.reference | 0
.../targetGPU/rt-symfunc-two-q6/plumed.dat | 1 +
.../targetGPU/rt-volume-around/Makefile | 0
.../rt-volume-around/colvar.reference | 0
.../targetGPU/rt-volume-around/config | 0
.../targetGPU/rt-volume-around/gentraj.cpp | 0
.../targetGPU/rt-volume-around/plumed.dat | 1 +
.../targetGPU/rt-volume-around/trajectory.xyz | 0
plugins/openaccPTM/regtest/trajectories | 1 +
plugins/openaccPTM/src/plumed | 1 +
.../secondarystructure/rt33-mpi/plumed.dat | 2 +-
regtest/secondarystructure/rt33/plumed.dat | 2 +-
regtest/targetGPU/distribuitedMCBiasTests.sh | 181 --------
regtest/targetGPU/distribuitedMCTests.sh | 132 ------
regtest/targetGPU/distribuitedTests.sh | 126 ------
regtest/targetGPU/rt-GPU-DISTANCE/plumed.dat | 8 -
.../rt-GPU-TORSION-biasIsSUM/colvar.reference | 20 -
.../rt-GPU-TORSION-biasIsSUM/plumed.dat | 6 -
.../rt-GPU-TORSION-biasIsSUM/tors.reference | 20 -
.../rt-adjmat-basic-matrix/coords.reference | 18 -
.../rt-adjmat-basic-matrix/forces.reference | 272 ------------
.../rt-symfunc-nbonds-one-q6/colv1.reference | 2 -
.../rt-symfunc-nbonds-one-q6/forces.reference | 66 ---
.../rt-symfunc-nbonds-one-q6/plumed.dat | 17 -
.../rt-symfunc-nbonds-q6/colv1.reference | 2 -
.../rt-symfunc-nbonds-q6/colv2.reference | 2 -
.../rt-symfunc-nbonds-q6/forces.reference | 66 ---
.../targetGPU/rt-symfunc-nbonds-q6/plumed.dat | 35 --
regtest/tools/rt-make-angle/main.cpp | 84 ++--
regtest/tools/rt-make-angle/output.reference | 39 +-
src/adjmat/AdjacencyMatrixBase.h | 104 +++--
src/adjmat/ContactMatrix.cpp | 359 +++++++++++++---
src/adjmat/ContactMatrix.h | 82 +++-
src/adjmat/ContactMatrixShortcut.cpp | 393 +----------------
src/adjmat/ContactMatrixShortcut.h | 145 +++++++
src/adjmat/Neighbors.cpp | 2 +
src/adjmat/TorsionsMatrix.cpp | 33 ++
src/colvar/Angle.cpp | 112 +----
src/colvar/Angle.h | 135 ++++++
src/colvar/ColvarInput.cpp | 48 ---
src/colvar/ColvarInput.h | 73 +++-
src/colvar/ColvarShortcut.h | 10 +-
src/colvar/DihedralCorrelation.cpp | 137 +-----
src/colvar/DihedralCorrelation.h | 163 +++++++
src/colvar/Dipole.cpp | 166 +------
src/colvar/Dipole.h | 197 +++++++++
src/colvar/Distance.cpp | 231 +---------
src/colvar/Distance.h | 254 +++++++++++
src/colvar/MultiColvarTemplate.h | 131 +++---
src/colvar/Plane.cpp | 146 +------
src/colvar/Plane.h | 176 ++++++++
src/colvar/Position.cpp | 165 +------
src/colvar/Position.h | 192 +++++++++
src/colvar/RMSDVector.h | 2 +
src/colvar/Torsion.cpp | 188 +-------
src/colvar/Torsion.h | 215 ++++++++++
src/contour/FindContour.h | 2 +
src/contour/FindContourSurface.cpp | 2 +
src/contour/FindSphericalContour.cpp | 2 +
src/core/AccelerableShortcut.cpp | 23 +
src/core/AccelerableShortcut.h | 59 +++
src/core/ActionShortcut.cpp | 8 +-
src/core/ActionWithMatrix.cpp | 38 ++
src/core/ActionWithMatrix.h | 4 +
src/core/ActionWithVector.cpp | 49 +++
src/core/ActionWithVector.h | 5 +
src/core/ParallelTaskManager.h | 406 +++++-------------
src/core/PlumedMain.cpp | 5 +-
src/core/PlumedMain.h | 2 +
src/crystdistrib/Quaternion.cpp | 10 +-
.../QuaternionBondProductMatrix.cpp | 5 +-
src/dimred/ProjectPoints.cpp | 2 +
src/function/Between.cpp | 93 +---
src/function/Between.h | 123 ++++++
src/function/Combine.cpp | 159 +------
src/function/Combine.h | 189 ++++++++
src/function/FunctionOfMatrix.h | 137 ++++--
src/function/FunctionOfVector.h | 129 ++++--
src/function/FunctionSetup.h | 4 +-
src/function/FunctionShortcut.h | 74 +++-
src/function/LessThan.cpp | 106 +----
src/function/LessThan.h | 133 ++++++
src/function/MoreThan.cpp | 105 +----
src/function/MoreThan.h | 135 ++++++
src/gridtools/FunctionOfGrid.h | 2 +
src/gridtools/InterpolateGrid.cpp | 2 +
src/gridtools/KDE.h | 2 +
src/gridtools/Marginal.cpp | 2 +
src/maketools/makeModuleMap | 19 +-
src/matrixtools/MatrixDissimilarities.cpp | 111 +++++
src/matrixtools/MatrixDissimilarities.h | 111 +++++
src/matrixtools/MatrixProduct.cpp | 137 ++++++
src/matrixtools/MatrixProduct.h | 69 +++
src/matrixtools/MatrixTimesMatrix.cpp | 297 -------------
src/matrixtools/MatrixTimesMatrix.h | 108 +++--
src/matrixtools/MatrixTimesVector.cpp | 27 +-
src/matrixtools/MatrixTimesVectorBase.cpp | 63 +--
src/matrixtools/MatrixTimesVectorBase.h | 170 +++++---
src/matrixtools/OuterProduct.h | 2 +
src/refdist/MatrixProductDiagonal.cpp | 2 +
src/secondarystructure/AlphaRMSD.cpp | 6 +-
src/secondarystructure/AntibetaRMSD.cpp | 6 +-
src/secondarystructure/ParabetaRMSD.cpp | 6 +-
.../SecondaryStructureBase.h | 120 ++++--
.../SecondaryStructureDRMSD.cpp | 195 +--------
.../SecondaryStructureDRMSD.h | 206 +++++++++
.../SecondaryStructureRMSD.cpp | 14 +-
src/symfunc/Fccubic.cpp | 70 +--
src/symfunc/Fccubic.h | 118 +++++
src/symfunc/SphericalHarmonic.cpp | 331 +-------------
src/symfunc/SphericalHarmonic.h | 360 ++++++++++++++++
src/symfunc/ThreeBodyGFunctions.cpp | 2 +
src/tools/Angle.cpp | 46 --
src/tools/Angle.h | 50 ++-
src/tools/ColvarOutput.cpp | 8 -
src/tools/ColvarOutput.h | 38 +-
src/tools/Pbc.cpp | 62 +++
src/tools/Pbc.h | 6 +
src/tools/SwitchingFunction.cpp | 2 +
src/tools/Tools.h | 17 +-
src/tools/Torsion.cpp | 57 ---
src/tools/Torsion.h | 68 ++-
src/tools/TypeUtils.cpp | 22 +
src/tools/TypeUtils.h | 32 ++
src/volumes/ActionVolume.h | 148 ++++---
src/volumes/VolumeAround.cpp | 132 +-----
src/volumes/VolumeAround.h | 167 +++++++
src/volumes/VolumeBetweenContours.cpp | 3 +
src/volumes/VolumeCavity.cpp | 3 +
src/volumes/VolumeInCylinder.cpp | 130 +-----
src/volumes/VolumeInCylinder.h | 178 ++++++++
src/volumes/VolumeInSphere.cpp | 86 +---
src/volumes/VolumeInSphere.h | 121 ++++++
src/volumes/VolumeShortcut.h | 15 +-
src/volumes/VolumeTetrapore.cpp | 3 +
403 files changed, 7574 insertions(+), 5409 deletions(-)
create mode 100644 plugins/openaccPTM/.gitignore
create mode 100644 plugins/openaccPTM/ACCParallelTaskManager.h
create mode 100644 plugins/openaccPTM/Angle.cpp
create mode 100644 plugins/openaccPTM/Between.cpp
create mode 100644 plugins/openaccPTM/Combine.cpp
create mode 100644 plugins/openaccPTM/ContactMatrix.cpp
create mode 100644 plugins/openaccPTM/DihedralCorrelation.cpp
create mode 100644 plugins/openaccPTM/Dipole.cpp
create mode 100644 plugins/openaccPTM/Distance.cpp
create mode 100644 plugins/openaccPTM/Fccubic.cpp
create mode 100644 plugins/openaccPTM/LessThan.cpp
create mode 100644 plugins/openaccPTM/Makefile
create mode 100644 plugins/openaccPTM/MatrixTimesMatrix.cpp
create mode 100644 plugins/openaccPTM/MatrixTimesVectorBase.cpp
create mode 100644 plugins/openaccPTM/MoreThan.cpp
create mode 100644 plugins/openaccPTM/Plane.cpp
create mode 100644 plugins/openaccPTM/Position.cpp
create mode 100644 plugins/openaccPTM/SecondaryStructureDRMSD.cpp
create mode 100644 plugins/openaccPTM/SphericalHarmonic.cpp
create mode 100644 plugins/openaccPTM/Torsion.cpp
create mode 100644 plugins/openaccPTM/VolumeAround.cpp
create mode 100644 plugins/openaccPTM/VolumeInCylinder.cpp
create mode 100644 plugins/openaccPTM/VolumeInSphere.cpp
create mode 100755 plugins/openaccPTM/configure.sh
create mode 100644 plugins/openaccPTM/module.type
create mode 120000 plugins/openaccPTM/plumed
create mode 100644 plugins/openaccPTM/regtest/.gitignore
create mode 120000 plugins/openaccPTM/regtest/Makefile
create mode 120000 plugins/openaccPTM/regtest/scripts
create mode 100644 plugins/openaccPTM/regtest/targetGPU/Makefile
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-DISTANCE/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-DISTANCE/colvar.reference (100%)
rename {regtest/targetGPU/rt-GPU-TORSION-biasIsSUM => plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE}/config (73%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/diff.reference
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-DISTANCE/dists.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-DISTANCE/forces.reference (100%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/plumed.dat
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-PLANE-bias/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-PLANE-bias/config (80%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-PLANE-bias/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-PLANE-bias/planes.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-PLANE-bias/plumed.dat (77%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-TORSION-biasIsSUM/Makefile (100%)
rename {regtest/targetGPU/rt-GPU-DISTANCE => plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM}/config (73%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/diff.reference
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-TORSION-biasIsSUM/forces.reference (54%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/plumed.dat
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/tors.reference
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/angles.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/cdipoles.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/cdists.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/ctorsions.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/ctorsions2.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/dipoles.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/dists.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/plumed.dat (98%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/pos.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/scdists.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/spos.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/test.pdb (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-multicolvar-print/torsions.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-deriv/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-deriv/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-deriv/config (82%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-deriv/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-deriv/plumed.dat (95%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-only/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-only/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-only/config (84%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-only/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product-only/plumed.dat (92%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product/config (84%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-quaternion-bond-product/plumed.dat (90%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure-DRMSD/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure-DRMSD/ala12_trajectory.xyz (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar10.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure-DRMSD/config (82%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure-DRMSD/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure-DRMSD/helix.pdb (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure-DRMSD/plumed.dat (96%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure/ala12_trajectory.xyz (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure/colvar10.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure/helix.pdb (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-GPU-secondarystructure/plumed.dat (95%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix-mtv/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix-mtv/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix-mtv/config (100%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/diff.reference
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix-mtv/fcolvar.reference (100%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/forces.reference
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix-mtv/isomers.xyz (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix-mtv/plumed.dat (52%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix/config (100%)
rename {regtest/targetGPU/rt-adjmat-basic-matrix-mtv => plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix}/coords.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix/fcolvar.reference (100%)
rename {regtest/targetGPU/rt-adjmat-basic-matrix-mtv => plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix}/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix/isomers.xyz (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix/plumed.dat (89%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix2/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix2/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix2/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix2/coords.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix2/fcolvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix2/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix2/plumed.dat (90%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix3/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix3/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix3/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix3/coords.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix3/fcolvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix3/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix3/gas-one.xyz (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix3/plumed.dat (91%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix4/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix4/cmcolvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix4/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix4/fcolvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix4/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix4/gas-one.xyz (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-basic-matrix4/plumed.dat (87%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvals/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvals/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvals/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvals/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvals/plumed.dat (82%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvecs/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvecs/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvecs/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvecs/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-eigvecs/plumed.dat (93%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvals/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvals/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvals/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvals/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvals/plumed.dat (91%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvecs/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvecs/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvecs/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvecs/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-join-eigvecs/plumed.dat (97%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-matmult/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-matmult/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-matmult/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-matmult/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-matmult/isomers.xyz (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-matmult/plumed.dat (84%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-prod/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-prod/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-prod/config (87%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-prod/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-adjmat-prod/plumed.dat (89%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere-nochain/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere-nochain/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere-nochain/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere-nochain/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere-nochain/plumed.dat (94%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-coordination-insphere/plumed.dat (94%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-cylinder/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-cylinder/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-cylinder/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-cylinder/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-cylinder/gentraj.cpp (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-cylinder/plumed.dat (87%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-cylinder/trajectory.xyz (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/analysis.1.mymatrix3.dat.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/colv_in (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/mymatrix.dat.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/mymatrix2.dat.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/mymatrix3.dat.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/output-fps.pdb.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/output-stride.pdb.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-landmarks-calc-dissims/plumed.dat (94%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-multicolvar-filters/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-multicolvar-filters/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-multicolvar-filters/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-multicolvar-filters/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-multicolvar-filters/plumed.dat (98%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6-spAspB/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6-spAspB/colvar_aq6.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6-spAspB/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6-spAspB/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6-spAspB/plumed.dat (87%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6-spAspB/traj_md-10.xyz (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6/colv.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6/colv3.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-averaged-q6/plumed.dat (85%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-nbonds-one-q6/Makefile (100%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/colv1.reference
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-nbonds-one-q6/config (100%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/forces.reference
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/plumed.dat
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-nbonds-q6/Makefile (100%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/colv1.reference
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/colv2.reference
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-nbonds-q6/config (78%)
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/forces.reference
create mode 100644 plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/plumed.dat
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-ntwo-lq6/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-ntwo-lq6/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-ntwo-lq6/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-ntwo-lq6/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-ntwo-lq6/plumed.dat (95%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-nochain/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-nochain/colv.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-nochain/colv3.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-nochain/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-nochain/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-nochain/plumed.dat (84%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-subset/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-subset/colv3.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-subset/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-subset/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6-subset/plumed.dat (88%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6/colv.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6/colv2.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6/colv3.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6/colv4.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-q6/plumed.dat (92%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-simplecubic/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-simplecubic/colv.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-simplecubic/colv2.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-simplecubic/colv3.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-simplecubic/colv4.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-simplecubic/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-simplecubic/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-simplecubic/plumed.dat (97%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-lq6/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-lq6/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-lq6/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-lq6/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-lq6/plumed.dat (94%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-q6/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-q6/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-q6/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-q6/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-small-q6/plumed.dat (92%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-lq6/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-lq6/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-lq6/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-lq6/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-lq6/plumed.dat (92%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-q6/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-q6/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-q6/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-q6/forces.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-symfunc-two-q6/plumed.dat (91%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-volume-around/Makefile (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-volume-around/colvar.reference (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-volume-around/config (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-volume-around/gentraj.cpp (100%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-volume-around/plumed.dat (99%)
rename {regtest => plugins/openaccPTM/regtest}/targetGPU/rt-volume-around/trajectory.xyz (100%)
create mode 120000 plugins/openaccPTM/regtest/trajectories
create mode 120000 plugins/openaccPTM/src/plumed
delete mode 100644 regtest/targetGPU/distribuitedMCBiasTests.sh
delete mode 100644 regtest/targetGPU/distribuitedMCTests.sh
delete mode 100644 regtest/targetGPU/distribuitedTests.sh
delete mode 100644 regtest/targetGPU/rt-GPU-DISTANCE/plumed.dat
delete mode 100644 regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/colvar.reference
delete mode 100644 regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/plumed.dat
delete mode 100644 regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/tors.reference
delete mode 100644 regtest/targetGPU/rt-adjmat-basic-matrix/coords.reference
delete mode 100644 regtest/targetGPU/rt-adjmat-basic-matrix/forces.reference
delete mode 100644 regtest/targetGPU/rt-symfunc-nbonds-one-q6/colv1.reference
delete mode 100644 regtest/targetGPU/rt-symfunc-nbonds-one-q6/forces.reference
delete mode 100644 regtest/targetGPU/rt-symfunc-nbonds-one-q6/plumed.dat
delete mode 100644 regtest/targetGPU/rt-symfunc-nbonds-q6/colv1.reference
delete mode 100644 regtest/targetGPU/rt-symfunc-nbonds-q6/colv2.reference
delete mode 100644 regtest/targetGPU/rt-symfunc-nbonds-q6/forces.reference
delete mode 100644 regtest/targetGPU/rt-symfunc-nbonds-q6/plumed.dat
create mode 100644 src/adjmat/ContactMatrixShortcut.h
create mode 100644 src/colvar/Angle.h
create mode 100644 src/colvar/DihedralCorrelation.h
create mode 100644 src/colvar/Dipole.h
create mode 100644 src/colvar/Distance.h
create mode 100644 src/colvar/Plane.h
create mode 100644 src/colvar/Position.h
create mode 100644 src/colvar/Torsion.h
create mode 100644 src/core/AccelerableShortcut.cpp
create mode 100644 src/core/AccelerableShortcut.h
create mode 100644 src/function/Between.h
create mode 100644 src/function/Combine.h
create mode 100644 src/function/LessThan.h
create mode 100644 src/function/MoreThan.h
create mode 100644 src/matrixtools/MatrixDissimilarities.cpp
create mode 100644 src/matrixtools/MatrixDissimilarities.h
create mode 100644 src/matrixtools/MatrixProduct.cpp
create mode 100644 src/matrixtools/MatrixProduct.h
create mode 100644 src/secondarystructure/SecondaryStructureDRMSD.h
create mode 100644 src/symfunc/Fccubic.h
create mode 100644 src/symfunc/SphericalHarmonic.h
create mode 100644 src/tools/TypeUtils.cpp
create mode 100644 src/tools/TypeUtils.h
create mode 100644 src/volumes/VolumeAround.h
create mode 100644 src/volumes/VolumeInCylinder.h
create mode 100644 src/volumes/VolumeInSphere.h
diff --git a/plugins/openaccPTM/.gitignore b/plugins/openaccPTM/.gitignore
new file mode 100644
index 0000000000..f11b086c1d
--- /dev/null
+++ b/plugins/openaccPTM/.gitignore
@@ -0,0 +1,4 @@
+Makefile.conf
+extra/
+.deps/
+
diff --git a/plugins/openaccPTM/ACCParallelTaskManager.h b/plugins/openaccPTM/ACCParallelTaskManager.h
new file mode 100644
index 0000000000..3036e70659
--- /dev/null
+++ b/plugins/openaccPTM/ACCParallelTaskManager.h
@@ -0,0 +1,364 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2017-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#ifndef __PLUMED_acc_ParallelTaskManager_h
+#define __PLUMED_acc_ParallelTaskManager_h
+#include "plumed/core/ActionWithVector.h"
+#include "plumed/core/ActionWithMatrix.h"
+#include "plumed/core/ParallelTaskManager.h"
+#include "plumed/tools/Communicator.h"
+#include "plumed/tools/OpenMP.h"
+#include "plumed/tools/View.h"
+#include "plumed/tools/View2D.h"
+
+#include "plumed/tools/ColvarOutput.h"
+#include "plumed/tools/OpenACC.h"
+
+namespace PLMD {
+
+template
+class AccParallelTaskManager : public ParallelTaskManager {
+ using ParallelTaskManager::action;
+ using ParallelTaskManager::myinput;
+ using ParallelTaskManager::argumentsMap;
+ using ParallelTaskManager::value_stash;
+ using ParallelTaskManager::comm;
+ using ParallelTaskManager::actiondata;
+ using ParallelTaskManager::nderivatives_per_task;
+ using ParallelTaskManager::workspace_size;
+ using ParallelTaskManager::omp_forces;
+ using ParallelTaskManager::input_buffer;
+ using ParallelTaskManager::serial;
+ using ParallelTaskManager::useacc;
+ using ParallelTaskManager::getValueStashSize;
+public:
+ typedef typename ParallelTaskManager::ParallelActionsInput ParallelActionsInput;
+ typedef typename ParallelTaskManager::ParallelActionsOutput ParallelActionsOutput;
+ typedef typename ParallelTaskManager::ForceInput ForceInput;
+ typedef typename ParallelTaskManager::ForceOutput ForceOutput;
+ typedef typename ParallelTaskManager::precision precision;
+ static void registerKeywords( Keywords& keys ) {
+ ParallelTaskManager::registerKeywords(keys);
+ }
+ AccParallelTaskManager(ActionWithVector* av):
+ PLMD::ParallelTaskManager(av) {
+ useacc=true;
+ }
+/// This runs all the tasks
+ void runAllTasks();
+/// Apply the forces on the parallel object
+ void applyForces( std::vector& forcesForApply );
+};
+
+struct ACCPTM {
+ template
+ using PTM=AccParallelTaskManager;
+};
+
+//use the __PLUMED_USE_OPENACC_TASKSMINE macro to debug the ptm ins a single file
+//so that compiling witha a small modification will be faster (the ptm is included nearly everywhere)
+#ifndef __PLUMED_USE_OPENACC_TASKSMINE
+template
+void runAllTasksACC(typename T::input_type actiondata,
+ ParActionsInput myinput,
+ std::vector& value_stash,
+ const std::vector & partialTaskList,
+ const unsigned nactive_tasks,
+ const std::size_t nderivatives_per_task,
+ const std::size_t workspace_size
+ ) {
+ auto myinput_acc = OpenACC::fromToDataHelper(myinput);
+ auto actiondata_acc = OpenACC::fromToDataHelper(actiondata);
+
+ //template type is deduced
+ OpenACC::memoryManager vs{value_stash};
+ auto value_stash_data = vs.devicePtr();
+
+ OpenACC::memoryManager ptl{partialTaskList};
+ auto partialTaskList_data = ptl.devicePtr();
+
+ OpenACC::memoryManager buff{workspace_size*nactive_tasks};
+
+ auto buffer = buff.devicePtr();
+ OpenACC::memoryManager dev(nderivatives_per_task*nactive_tasks);
+ auto derivatives = dev.devicePtr();
+#pragma acc parallel loop present(myinput, actiondata) \
+ copyin(nactive_tasks, \
+ nderivatives_per_task, \
+ workspace_size)\
+ deviceptr(derivatives, \
+ partialTaskList_data, \
+ value_stash_data, \
+ buffer) \
+ default(none)
+ for(unsigned i=0; i::create (myinput.nscalars,
+ value_stash_data+val_pos,
+ nderivatives_per_task,
+ derivatives+nderivatives_per_task*i,
+ workspace_size,
+ (workspace_size>0)?
+ buffer+workspace_size*i
+ :nullptr );
+ // Calculate the stuff in the loop for this action
+ T::performTask( task_index, actiondata, myinput, myout );
+ }
+ vs.copyFromDevice(value_stash.data());
+}
+#else
+template
+void runAllTasksACC(typename T::input_type actiondata,
+ ParActionsInput myinput,
+ std::vector& value_stash,
+ const std::vector & partialTaskList,
+ const unsigned nactive_tasks,
+ const std::size_t nderivatives_per_task,
+ const std::size_t workspace_size
+ ) ;
+#endif //__PLUMED_USE_OPENACC_TASKSMINE
+
+template
+void AccParallelTaskManager::runAllTasks() {
+ // Get the list of active tasks
+ std::vector & partialTaskList( action->getListOfActiveTasks( action ) );
+ unsigned nactive_tasks=partialTaskList.size();
+ // Get all the input data so we can broadcast it to the GPU
+ myinput.noderiv = true;
+ action->getInputData( input_buffer );
+ myinput.dataSize = input_buffer.size();
+ myinput.inputdata = input_buffer.data();
+ // Transfer all the bookeeping information about the arguments
+ argumentsMap.setupArguments( action );
+ myinput.setupArguments( argumentsMap );
+ // Reset the values at the start of the task loop
+ std::size_t totalvals=getValueStashSize();
+ if( value_stash.size()!=totalvals ) {
+ value_stash.resize(totalvals);
+ }
+ std::fill (value_stash.begin(),value_stash.end(), 0.0);
+ if (comm.Get_rank()== 0) {// no multigpu shenanigans until this works
+ runAllTasksACC(
+ actiondata,
+ myinput,
+ value_stash,
+ partialTaskList,
+ nactive_tasks,
+ nderivatives_per_task,
+ workspace_size
+ );
+ }
+ comm.Bcast( value_stash.data(), value_stash.size(), 0);
+
+ // MPI Gather everything
+ if( !serial ) {
+ this->comm.Sum( this->value_stash );
+ }
+
+// And transfer the value to the output values
+ action->transferStashToValues( partialTaskList, value_stash );
+}
+
+//use the __PLUMED_USE_OPENACC_FORCESMINE macro to debug the ptm ins a single file
+//so that compiling witha a small modification will be faster (the ptm is included nearly everywhere)
+#ifndef __PLUMED_USE_OPENACC_FORCESMINE
+template
+void applyForcesWithACC(PLMD::View forcesForApply,
+ typename T::input_type actiondata,
+ ParActionsInput myinput,
+ const std::vector& value_stash,
+ const std::vector & partialTaskList,
+ const unsigned nactive_tasks,
+ const std::size_t nderivatives_per_task,
+ const std::size_t workspace_size
+ ) {
+ auto myinput_acc = OpenACC::fromToDataHelper(myinput);
+ auto actiondata_acc = OpenACC::fromToDataHelper(actiondata);
+
+ //template type is deduced
+ OpenACC::memoryManager vs{value_stash};
+ auto value_stash_data = vs.devicePtr();
+
+ OpenACC::memoryManager ptl{partialTaskList};
+ auto partialTaskList_data = ptl.devicePtr();
+
+ OpenACC::memoryManager ffa {forcesForApply};
+ auto forcesForApply_data = ffa.devicePtr();
+ const auto forcesForApply_size = ffa.size();
+ const auto nind_per_scalar = ForceIndexHolder::indexesPerScalar(myinput);
+ //nscalars is >=ncomponents (see setupParallelTaskManager )
+ const auto nind_per_task = nind_per_scalar*myinput.nscalars;
+
+ OpenACC::memoryManager dev{nderivatives_per_task*nactive_tasks};
+ auto derivatives = dev.devicePtr();
+ OpenACC::memoryManager ind{nind_per_task*nactive_tasks};
+ auto indices = ind.devicePtr();
+ OpenACC::memoryManager vtmp{myinput.sizeOfFakeVals()*nactive_tasks};
+ auto valstmp = vtmp.devicePtr();
+ OpenACC::memoryManager buff{workspace_size*nactive_tasks};
+ auto buffer = buff.devicePtr();
+
+#define forces_indicesArg(taskID,scalarID) ForceIndexHolder::create(myinput, \
+ indices + taskID*nind_per_task + scalarID*nind_per_scalar)
+#define derivativeDrift(taskID,scalarID) taskID*nderivatives_per_task \
+ + scalarID*myinput.ncomponents*myinput.nderivatives_per_scalar
+#define stashDrift(taskID,scalarID) taskID*myinput.nscalars \
+ + scalarID*myinput.ncomponents
+
+#pragma acc data present(myinput,actiondata) \
+ copyin(nactive_tasks, \
+ forcesForApply_size, \
+ nderivatives_per_task, nind_per_task,nind_per_scalar, \
+ workspace_size) \
+ deviceptr(derivatives, \
+ indices, \
+ value_stash_data, \
+ partialTaskList_data, \
+ forcesForApply_data, \
+ valstmp, \
+ buffer) \
+ default(none)
+ {
+#pragma acc parallel loop
+ for(unsigned t=0; t::create( myinput.nscalars,
+ valstmp+myinput.nscalars*t,
+ nderivatives_per_task,
+ derivatives+nderivatives_per_task*t,
+ workspace_size,
+ (workspace_size>0)?buffer+workspace_size*t:nullptr);
+ // Calculate the stuff in the loop for this action
+ T::performTask( task_index, actiondata, myinput, myout );
+ // If this is a matrix this returns a number that isn't one as we have to loop over the columns
+ const std::size_t nvpt = T::getNumberOfValuesPerTask( task_index, actiondata );
+#pragma acc loop seq
+ for(unsigned vID=0; vID::create ( myinput.nscalars,
+ value_stash_data + stashDrift(task_index,vID),
+ myinput.nderivatives_per_scalar,
+ derivatives + derivativeDrift(t,vID));
+
+ // Gather forces that can be gathered locally
+ ParallelTaskManager::gatherThreadSafeForces( myinput,
+ force_indices,
+ finput,
+ View(forcesForApply_data,
+ forcesForApply_size));
+ }
+ }
+
+#pragma acc parallel loop
+ for(unsigned v=myinput.threadunsafe_forces_start; v::create( myinput.nscalars,
+ value_stash_data + stashDrift(task_index,vID),
+ myinput.nderivatives_per_scalar,
+ derivatives + derivativeDrift(t,vID));
+ for(unsigned i=0; i
+void applyForcesWithACC(PLMD::View forcesForApply,
+ typename T::input_type actiondata,
+ ParActionsInput myinput,
+ const std::vector& value_stash,
+ const std::vector & partialTaskList,
+ const unsigned nactive_tasks,
+ const std::size_t nderivatives_per_task,
+ const std::size_t workspace_size
+ );
+#endif //__PLUMED_USE_OPENACC_FORCESMINE
+
+template
+void AccParallelTaskManager::applyForces( std::vector& forcesForApply ) {
+ // Get the list of active tasks
+ std::vector & partialTaskList= action->getListOfActiveTasks( action );
+ unsigned nactive_tasks=partialTaskList.size();
+ forceData forces(forcesForApply);
+ // Clear force buffer
+ std::fill (forces.ffa.begin(),forces.ffa.end(), precision(0.0));
+ // Get all the input data so we can broadcast it to the GPU
+ myinput.noderiv = false;
+ // Retrieve the forces from the values
+ action->transferForcesToStash( partialTaskList, value_stash );
+
+ std::fill (omp_forces[0].begin(),omp_forces[0].end(), 0.0);
+ if (comm.Get_rank() == 0) {
+ applyForcesWithACC(
+ PLMD::View { forces.ffa.data(), forces.ffa.size() },
+ actiondata,
+ myinput,
+ value_stash,
+ partialTaskList,
+ nactive_tasks,
+ nderivatives_per_task,
+ workspace_size
+ );
+ }
+ forces.update();
+ // MPI Gather everything (this must be extended to the gpu thing, after makning it mpi-aware)
+ if( !serial ) {
+ this->comm.Sum( forcesForApply );
+ }
+}
+
+} // namespace PLMD
+#endif // __PLUMED_acc_ParallelTaskManager_h
+
+
diff --git a/plugins/openaccPTM/Angle.cpp b/plugins/openaccPTM/Angle.cpp
new file mode 100644
index 0000000000..9fcb021a24
--- /dev/null
+++ b/plugins/openaccPTM/Angle.cpp
@@ -0,0 +1,30 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/core/ActionRegister.h"
+#include "plumed/colvar/MultiColvarTemplate.h"
+#include "plumed/colvar/Angle.h"
+
+#include "ACCParallelTaskManager.h"
+
+typedef PLMD::colvar::MultiColvarTemplate,PLMD::ACCPTM> AngleMultiAcc;
+
+PLUMED_REGISTER_ACTION(AngleMultiAcc,"ANGLE_VECTORACC")
diff --git a/plugins/openaccPTM/Between.cpp b/plugins/openaccPTM/Between.cpp
new file mode 100644
index 0000000000..2e6b2cb58f
--- /dev/null
+++ b/plugins/openaccPTM/Between.cpp
@@ -0,0 +1,37 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2017 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/function/Between.h"
+#include "plumed/function/FunctionOfVector.h"
+#include "plumed/function/FunctionOfMatrix.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+
+namespace PLMD {
+namespace function {
+
+typedef FunctionOfVector VectorBetween;
+PLUMED_REGISTER_ACTION(VectorBetween,"BETWEEN_VECTORACC")
+typedef FunctionOfMatrix MatrixBetween;
+PLUMED_REGISTER_ACTION(MatrixBetween,"BETWEEN_MATRIXACC")
+}
+}
diff --git a/plugins/openaccPTM/Combine.cpp b/plugins/openaccPTM/Combine.cpp
new file mode 100644
index 0000000000..dc9a411cb6
--- /dev/null
+++ b/plugins/openaccPTM/Combine.cpp
@@ -0,0 +1,38 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/function/Combine.h"
+#include "plumed/function/FunctionOfVector.h"
+#include "plumed/function/FunctionOfMatrix.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+
+namespace PLMD {
+namespace function {
+
+typedef FunctionOfVector VectorCombine;
+PLUMED_REGISTER_ACTION(VectorCombine,"COMBINE_VECTORACC")
+typedef FunctionOfMatrix MatrixCombine;
+PLUMED_REGISTER_ACTION(MatrixCombine,"COMBINE_MATRIXACC")
+
+} // namespace function
+} // namespace PLMD
diff --git a/plugins/openaccPTM/ContactMatrix.cpp b/plugins/openaccPTM/ContactMatrix.cpp
new file mode 100644
index 0000000000..858a48b7e5
--- /dev/null
+++ b/plugins/openaccPTM/ContactMatrix.cpp
@@ -0,0 +1,34 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2015-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/adjmat/ContactMatrix.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+
+namespace PLMD {
+namespace adjmat {
+
+typedef AdjacencyMatrixBase cmap;
+PLUMED_REGISTER_ACTION(cmap,"CONTACT_MATRIX_PROPERACC")
+
+} // namespace adjmat
+} // namespace PLMD
diff --git a/plugins/openaccPTM/DihedralCorrelation.cpp b/plugins/openaccPTM/DihedralCorrelation.cpp
new file mode 100644
index 0000000000..045bf770c9
--- /dev/null
+++ b/plugins/openaccPTM/DihedralCorrelation.cpp
@@ -0,0 +1,30 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/core/ActionRegister.h"
+#include "plumed/colvar/MultiColvarTemplate.h"
+#include "plumed/colvar/DihedralCorrelation.h"
+
+#include "ACCParallelTaskManager.h"
+
+typedef PLMD::colvar::MultiColvarTemplate,PLMD::ACCPTM> DihedralCorrelationMultiAcc;
+
+PLUMED_REGISTER_ACTION(DihedralCorrelationMultiAcc,"DIHEDRALCORRELATION_VECTORACC")
diff --git a/plugins/openaccPTM/Dipole.cpp b/plugins/openaccPTM/Dipole.cpp
new file mode 100644
index 0000000000..4bfa9650fb
--- /dev/null
+++ b/plugins/openaccPTM/Dipole.cpp
@@ -0,0 +1,30 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/core/ActionRegister.h"
+#include "plumed/colvar/MultiColvarTemplate.h"
+#include "plumed/colvar/Dipole.h"
+
+#include "ACCParallelTaskManager.h"
+
+typedef PLMD::colvar::MultiColvarTemplate,PLMD::ACCPTM> DipoleMultiAcc;
+
+PLUMED_REGISTER_ACTION(DipoleMultiAcc,"DIPOLE_VECTORACC")
diff --git a/plugins/openaccPTM/Distance.cpp b/plugins/openaccPTM/Distance.cpp
new file mode 100644
index 0000000000..0b21d85ac2
--- /dev/null
+++ b/plugins/openaccPTM/Distance.cpp
@@ -0,0 +1,30 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/core/ActionRegister.h"
+#include "plumed/colvar/MultiColvarTemplate.h"
+#include "plumed/colvar/Distance.h"
+
+#include "ACCParallelTaskManager.h"
+
+typedef PLMD::colvar::MultiColvarTemplate,PLMD::ACCPTM> DistanceMultiAcc;
+
+PLUMED_REGISTER_ACTION(DistanceMultiAcc,"DISTANCE_VECTORACC")
diff --git a/plugins/openaccPTM/Fccubic.cpp b/plugins/openaccPTM/Fccubic.cpp
new file mode 100644
index 0000000000..2de1a582e4
--- /dev/null
+++ b/plugins/openaccPTM/Fccubic.cpp
@@ -0,0 +1,34 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2014-2020 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/symfunc/Fccubic.h"
+#include "plumed/function/FunctionOfMatrix.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+namespace PLMD {
+namespace symfunc {
+
+typedef function::FunctionOfMatrix,PLMD::ACCPTM> MatrixFccubic;
+PLUMED_REGISTER_ACTION(MatrixFccubic,"FCCUBIC_FUNC_MATRIXACC")
+
+}
+}
diff --git a/plugins/openaccPTM/LessThan.cpp b/plugins/openaccPTM/LessThan.cpp
new file mode 100644
index 0000000000..aea09c395b
--- /dev/null
+++ b/plugins/openaccPTM/LessThan.cpp
@@ -0,0 +1,38 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2017 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/function/LessThan.h"
+#include "plumed/function/FunctionOfVector.h"
+#include "plumed/function/FunctionOfMatrix.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+
+namespace PLMD {
+namespace function {
+
+typedef FunctionOfVector VectorLessThan;
+PLUMED_REGISTER_ACTION(VectorLessThan,"LESS_THAN_VECTORACC")
+typedef FunctionOfMatrix MatrixLessThan;
+PLUMED_REGISTER_ACTION(MatrixLessThan,"LESS_THAN_MATRIXACC")
+
+}
+}
diff --git a/plugins/openaccPTM/Makefile b/plugins/openaccPTM/Makefile
new file mode 100644
index 0000000000..6f5b7413fd
--- /dev/null
+++ b/plugins/openaccPTM/Makefile
@@ -0,0 +1,62 @@
+include ./Makefile.conf
+
+#Dependency tracking based on https://make.mad-scientist.net/papers/advanced-auto-dependency-generation/#tldr
+#this assumes gcc
+DEPDIR := .deps
+DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
+#tested with nvcc with :"Build cuda_11.7.r11.7/compiler.31442593_0"
+#-dc adds relocatable device code
+#-dlto Perform link-time optimization of device code.
+CVS_OBJS = $(wildcard *.cpp)
+TOOLS_OBJS = extra/colvar/ColvarInput.o extra/tools/Pbc.o extra/tools/SwitchingFunction.o extra/tools/HistogramBead.o
+
+OBJS = $(CVS_OBJS:.cpp=.o) $(TOOLS_OBJS)
+ADDCPPFLAGS=$(PLUMED_INCLUDE) -D__PLUMED_HAS_OPENACC=1 -acc -acc="gpu"
+ADDCLDFLAGS=-acc -static-nvidia
+
+ifeq ($(SOEXT),dylib)
+ SONAME_OPTION:=-Xlinker -install_name
+else
+ SONAME_OPTION:=-Xlinker -soname
+endif
+
+PLUGIN=plumedOpenACC.$(SOEXT)
+
+NVCXX ?= nvc++
+NVLDSHARED = $(LDSHARED:$(CXX)=$(NVCXX))
+all: $(PLUGIN)
+
+%.o: %.cpp $(DEPDIR)/%.d | $(DEPDIR)
+ @echo Compiling object $@
+ $(NVCXX) -c $(DEPFLAGS) $(CPPFLAGS) $(ADDCPPFLAGS) $(CXXFLAGS) $< -o $@
+
+extra/colvar/%.o: plumed/colvar/%.cpp $(DEPDIR)/extra/colvar/%.d | $(DEPDIR)/extra/colvar extra/colvar
+ @echo Compiling object $@
+ $(NVCXX) -c $(DEPFLAGS) $(CPPFLAGS) $(ADDCPPFLAGS) $(CXXFLAGS) $< -o $@
+
+extra/tools/%.o: plumed/tools/%.cpp $(DEPDIR)/extra/tools/%.d | $(DEPDIR)/extra/tools extra/tools
+ @echo Compiling object $@
+ $(NVCXX) -c $(DEPFLAGS) $(CPPFLAGS) $(ADDCPPFLAGS) $(CXXFLAGS) $< -o $@
+
+
+$(DEPDIR): ; @mkdir -p $@
+$(DEPDIR)/extra/colvar: ; @mkdir -p $@
+$(DEPDIR)/extra/tools: ; @mkdir -p $@
+extra/colvar: ; mkdir -p $@
+extra/tools: ; mkdir -p $@
+
+DEPFILES := $(OBJS:%.o=$(DEPDIR)/%.d)
+$(DEPFILES):
+include $(wildcard $(DEPFILES))
+
+$(PLUGIN): $(OBJS)
+ @echo Linking $@
+ $(NVLDSHARED) $(ADDCLDFLAGS) $(SONAME_OPTION),"$(notdir $@)" $(DYNAMIC_LIBS) $(PLUMED_KERNEL) -o $@ $^
+
+clean:
+ @rm -fv $(OBJS) $(PLUGIN)
+ @rm -rf .deps
+
+check: all
+ $(MAKE) -C regtest
+ $(MAKE) -C regtest checkfail
diff --git a/plugins/openaccPTM/MatrixTimesMatrix.cpp b/plugins/openaccPTM/MatrixTimesMatrix.cpp
new file mode 100644
index 0000000000..c646cdbcd9
--- /dev/null
+++ b/plugins/openaccPTM/MatrixTimesMatrix.cpp
@@ -0,0 +1,37 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/matrixtools/MatrixDissimilarities.h"
+#include "plumed/matrixtools/MatrixProduct.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+
+namespace PLMD {
+namespace matrixtools {
+
+typedef MatrixTimesMatrix mtimes;
+PLUMED_REGISTER_ACTION(mtimes,"MATRIX_PRODUCT_ACC")
+typedef MatrixTimesMatrix dissims;
+PLUMED_REGISTER_ACTION(dissims,"DISSIMILARITIES_ACC")
+
+}
+}
diff --git a/plugins/openaccPTM/MatrixTimesVectorBase.cpp b/plugins/openaccPTM/MatrixTimesVectorBase.cpp
new file mode 100644
index 0000000000..935915387c
--- /dev/null
+++ b/plugins/openaccPTM/MatrixTimesVectorBase.cpp
@@ -0,0 +1,35 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/matrixtools/MatrixTimesVectorBase.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+namespace PLMD {
+namespace matrixtools {
+typedef MatrixTimesVectorBase,PLMD::ACCPTM> mycr;
+PLUMED_REGISTER_ACTION(mycr,"MATRIX_VECTOR_PRODUCT_ROWSUMSACC")
+typedef MatrixTimesVectorBase,PLMD::ACCPTM> mycp;
+PLUMED_REGISTER_ACTION(mycp,"MATRIX_VECTOR_PRODUCT_PROPERACC")
+
+
+}
+}
diff --git a/plugins/openaccPTM/MoreThan.cpp b/plugins/openaccPTM/MoreThan.cpp
new file mode 100644
index 0000000000..42abb9dec2
--- /dev/null
+++ b/plugins/openaccPTM/MoreThan.cpp
@@ -0,0 +1,39 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2017 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/function/MoreThan.h"
+#include "plumed/function/FunctionOfVector.h"
+#include "plumed/function/FunctionOfMatrix.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+
+namespace PLMD {
+namespace function {
+
+
+typedef FunctionOfVector VectorMoreThan;
+PLUMED_REGISTER_ACTION(VectorMoreThan,"MORE_THAN_VECTORACC")
+typedef FunctionOfMatrix MatrixMoreThan;
+PLUMED_REGISTER_ACTION(MatrixMoreThan,"MORE_THAN_MATRIXACC")
+
+}
+}
diff --git a/plugins/openaccPTM/Plane.cpp b/plugins/openaccPTM/Plane.cpp
new file mode 100644
index 0000000000..d9bf70b781
--- /dev/null
+++ b/plugins/openaccPTM/Plane.cpp
@@ -0,0 +1,30 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/core/ActionRegister.h"
+#include "plumed/colvar/MultiColvarTemplate.h"
+#include "plumed/colvar/Plane.h"
+
+#include "ACCParallelTaskManager.h"
+
+typedef PLMD::colvar::MultiColvarTemplate,PLMD::ACCPTM> PlaneMultiAcc;
+
+PLUMED_REGISTER_ACTION(PlaneMultiAcc,"PLANE_VECTORACC")
diff --git a/plugins/openaccPTM/Position.cpp b/plugins/openaccPTM/Position.cpp
new file mode 100644
index 0000000000..f14f8ed5a4
--- /dev/null
+++ b/plugins/openaccPTM/Position.cpp
@@ -0,0 +1,30 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/core/ActionRegister.h"
+#include "plumed/colvar/MultiColvarTemplate.h"
+#include "plumed/colvar/Position.h"
+
+#include "ACCParallelTaskManager.h"
+
+typedef PLMD::colvar::MultiColvarTemplate,PLMD::ACCPTM> PositionMultiAcc;
+
+PLUMED_REGISTER_ACTION(PositionMultiAcc,"POSITION_VECTORACC")
diff --git a/plugins/openaccPTM/SecondaryStructureDRMSD.cpp b/plugins/openaccPTM/SecondaryStructureDRMSD.cpp
new file mode 100644
index 0000000000..32a0de05d1
--- /dev/null
+++ b/plugins/openaccPTM/SecondaryStructureDRMSD.cpp
@@ -0,0 +1,33 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2017-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/secondarystructure/SecondaryStructureDRMSD.h"
+#include "plumed/core/ActionRegister.h"
+#include "ACCParallelTaskManager.h"
+
+namespace PLMD {
+namespace secondarystructure {
+
+typedef SecondaryStructureBase,PLMD::ACCPTM> colv;
+PLUMED_REGISTER_ACTION(colv,"SECONDARY_STRUCTURE_DRMSD_ACC");
+
+}
+}
diff --git a/plugins/openaccPTM/SphericalHarmonic.cpp b/plugins/openaccPTM/SphericalHarmonic.cpp
new file mode 100644
index 0000000000..a5c9a5d15f
--- /dev/null
+++ b/plugins/openaccPTM/SphericalHarmonic.cpp
@@ -0,0 +1,36 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2012-2017 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/symfunc/SphericalHarmonic.h"
+#include "plumed/function/FunctionOfMatrix.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+
+namespace PLMD {
+namespace symfunc {
+
+typedef function::FunctionOfMatrix MatrixSpHarm;
+PLUMED_REGISTER_ACTION(MatrixSpHarm,"SPHERICAL_HARMONIC_MATRIXACC")
+
+}
+}
+
diff --git a/plugins/openaccPTM/Torsion.cpp b/plugins/openaccPTM/Torsion.cpp
new file mode 100644
index 0000000000..c49f0c9cbd
--- /dev/null
+++ b/plugins/openaccPTM/Torsion.cpp
@@ -0,0 +1,30 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2011-2023 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/core/ActionRegister.h"
+#include "plumed/colvar/MultiColvarTemplate.h"
+#include "plumed/colvar/Torsion.h"
+
+#include "ACCParallelTaskManager.h"
+
+typedef PLMD::colvar::MultiColvarTemplate,PLMD::ACCPTM> TorsionMultiAcc;
+
+PLUMED_REGISTER_ACTION(TorsionMultiAcc,"TORSION_VECTORACC")
diff --git a/plugins/openaccPTM/VolumeAround.cpp b/plugins/openaccPTM/VolumeAround.cpp
new file mode 100644
index 0000000000..f59c4cad01
--- /dev/null
+++ b/plugins/openaccPTM/VolumeAround.cpp
@@ -0,0 +1,31 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2013-2020 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/volumes/VolumeAround.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+namespace PLMD {
+namespace volumes {
+typedef ActionVolume Vola;
+PLUMED_REGISTER_ACTION(Vola,"AROUND_ACC")
+}
+}
diff --git a/plugins/openaccPTM/VolumeInCylinder.cpp b/plugins/openaccPTM/VolumeInCylinder.cpp
new file mode 100644
index 0000000000..c3d0bf46ed
--- /dev/null
+++ b/plugins/openaccPTM/VolumeInCylinder.cpp
@@ -0,0 +1,36 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2015-2020 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/volumes/VolumeInCylinder.h"
+#include "plumed/volumes/ActionVolume.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+
+namespace PLMD {
+namespace volumes {
+
+
+typedef ActionVolume Volc;
+PLUMED_REGISTER_ACTION(Volc,"INCYLINDER_ACC")
+
+}
+}
diff --git a/plugins/openaccPTM/VolumeInSphere.cpp b/plugins/openaccPTM/VolumeInSphere.cpp
new file mode 100644
index 0000000000..d700a910f1
--- /dev/null
+++ b/plugins/openaccPTM/VolumeInSphere.cpp
@@ -0,0 +1,33 @@
+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Copyright (c) 2015-2020 The plumed team
+ (see the PEOPLE file at the root of the distribution for a list of names)
+
+ See http://www.plumed.org for more information.
+
+ This file is part of plumed, version 2.
+
+ plumed is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ plumed is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with plumed. If not, see .
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
+#include "plumed/volumes/VolumeInSphere.h"
+#include "plumed/volumes/VolumeShortcut.h"
+#include "plumed/core/ActionRegister.h"
+
+#include "ACCParallelTaskManager.h"
+namespace PLMD {
+namespace volumes {
+
+typedef ActionVolume Vols;
+PLUMED_REGISTER_ACTION(Vols,"INSPHERE_ACC")
+} // namespace PLMD
+} // namespace volumes
diff --git a/plugins/openaccPTM/configure.sh b/plugins/openaccPTM/configure.sh
new file mode 100755
index 0000000000..09ebb2b162
--- /dev/null
+++ b/plugins/openaccPTM/configure.sh
@@ -0,0 +1,32 @@
+#! /usr/bin/env bash
+
+if [[ -z $PLUMED_KERNEL ]]; then
+ echo "$(basename $0) can work only if \"PLUMED_KERNEL\" is defined"
+ echo "either via module load or sourceme.sh"
+fi
+
+{
+ plumed config makefile_conf
+ echo "PLUMED_INCLUDE=-I$(plumed info --include-dir)"
+ echo "PLUMED_KERNEL=-L${PLUMED_KERNEL}"
+} >Make.tmp
+
+#pendantic adds a unuseful FOR EACH line with
+#"" warning: style of line directive is a GCC extension"
+{
+ # grep CXXFLAGS Make.tmp \
+ # | sed -e 's/-f/-Xcompiler -f/g' \
+ # -e 's/-pedantic//g' \
+ # -e 's/-W/-Xcompiler -W/g'
+ # grep -eDYNAMIC_LIBS -eLDFLAGS Make.tmp \
+ # | sed -e 's/-rdynamic/-Xcompiler -rdynamic/g' \
+ # -e 's/-Wl,/-Xlinker /g' \
+ # -e 's/-f/-Xcompiler -f/g'
+ # #prints the rest of the file
+ # grep -eDYNAMIC_LIBS -eLDFLAGS -eCXXFLAGS Make.tmp -v
+ sed -e 's/-fno-gnu-unique//g' -e 's/-Wno-unknown-pragmas//g' \
+ -e 's/ -Wno-unknown-pragmas//g' \
+ Make.tmp
+} >Makefile.conf
+
+rm Make.tmp
diff --git a/plugins/openaccPTM/module.type b/plugins/openaccPTM/module.type
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/plugins/openaccPTM/plumed b/plugins/openaccPTM/plumed
new file mode 120000
index 0000000000..929cb3dc9b
--- /dev/null
+++ b/plugins/openaccPTM/plumed
@@ -0,0 +1 @@
+../../src
\ No newline at end of file
diff --git a/plugins/openaccPTM/regtest/.gitignore b/plugins/openaccPTM/regtest/.gitignore
new file mode 100644
index 0000000000..1774e730ac
--- /dev/null
+++ b/plugins/openaccPTM/regtest/.gitignore
@@ -0,0 +1,2 @@
+tmp
+report.txt
diff --git a/plugins/openaccPTM/regtest/Makefile b/plugins/openaccPTM/regtest/Makefile
new file mode 120000
index 0000000000..c99f3d3431
--- /dev/null
+++ b/plugins/openaccPTM/regtest/Makefile
@@ -0,0 +1 @@
+../../../regtest/Makefile
\ No newline at end of file
diff --git a/plugins/openaccPTM/regtest/scripts b/plugins/openaccPTM/regtest/scripts
new file mode 120000
index 0000000000..efaa4c5613
--- /dev/null
+++ b/plugins/openaccPTM/regtest/scripts
@@ -0,0 +1 @@
+../../../regtest/scripts
\ No newline at end of file
diff --git a/plugins/openaccPTM/regtest/targetGPU/Makefile b/plugins/openaccPTM/regtest/targetGPU/Makefile
new file mode 100644
index 0000000000..42480767ae
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/Makefile
@@ -0,0 +1,2 @@
+include ../scripts/module.make
+
diff --git a/regtest/targetGPU/rt-GPU-DISTANCE/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-GPU-DISTANCE/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/Makefile
diff --git a/regtest/targetGPU/rt-GPU-DISTANCE/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-DISTANCE/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/colvar.reference
diff --git a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/config b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/config
similarity index 73%
rename from regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/config
index 63c2256362..be65c62ebc 100644
--- a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/config
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/config
@@ -1,8 +1,7 @@
type=driver
-plumed_modules=adjmat
-plumed_needs=openacc
+#plumed_modules=adjmat
# this is to test a different name
arg="--plumed plumed.dat --ixyz isomers.xyz --dump-forces forces --dump-forces-fmt=%8.4f" # --debug-forces forces.num"
extra_files="../../trajectories/isomers.xyz"
-#export NVCOMPILER_ACC_NOTIFY=31
\ No newline at end of file
+#export NVCOMPILER_ACC_NOTIFY=31
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/diff.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/diff.reference
new file mode 100644
index 0000000000..7710dbd875
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/diff.reference
@@ -0,0 +1,18 @@
+#! FIELDS time diff_x.1 diff_x.2 diff_x.3 diff_x.4 diff_y.1 diff_y.2 diff_y.3 diff_y.4 diff_z.1 diff_z.2 diff_z.3 diff_z.4
+ 0.000000 -0.0000 -0.0000 -0.0000 0.0000 -0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000
+ 1.000000 -0.0000 0.0000 -0.0000 -0.0000 0.0000 -0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000
+ 2.000000 -0.0000 -0.0000 0.0000 -0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 -0.0000 0.0000 0.0000
+ 3.000000 -0.0000 0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 -0.0000
+ 4.000000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 0.0000 -0.0000 0.0000 0.0000 0.0000
+ 5.000000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 0.0000 -0.0000 -0.0000 0.0000 0.0000
+ 6.000000 0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 0.0000 -0.0000 -0.0000
+ 7.000000 0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 0.0000 -0.0000 -0.0000
+ 8.000000 -0.0000 -0.0000 0.0000 0.0000 0.0000 -0.0000 0.0000 0.0000 -0.0000 -0.0000 0.0000 0.0000
+ 9.000000 0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000 0.0000 0.0000
+ 10.000000 -0.0000 -0.0000 -0.0000 0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 -0.0000 -0.0000
+ 11.000000 -0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000
+ 12.000000 0.0000 0.0000 -0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 0.0000
+ 13.000000 -0.0000 -0.0000 -0.0000 0.0000 -0.0000 -0.0000 -0.0000 -0.0000 0.0000 0.0000 -0.0000 0.0000
+ 14.000000 0.0000 0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 0.0000 0.0000 -0.0000 0.0000 -0.0000
+ 15.000000 -0.0000 0.0000 -0.0000 -0.0000 -0.0000 0.0000 -0.0000 -0.0000 0.0000 -0.0000 -0.0000 -0.0000
+ 16.000000 0.0000 0.0000 0.0000 -0.0000 -0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000 -0.0000 0.0000
diff --git a/regtest/targetGPU/rt-GPU-DISTANCE/dists.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/dists.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-DISTANCE/dists.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/dists.reference
diff --git a/regtest/targetGPU/rt-GPU-DISTANCE/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-DISTANCE/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/forces.reference
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/plumed.dat
new file mode 100644
index 0000000000..3e97668424
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-DISTANCE/plumed.dat
@@ -0,0 +1,15 @@
+LOAD FILE=../../../../plumedOpenACC.so
+#original test was 3 task of 3 components, this is 4 task of 3 componets, so I can manage better where the 3 comes from
+
+d1cpu: DISTANCE COMPONENTS ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 ATOMS4=1,6
+d1: DISTANCE USEGPU COMPONENTS ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 ATOMS4=1,6
+v: VSTACK ARG=d1.x,d1.y,d1.z
+vT: TRANSPOSE ARG=v
+s: SUM ARG=vT PERIODIC=NO
+diff_x: CUSTOM ARG=d1.x,d1cpu.x FUNC=y-x PERIODIC=NO
+diff_y: CUSTOM ARG=d1.y,d1cpu.y FUNC=y-x PERIODIC=NO
+diff_z: CUSTOM ARG=d1.z,d1cpu.z FUNC=y-x PERIODIC=NO
+PRINT ARG=diff_x,diff_y,diff_z FILE=diff FMT=%8.4f
+PRINT ARG=d1.* FILE=dists FMT=%8.4f
+PRINT ARG=s FILE=colvar FMT=%8.4f
+BIASVALUE ARG=s
diff --git a/regtest/targetGPU/rt-GPU-PLANE-bias/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-GPU-PLANE-bias/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/Makefile
diff --git a/regtest/targetGPU/rt-GPU-PLANE-bias/config b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/config
similarity index 80%
rename from regtest/targetGPU/rt-GPU-PLANE-bias/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/config
index 6fdf46b014..f97288130a 100644
--- a/regtest/targetGPU/rt-GPU-PLANE-bias/config
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/config
@@ -1,7 +1,6 @@
type=driver
# this is to test a different name
-plumed_needs=openacc
arg="--plumed plumed.dat --ixyz isomers.xyz --dump-forces forces --dump-forces-fmt=%8.4f" # --debug-forces forces.num"
extra_files="../../trajectories/isomers.xyz"
-#export NVCOMPILER_ACC_NOTIFY=31
\ No newline at end of file
+#export NVCOMPILER_ACC_NOTIFY=31
diff --git a/regtest/targetGPU/rt-GPU-PLANE-bias/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-PLANE-bias/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/forces.reference
diff --git a/regtest/targetGPU/rt-GPU-PLANE-bias/planes.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/planes.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-PLANE-bias/planes.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/planes.reference
diff --git a/regtest/targetGPU/rt-GPU-PLANE-bias/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/plumed.dat
similarity index 77%
rename from regtest/targetGPU/rt-GPU-PLANE-bias/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/plumed.dat
index 4aed89d401..ca707aa1fd 100644
--- a/regtest/targetGPU/rt-GPU-PLANE-bias/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-PLANE-bias/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
plns: PLANE ATOMS1=1,2,3 ATOMS2=2,3,4 ATOMS3=3,4,5 ATOMS4=4,5,6 USEGPU
PRINT ARG=plns.* FILE=planes FMT=%8.4f
diff --git a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/Makefile
diff --git a/regtest/targetGPU/rt-GPU-DISTANCE/config b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/config
similarity index 73%
rename from regtest/targetGPU/rt-GPU-DISTANCE/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/config
index 63c2256362..f97288130a 100644
--- a/regtest/targetGPU/rt-GPU-DISTANCE/config
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/config
@@ -1,8 +1,6 @@
type=driver
-plumed_modules=adjmat
-plumed_needs=openacc
# this is to test a different name
arg="--plumed plumed.dat --ixyz isomers.xyz --dump-forces forces --dump-forces-fmt=%8.4f" # --debug-forces forces.num"
extra_files="../../trajectories/isomers.xyz"
-#export NVCOMPILER_ACC_NOTIFY=31
\ No newline at end of file
+#export NVCOMPILER_ACC_NOTIFY=31
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/diff.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/diff.reference
new file mode 100644
index 0000000000..cbf54ebe76
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/diff.reference
@@ -0,0 +1,20 @@
+#! FIELDS time diff.1 diff.2 diff.3 diff.4
+#! SET min_diff -pi
+#! SET max_diff pi
+ 0.000000 -0.0000 0.0000 0.0000 -0.0000
+ 1.000000 -0.0000 0.0000 0.0000 0.0000
+ 2.000000 0.0000 -0.0000 -0.0000 -0.0000
+ 3.000000 -0.0000 -0.0000 0.0000 -0.0000
+ 4.000000 0.0000 0.0000 -0.0000 0.0000
+ 5.000000 -0.0000 0.0000 0.0000 -0.0000
+ 6.000000 0.0000 -0.0000 -0.0000 -0.0000
+ 7.000000 -0.0000 0.0000 0.0000 -0.0000
+ 8.000000 -0.0000 0.0000 0.0000 -0.0000
+ 9.000000 -0.0000 -0.0000 0.0000 0.0000
+ 10.000000 -0.0000 0.0000 0.0000 0.0000
+ 11.000000 0.0000 0.0000 -0.0000 0.0000
+ 12.000000 -0.0000 -0.0000 0.0000 0.0000
+ 13.000000 0.0000 -0.0000 0.0000 0.0000
+ 14.000000 -0.0000 -0.0000 0.0000 0.0000
+ 15.000000 -0.0000 -0.0000 0.0000 0.0000
+ 16.000000 0.0000 0.0000 -0.0000 -0.0000
diff --git a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/forces.reference
similarity index 54%
rename from regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/forces.reference
index 19f5db1db7..eab1e53f5c 100644
--- a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/forces.reference
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/forces.reference
@@ -1,11 +1,11 @@
14
- -0.0290 0.1212 -0.0923
-X 0.1006 1.5995 -0.1145
-X -0.1319 -1.2124 0.1541
-X 0.0524 0.8326 -0.0311
-X -0.0169 -0.8257 -0.0295
-X 0.0128 1.2690 -0.0084
-X -0.0171 -1.6630 0.0293
+ -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -15,13 +15,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- 0.0785 -0.0331 -0.0454
-X 0.2158 1.3049 -0.9419
-X -0.1537 -0.9743 0.6638
-X 0.1086 0.6284 -0.4659
-X -0.1125 -0.6577 0.5264
-X 0.2144 0.9642 -0.7501
-X -0.2725 -1.2656 0.9678
+ -0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -31,13 +31,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- -0.3511 0.2909 0.0603
-X 0.4188 1.4836 -0.6721
-X -0.2839 -0.9001 0.3353
-X -0.0423 0.6835 -0.3062
-X -0.0994 -0.9064 0.6462
-X 0.1886 1.0002 -1.1852
-X -0.1816 -1.3608 1.1820
+ 0.0000 0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 0.0000 -0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -47,13 +47,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- 0.3706 -1.0189 0.6483
-X 0.2307 1.4725 -0.5202
-X -0.2011 -1.3333 0.5600
-X 0.2789 0.6681 -0.1430
-X -0.3780 -0.7172 0.0903
-X 0.8866 1.1315 0.1918
-X -0.8171 -1.2217 -0.1789
+ 0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -63,13 +63,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- 0.4326 -1.0978 0.6652
-X 0.1811 1.5460 -0.6850
-X -0.1781 -1.6765 0.8279
-X 0.3207 0.9242 -0.3230
-X -0.3594 -0.6699 0.1941
-X 0.8989 1.0411 0.1193
-X -0.8632 -1.1649 -0.1333
+ -0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -79,13 +79,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- -0.0008 0.0008 0.0000
-X -0.5075 1.6222 0.0002
-X 0.2428 -0.7767 -0.0001
-X 0.4892 -1.5668 -0.0002
-X -0.0019 0.0084 0.0000
-X -0.6202 1.9870 0.0003
-X 0.3977 -1.2740 -0.0002
+ 0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -95,13 +95,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- -0.1510 0.3674 -0.2163
-X -1.0194 1.3928 0.9151
-X 0.5310 -0.7944 -0.4920
-X -0.4694 0.4567 0.4297
-X 0.6484 -0.5638 -0.9757
-X 1.0320 -0.8043 -0.7424
-X -0.7225 0.3129 0.8653
+ -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -111,13 +111,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- -0.5645 -0.0111 0.5755
-X -0.5835 0.6844 0.9123
-X 0.8234 -0.9086 -0.4350
-X 0.2753 0.3739 0.9490
-X -0.4685 0.2937 -0.9094
-X -0.1809 -1.2291 -0.0613
-X 0.1341 0.7857 -0.4557
+ 0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -127,13 +127,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- 0.6866 0.2955 -0.9821
-X -1.1139 0.2655 1.2948
-X 0.6793 -0.1844 -0.0713
-X -0.4537 0.1030 0.5161
-X 0.3366 -0.0925 -0.4063
-X 0.5421 0.0650 -0.3531
-X 0.0096 -0.1567 -0.9800
+ -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -143,13 +143,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- 0.5502 0.4314 -0.9816
-X -0.4701 -0.2929 1.6608
-X 0.3111 0.1111 -0.6959
-X -0.1757 -0.1174 0.6634
-X 0.1374 -0.0873 -0.9179
-X 0.2751 0.4587 0.1799
-X -0.0777 -0.0722 -0.8903
+ 0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -159,13 +159,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- -0.0001 0.0000 0.0001
-X -0.6213 1.5536 0.6698
-X 0.2343 -0.5859 -0.2526
-X -0.2409 0.6023 0.2596
-X 0.4195 -1.0491 -0.4521
-X -0.1414 0.3538 0.1524
-X 0.3497 -0.8747 -0.3770
+ -0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -176,12 +176,12 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
0.0000 0.0000 0.0000
-X 0.0000 -3.1362 0.0000
-X 0.0000 1.4635 0.0000
-X 0.0000 1.0361 0.0000
-X 0.0000 31.2032 0.0000
-X 0.0000 -62.8267 0.0000
-X 0.0000 32.2602 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 -0.0001 0.0000
+X 0.0000 0.0001 0.0000
+X 0.0000 -0.0001 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -191,13 +191,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- 0.0097 0.0756 -0.0853
-X 0.4533 -0.3424 1.8456
-X 0.6530 -0.7103 2.1238
-X 0.1838 -0.1365 0.7451
-X -0.1007 0.0742 -0.4144
-X -0.5683 0.5126 -2.1123
-X -0.6212 0.6024 -2.1879
+ 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -207,13 +207,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- -0.0009 -0.0002 0.0012
-X -0.0009 0.0092 1.7670
-X -0.0011 0.0167 2.8515
-X -0.0001 0.0037 0.6931
-X 0.0000 -0.0018 -0.2743
-X 0.0007 -0.0129 -2.3673
-X 0.0013 -0.0149 -2.6699
+ -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -223,13 +223,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- 0.6007 0.2090 -0.8097
-X -0.8209 0.0098 1.7049
-X 0.7935 -1.0465 -0.2523
-X -0.3154 0.0155 0.6608
-X 0.2265 -0.0078 -0.3634
-X 0.3498 0.3172 -1.0656
-X -0.2335 0.7117 -0.6843
+ 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -240,12 +240,12 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
0.0000 -0.0000 -0.0000
-X 0.0052 -0.0409 -1.6635
-X -0.0038 0.0302 1.2264
-X 0.0025 -0.0197 -0.7995
-X -0.0026 0.0203 0.8268
-X 0.0038 -0.0297 -1.2056
-X -0.0050 0.0397 1.6155
+X -0.0000 0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
@@ -255,13 +255,13 @@ X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
14
- -0.0131 0.0912 -0.0781
-X -0.9206 0.4456 -0.5210
-X 0.7036 0.0588 0.7675
-X -0.1849 0.6894 -0.2128
-X 0.1348 -0.7273 -0.1915
-X -0.5138 0.0289 0.8430
-X 0.7809 -0.4955 -0.6852
+ -0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
X 0.0000 0.0000 0.0000
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/plumed.dat
new file mode 100644
index 0000000000..c0ff4d9ddf
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/plumed.dat
@@ -0,0 +1,11 @@
+LOAD FILE=../../../../plumedOpenACC.so
+trs_cpu: TORSION ATOMS1=1,2,3,4 ATOMS2=3,4,5,6 ATOMS3=2,3,4,5 ATOMS4=1,2,5,6
+trs: TORSION ATOMS1=1,2,3,4 ATOMS2=3,4,5,6 ATOMS3=2,3,4,5 ATOMS4=1,2,5,6 USEGPU
+
+diff: CUSTOM ARG=trs,trs_cpu FUNC=y-x PERIODIC=-pi,pi
+PRINT ARG=diff FILE=diff FMT=%8.4f
+#note that if TORSION is compiled in floating precision the test will give some periodicity errors (namely -pi instead of pi and vice versa)
+s: SUM ARG=diff PERIODIC=-pi,pi
+PRINT ARG=diff FILE=tors FMT=%8.4f
+PRINT ARG=s FILE=colvar FMT=%8.4f
+BIASVALUE ARG=s
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/tors.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/tors.reference
new file mode 100644
index 0000000000..cbf54ebe76
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/tors.reference
@@ -0,0 +1,20 @@
+#! FIELDS time diff.1 diff.2 diff.3 diff.4
+#! SET min_diff -pi
+#! SET max_diff pi
+ 0.000000 -0.0000 0.0000 0.0000 -0.0000
+ 1.000000 -0.0000 0.0000 0.0000 0.0000
+ 2.000000 0.0000 -0.0000 -0.0000 -0.0000
+ 3.000000 -0.0000 -0.0000 0.0000 -0.0000
+ 4.000000 0.0000 0.0000 -0.0000 0.0000
+ 5.000000 -0.0000 0.0000 0.0000 -0.0000
+ 6.000000 0.0000 -0.0000 -0.0000 -0.0000
+ 7.000000 -0.0000 0.0000 0.0000 -0.0000
+ 8.000000 -0.0000 0.0000 0.0000 -0.0000
+ 9.000000 -0.0000 -0.0000 0.0000 0.0000
+ 10.000000 -0.0000 0.0000 0.0000 0.0000
+ 11.000000 0.0000 0.0000 -0.0000 0.0000
+ 12.000000 -0.0000 -0.0000 0.0000 0.0000
+ 13.000000 0.0000 -0.0000 0.0000 0.0000
+ 14.000000 -0.0000 -0.0000 0.0000 0.0000
+ 15.000000 -0.0000 -0.0000 0.0000 0.0000
+ 16.000000 0.0000 0.0000 -0.0000 -0.0000
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/Makefile
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/angles.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/angles.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/angles.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/angles.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/cdipoles.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/cdipoles.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/cdipoles.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/cdipoles.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/cdists.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/cdists.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/cdists.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/cdists.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/config b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/config
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/config
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/ctorsions.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/ctorsions.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/ctorsions.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/ctorsions.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/ctorsions2.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/ctorsions2.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/ctorsions2.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/ctorsions2.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/dipoles.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/dipoles.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/dipoles.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/dipoles.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/dists.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/dists.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/dists.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/dists.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/plumed.dat
similarity index 98%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/plumed.dat
index 2a5aaf602f..16c6af1c08 100644
--- a/regtest/targetGPU/rt-GPU-multicolvar-print/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
d1: DISTANCE ATOMS=1,2
d2: DISTANCE ATOMS=3,4
d3: DISTANCE ATOMS=5,6
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/pos.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/pos.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/pos.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/pos.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/scdists.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/scdists.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/scdists.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/scdists.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/spos.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/spos.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/spos.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/spos.reference
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/test.pdb b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/test.pdb
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/test.pdb
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/test.pdb
diff --git a/regtest/targetGPU/rt-GPU-multicolvar-print/torsions.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/torsions.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-multicolvar-print/torsions.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-multicolvar-print/torsions.reference
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/Makefile
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/colvar.reference
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/config b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/config
similarity index 82%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/config
index a539a80b0f..562c2a274c 100644
--- a/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/config
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/config
@@ -1,5 +1,5 @@
type=driver
-plumed_modules="adjmat crystdistrib"
+plumed_modules="adjmat crystdistrib notImplemented"
arg="--plumed plumed.dat --ixyz short.xyz --dump-forces forces --dump-forces-fmt=%8.4f" #--debug-forces=forces.num"
extra_files="../../crystdistrib/rt-quaternion-bond-product-deriv/short.xyz"
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/forces.reference
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/plumed.dat
similarity index 95%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/plumed.dat
index 33e95844cb..f38ff1b347 100644
--- a/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-deriv/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
quat: QUATERNION ATOMS1=1,2,3 ATOMS2=4,5,6 ATOMS3=7,8,9 ATOMS4=10,11,12 ATOMS5=13,14,15 ATOMS6=16,17,18 ATOMS7=19,20,21 ATOMS8=22,23,24 ATOMS9=25,26,27 ATOMS10=28,29,30 ATOMS11=31,32,33 ATOMS12=34,35,36 ATOMS13=37,38,39 ATOMS14=40,41,42 ATOMS15=43,44,45 ATOMS16=46,47,48 ATOMS17=49,50,51 ATOMS18=52,53,54 ATOMS19=55,56,57 ATOMS20=58,59,60 ATOMS21=61,62,63 ATOMS22=64,65,66 ATOMS23=67,68,69 ATOMS24=70,71,72 ATOMS25=73,74,75
c1: DISTANCE_MATRIX GROUP=1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73 CUTOFF=100.0 COMPONENTS
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-only/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/Makefile
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-only/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/colvar.reference
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/config b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/config
similarity index 84%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-only/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/config
index 4f006d22d5..10ef3b597f 100644
--- a/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/config
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/config
@@ -1,5 +1,5 @@
type=driver
-plumed_modules="adjmat crystdistrib"
+plumed_modules="adjmat crystdistrib notImplemented"
arg="--plumed plumed.dat --ixyz small.xyz --timestep=0.001 --trajectory-stride=25 --dump-forces forces --dump-forces-fmt=%8.4f" # --debug-forces=forces.num"
extra_files="../../crystdistrib/rt-quaternion-bond-product-only/small.xyz"
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-only/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/forces.reference
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/plumed.dat
similarity index 92%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product-only/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/plumed.dat
index e388f89820..f3c385502a 100644
--- a/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product-only/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
quat: QUATERNION ATOMS1=1,2,3 ATOMS2=4,5,6 ATOMS3=7,8,9
c1: DISTANCE_MATRIX GROUP=1,4,7 CUTOFF=100.0 COMPONENTS
qp: QUATERNION_BOND_PRODUCT_MATRIX ARG=quat.*,c1.* USEGPU
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/Makefile
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/colvar.reference
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product/config b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/config
similarity index 84%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/config
index 5213556460..0f1b56ecc6 100644
--- a/regtest/targetGPU/rt-GPU-quaternion-bond-product/config
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/config
@@ -1,5 +1,5 @@
type=driver
-plumed_modules="adjmat crystdistrib"
+plumed_modules="adjmat crystdistrib notimplemented"
arg="--plumed plumed.dat --ixyz small.xyz --timestep=0.001 --trajectory-stride=25 --dump-forces forces --dump-forces-fmt=%8.4f" # --debug-forces=forces.num"
extra_files="../../crystdistrib/rt-quaternion-bond-product/small.xyz"
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/forces.reference
diff --git a/regtest/targetGPU/rt-GPU-quaternion-bond-product/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/plumed.dat
similarity index 90%
rename from regtest/targetGPU/rt-GPU-quaternion-bond-product/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/plumed.dat
index b905997bee..047904732d 100644
--- a/regtest/targetGPU/rt-GPU-quaternion-bond-product/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-quaternion-bond-product/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
quat: QUATERNION ATOMS1=1,2,3 ATOMS2=4,5,6 ATOMS3=7,8,9
c1: DISTANCE_MATRIX GROUP=1,4,7 CUTOFF=100.0 COMPONENTS
qp: QUATERNION_BOND_PRODUCT_MATRIX ARG=quat.*,c1.* USEGPU
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/Makefile
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/ala12_trajectory.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/ala12_trajectory.xyz
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/ala12_trajectory.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/ala12_trajectory.xyz
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar.reference
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar10.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar10.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar10.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/colvar10.reference
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/config b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/config
similarity index 82%
rename from regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/config
index 64ee15151e..5079009dfd 100644
--- a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/config
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/config
@@ -1,4 +1,4 @@
type=driver
arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz ala12_trajectory.xyz --dump-forces forces --dump-forces-fmt=%10.6f"
-export NVCOMPILER_ACC_NOTIFY=31
+#export NVCOMPILER_ACC_NOTIFY=31
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/forces.reference
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/helix.pdb b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/helix.pdb
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/helix.pdb
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/helix.pdb
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/plumed.dat
similarity index 96%
rename from regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/plumed.dat
index 2a2bf529dc..9b396f233b 100644
--- a/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure-DRMSD/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
MOLINFO STRUCTURE=helix.pdb
ALPHARMSD RESIDUES=ALL TYPE=DRMSD LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12 NOSTRETCH} LABEL=a USEGPU
ANTIBETARMSD RESIDUES=all TYPE=DRMSD STRANDS_CUTOFF=1.0 LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12 NOSTRETCH} LABEL=b USEGPU
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/Makefile
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure/ala12_trajectory.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/ala12_trajectory.xyz
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure/ala12_trajectory.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/ala12_trajectory.xyz
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/colvar.reference
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure/colvar10.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/colvar10.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure/colvar10.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/colvar10.reference
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure/config b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/config
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/config
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/forces.reference
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure/helix.pdb b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/helix.pdb
similarity index 100%
rename from regtest/targetGPU/rt-GPU-secondarystructure/helix.pdb
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/helix.pdb
diff --git a/regtest/targetGPU/rt-GPU-secondarystructure/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/plumed.dat
similarity index 95%
rename from regtest/targetGPU/rt-GPU-secondarystructure/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/plumed.dat
index de008a2ab1..afec80f2ba 100644
--- a/regtest/targetGPU/rt-GPU-secondarystructure/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-GPU-secondarystructure/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
MOLINFO STRUCTURE=helix.pdb
ALPHARMSD RESIDUES=ALL TYPE=DRMSD LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12 NOSTRETCH} LABEL=a USEGPU
ANTIBETARMSD RESIDUES=all TYPE=DRMSD STRANDS_CUTOFF=1.0 LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12 NOSTRETCH} LABEL=b USEGPU
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix-mtv/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix-mtv/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix-mtv/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/config
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/diff.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/diff.reference
new file mode 100644
index 0000000000..4bc27c962d
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/diff.reference
@@ -0,0 +1,18 @@
+#! FIELDS time diff.1 diff.2 diff.3 diff.4 diff.5 diff.6 diff.7
+ 0.000000 -0.000000 -0.000000 -0.000000 -0.000000 0.000000 0.000000 -0.000000
+ 1.000000 -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
+ 2.000000 0.000000 -0.000000 0.000000 -0.000000 0.000000 0.000000 -0.000000
+ 3.000000 0.000000 -0.000000 0.000000 -0.000000 -0.000000 0.000000 0.000000
+ 4.000000 0.000000 -0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
+ 5.000000 -0.000000 -0.000000 -0.000000 0.000000 0.000000 -0.000000 -0.000000
+ 6.000000 0.000000 -0.000000 0.000000 0.000000 -0.000000 0.000000 -0.000000
+ 7.000000 -0.000000 -0.000000 0.000000 -0.000000 -0.000000 -0.000000 0.000000
+ 8.000000 -0.000000 0.000000 -0.000000 -0.000000 -0.000000 0.000000 0.000000
+ 9.000000 0.000000 -0.000000 -0.000000 -0.000000 0.000000 -0.000000 -0.000000
+ 10.000000 0.000000 -0.000000 0.000000 -0.000000 0.000000 0.000000 0.000000
+ 11.000000 -0.000000 -0.000000 -0.000000 -0.000000 0.000000 0.000000 0.000000
+ 12.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000
+ 13.000000 -0.000000 0.000000 0.000000 -0.000000 0.000000 0.000000 0.000000
+ 14.000000 -0.000000 -0.000000 -0.000000 0.000000 0.000000 0.000000 0.000000
+ 15.000000 -0.000000 -0.000000 0.000000 0.000000 -0.000000 0.000000 0.000000
+ 16.000000 -0.000000 -0.000000 0.000000 0.000000 0.000000 -0.000000 -0.000000
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/fcolvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/fcolvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix-mtv/fcolvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/fcolvar.reference
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/forces.reference
new file mode 100644
index 0000000000..7bb992be6b
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/forces.reference
@@ -0,0 +1,272 @@
+14
+ 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ 0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ -0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ 0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+14
+ 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/isomers.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/isomers.xyz
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix-mtv/isomers.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/isomers.xyz
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/plumed.dat
similarity index 52%
rename from regtest/targetGPU/rt-adjmat-basic-matrix-mtv/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/plumed.dat
index d3d24e3d08..1b7ed2a625 100644
--- a/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CONTACT_MATRIX ...
GROUP=1-7
SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
@@ -6,9 +7,19 @@ PRINT ARG=c1 FILE=colvar FMT=%8.4f
ones: ONES SIZE=7
cc: MATRIX_VECTOR_PRODUCT ARG=c1,ones USEGPU
+cc_cpu: MATRIX_VECTOR_PRODUCT ARG=c1,ones
PRINT ARG=cc FILE=coords FMT=%8.5f
+diff: CUSTOM ARG=cc,cc_cpu PERIODIC=NO FUNC=y-x
+print arg=diff file=diff
+
mtc: MORE_THAN ARG=cc SWITCH={RATIONAL D_0=3 R_0=1}
s: SUM ARG=mtc PERIODIC=NO
PRINT ARG=s FILE=fcolvar FMT=%8.5f
BIASVALUE ARG=s
+
+mtc_cpu: MORE_THAN ARG=cc_cpu SWITCH={RATIONAL D_0=3 R_0=1}
+s_cpu: SUM ARG=mtc_cpu PERIODIC=NO
+inv: CUSTOM ARG=s_cpu FUNC=-x PERIODIC=NO
+BIASVALUE ARG=inv
+
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/config
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/coords.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/coords.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix-mtv/coords.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/coords.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix/fcolvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/fcolvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix/fcolvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/fcolvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix-mtv/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix-mtv/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix/isomers.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/isomers.xyz
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix/isomers.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/isomers.xyz
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/plumed.dat
similarity index 89%
rename from regtest/targetGPU/rt-adjmat-basic-matrix/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/plumed.dat
index 7aa5ce18ef..5d232243e6 100644
--- a/regtest/targetGPU/rt-adjmat-basic-matrix/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CONTACT_MATRIX ...
GROUP=1-7
SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix2/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix2/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix2/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix2/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix2/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix2/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/config
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix2/coords.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/coords.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix2/coords.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/coords.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix2/fcolvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/fcolvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix2/fcolvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/fcolvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix2/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix2/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix2/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/plumed.dat
similarity index 90%
rename from regtest/targetGPU/rt-adjmat-basic-matrix2/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/plumed.dat
index f8a4d27c84..8b03fc368a 100644
--- a/regtest/targetGPU/rt-adjmat-basic-matrix2/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix2/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CONTACT_MATRIX ...
GROUPA=1-3
GROUPB=1-108
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix3/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix3/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix3/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix3/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix3/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix3/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/config
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix3/coords.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/coords.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix3/coords.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/coords.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix3/fcolvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/fcolvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix3/fcolvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/fcolvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix3/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix3/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix3/gas-one.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/gas-one.xyz
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix3/gas-one.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/gas-one.xyz
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix3/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/plumed.dat
similarity index 91%
rename from regtest/targetGPU/rt-adjmat-basic-matrix3/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/plumed.dat
index 1a3acb6084..561c2ead47 100644
--- a/regtest/targetGPU/rt-adjmat-basic-matrix3/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix3/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CONTACT_MATRIX ...
GROUPA=1-3
GROUPB=1-512
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix4/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix4/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix4/cmcolvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/cmcolvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix4/cmcolvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/cmcolvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix4/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix4/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/config
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix4/fcolvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/fcolvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix4/fcolvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/fcolvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix4/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix4/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix4/gas-one.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/gas-one.xyz
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-basic-matrix4/gas-one.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/gas-one.xyz
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix4/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/plumed.dat
similarity index 87%
rename from regtest/targetGPU/rt-adjmat-basic-matrix4/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/plumed.dat
index 9746f698ea..6d8ef7ca58 100644
--- a/regtest/targetGPU/rt-adjmat-basic-matrix4/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-basic-matrix4/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CONTACT_MATRIX ...
GROUPA=1-3
GROUPB=1-512
diff --git a/regtest/targetGPU/rt-adjmat-eigvals/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-eigvals/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-eigvals/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-eigvals/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-eigvals/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-eigvals/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/config
diff --git a/regtest/targetGPU/rt-adjmat-eigvals/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-eigvals/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-eigvals/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/plumed.dat
similarity index 82%
rename from regtest/targetGPU/rt-adjmat-eigvals/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/plumed.dat
index 23de49783e..071352c277 100644
--- a/regtest/targetGPU/rt-adjmat-eigvals/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvals/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12} USEGPU
diag: DIAGONALIZE ARG=c1 VECTORS=1
PRINT ARG=diag.vals-1 FILE=colvar FMT=%8.4f
diff --git a/regtest/targetGPU/rt-adjmat-eigvecs/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-eigvecs/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-eigvecs/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-eigvecs/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-eigvecs/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-eigvecs/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/config
diff --git a/regtest/targetGPU/rt-adjmat-eigvecs/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-eigvecs/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-eigvecs/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/plumed.dat
similarity index 93%
rename from regtest/targetGPU/rt-adjmat-eigvecs/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/plumed.dat
index 66c1772156..f496dd7a89 100644
--- a/regtest/targetGPU/rt-adjmat-eigvecs/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-eigvecs/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12} USEGPU
diag: DIAGONALIZE ARG=c1 VECTORS=1
eigv1: SELECT_COMPONENTS ARG=diag.vecs-1 COMPONENTS=1
@@ -7,6 +8,6 @@ eigv4: SELECT_COMPONENTS ARG=diag.vecs-1 COMPONENTS=4
eigv5: SELECT_COMPONENTS ARG=diag.vecs-1 COMPONENTS=5
eigv6: SELECT_COMPONENTS ARG=diag.vecs-1 COMPONENTS=6
eigv7: SELECT_COMPONENTS ARG=diag.vecs-1 COMPONENTS=7
-cc: COMBINE ARG=eigv1,eigv2,eigv3,eigv4,eigv5,eigv6,eigv7 COEFFICIENTS=1,2,3,4,5,6,7 POWERS=2,2,3,4,3,2,1 PERIODIC=NO NORMALIZE USEGPU
+cc: COMBINE ARG=eigv1,eigv2,eigv3,eigv4,eigv5,eigv6,eigv7 COEFFICIENTS=1,2,3,4,5,6,7 POWERS=2,2,3,4,3,2,1 PERIODIC=NO NORMALIZE USEGPU
PRINT ARG=cc FILE=colvar FMT=%8.4f
BIASVALUE ARG=cc
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvals/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-join-eigvals/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvals/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-join-eigvals/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvals/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-join-eigvals/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/config
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvals/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-join-eigvals/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvals/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/plumed.dat
similarity index 91%
rename from regtest/targetGPU/rt-adjmat-join-eigvals/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/plumed.dat
index af572f8679..c9cfb35cf4 100644
--- a/regtest/targetGPU/rt-adjmat-join-eigvals/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvals/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c11: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12} USEGPU
c12: CONTACT_MATRIX GROUPA=1-7 GROUPB=8-14 SWITCH={RATIONAL R_0=2.2 NN=6 MM=12} USEGPU
c21: TRANSPOSE ARG=c12
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvecs/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-join-eigvecs/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvecs/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-join-eigvecs/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvecs/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-join-eigvecs/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/config
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvecs/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-join-eigvecs/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-join-eigvecs/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/plumed.dat
similarity index 97%
rename from regtest/targetGPU/rt-adjmat-join-eigvecs/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/plumed.dat
index bab317834a..be23a93a98 100644
--- a/regtest/targetGPU/rt-adjmat-join-eigvecs/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-join-eigvecs/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c11: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12} USEGPU
c12: CONTACT_MATRIX GROUPA=1-7 GROUPB=8-14 SWITCH={RATIONAL R_0=2.2 NN=6 MM=12} USEGPU
c21: TRANSPOSE ARG=c12
diff --git a/regtest/targetGPU/rt-adjmat-matmult/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-matmult/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-matmult/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-matmult/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-matmult/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/config
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-matmult/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/config
diff --git a/regtest/targetGPU/rt-adjmat-matmult/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-matmult/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-matmult/isomers.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/isomers.xyz
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-matmult/isomers.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/isomers.xyz
diff --git a/regtest/targetGPU/rt-adjmat-matmult/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/plumed.dat
similarity index 84%
rename from regtest/targetGPU/rt-adjmat-matmult/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/plumed.dat
index 5094e1d5f0..699edffa69 100644
--- a/regtest/targetGPU/rt-adjmat-matmult/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-matmult/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
c12: MATRIX_PRODUCT ARG=c1,c1 USEGPU
diag: DIAGONALIZE ARG=c12 VECTORS=1
diff --git a/regtest/targetGPU/rt-adjmat-prod/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-prod/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/Makefile
diff --git a/regtest/targetGPU/rt-adjmat-prod/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-prod/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/colvar.reference
diff --git a/regtest/targetGPU/rt-adjmat-prod/config b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/config
similarity index 87%
rename from regtest/targetGPU/rt-adjmat-prod/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/config
index f7cb2dce13..e95183481c 100644
--- a/regtest/targetGPU/rt-adjmat-prod/config
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/config
@@ -4,4 +4,4 @@ plumed_modules=adjmat
arg="--plumed plumed.dat --ixyz isomers.xyz --dump-forces forces --dump-forces-fmt=%8.4f" # --debug-forces forces.num"
extra_files="../../trajectories/isomers.xyz"
-# export NVCOMPILER_ACC_NOTIFY=31
\ No newline at end of file
+# export NVCOMPILER_ACC_NOTIFY=31
diff --git a/regtest/targetGPU/rt-adjmat-prod/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-adjmat-prod/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/forces.reference
diff --git a/regtest/targetGPU/rt-adjmat-prod/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/plumed.dat
similarity index 89%
rename from regtest/targetGPU/rt-adjmat-prod/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/plumed.dat
index ae57b2c7f7..9ff0003334 100644
--- a/regtest/targetGPU/rt-adjmat-prod/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-adjmat-prod/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12} USEGPU
c2: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=3.2 NN=4 MM=8 } USEGPU
prod: CUSTOM ARG=c1,c2 FUNC=x*y PERIODIC=NO
diff --git a/regtest/targetGPU/rt-coordination-insphere-nochain/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-coordination-insphere-nochain/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/Makefile
diff --git a/regtest/targetGPU/rt-coordination-insphere-nochain/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-coordination-insphere-nochain/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/colvar.reference
diff --git a/regtest/targetGPU/rt-coordination-insphere-nochain/config b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/config
similarity index 100%
rename from regtest/targetGPU/rt-coordination-insphere-nochain/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/config
diff --git a/regtest/targetGPU/rt-coordination-insphere-nochain/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-coordination-insphere-nochain/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/forces.reference
diff --git a/regtest/targetGPU/rt-coordination-insphere-nochain/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/plumed.dat
similarity index 94%
rename from regtest/targetGPU/rt-coordination-insphere-nochain/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/plumed.dat
index 4cb1733aa3..511f811c9e 100644
--- a/regtest/targetGPU/rt-coordination-insphere-nochain/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere-nochain/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
# Water oxygens: atoms 1-N with stride 4 (TIP4P geometry)
ow: GROUP ATOMS=1-16500:4
diff --git a/regtest/targetGPU/rt-coordination-insphere/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-coordination-insphere/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/Makefile
diff --git a/regtest/targetGPU/rt-coordination-insphere/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-coordination-insphere/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/colvar.reference
diff --git a/regtest/targetGPU/rt-coordination-insphere/config b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/config
similarity index 100%
rename from regtest/targetGPU/rt-coordination-insphere/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/config
diff --git a/regtest/targetGPU/rt-coordination-insphere/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-coordination-insphere/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/forces.reference
diff --git a/regtest/targetGPU/rt-coordination-insphere/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/plumed.dat
similarity index 94%
rename from regtest/targetGPU/rt-coordination-insphere/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/plumed.dat
index e21da71002..1e211c19a0 100644
--- a/regtest/targetGPU/rt-coordination-insphere/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-coordination-insphere/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
# Water oxygens: atoms 1-N with stride 4 (TIP4P geometry)
ow: GROUP ATOMS=1-16500:4
diff --git a/regtest/targetGPU/rt-cylinder/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-cylinder/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-cylinder/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-cylinder/Makefile
diff --git a/regtest/targetGPU/rt-cylinder/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-cylinder/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-cylinder/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-cylinder/colvar.reference
diff --git a/regtest/targetGPU/rt-cylinder/config b/plugins/openaccPTM/regtest/targetGPU/rt-cylinder/config
similarity index 100%
rename from regtest/targetGPU/rt-cylinder/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-cylinder/config
diff --git a/regtest/targetGPU/rt-cylinder/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-cylinder/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-cylinder/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-cylinder/forces.reference
diff --git a/regtest/targetGPU/rt-cylinder/gentraj.cpp b/plugins/openaccPTM/regtest/targetGPU/rt-cylinder/gentraj.cpp
similarity index 100%
rename from regtest/targetGPU/rt-cylinder/gentraj.cpp
rename to plugins/openaccPTM/regtest/targetGPU/rt-cylinder/gentraj.cpp
diff --git a/regtest/targetGPU/rt-cylinder/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-cylinder/plumed.dat
similarity index 87%
rename from regtest/targetGPU/rt-cylinder/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-cylinder/plumed.dat
index f5581d2d08..38497db56a 100644
--- a/regtest/targetGPU/rt-cylinder/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-cylinder/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CENTER ATOMS=1-200
d2: INCYLINDER ATOMS=2-201 CENTER=c1 DIRECTION=Z RADIUS={TANH R_0=1.5} SIGMA=0.1 LOWER=-0.1 UPPER=0.1 SUM USEGPU
diff --git a/regtest/targetGPU/rt-cylinder/trajectory.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-cylinder/trajectory.xyz
similarity index 100%
rename from regtest/targetGPU/rt-cylinder/trajectory.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-cylinder/trajectory.xyz
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/Makefile
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/analysis.1.mymatrix3.dat.reference b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/analysis.1.mymatrix3.dat.reference
similarity index 100%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/analysis.1.mymatrix3.dat.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/analysis.1.mymatrix3.dat.reference
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/colv_in b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/colv_in
similarity index 100%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/colv_in
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/colv_in
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/config b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/config
similarity index 100%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/config
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix.dat.reference b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix.dat.reference
similarity index 100%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix.dat.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix.dat.reference
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix2.dat.reference b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix2.dat.reference
similarity index 100%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix2.dat.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix2.dat.reference
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix3.dat.reference b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix3.dat.reference
similarity index 100%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix3.dat.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/mymatrix3.dat.reference
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/output-fps.pdb.reference b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/output-fps.pdb.reference
similarity index 100%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/output-fps.pdb.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/output-fps.pdb.reference
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/output-stride.pdb.reference b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/output-stride.pdb.reference
similarity index 100%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/output-stride.pdb.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/output-stride.pdb.reference
diff --git a/regtest/targetGPU/rt-landmarks-calc-dissims/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/plumed.dat
similarity index 94%
rename from regtest/targetGPU/rt-landmarks-calc-dissims/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/plumed.dat
index 6f162118ff..273230a411 100644
--- a/regtest/targetGPU/rt-landmarks-calc-dissims/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-landmarks-calc-dissims/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
d1: READ FILE=colv_in VALUES=data
ff: COLLECT_FRAMES ARG=d1 STRIDE=1
diff --git a/regtest/targetGPU/rt-multicolvar-filters/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-multicolvar-filters/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/Makefile
diff --git a/regtest/targetGPU/rt-multicolvar-filters/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-multicolvar-filters/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/colvar.reference
diff --git a/regtest/targetGPU/rt-multicolvar-filters/config b/plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/config
similarity index 100%
rename from regtest/targetGPU/rt-multicolvar-filters/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/config
diff --git a/regtest/targetGPU/rt-multicolvar-filters/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-multicolvar-filters/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/forces.reference
diff --git a/regtest/targetGPU/rt-multicolvar-filters/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/plumed.dat
similarity index 98%
rename from regtest/targetGPU/rt-multicolvar-filters/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/plumed.dat
index 0377f989d9..12719d385b 100644
--- a/regtest/targetGPU/rt-multicolvar-filters/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-multicolvar-filters/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
d1: DISTANCE ...
ATOMS1=1,2
ATOMS2=1,3
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/colvar_aq6.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/colvar_aq6.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/colvar_aq6.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/colvar_aq6.reference
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/config
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/plumed.dat
similarity index 87%
rename from regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/plumed.dat
index fbb730dec8..8498d5eb86 100644
--- a/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
q6: Q6 SPECIES=1-500 SWITCH={RATIONAL R_0=0.01 D_0=0.415 D_MAX=0.45} MEAN USEGPU
aq6: LOCAL_AVERAGE SPECIESA=q6 SPECIESB=q6 SWITCH={RATIONAL R_0=0.01 D_0=0.415 D_MAX=0.45} MEAN USEGPU
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/traj_md-10.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/traj_md-10.xyz
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/traj_md-10.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6-spAspB/traj_md-10.xyz
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6/colv.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/colv.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6/colv.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/colv.reference
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6/colv3.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/colv3.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6/colv3.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/colv3.reference
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/config
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-averaged-q6/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-averaged-q6/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/plumed.dat
similarity index 85%
rename from regtest/targetGPU/rt-symfunc-averaged-q6/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/plumed.dat
index 49f15ab8ef..81578593b7 100644
--- a/regtest/targetGPU/rt-symfunc-averaged-q6/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-averaged-q6/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
Q6 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MM=24 MEAN LABEL=q6 USEGPU
PRINT ARG=q6.* FILE=colv
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-one-q6/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-nbonds-one-q6/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/Makefile
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/colv1.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/colv1.reference
new file mode 100644
index 0000000000..d0cfe3c253
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/colv1.reference
@@ -0,0 +1,2 @@
+#! FIELDS time diff
+ 0.000000 -0.0000
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-one-q6/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-nbonds-one-q6/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/config
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/forces.reference
new file mode 100644
index 0000000000..2e600497ca
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/forces.reference
@@ -0,0 +1,66 @@
+64
+ -0.0001 -0.0000 0.0001
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X 0.0000 -0.0000 0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X -0.0000 -0.0000 -0.0000
+X 0.0000 0.0000 0.0000
+X -0.0000 0.0000 0.0000
+X 0.0000 -0.0000 0.0000
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/plumed.dat
new file mode 100644
index 0000000000..3a6eeb9957
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-one-q6/plumed.dat
@@ -0,0 +1,33 @@
+LOAD FILE=../../../../plumedOpenACC.so
+q6: Q6 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN USEGPU
+
+#Â Create a normalising matrix
+q6_uones: ONES SIZE=26
+q6_nmat: OUTER_PRODUCT ARG=q6_norm,q6_uones
+udata6: VSTACK ARG=q6_sp.*
+data6: CUSTOM ARG=udata6,q6_nmat FUNC=x/y PERIODIC=NO
+data6T: TRANSPOSE ARG=data6
+
+con6: CONTACT_MATRIX GROUP=q6 SWITCH={RATIONAL D_0=3.0 R_0=1.5} USEGPU
+dot6: MATRIX_PRODUCT ARG=data6,data6T MASK=con6 USEGPU
+ww6: CUSTOM ARG=con6,dot6 FUNC=x*y PERIODIC=NO
+w6: SUM ARG=ww6 PERIODIC=NO
+#on the CPU:
+q6c: Q6 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN
+
+#Â Create a normalising matrix
+q6c_uones: ONES SIZE=26
+q6c_nmat: OUTER_PRODUCT ARG=q6c_norm,q6c_uones
+udata6c: VSTACK ARG=q6c_sp.*
+data6c: CUSTOM ARG=udata6c,q6c_nmat FUNC=x/y PERIODIC=NO
+data6Tc: TRANSPOSE ARG=data6
+
+con6c: CONTACT_MATRIX GROUP=q6c SWITCH={RATIONAL D_0=3.0 R_0=1.5}
+dot6c: MATRIX_PRODUCT ARG=data6c,data6Tc MASK=con6c
+ww6c: CUSTOM ARG=con6c,dot6c FUNC=x*y PERIODIC=NO
+w6c: SUM ARG=ww6c PERIODIC=NO
+
+diff: CUSTOM ARG=w6,w6c FUNC=y-x PERIODIC=NO
+PRINT ARG=diff FILE=colv1 FMT=%8.4f
+
+RESTRAINT ARG=diff AT=30 KAPPA=1
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-q6/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-nbonds-q6/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/Makefile
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/colv1.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/colv1.reference
new file mode 100644
index 0000000000..4caa598c7b
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/colv1.reference
@@ -0,0 +1,2 @@
+#! FIELDS time w6d
+ 0.000000 -0.0000
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/colv2.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/colv2.reference
new file mode 100644
index 0000000000..a4269a0d46
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/colv2.reference
@@ -0,0 +1,2 @@
+#! FIELDS time w4d
+ 0.000000 0.0000
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-q6/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/config
similarity index 78%
rename from regtest/targetGPU/rt-symfunc-nbonds-q6/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/config
index 4654aeb728..f37b86ed5a 100644
--- a/regtest/targetGPU/rt-symfunc-nbonds-q6/config
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/config
@@ -1,5 +1,5 @@
type=driver
plumed_modules="adjmat symfunc"
# this is to test a different name
-arg="--plumed plumed.dat --ixyz 64.xyz --dump-forces forces --dump-forces-fmt=%8.4f" # --debug-forces forces.num"
+arg="--plumed plumed.dat --ixyz 64.xyz --dump-forces forces --dump-forces-fmt=%8.3f" # --debug-forces forces.num"
extra_files="../../trajectories/64.xyz"
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/forces.reference
new file mode 100644
index 0000000000..a9482b974a
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/forces.reference
@@ -0,0 +1,66 @@
+64
+ -0.001 0.001 0.001
+X -0.000 -0.000 -0.000
+X 0.000 0.000 0.000
+X 0.000 -0.000 0.000
+X -0.000 0.000 -0.000
+X 0.000 -0.000 0.000
+X 0.000 -0.000 0.000
+X -0.000 0.000 0.000
+X 0.000 0.000 0.000
+X -0.000 0.000 0.000
+X 0.000 0.000 0.000
+X -0.000 0.000 0.000
+X 0.000 -0.000 -0.000
+X 0.000 0.000 -0.000
+X -0.000 -0.000 0.000
+X -0.000 0.000 -0.000
+X 0.000 -0.000 0.000
+X 0.000 0.000 0.000
+X -0.000 0.000 -0.000
+X 0.000 -0.000 -0.000
+X 0.000 0.000 0.000
+X -0.000 0.000 0.000
+X 0.000 0.000 -0.000
+X -0.000 -0.000 0.000
+X -0.000 -0.000 0.000
+X -0.000 -0.000 -0.000
+X -0.000 -0.000 -0.000
+X 0.000 -0.000 -0.000
+X 0.000 -0.000 -0.000
+X 0.000 -0.000 -0.000
+X -0.000 -0.000 0.000
+X 0.000 -0.000 0.000
+X -0.000 -0.000 -0.000
+X 0.000 -0.000 0.000
+X -0.000 0.000 0.000
+X -0.000 0.000 -0.000
+X 0.000 0.000 0.000
+X 0.000 -0.000 -0.000
+X 0.000 0.000 -0.000
+X -0.000 0.000 -0.000
+X -0.000 -0.000 0.000
+X 0.000 0.000 -0.000
+X 0.000 -0.000 -0.000
+X 0.000 -0.000 -0.000
+X 0.000 0.000 0.000
+X -0.000 0.000 0.000
+X 0.000 0.000 0.000
+X 0.000 -0.000 0.000
+X -0.000 -0.000 0.000
+X -0.000 -0.000 -0.000
+X -0.000 -0.000 -0.000
+X 0.000 0.000 -0.000
+X 0.000 0.000 0.000
+X 0.000 -0.000 0.000
+X -0.000 -0.000 -0.000
+X 0.000 0.000 -0.000
+X -0.000 -0.000 0.000
+X 0.000 0.000 -0.000
+X -0.000 0.000 -0.000
+X -0.000 0.000 0.000
+X -0.000 0.000 -0.000
+X -0.000 0.000 0.000
+X -0.000 -0.000 0.000
+X 0.000 0.000 -0.000
+X 0.000 0.000 0.000
diff --git a/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/plumed.dat
new file mode 100644
index 0000000000..ac955721aa
--- /dev/null
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-nbonds-q6/plumed.dat
@@ -0,0 +1,71 @@
+LOAD FILE=../../../../plumedOpenACC.so
+q6: Q6 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN USEGPU
+q4: Q4 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN USEGPU
+
+#Â Create a normalising matrix
+q6_uones: ONES SIZE=26
+q6_nmat: OUTER_PRODUCT ARG=q6_norm,q6_uones
+udata6: VSTACK ARG=q6_sp.*
+data6: CUSTOM ARG=udata6,q6_nmat FUNC=x/y PERIODIC=NO
+data6T: TRANSPOSE ARG=data6
+
+# Create a normalising matrix
+q4_uones: ONES SIZE=18
+q4_nmat: OUTER_PRODUCT ARG=q4_norm,q4_uones
+udata4: VSTACK ARG=q4_sp.*
+data4: CUSTOM ARG=udata4,q4_nmat FUNC=x/y PERIODIC=NO
+data4T: TRANSPOSE ARG=data4
+
+con6: CONTACT_MATRIX GROUP=q6 SWITCH={RATIONAL D_0=3.0 R_0=1.5}
+dot6: MATRIX_PRODUCT ARG=data6,data6T MASK=con6 USEGPU
+
+ww6: CUSTOM ARG=con6,dot6 FUNC=x*y PERIODIC=NO
+
+w6: SUM ARG=ww6 PERIODIC=NO
+
+
+dot4: MATRIX_PRODUCT ARG=data4,data4T MASK=con6 USEGPU
+
+ww4: CUSTOM ARG=con6,dot4 FUNC=x*y PERIODIC=NO
+
+w4: SUM ARG=ww4 PERIODIC=NO
+
+
+#CPU references
+q6c: Q6 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN
+q4c: Q4 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN
+
+#Â Create a normalising matrix
+q6c_uones: ONES SIZE=26
+q6c_nmat: OUTER_PRODUCT ARG=q6c_norm,q6c_uones
+udata6c: VSTACK ARG=q6c_sp.*
+data6c: CUSTOM ARG=udata6c,q6c_nmat FUNC=x/y PERIODIC=NO
+data6Tc: TRANSPOSE ARG=data6c
+
+# Create a normalising matrix
+q4c_uones: ONES SIZE=18
+q4c_nmat: OUTER_PRODUCT ARG=q4c_norm,q4c_uones
+udata4c: VSTACK ARG=q4c_sp.*
+data4c: CUSTOM ARG=udata4c,q4c_nmat FUNC=x/y PERIODIC=NO
+data4Tc: TRANSPOSE ARG=data4c
+
+dot6c: MATRIX_PRODUCT ARG=data6c,data6Tc MASK=con6
+
+ww6c: CUSTOM ARG=con6,dot6c FUNC=x*y PERIODIC=NO
+
+w6c: SUM ARG=ww6c PERIODIC=NO
+
+dot4c: MATRIX_PRODUCT ARG=data4c,data4Tc MASK=con6 USEGPU
+
+ww4c: CUSTOM ARG=con6,dot4c FUNC=x*y PERIODIC=NO
+
+w4c: SUM ARG=ww4c PERIODIC=NO
+########
+
+w6d: CUSTOM ARG=w6,w6c FUNC=y-x PERIODIC=NO
+w4d: CUSTOM ARG=w4,w4c FUNC=y-x PERIODIC=NO
+
+PRINT ARG=w6d FILE=colv1 FMT=%8.4f
+PRINT ARG=w4d FILE=colv2 FMT=%8.4f
+
+RESTRAINT ARG=w6d,w4d AT=30,66 KAPPA=1,1
diff --git a/regtest/targetGPU/rt-symfunc-ntwo-lq6/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-ntwo-lq6/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-ntwo-lq6/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-ntwo-lq6/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/colvar.reference
diff --git a/regtest/targetGPU/rt-symfunc-ntwo-lq6/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-ntwo-lq6/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/config
diff --git a/regtest/targetGPU/rt-symfunc-ntwo-lq6/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-ntwo-lq6/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-ntwo-lq6/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/plumed.dat
similarity index 95%
rename from regtest/targetGPU/rt-symfunc-ntwo-lq6/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/plumed.dat
index d9e1cfb212..48f96890ea 100644
--- a/regtest/targetGPU/rt-symfunc-ntwo-lq6/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-ntwo-lq6/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
q1: Q1 SPECIESA=1,2 SPECIESB=1-64 D_0=3.0 R_0=1.5 NN=12 SUM USEGPU
norm_q1_rm-n1: CUSTOM ARG=q1_sp.rm-n1,q1_norm FUNC=x/y PERIODIC=NO
diff --git a/regtest/targetGPU/rt-symfunc-q6-nochain/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6-nochain/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-q6-nochain/colv.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/colv.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6-nochain/colv.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/colv.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6-nochain/colv3.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/colv3.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6-nochain/colv3.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/colv3.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6-nochain/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6-nochain/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/config
diff --git a/regtest/targetGPU/rt-symfunc-q6-nochain/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6-nochain/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6-nochain/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/plumed.dat
similarity index 84%
rename from regtest/targetGPU/rt-symfunc-q6-nochain/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/plumed.dat
index 2342f3be01..c641e345d4 100644
--- a/regtest/targetGPU/rt-symfunc-q6-nochain/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-nochain/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
Q6 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN LABEL=q6 USEGPU
PRINT ARG=q6.* FILE=colv
diff --git a/regtest/targetGPU/rt-symfunc-q6-subset/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6-subset/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-q6-subset/colv3.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/colv3.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6-subset/colv3.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/colv3.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6-subset/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6-subset/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/config
diff --git a/regtest/targetGPU/rt-symfunc-q6-subset/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6-subset/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6-subset/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/plumed.dat
similarity index 88%
rename from regtest/targetGPU/rt-symfunc-q6-subset/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/plumed.dat
index e5fb80b83f..cb84c4c069 100644
--- a/regtest/targetGPU/rt-symfunc-q6-subset/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6-subset/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
Q6 SPECIESA=1-5 SPECIESB=1-64 D_0=3.0 R_0=1.5 NN=12 MM=24 LABEL=q6a USEGPU
Q6 SPECIESA=6-64 SPECIESB=1-64 D_0=3.0 R_0=1.5 NN=12 MM=24 LABEL=q6b USEGPU
diff --git a/regtest/targetGPU/rt-symfunc-q6/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-q6/colv.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/colv.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6/colv.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/colv.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6/colv2.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/colv2.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6/colv2.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/colv2.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6/colv3.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/colv3.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6/colv3.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/colv3.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6/colv4.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/colv4.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6/colv4.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/colv4.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/config
diff --git a/regtest/targetGPU/rt-symfunc-q6/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-q6/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-q6/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/plumed.dat
similarity index 92%
rename from regtest/targetGPU/rt-symfunc-q6/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/plumed.dat
index 731e32d51b..21bbc19736 100644
--- a/regtest/targetGPU/rt-symfunc-q6/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-q6/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
COORDINATIONNUMBER SPECIES=1-64 SWITCH={RATIONAL D_0=3.0 R_0=1.5} MEAN LABEL=c
PRINT ARG=c.* FILE=colv2
diff --git a/regtest/targetGPU/rt-symfunc-simplecubic/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-simplecubic/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-simplecubic/colv.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/colv.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-simplecubic/colv.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/colv.reference
diff --git a/regtest/targetGPU/rt-symfunc-simplecubic/colv2.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/colv2.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-simplecubic/colv2.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/colv2.reference
diff --git a/regtest/targetGPU/rt-symfunc-simplecubic/colv3.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/colv3.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-simplecubic/colv3.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/colv3.reference
diff --git a/regtest/targetGPU/rt-symfunc-simplecubic/colv4.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/colv4.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-simplecubic/colv4.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/colv4.reference
diff --git a/regtest/targetGPU/rt-symfunc-simplecubic/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-simplecubic/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/config
diff --git a/regtest/targetGPU/rt-symfunc-simplecubic/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-simplecubic/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-simplecubic/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/plumed.dat
similarity index 97%
rename from regtest/targetGPU/rt-symfunc-simplecubic/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/plumed.dat
index 74991cec91..82f22fa758 100644
--- a/regtest/targetGPU/rt-symfunc-simplecubic/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-simplecubic/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
SIMPLECUBIC SPECIES=1-64 SWITCH={RATIONAL D_0=3.0 R_0=1.5} MEAN LABEL=c USEGPU
#SIMPLECUBIC SPECIES=1-64 SWITCH={RATIONAL D_0=3.0 R_0=1.5} MEAN NUMERICAL_DERIVATIVES LABEL=cn
PRINT ARG=c.* FILE=colv2 FMT=%8.4f
diff --git a/regtest/targetGPU/rt-symfunc-small-lq6/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-small-lq6/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-small-lq6/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-small-lq6/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/colvar.reference
diff --git a/regtest/targetGPU/rt-symfunc-small-lq6/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-small-lq6/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/config
diff --git a/regtest/targetGPU/rt-symfunc-small-lq6/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-small-lq6/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-small-lq6/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/plumed.dat
similarity index 94%
rename from regtest/targetGPU/rt-symfunc-small-lq6/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/plumed.dat
index 1ce5a4efdb..9142ed5069 100644
--- a/regtest/targetGPU/rt-symfunc-small-lq6/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-lq6/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
q1a: Q1 SPECIESA=1 SPECIESB=2-64 D_0=3.0 R_0=1.5 NN=12 SUM USEGPU
q1b: Q1 SPECIESA=2 SPECIESB=1,3-64 D_0=3.0 R_0=1.5 NN=12 SUM USEGPU
diff --git a/regtest/targetGPU/rt-symfunc-small-q6/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-small-q6/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-small-q6/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-small-q6/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/colvar.reference
diff --git a/regtest/targetGPU/rt-symfunc-small-q6/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-small-q6/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/config
diff --git a/regtest/targetGPU/rt-symfunc-small-q6/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-small-q6/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-small-q6/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/plumed.dat
similarity index 92%
rename from regtest/targetGPU/rt-symfunc-small-q6/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/plumed.dat
index acda4ec985..b67045cf68 100644
--- a/regtest/targetGPU/rt-symfunc-small-q6/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-small-q6/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
q1a: Q1 SPECIESA=1 SPECIESB=2-64 D_0=3.0 R_0=1.5 NN=12 SUM USEGPU
q1b: Q1 SPECIESA=2 SPECIESB=1,3-64 D_0=3.0 R_0=1.5 NN=12 SUM USEGPU
diff --git a/regtest/targetGPU/rt-symfunc-two-lq6/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-two-lq6/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-two-lq6/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-two-lq6/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/colvar.reference
diff --git a/regtest/targetGPU/rt-symfunc-two-lq6/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-two-lq6/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/config
diff --git a/regtest/targetGPU/rt-symfunc-two-lq6/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-two-lq6/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-two-lq6/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/plumed.dat
similarity index 92%
rename from regtest/targetGPU/rt-symfunc-two-lq6/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/plumed.dat
index fdb1f8484d..0d35cd4eb6 100644
--- a/regtest/targetGPU/rt-symfunc-two-lq6/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-lq6/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
q1: Q1 SPECIESA=1,2 SPECIESB=1-64 D_0=3.0 R_0=1.5 NN=12 SUM USEGPU
ddA: VSTACK ARG=q1_sp.rm-n1,q1_sp.im-n1,q1_sp.rm-0,q1_sp.im-0,q1_sp.rm-p1,q1_sp.im-p1
diff --git a/regtest/targetGPU/rt-symfunc-two-q6/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-two-q6/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/Makefile
diff --git a/regtest/targetGPU/rt-symfunc-two-q6/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-two-q6/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/colvar.reference
diff --git a/regtest/targetGPU/rt-symfunc-two-q6/config b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/config
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-two-q6/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/config
diff --git a/regtest/targetGPU/rt-symfunc-two-q6/forces.reference b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/forces.reference
similarity index 100%
rename from regtest/targetGPU/rt-symfunc-two-q6/forces.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/forces.reference
diff --git a/regtest/targetGPU/rt-symfunc-two-q6/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/plumed.dat
similarity index 91%
rename from regtest/targetGPU/rt-symfunc-two-q6/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/plumed.dat
index 5f78fc1438..2d7986878f 100644
--- a/regtest/targetGPU/rt-symfunc-two-q6/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-symfunc-two-q6/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
q1: Q1 SPECIESA=1,2 SPECIESB=1-64 D_0=3.0 R_0=1.5 NN=12 SUM USEGPU
dda: VSTACK ARG=q1_sp.rm-n1,q1_sp.im-n1,q1_sp.rm-0,q1_sp.im-0,q1_sp.rm-p1,q1_sp.im-p1
diff --git a/regtest/targetGPU/rt-volume-around/Makefile b/plugins/openaccPTM/regtest/targetGPU/rt-volume-around/Makefile
similarity index 100%
rename from regtest/targetGPU/rt-volume-around/Makefile
rename to plugins/openaccPTM/regtest/targetGPU/rt-volume-around/Makefile
diff --git a/regtest/targetGPU/rt-volume-around/colvar.reference b/plugins/openaccPTM/regtest/targetGPU/rt-volume-around/colvar.reference
similarity index 100%
rename from regtest/targetGPU/rt-volume-around/colvar.reference
rename to plugins/openaccPTM/regtest/targetGPU/rt-volume-around/colvar.reference
diff --git a/regtest/targetGPU/rt-volume-around/config b/plugins/openaccPTM/regtest/targetGPU/rt-volume-around/config
similarity index 100%
rename from regtest/targetGPU/rt-volume-around/config
rename to plugins/openaccPTM/regtest/targetGPU/rt-volume-around/config
diff --git a/regtest/targetGPU/rt-volume-around/gentraj.cpp b/plugins/openaccPTM/regtest/targetGPU/rt-volume-around/gentraj.cpp
similarity index 100%
rename from regtest/targetGPU/rt-volume-around/gentraj.cpp
rename to plugins/openaccPTM/regtest/targetGPU/rt-volume-around/gentraj.cpp
diff --git a/regtest/targetGPU/rt-volume-around/plumed.dat b/plugins/openaccPTM/regtest/targetGPU/rt-volume-around/plumed.dat
similarity index 99%
rename from regtest/targetGPU/rt-volume-around/plumed.dat
rename to plugins/openaccPTM/regtest/targetGPU/rt-volume-around/plumed.dat
index d00e47866b..0492b2dfea 100644
--- a/regtest/targetGPU/rt-volume-around/plumed.dat
+++ b/plugins/openaccPTM/regtest/targetGPU/rt-volume-around/plumed.dat
@@ -1,3 +1,4 @@
+LOAD FILE=../../../../plumedOpenACC.so
c1: CENTER ATOMS=2,3
c2: CENTER ATOMS=4,5
c3: CENTER ATOMS=6,7
diff --git a/regtest/targetGPU/rt-volume-around/trajectory.xyz b/plugins/openaccPTM/regtest/targetGPU/rt-volume-around/trajectory.xyz
similarity index 100%
rename from regtest/targetGPU/rt-volume-around/trajectory.xyz
rename to plugins/openaccPTM/regtest/targetGPU/rt-volume-around/trajectory.xyz
diff --git a/plugins/openaccPTM/regtest/trajectories b/plugins/openaccPTM/regtest/trajectories
new file mode 120000
index 0000000000..ea70cfb850
--- /dev/null
+++ b/plugins/openaccPTM/regtest/trajectories
@@ -0,0 +1 @@
+../../../regtest/trajectories
\ No newline at end of file
diff --git a/plugins/openaccPTM/src/plumed b/plugins/openaccPTM/src/plumed
new file mode 120000
index 0000000000..dabb0e15a9
--- /dev/null
+++ b/plugins/openaccPTM/src/plumed
@@ -0,0 +1 @@
+../../../src
\ No newline at end of file
diff --git a/regtest/secondarystructure/rt33-mpi/plumed.dat b/regtest/secondarystructure/rt33-mpi/plumed.dat
index f565596144..faf0776395 100644
--- a/regtest/secondarystructure/rt33-mpi/plumed.dat
+++ b/regtest/secondarystructure/rt33-mpi/plumed.dat
@@ -9,7 +9,7 @@ COMBINE ARG=b.lessthan,p.lessthan PERIODIC=NO LABEL=sum
RESTRAINT ARG=b.*,brf.*,br.*,p.*,prf.*,pr.*,sum KAPPA=1.,1.,1.,1,1,1,1 AT=0,0,0,0,0,0,0 SLOPE=0,0,0,0,0,0,0
-DUMPFORCES ARG=b.lessthan,brf.lessthan,br.lessthan,p.lessthan,prf.lessthan,pr.lessthan,sum,@75.* FILE=forces STRIDE=1
+DUMPFORCES ARG=b.lessthan,brf.lessthan,br.lessthan,p.lessthan,prf.lessthan,pr.lessthan,sum,@77.* FILE=forces STRIDE=1
PRINT ARG=b.*,brf.*,br.*,p.*,prf.*,pr.*,sum STRIDE=1 FILE=colvar FMT=%8.4f
diff --git a/regtest/secondarystructure/rt33/plumed.dat b/regtest/secondarystructure/rt33/plumed.dat
index f565596144..faf0776395 100644
--- a/regtest/secondarystructure/rt33/plumed.dat
+++ b/regtest/secondarystructure/rt33/plumed.dat
@@ -9,7 +9,7 @@ COMBINE ARG=b.lessthan,p.lessthan PERIODIC=NO LABEL=sum
RESTRAINT ARG=b.*,brf.*,br.*,p.*,prf.*,pr.*,sum KAPPA=1.,1.,1.,1,1,1,1 AT=0,0,0,0,0,0,0 SLOPE=0,0,0,0,0,0,0
-DUMPFORCES ARG=b.lessthan,brf.lessthan,br.lessthan,p.lessthan,prf.lessthan,pr.lessthan,sum,@75.* FILE=forces STRIDE=1
+DUMPFORCES ARG=b.lessthan,brf.lessthan,br.lessthan,p.lessthan,prf.lessthan,pr.lessthan,sum,@77.* FILE=forces STRIDE=1
PRINT ARG=b.*,brf.*,br.*,p.*,prf.*,pr.*,sum STRIDE=1 FILE=colvar FMT=%8.4f
diff --git a/regtest/targetGPU/distribuitedMCBiasTests.sh b/regtest/targetGPU/distribuitedMCBiasTests.sh
deleted file mode 100644
index 0bcaeb190f..0000000000
--- a/regtest/targetGPU/distribuitedMCBiasTests.sh
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/bin/bash
-# checked with shellcheck
-# formatted with shfmtv3.36.0
-
-action="run"
-initialize="false"
-USEGPU="USEGPU"
-basedir="rt-GPU-MCVT-Bias-"
-if [[ $1 = "prepare" ]]; then
- action="prepare"
-elif [[ $1 = "reset" ]]; then
- action="prepare"
- initialize="true"
- USEGPU=""
-elif [[ $1 = "clean" ]]; then
- action="clean"
-elif [[ $1 = "usage" ]]; then
- cat <"$dir"/plumed.dat
-v: $line
-PRINT ARG=v STRIDE=1 FILE=colvar FMT=%8.4f
-RESTRAINT ARG=v AT=2 KAPPA=3 SLOPE=3
-EOF
- if [[ $initialize = "true" ]]; then
- (
- cd "$dir" || exit
- #touch forces.reference
- touch colvar.reference
-
- echo "include ../../scripts/test.make" >Makefile
-
- cat <config
-type=driver
-arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz trajectory.xyz --dump-forces forces --dump-forces-fmt=%10.6f --pdb print_pdb_test.pdb"
-
-extra_files="../../trajectories/trajectory.xyz ../../trajectories/print_pdb_test.pdb"
-
-#export NVCOMPILER_ACC_NOTIFY=31
-EOF
- make reset
- grep -vzq FAILURE report.txt
- ) >>/dev/null || echo "fail: $i, \"$line\""
- fi
- i=$((i + 1))
- done
-
- for line in "${inputLineComponents[@]}"; do
- echo "$i $line"
- dir=${basedir}$i
- mkdir -pv "$dir"
-
- cat <"$dir"/plumed.dat
-v: $line
-PRINT ARG=v.* STRIDE=1 FILE=colvar FMT=%8.4f
-RESTRAINT ARG=v.x AT=2 KAPPA=3 SLOPE=3
-RESTRAINT ARG=v.y AT=2 KAPPA=3 SLOPE=3
-RESTRAINT ARG=v.z AT=2 KAPPA=3 SLOPE=3
-EOF
- if [[ $initialize = "true" ]]; then
- (
- cd "$dir" || exit
- # touch forces.reference
- touch colvar.reference
-
- echo "include ../../scripts/test.make" >Makefile
-
- cat <config
-type=driver
-arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz trajectory.xyz --dump-forces forces --dump-forces-fmt=%10.6f --pdb print_pdb_test.pdb"
-
-extra_files="../../trajectories/trajectory.xyz ../../trajectories/print_pdb_test.pdb"
-
-#export NVCOMPILER_ACC_NOTIFY=31
-EOF
- make reset
- grep -vzq FAILURE report.txt
- ) >>/dev/null || echo "fail: $i, \"$line\""
- fi
- i=$((i + 1))
- done
-
-for line in "${inputLineScaledComponents[@]}"; do
- echo "$i $line"
- dir=${basedir}$i
- mkdir -pv "$dir"
-
- cat <"$dir"/plumed.dat
-v: $line
-PRINT ARG=v.* STRIDE=1 FILE=colvar FMT=%8.4f
-RESTRAINT ARG=v.a AT=2 KAPPA=3 SLOPE=3
-RESTRAINT ARG=v.b AT=2 KAPPA=3 SLOPE=3
-RESTRAINT ARG=v.c AT=2 KAPPA=3 SLOPE=3
-EOF
- if [[ $initialize = "true" ]]; then
- (
- cd "$dir" || exit
- # touch forces.reference
- touch colvar.reference
-
- echo "include ../../scripts/test.make" >Makefile
-
- cat <config
-type=driver
-arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz trajectory.xyz --dump-forces forces --dump-forces-fmt=%10.6f --pdb print_pdb_test.pdb"
-
-extra_files="../../trajectories/trajectory.xyz ../../trajectories/print_pdb_test.pdb"
-
-#export NVCOMPILER_ACC_NOTIFY=31
-EOF
- make reset
- grep -vzq FAILURE report.txt
- ) >>/dev/null || echo "fail: $i, \"$line\""
- fi
- i=$((i + 1))
- done
-
-fi
-
-
-if [[ $action = "run" ]]; then
- for dir in rt-GPU-MCVT-B*; do
-
- (
- cd "$dir" || exit
- make
- grep -vzq FAILURE report.txt
- ) >>/dev/null || {
- echo "####"
- echo "FAILURE in:"
- echo "$dir"
- grep 'v:' "${dir}/plumed.dat"
- } && {
- echo -n ""
- # tail "$dir/tmp/out" | grep 'Cycles Total Average Minimum MaximumCalculating'
- # tail "$dir/tmp/out" | grep Calculating -A1
- }
- done
-fi
-
-if [[ $action = "clean" ]]; then
- for dir in rt-GPU-secondarystructure-DRMSD-play-*; do
- (
- cd "$dir" || exit
- make clean
-
- )
- done
-fi
diff --git a/regtest/targetGPU/distribuitedMCTests.sh b/regtest/targetGPU/distribuitedMCTests.sh
deleted file mode 100644
index a495eb108e..0000000000
--- a/regtest/targetGPU/distribuitedMCTests.sh
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/bin/bash
-# checked with shellcheck
-# formatted with shfmtv3.36.0
-
-action="run"
-initialize="false"
-USEGPU="USEGPU"
-basedir="rt-GPU-MCVT-"
-if [[ $1 = "prepare" ]]; then
- action="prepare"
-elif [[ $1 = "reset" ]]; then
- action="prepare"
- initialize="true"
- USEGPU=""
-elif [[ $1 = "clean" ]]; then
- action="clean"
-fi
-
-if [[ $action = "prepare" ]]; then
- inputLine=()
- inputLineComponents=()
- inputLine[${#inputLine[@]}]="DISTANCE ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 $USEGPU"
- inputLineComponents[${#inputLineComponents[@]}]="DISTANCE ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 COMPONENTS $USEGPU"
- inputLineComponents[${#inputLineComponents[@]}]="DISTANCE ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 SCALED_COMPONENTS $USEGPU"
- inputLine[${#inputLine[@]}]="ANGLE ATOMS1=1,2,3 ATOMS2=4,5,6,7 ATOMS3=8,9,10 $USEGPU"
- inputLine[${#inputLine[@]}]="TORSION ATOMS1=1,2,3,4 VECTORA2=5,6 AXIS2=7,8 VECTORB2=9,10 ATOMS3=11,12,13,14 $USEGPU"
- inputLine[${#inputLine[@]}]="TORSION ATOMS1=1,2,3,4 VECTORA2=5,6 AXIS2=7,8 VECTORB2=9,10 ATOMS3=11,12,13,14 COSINE $USEGPU"
- #inputLine[${#inputLine[@]}]="TORSION ATOMS1=1,2,3,4 VECTORA2=5,6 AXIS2=7,8 VECTORB2=9,10 ATOMS3=11,12,13,14 $USEGPU"
- #ct5: CUSTOM ARG=tt4 FUNC=cos(x) PERIODIC=NO
-
- inputLineComponents[${#inputLineComponents[@]}]="POSITION ATOM1=1 ATOM2=3 ATOM3=5 $USEGPU"
- inputLineComponents[${#inputLineComponents[@]}]="POSITION ATOM1=1 ATOM2=3 ATOM3=5 SCALED_COMPONENTS $USEGPU"
- inputLine[${#inputLine[@]}]="DIPOLE GROUP1=1-6 GROUP2=7-12 $USEGPU"
- inputLineComponents[${#inputLineComponents[@]}]="DIPOLE GROUP1=1-6 GROUP2=7-12 COMPONENTS $USEGPU"
-
- i=0
- for line in "${inputLine[@]}"; do
- echo "$i $line"
- dir=${basedir}$i
- mkdir -pv "$dir"
-
- cat <"$dir"/plumed.dat
-v: $line
-PRINT ARG=v STRIDE=1 FILE=colvar FMT=%8.4f
-#RESTRAINT ARG=v AT=2 KAPPA=3 SLOPE=3
-EOF
- if [[ $initialize = "true" ]]; then
- (
- cd "$dir" || exit
- #touch forces.reference
- touch colvar.reference
-
- echo "include ../../scripts/test.make" >Makefile
-
- cat <config
-type=driver
-arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz trajectory.xyz --dump-forces forces --dump-forces-fmt=%10.6f --pdb print_pdb_test.pdb"
-
-extra_files="../../trajectories/trajectory.xyz ../../trajectories/print_pdb_test.pdb"
-
-#export NVCOMPILER_ACC_NOTIFY=31
-EOF
- make reset
- grep -vzq FAILURE report.txt
- ) >>/dev/null || echo "fail: $i, \"$line\""
- fi
- i=$((i + 1))
- done
-
- for line in "${inputLineComponents[@]}"; do
- echo "$i $line"
- dir=${basedir}$i
- mkdir -pv "$dir"
-
- cat <"$dir"/plumed.dat
-v: $line
-PRINT ARG=v.* STRIDE=1 FILE=colvar FMT=%8.4f
-EOF
- if [[ $initialize = "true" ]]; then
- (
- cd "$dir" || exit
- # touch forces.reference
- touch colvar.reference
-
- echo "include ../../scripts/test.make" >Makefile
-
- cat <config
-type=driver
-arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz trajectory.xyz --dump-forces forces --dump-forces-fmt=%10.6f --pdb print_pdb_test.pdb"
-
-extra_files="../../trajectories/trajectory.xyz ../../trajectories/print_pdb_test.pdb"
-
-#export NVCOMPILER_ACC_NOTIFY=31
-EOF
- make reset
- grep -vzq FAILURE report.txt
- ) >>/dev/null || echo "fail: $i, \"$line\""
- fi
- i=$((i + 1))
- done
-
-fi
-
-if [[ $action = "run" ]]; then
- for dir in rt-GPU-MCVT*; do
-
- (
- cd "$dir" || exit
- make
- grep -vzq FAILURE report.txt
- ) >>/dev/null || {
- echo "####"
- echo "FAILURE in:"
- echo "$dir"
- grep 'v:' "${dir}/plumed.dat"
- } && {
- echo -n ""
- # tail "$dir/tmp/out" | grep 'Cycles Total Average Minimum MaximumCalculating'
- # tail "$dir/tmp/out" | grep Calculating -A1
- }
- done
-fi
-
-if [[ $action = "clean" ]]; then
- for dir in rt-GPU-secondarystructure-DRMSD-play-*; do
- (
- cd "$dir" || exit
- make clean
-
- )
- done
-fi
diff --git a/regtest/targetGPU/distribuitedTests.sh b/regtest/targetGPU/distribuitedTests.sh
deleted file mode 100644
index c4565f42a6..0000000000
--- a/regtest/targetGPU/distribuitedTests.sh
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/bin/bash
-# checked with shellcheck
-# formatted with shfmtv3.36.0
-
-action="run"
-initialize="false"
-USEGPU="USEGPU"
-basedir="rt-GPU-secondarystructure-DRMSD-"
-if [[ $1 = "prepare" ]]; then
- action="prepare"
-elif [[ $1 = "reset" ]]; then
- action="prepare"
- initialize="true"
- USEGPU=""
-elif [[ $1 = "clean" ]]; then
- action="clean"
-fi
-
-if [[ $action = "prepare" ]]; then
- inputLine=()
- inputLineNoBias=()
- inputLine[${#inputLine[@]}]="ALPHARMSD RESIDUES=ALL TYPE=DRMSD LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12 NOSTRETCH} $USEGPU"
- inputLine[${#inputLine[@]}]="ANTIBETARMSD RESIDUES=all TYPE=DRMSD STRANDS_CUTOFF=1.0 LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12 NOSTRETCH} $USEGPU"
- inputLine[${#inputLine[@]}]="PARABETARMSD RESIDUES=all TYPE=DRMSD STRANDS_CUTOFF=1.0 LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12 NOSTRETCH} $USEGPU"
- inputLine[${#inputLine[@]}]="ANTIBETARMSD RESIDUES=3-5,8-10 TYPE=DRMSD STYLE=inter LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12 NOSTRETCH} $USEGPU"
- inputLine[${#inputLine[@]}]="PARABETARMSD RESIDUES=all TYPE=DRMSD LESS_THAN={RATIONAL R_0=0.08 NN=8 MM=12} $USEGPU"
-
- inputLineNoBias[${#inputLineNoBias[@]}]="ALPHARMSD RESIDUES=2-7 TYPE=DRMSD R_0=0.08 NN=8 MM=12 $USEGPU"
- inputLineNoBias[${#inputLineNoBias[@]}]="ALPHARMSD RESIDUES=ALL TYPE=DRMSD $USEGPU"
- inputLineNoBias[${#inputLineNoBias[@]}]="PARABETARMSD RESIDUES=all TYPE=DRMSD NN=8 MM=12 R_0=0.08 $USEGPU"
-
- i=0
- for line in "${inputLine[@]}"; do
- dir=${basedir}$i
- mkdir -pv "$dir"
-
- cat <"$dir"/plumed.dat
-MOLINFO STRUCTURE=helix.pdb
-v: $line
-PRINT ARG=v.* STRIDE=1 FILE=colvar FMT=%8.4f
-RESTRAINT ARG=v.lessthan AT=2 KAPPA=3 SLOPE=3
-EOF
- if [[ $initialize = "true" ]]; then
- (
- cd "$dir" || exit
- touch forces.reference
- touch colvar.reference
- cp ../rt-GPU-secondarystructure-DRMSD/*.pdb .
- cp ../rt-GPU-secondarystructure-DRMSD/*.xyz .
- echo "include ../../scripts/test.make" >Makefile
-
- cat <config
-type=driver
-arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz ala12_trajectory.xyz --dump-forces forces --dump-forces-fmt=%10.6f"
-
-#export NVCOMPILER_ACC_NOTIFY=31
-EOF
- make reset
- grep -vzq FAILURE report.txt
- ) >>/dev/null || echo "fail: $i, \"$line\""
- fi
- i=$((i + 1))
- done
-
- for line in "${inputLineNoBias[@]}"; do
- dir=${basedir}$i
- mkdir -pv "$dir"
-
- cat <"$dir"/plumed.dat
-MOLINFO STRUCTURE=helix.pdb
-v: $line
-PRINT ARG=v.* STRIDE=1 FILE=colvar FMT=%8.4f
-EOF
- if [[ $initialize = "true" ]]; then
- (
- cd "$dir" || exit
- touch forces.reference
- touch colvar.reference
- cp ../rt-GPU-secondarystructure-DRMSD/*.pdb .
- cp ../rt-GPU-secondarystructure-DRMSD/*.xyz .
- echo "include ../../scripts/test.make" >Makefile
-
- cat <config
-type=driver
-arg="--plumed plumed.dat --trajectory-stride 10 --timestep 0.005 --ixyz ala12_trajectory.xyz --dump-forces forces --dump-forces-fmt=%10.6f"
-
-#export NVCOMPILER_ACC_NOTIFY=31
-EOF
- make reset
- grep -vzq FAILURE report.txt
- ) >>/dev/null || echo "fail: $i, \"$line\""
- fi
- i=$((i + 1))
- done
-
-fi
-
-if [[ $action = "run" ]]; then
- for dir in rt-GPU-*; do
-
- (
- cd "$dir" || exit
- make
- grep -vzq FAILURE report.txt
- ) >>/dev/null || {
- echo "####"
- echo "FAILURE in:"
- echo "$dir"
- grep 'v:' "${dir}/plumed.dat"
- } && {
- echo -n ""
- # tail "$dir/tmp/out" | grep 'Cycles Total Average Minimum MaximumCalculating'
- # tail "$dir/tmp/out" | grep Calculating -A1
- }
- done
-fi
-
-if [[ $action = "clean" ]]; then
- for dir in rt-GPU-secondarystructure-DRMSD-play-*; do
- (
- cd "$dir" || exit
- make clean
-
- )
- done
-fi
diff --git a/regtest/targetGPU/rt-GPU-DISTANCE/plumed.dat b/regtest/targetGPU/rt-GPU-DISTANCE/plumed.dat
deleted file mode 100644
index c1e9dfc0b6..0000000000
--- a/regtest/targetGPU/rt-GPU-DISTANCE/plumed.dat
+++ /dev/null
@@ -1,8 +0,0 @@
-#original test was 3 task of 3 components, this is 4 task of 3 componets, so I can manage better where the 3 comes from
-d1: DISTANCE COMPONENTS ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 ATOMS4=1,6 USEGPU
-v: VSTACK ARG=d1.x,d1.y,d1.z
-vT: TRANSPOSE ARG=v
-s: SUM ARG=vT PERIODIC=NO
-PRINT ARG=d1.* FILE=dists FMT=%8.4f
-PRINT ARG=s FILE=colvar FMT=%8.4f
-BIASVALUE ARG=s
diff --git a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/colvar.reference b/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/colvar.reference
deleted file mode 100644
index c0c647ec2a..0000000000
--- a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/colvar.reference
+++ /dev/null
@@ -1,20 +0,0 @@
-#! FIELDS time s
-#! SET min_s -pi
-#! SET max_s pi
- 0.000000 0.1232
- 1.000000 -0.0261
- 2.000000 0.1719
- 3.000000 -1.3292
- 4.000000 -1.4901
- 5.000000 0.0010
- 6.000000 -1.1835
- 7.000000 -0.3836
- 8.000000 -1.4126
- 9.000000 -1.0617
- 10.000000 0.0000
- 11.000000 -3.1416
- 12.000000 -0.1065
- 13.000000 0.0012
- 14.000000 -1.5912
- 15.000000 -0.0000
- 16.000000 -0.0676
diff --git a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/plumed.dat b/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/plumed.dat
deleted file mode 100644
index dc561d505d..0000000000
--- a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/plumed.dat
+++ /dev/null
@@ -1,6 +0,0 @@
-trs: TORSION ATOMS1=1,2,3,4 ATOMS2=3,4,5,6 ATOMS3=2,3,4,5 ATOMS4=1,2,5,6 USEGPU
-
-s: SUM ARG=trs PERIODIC=-pi,pi
-PRINT ARG=trs FILE=tors FMT=%8.4f
-PRINT ARG=s FILE=colvar FMT=%8.4f
-BIASVALUE ARG=s
diff --git a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/tors.reference b/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/tors.reference
deleted file mode 100644
index e1e0c14395..0000000000
--- a/regtest/targetGPU/rt-GPU-TORSION-biasIsSUM/tors.reference
+++ /dev/null
@@ -1,20 +0,0 @@
-#! FIELDS time trs.1 trs.2 trs.3 trs.4
-#! SET min_trs -pi
-#! SET max_trs pi
- 0.000000 0.1667 0.0000 -0.0834 0.0400
- 1.000000 0.0682 -0.0085 -0.0574 -0.0283
- 2.000000 0.0814 -0.5201 0.3719 0.2387
- 3.000000 -0.0831 -0.1011 -0.4395 -0.7055
- 4.000000 0.0081 -0.1375 -0.5609 -0.7998
- 5.000000 -0.0000 -3.1416 -3.1406 -0.0000
- 6.000000 0.0200 2.6856 -0.1632 2.5572
- 7.000000 1.2403 -1.7220 0.1118 -0.0136
- 8.000000 -0.0103 -0.4899 0.0174 -0.9298
- 9.000000 -0.0183 -0.5304 0.0000 -0.5130
- 10.000000 -0.0001 0.0001 0.0000 -0.0000
- 11.000000 0.0000 -3.1416 -3.1416 -3.1416
- 12.000000 0.0055 -0.0112 -0.0034 -0.0975
- 13.000000 0.0009 0.0005 -0.0009 0.0006
- 14.000000 0.0286 -0.3142 -0.0169 -1.2887
- 15.000000 0.0000 0.0000 -0.0000 -0.0000
- 16.000000 -1.1854 1.1178 0.0003 -0.0003
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix/coords.reference b/regtest/targetGPU/rt-adjmat-basic-matrix/coords.reference
deleted file mode 100644
index a02d335502..0000000000
--- a/regtest/targetGPU/rt-adjmat-basic-matrix/coords.reference
+++ /dev/null
@@ -1,18 +0,0 @@
-#! FIELDS time cc.1 cc.2 cc.3 cc.4 cc.5 cc.6 cc.7
- 0.000000 4.46566 4.10850 3.63302 3.57930 3.63245 4.11256 2.37411
- 1.000000 3.91738 4.43991 4.35299 3.87437 3.65999 3.65829 3.17390
- 2.000000 3.54957 3.74537 3.61167 3.61935 3.61214 3.59171 3.50725
- 3.000000 3.79237 3.56206 3.61228 3.63247 3.65638 3.57460 3.61015
- 4.000000 3.57150 3.81183 3.59765 3.60209 3.66333 3.68429 3.62085
- 5.000000 3.50112 3.50112 3.49697 3.49697 3.50777 3.50777 3.49693
- 6.000000 3.80643 3.56238 3.85363 5.03687 4.92002 3.50579 3.36274
- 7.000000 3.59722 4.99874 3.58017 3.90625 4.84507 3.55930 3.72120
- 8.000000 4.57943 4.58007 3.88238 3.60851 3.88263 4.30509 2.17297
- 9.000000 4.68555 3.90649 3.44913 3.44909 3.90647 3.33067 1.74511
- 10.000000 4.67865 3.81642 3.37773 3.39538 3.91952 3.29259 1.71067
- 11.000000 2.64515 1.68995 3.26061 3.18501 3.17662 2.60149 1.58498
- 12.000000 3.91745 4.85212 3.91728 3.44451 3.44455 3.16351 1.89748
- 13.000000 3.97196 4.78409 3.93409 3.40543 3.38665 3.18219 1.95781
- 14.000000 4.08288 4.73992 3.91445 3.46537 3.48869 3.27422 2.07807
- 15.000000 3.66878 4.10845 4.44719 4.20548 3.60765 3.59714 2.23526
- 16.000000 4.16870 5.00342 4.16888 4.19368 4.91772 4.19356 4.47857
diff --git a/regtest/targetGPU/rt-adjmat-basic-matrix/forces.reference b/regtest/targetGPU/rt-adjmat-basic-matrix/forces.reference
deleted file mode 100644
index 61d13f94ab..0000000000
--- a/regtest/targetGPU/rt-adjmat-basic-matrix/forces.reference
+++ /dev/null
@@ -1,272 +0,0 @@
-14
--11.7529 -0.0185 -12.0120
-X -1.2086 -0.0122 -0.7014
-X -2.2206 0.1846 2.4328
-X 0.0612 -0.0123 2.0864
-X 1.8111 -0.0390 1.0415
-X 1.8363 -0.0321 -0.9934
-X 0.9931 -0.0595 -3.1271
-X -1.2726 -0.0295 -0.7387
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
--15.4835 -4.0233 -10.1720
-X 4.1853 -1.1156 0.1042
-X 0.6947 -1.3034 -1.5482
-X -1.8950 -0.7696 -1.3017
-X -3.7924 1.2436 1.2682
-X -0.8266 1.4965 1.8540
-X 1.9284 0.5908 1.4056
-X -0.2943 -0.1424 -1.7821
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
- -8.9763 -2.5817 -7.0672
-X 1.1577 -0.3744 0.0623
-X 1.6093 -1.2648 -1.6179
-X -1.6860 -0.2058 -0.5389
-X -1.5571 0.2912 0.6552
-X -0.2886 0.9872 1.3454
-X 0.9399 0.6956 1.1962
-X -0.1752 -0.1290 -1.1022
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
--12.1661 -0.7729 -9.5142
-X 3.0752 -0.0004 -0.0961
-X 0.7727 -0.3687 -1.1722
-X -0.7341 -0.1650 -1.8716
-X -1.8278 0.5488 -0.6796
-X -1.9553 0.4153 0.9757
-X -0.5468 -0.5079 1.6756
-X 1.2160 0.0780 1.1683
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
--11.2306 -1.1175 -12.6378
-X 1.6243 0.1528 -0.1406
-X 1.8110 -0.7205 -2.7990
-X -0.4177 -0.2493 -1.6891
-X -1.8791 0.6672 -0.5919
-X -1.9732 0.6129 1.0999
-X -0.5267 -0.6099 2.4684
-X 1.3614 0.1467 1.6522
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
- -3.1932 -0.3115 -3.5041
-X -0.5418 -0.1694 -0.2520
-X -0.5419 -0.1694 0.2520
-X -0.1168 -0.0363 0.5894
-X -0.1168 -0.0362 -0.5894
-X 0.3741 0.1168 0.5078
-X 0.3741 0.1170 -0.5078
-X 0.5691 0.1775 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
- -6.1016 -6.1116 -5.1466
-X -1.6176 -2.4456 0.9183
-X 0.1723 -0.3829 0.6216
-X 2.8315 0.7255 1.4982
-X 0.3465 0.7312 -0.5812
-X -0.7805 -0.2384 -0.8416
-X -0.3728 1.0549 -0.9107
-X -0.5794 0.5553 -0.7045
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
--10.5457 -8.3226 -0.7069
-X -1.5828 -0.6758 -0.2480
-X -0.6039 -0.9498 0.4270
-X 0.9527 0.1283 -0.2721
-X 1.8731 3.0858 -0.3648
-X -0.6030 0.6552 0.4300
-X -1.6086 0.0735 -0.1698
-X 1.5724 -2.3172 0.1978
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
--10.9705 -8.8664 -2.8882
-X 0.9176 -0.4528 1.1395
-X 0.4501 1.4201 0.3530
-X -2.5779 2.3720 -1.7199
-X -1.1749 -0.5566 -0.6280
-X -1.0712 -3.6636 0.8130
-X 2.7006 0.7653 0.2176
-X 0.7558 0.1156 -0.1750
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
- -7.8056 -8.7204 -0.6692
-X 0.4583 -0.0332 0.1815
-X -0.5352 3.1831 0.9143
-X -0.7866 0.8316 -0.0458
-X -0.7861 -0.7616 -0.3384
-X -0.5331 -3.3006 -0.2764
-X 1.6346 0.0701 -0.3784
-X 0.5481 0.0106 -0.0569
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
- -6.9259 -2.1034 -6.7351
-X -0.2296 0.0319 -0.2869
-X -1.7249 -1.5363 1.9635
-X 0.1208 -0.3867 1.0092
-X 0.9165 0.2913 0.1746
-X 2.3048 1.5304 -1.4125
-X -1.0492 0.0514 -1.0924
-X -0.3384 0.0180 -0.3555
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
- -0.0043 0.0000 -0.0337
-X 0.0008 0.0000 0.0015
-X 0.0010 0.0000 0.0044
-X -0.0003 0.0000 0.0022
-X 0.0007 0.0000 -0.0009
-X -0.0008 0.0000 -0.0046
-X -0.0009 0.0000 -0.0018
-X -0.0005 0.0000 -0.0007
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
- -7.9176 -8.5214 -0.6659
-X -0.5252 -3.2121 -0.5459
-X 0.3441 0.0185 -0.0996
-X -0.5278 3.1962 0.6298
-X -0.7623 0.7447 0.3250
-X -0.7616 -0.8122 0.0394
-X 1.5651 0.0750 -0.4047
-X 0.6677 -0.0100 0.0560
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
- -8.8629 -8.5241 -0.0003
-X -0.2000 -3.3301 0.0176
-X 0.3076 0.1505 -0.0006
-X -0.8131 3.0850 -0.0176
-X -0.9330 0.5915 -0.0032
-X -0.7526 -0.7947 0.0042
-X 1.5930 0.2863 -0.0006
-X 0.7980 0.0115 0.0003
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
- -8.0421 -8.4845 -0.7712
-X -0.3029 -3.0058 0.6902
-X 0.4250 0.1021 0.2841
-X -1.0888 3.1436 0.0021
-X -0.7966 0.5694 -0.3740
-X -0.6221 -1.0061 -0.2491
-X 1.5442 0.2101 -0.0824
-X 0.8411 -0.0132 -0.2709
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
--11.3834 -11.0342 -0.0068
-X -1.1413 1.8689 -0.0495
-X 0.8421 2.9433 -0.0697
-X 1.4435 -0.1361 0.0079
-X 0.6087 -2.7364 0.0692
-X -1.0312 -1.7207 0.0391
-X -2.0449 -0.0707 -0.0046
-X 1.3231 -0.1484 0.0077
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-14
--10.8672 -9.2775 -5.9309
-X 1.5136 2.5965 -1.5726
-X 0.1837 -0.4081 -1.0603
-X -3.0363 -1.2158 -0.8956
-X -2.5575 -1.1194 1.5926
-X 0.4993 -0.3944 1.1399
-X 1.7725 2.5083 0.9489
-X 1.6246 -1.9670 -0.1529
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
-X 0.0000 0.0000 0.0000
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-one-q6/colv1.reference b/regtest/targetGPU/rt-symfunc-nbonds-one-q6/colv1.reference
deleted file mode 100644
index 65e2cc8c1a..0000000000
--- a/regtest/targetGPU/rt-symfunc-nbonds-one-q6/colv1.reference
+++ /dev/null
@@ -1,2 +0,0 @@
-#! FIELDS time w6
- 0.000000 31.2882
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-one-q6/forces.reference b/regtest/targetGPU/rt-symfunc-nbonds-one-q6/forces.reference
deleted file mode 100644
index d7788a757f..0000000000
--- a/regtest/targetGPU/rt-symfunc-nbonds-one-q6/forces.reference
+++ /dev/null
@@ -1,66 +0,0 @@
-64
--106.7571 77.1605 -2.3060
-X -1.9360 -2.2745 -6.2646
-X 9.1140 -1.2294 20.5367
-X -5.3464 -3.0208 22.3305
-X 4.8957 -1.2996 -7.6059
-X 0.0209 -0.1193 -0.0225
-X 0.6590 8.6035 0.6692
-X 7.9899 0.4593 -0.1673
-X 1.9363 1.3545 2.2160
-X -8.3855 4.3400 6.6035
-X -2.1788 8.7509 -1.4810
-X 3.4280 -14.8706 -3.6056
-X -3.2670 0.5906 -7.9737
-X -0.1695 0.3182 6.3447
-X -1.9290 -4.6495 -7.1641
-X 2.2993 -5.6411 -1.6758
-X -12.9872 -2.5351 -4.4377
-X 4.2751 1.2023 4.9743
-X 3.0469 -4.8951 7.2375
-X 0.8919 -7.8115 -9.2222
-X 0.5335 3.8606 6.7507
-X 1.0973 12.0449 2.7568
-X 9.5187 -11.0087 -8.0466
-X 0.0755 -3.2723 8.1532
-X -4.7208 5.4793 2.0939
-X -5.1874 -10.5065 -10.6462
-X 4.8058 8.3682 1.0234
-X -6.8109 11.6990 1.2832
-X 3.6819 3.4047 -0.9343
-X -4.2988 -1.1830 1.0438
-X 0.6230 8.0716 -22.2132
-X -1.5530 -4.2628 -6.3275
-X -7.9129 -3.0261 12.4253
-X -7.6973 -7.1771 1.4027
-X -0.6930 -2.6421 3.4878
-X 4.9328 6.0213 1.7788
-X -16.7645 -0.0890 -7.7296
-X -0.7179 -13.6532 1.0868
-X -1.2952 -2.2488 3.4969
-X -10.1070 4.8564 12.9132
-X -9.8394 -1.1509 -13.1097
-X 5.7940 6.0021 -2.8803
-X -3.7998 5.5769 14.4462
-X 3.5659 4.3264 -1.5596
-X -0.1006 15.3403 4.0990
-X 4.2663 -0.5217 9.2966
-X -7.2712 2.5225 -10.0530
-X -11.3184 0.4627 1.2938
-X 2.4396 -2.8740 -13.6829
-X -3.4174 -1.3823 -1.3163
-X 9.0495 -0.9796 3.1617
-X 5.8471 -8.0591 -11.1142
-X 5.9064 -0.0601 8.1531
-X -7.1817 1.8354 15.4212
-X 7.7601 7.3024 4.7172
-X 8.8340 10.0608 -13.4993
-X -7.2098 4.4126 -14.9404
-X -6.7263 -9.9006 -7.8963
-X 1.2421 -13.7278 -0.5332
-X 0.6479 10.6837 -16.5880
-X 12.1371 -2.8863 -1.0563
-X 0.8573 -1.1242 20.7123
-X 2.7276 11.8767 -2.5897
-X 8.6666 0.4273 -0.7667
-X 17.2560 -20.1724 5.1936
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-one-q6/plumed.dat b/regtest/targetGPU/rt-symfunc-nbonds-one-q6/plumed.dat
deleted file mode 100644
index d565bd11e6..0000000000
--- a/regtest/targetGPU/rt-symfunc-nbonds-one-q6/plumed.dat
+++ /dev/null
@@ -1,17 +0,0 @@
-q6: Q6 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN USEGPU
-
-#Â Create a normalising matrix
-q6_uones: ONES SIZE=26
-q6_nmat: OUTER_PRODUCT ARG=q6_norm,q6_uones
-udata6: VSTACK ARG=q6_sp.*
-data6: CUSTOM ARG=udata6,q6_nmat FUNC=x/y PERIODIC=NO
-data6T: TRANSPOSE ARG=data6
-
-con6: CONTACT_MATRIX GROUP=q6 SWITCH={RATIONAL D_0=3.0 R_0=1.5} USEGPU
-dot6: MATRIX_PRODUCT ARG=data6,data6T MASK=con6 USEGPU
-ww6: CUSTOM ARG=con6,dot6 FUNC=x*y PERIODIC=NO
-w6: SUM ARG=ww6 PERIODIC=NO
-
-PRINT ARG=w6 FILE=colv1 FMT=%8.4f
-
-RESTRAINT ARG=w6 AT=30 KAPPA=1
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-q6/colv1.reference b/regtest/targetGPU/rt-symfunc-nbonds-q6/colv1.reference
deleted file mode 100644
index 65e2cc8c1a..0000000000
--- a/regtest/targetGPU/rt-symfunc-nbonds-q6/colv1.reference
+++ /dev/null
@@ -1,2 +0,0 @@
-#! FIELDS time w6
- 0.000000 31.2882
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-q6/colv2.reference b/regtest/targetGPU/rt-symfunc-nbonds-q6/colv2.reference
deleted file mode 100644
index f9606fdf81..0000000000
--- a/regtest/targetGPU/rt-symfunc-nbonds-q6/colv2.reference
+++ /dev/null
@@ -1,2 +0,0 @@
-#! FIELDS time w4
- 0.000000 67.6239
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-q6/forces.reference b/regtest/targetGPU/rt-symfunc-nbonds-q6/forces.reference
deleted file mode 100644
index 21512b5264..0000000000
--- a/regtest/targetGPU/rt-symfunc-nbonds-q6/forces.reference
+++ /dev/null
@@ -1,66 +0,0 @@
-64
- 35.6178 233.2021 594.1096
-X -1.1090 -8.0931 -10.8826
-X 20.1914 9.1972 33.1012
-X -7.2433 -4.7241 24.1188
-X -0.5613 6.5246 -21.6037
-X -1.6585 -10.4122 2.5490
-X -27.6995 -1.9626 -14.2509
-X 7.4933 4.8792 -2.1363
-X -5.0379 -2.3678 -3.5793
-X -0.2218 -3.0763 16.8300
-X 9.1047 9.2066 -2.5416
-X -18.0789 -14.0220 3.8151
-X -6.3715 11.7773 -2.2729
-X 16.1859 -6.9319 25.5446
-X -0.6996 18.4939 -8.1891
-X -5.1562 -1.1171 -3.2800
-X -18.5409 -1.9242 -12.5475
-X 23.3042 15.1516 8.2474
-X 16.1888 -13.8679 5.4119
-X 2.2552 -10.1397 -14.0183
-X 0.3735 8.3007 -14.7275
-X 11.2690 5.6741 -10.3180
-X -1.4197 -27.6537 -11.4799
-X 8.7529 -9.6092 18.1892
-X -15.7129 -6.0096 10.4283
-X -9.6871 -7.6271 -21.2446
-X 23.9197 31.8715 7.6719
-X -10.7465 2.9191 7.8935
-X 4.5999 8.6750 -2.9585
-X -8.4942 -10.9668 -23.7202
-X 7.0508 5.3489 -42.5071
-X 2.5450 -9.7580 -22.3195
-X -7.7330 -24.2511 32.0889
-X -4.3825 -8.3764 24.3058
-X 2.3715 2.5780 -28.4529
-X 20.2640 -2.9183 27.5157
-X -34.8277 -4.0827 -20.2956
-X 6.6003 -11.7928 7.9191
-X -0.1759 3.8699 -0.3237
-X -7.1729 13.0739 24.2590
-X -22.6281 -1.3048 -16.5224
-X 22.0167 15.1831 -4.2115
-X -9.4277 15.3892 15.3749
-X -2.4917 -2.3009 5.3769
-X 8.6785 7.0673 5.0115
-X -0.9090 9.5521 14.5193
-X -9.7282 -9.5758 -12.6614
-X -13.6139 1.1621 4.6502
-X -1.2772 -7.7462 -17.0120
-X -1.8947 6.2766 -21.6470
-X -1.0801 6.0876 -5.8118
-X 13.9424 3.9885 -5.4200
-X 19.3351 5.6165 17.5935
-X -11.6539 6.2622 39.0639
-X 11.9032 8.2731 3.7823
-X 2.7352 20.5966 4.4860
-X 4.5448 -17.3924 -24.1895
-X -25.7250 1.4864 -15.5689
-X -5.9445 -18.2450 2.0745
-X 12.3993 25.3743 -12.8354
-X 8.4740 -5.7727 -18.3089
-X -1.2052 1.3296 32.2614
-X 2.5622 7.9696 -2.6587
-X -1.1658 -7.0903 9.6047
-X 12.4146 -28.0434 16.8084
diff --git a/regtest/targetGPU/rt-symfunc-nbonds-q6/plumed.dat b/regtest/targetGPU/rt-symfunc-nbonds-q6/plumed.dat
deleted file mode 100644
index 9da204a08d..0000000000
--- a/regtest/targetGPU/rt-symfunc-nbonds-q6/plumed.dat
+++ /dev/null
@@ -1,35 +0,0 @@
-q6: Q6 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN USEGPU
-q4: Q4 SPECIES=1-64 D_0=3.0 R_0=1.5 NN=12 MEAN USEGPU
-
-#Â Create a normalising matrix
-q6_uones: ONES SIZE=26
-q6_nmat: OUTER_PRODUCT ARG=q6_norm,q6_uones
-udata6: VSTACK ARG=q6_sp.*
-data6: CUSTOM ARG=udata6,q6_nmat FUNC=x/y PERIODIC=NO
-data6T: TRANSPOSE ARG=data6
-
-# Create a normalising matrix
-q4_uones: ONES SIZE=18
-q4_nmat: OUTER_PRODUCT ARG=q4_norm,q4_uones
-udata4: VSTACK ARG=q4_sp.*
-data4: CUSTOM ARG=udata4,q4_nmat FUNC=x/y PERIODIC=NO
-data4T: TRANSPOSE ARG=data4
-
-con6: CONTACT_MATRIX GROUP=q6 SWITCH={RATIONAL D_0=3.0 R_0=1.5}
-dot6: MATRIX_PRODUCT ARG=data6,data6T MASK=con6 USEGPU
-
-ww6: CUSTOM ARG=con6,dot6 FUNC=x*y PERIODIC=NO
-
-w6: SUM ARG=ww6 PERIODIC=NO
-
-PRINT ARG=w6 FILE=colv1 FMT=%8.4f
-
-dot4: MATRIX_PRODUCT ARG=data4,data4T MASK=con6 USEGPU
-
-ww4: CUSTOM ARG=con6,dot4 FUNC=x*y PERIODIC=NO
-
-w4: SUM ARG=ww4 PERIODIC=NO
-
-PRINT ARG=w4 FILE=colv2 FMT=%8.4f
-
-RESTRAINT ARG=w6,w4 AT=30,66 KAPPA=1,1
diff --git a/regtest/tools/rt-make-angle/main.cpp b/regtest/tools/rt-make-angle/main.cpp
index 51dc1ecc28..3591864c0b 100644
--- a/regtest/tools/rt-make-angle/main.cpp
+++ b/regtest/tools/rt-make-angle/main.cpp
@@ -5,71 +5,83 @@
using namespace PLMD;
+template
+using myVector=PLMD::VectorTyped;
+//by removing the \n the diff becames clearer
+template
int testCompute2Vectors90Degrees(std::ofstream &ofs) {
- ofs << "testCompute2Vectors90Degrees" << std::endl;
- Vector vector1(1.0, 0.0, 0.0);
- Vector vector2(0.0, 1.0, 0.0);
+ ofs << "testCompute2Vectors90Degrees ";
+ myVector vector1(1.0, 0.0, 0.0);
+ myVector vector2(0.0, 1.0, 0.0);
Angle angle;
- double result = angle.compute(vector1, vector2);
+ auto result = angle.compute(vector1, vector2);
ofs << result << std::endl;
return 0;
}
+template
int testCompute2Vectors45Degrees(std::ofstream &ofs) {
- ofs << "testCompute2Vectors45Degrees" << std::endl;
- Vector vector1(1.0, 0.0, 0.0);
- Vector vector2(1.0, 1.0, 0.0);
+ ofs << "testCompute2Vectors45Degrees ";
+ myVector vector1(1.0, 0.0, 0.0);
+ myVector vector2(1.0, 1.0, 0.0);
Angle angle;
- double result = angle.compute(vector1, vector2);
+ auto result = angle.compute(vector1, vector2);
ofs << result << std::endl;
return 0;
}
+template
int testCompute4Vectors45Degrees(std::ofstream &ofs) {
- ofs << "testCompute4Vectors45Degrees" << std::endl;
- Vector vector1(1.0, 1.0, 0.0);
- Vector vector2(1.0, 0.0, 0.0);
- Vector d1, d2;
+ ofs << "testCompute4Vectors45Degrees ";
+ myVector vector1(1.0, 1.0, 0.0);
+ myVector vector2(1.0, 0.0, 0.0);
+ myVector d1, d2;
Angle angle;
- double result = angle.compute(vector1, vector2, d1, d2);
+ auto result = angle.compute(vector1, vector2, d1, d2);
ofs << result << std::endl;
- ofs << d1 << std::endl;
- ofs << d2 << std::endl;
+ ofs << "testCompute4Vectors45Degrees d1= " << d1 << std::endl;
+ ofs << "testCompute4Vectors45Degrees d2= " << d2 << std::endl;
return 0;
}
+template
int testCompute4VectorsParallel(std::ofstream &ofs) {
- ofs << "testCompute4VectorsParallel" << std::endl;
- Vector vector1(1.0, 1.0, 0.0);
- Vector vector2(1.0, 1.0, 0.0);
- Vector d1, d2;
- Angle angle;
- double result = angle.compute(vector1, vector2, d1, d2);
+ ofs << "testCompute4VectorsParallel ";
+ myVector vector1(1.0, 1.0, 0.0);
+ myVector vector2(1.0, 1.0, 0.0);
+ myVector d1, d2;
+ auto result = Angle::compute(vector1, vector2, d1, d2);
ofs << result << std::endl;
- ofs << d1 << std::endl;
- ofs << d2 << std::endl;
+ ofs << "testCompute4VectorsParallel d1= " << d1 << std::endl;
+ ofs << "testCompute4VectorsParallel d2= " << d2 << std::endl;
return 0;
}
-
+template
int testCompute4VectorsAntiParallel(std::ofstream &ofs) {
- ofs << "testCompute4VectorsAntiParallel" << std::endl;
- Vector vector1(1.0, 1.0, 0.0);
- Vector vector2(-1.0, -1.0, 0.0);
- Vector d1, d2;
+ ofs << "testCompute4VectorsAntiParallel ";
+ myVector vector1(1.0, 1.0, 0.0);
+ myVector vector2(-1.0, -1.0, 0.0);
+ myVector d1, d2;
Angle angle;
- double result = angle.compute(vector1, vector2, d1, d2);
+ auto result = angle.compute(vector1, vector2, d1, d2);
ofs << result << std::endl;
- ofs << d1 << std::endl;
- ofs << d2 << std::endl;
+ ofs << "testCompute4VectorsAntiParallel d1= " << d1 << std::endl;
+ ofs << "testCompute4VectorsAntiParallel d2= " << d2 << std::endl;
return 0;
}
int main() {
std::ofstream ofs("output");
- testCompute2Vectors90Degrees(ofs);
- testCompute2Vectors45Degrees(ofs);
- testCompute4Vectors45Degrees(ofs);
- testCompute4VectorsParallel(ofs);
- testCompute4VectorsAntiParallel(ofs);
+ testCompute2Vectors90Degrees(ofs);
+ testCompute2Vectors45Degrees(ofs);
+ testCompute4Vectors45Degrees(ofs);
+ testCompute4VectorsParallel(ofs);
+ testCompute4VectorsAntiParallel(ofs);
+ ofs << "float\n";
+ testCompute2Vectors90Degrees(ofs);
+ testCompute2Vectors45Degrees(ofs);
+ testCompute4Vectors45Degrees(ofs);
+ testCompute4VectorsParallel(ofs);
+ testCompute4VectorsAntiParallel(ofs);
return 0;
}
diff --git a/regtest/tools/rt-make-angle/output.reference b/regtest/tools/rt-make-angle/output.reference
index 1033f80117..a6959284fa 100644
--- a/regtest/tools/rt-make-angle/output.reference
+++ b/regtest/tools/rt-make-angle/output.reference
@@ -1,16 +1,23 @@
-testCompute2Vectors90Degrees
-1.5708
-testCompute2Vectors45Degrees
-0.785398
-testCompute4Vectors45Degrees
-0.785398
--0.5 0.5 -0
--0 -1 -0
-testCompute4VectorsParallel
-0
-0 0 0
-0 0 0
-testCompute4VectorsAntiParallel
-3.14159
-0 0 0
-0 0 0
+testCompute2Vectors90Degrees 1.5708
+testCompute2Vectors45Degrees 0.785398
+testCompute4Vectors45Degrees 0.785398
+testCompute4Vectors45Degrees d1= -0.5 0.5 -0
+testCompute4Vectors45Degrees d2= -0 -1 -0
+testCompute4VectorsParallel 0
+testCompute4VectorsParallel d1= 0 0 0
+testCompute4VectorsParallel d2= 0 0 0
+testCompute4VectorsAntiParallel 3.14159
+testCompute4VectorsAntiParallel d1= 0 0 0
+testCompute4VectorsAntiParallel d2= 0 0 0
+float
+testCompute2Vectors90Degrees 1.5708
+testCompute2Vectors45Degrees 0.785398
+testCompute4Vectors45Degrees 0.785398
+testCompute4Vectors45Degrees d1= -0.5 0.5 -0
+testCompute4Vectors45Degrees d2= -0 -1 -0
+testCompute4VectorsParallel 0
+testCompute4VectorsParallel d1= 0 0 0
+testCompute4VectorsParallel d2= 0 0 0
+testCompute4VectorsAntiParallel 3.14159
+testCompute4VectorsAntiParallel d1= 0 0 0
+testCompute4VectorsAntiParallel d2= 0 0 0
diff --git a/src/adjmat/AdjacencyMatrixBase.h b/src/adjmat/AdjacencyMatrixBase.h
index 5e08ad57dd..887125eb09 100644
--- a/src/adjmat/AdjacencyMatrixBase.h
+++ b/src/adjmat/AdjacencyMatrixBase.h
@@ -31,6 +31,8 @@
namespace PLMD {
namespace adjmat {
+struct ContactMatrix;
+
template
struct AdjacencyMatrixData {
T matrixdata;
@@ -47,7 +49,7 @@ struct AdjacencyMatrixData {
nlist=nlist_v.data();
nlist_three=nlist_three_v.data();
}
-#ifdef __PLUMED_USE_OPENACC
+#ifdef __PLUMED_HAS_OPENACC
void toACCDevice() const {
#pragma acc enter data copyin(this[0:1],usepbc,components,nlists, \
natoms_per_list,nlist[0:nlist_v.size()], \
@@ -62,7 +64,7 @@ struct AdjacencyMatrixData {
nlist[0:nlist_v.size()], natoms_per_list, \
nlists, components, usepbc, this[0:1])
}
-#endif //__PLUMED_USE_OPENACC
+#endif //__PLUMED_HAS_OPENACC
};
struct AdjacencyMatrixInput {
@@ -94,11 +96,13 @@ struct MatrixOutput {
}
};
-template
+template
class AdjacencyMatrixBase : public ActionWithMatrix {
public:
- using input_type = AdjacencyMatrixData;
- using PTM = ParallelTaskManager>;
+ using input_type = AdjacencyMatrixData;
+ using PTM = ParallelTaskManager>;
+ typedef typename PTM::ParallelActionsInput ParallelActionsInput;
+ typedef typename PTM::ParallelActionsOutput ParallelActionsOutput;
private:
PTM taskmanager;
bool nopbc, read_one_group;
@@ -116,30 +120,32 @@ class AdjacencyMatrixBase : public ActionWithMatrix {
void calculate() override ;
void applyNonZeroRankForces( std::vector& outforces ) override ;
void getInputData( std::vector& inputdata ) const override;
+ void getInputData( std::vector& inputdata ) const override;
std::string writeInGraph() const override {
- if( getName()=="CONTACT_MATRIX_PROPER" ) {
+ if constexpr ( std::is_same_v ) {
+ //TODO:this will change to std::is_same_v,CV> when adding the mixed precision to the contact matrix
return "CONTACT_MATRIX";
}
return getName();
}
void setLinkCellCutoff( const bool& symmetric, const double& lcut, double tcut=-1.0 );
static void performTask( std::size_t task_index,
- const AdjacencyMatrixData& actiondata,
+ const AdjacencyMatrixData& actiondata,
ParallelActionsInput& input,
ParallelActionsOutput output );
static int getNumberOfValuesPerTask( std::size_t task_index,
- const AdjacencyMatrixData& actiondata );
+ const AdjacencyMatrixData& actiondata );
static void getForceIndices( std::size_t task_index,
std::size_t colno,
std::size_t ntotal_force,
- const AdjacencyMatrixData& actiondata,
+ const AdjacencyMatrixData& actiondata,
const ParallelActionsInput& input,
ForceIndexHolder force_indices );
void getMatrixColumnTitles( std::vector& argnames ) const override ;
};
-template
-void AdjacencyMatrixBase::registerKeywords( Keywords& keys ) {
+template
+void AdjacencyMatrixBase::registerKeywords( Keywords& keys ) {
ActionWithMatrix::registerKeywords( keys );
keys.addInputKeyword("optional","MASK","vector","a vector that is used to used to determine which rows of the adjancency matrix to compute");
keys.add("atoms","GROUP","the atoms for which you would like to calculate the adjacency matrix");
@@ -151,7 +157,7 @@ void AdjacencyMatrixBase::registerKeywords( Keywords& keys ) {
keys.addFlag("NOPBC",false,"don't use pbc");
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");
keys.add("compulsory","NL_STRIDE","1","The frequency with which we are updating the atoms in the neighbor list");
- T::registerKeywords( keys );
+ CV::registerKeywords( keys );
PTM::registerKeywords( keys );
keys.addOutputComponent("w","COMPONENTS","matrix","a matrix containing the weights for the bonds between each pair of atoms");
keys.addOutputComponent("x","COMPONENTS","matrix","the projection of the bond on the x axis");
@@ -161,8 +167,8 @@ void AdjacencyMatrixBase::registerKeywords( Keywords& keys ) {
keys.addDOI("10.1021/acs.jctc.6b01073");
}
-template
-AdjacencyMatrixBase::AdjacencyMatrixBase(const ActionOptions& ao):
+template
+AdjacencyMatrixBase::AdjacencyMatrixBase(const ActionOptions& ao):
Action(ao),
ActionWithMatrix(ao),
taskmanager(this),
@@ -297,7 +303,7 @@ AdjacencyMatrixBase::AdjacencyMatrixBase(const ActionOptions& ao):
componentIsNotPeriodic("z");
}
log<<" Bibliography "< matdata;
+ AdjacencyMatrixData matdata;
matdata.usepbc = !nopbc;
matdata.components = components;
matdata.nlists = getPntrToComponent(0)->getShape()[0];
@@ -305,13 +311,13 @@ AdjacencyMatrixBase::AdjacencyMatrixBase(const ActionOptions& ao):
taskmanager.setActionInput( matdata );
}
-template
-unsigned AdjacencyMatrixBase::getNumberOfDerivatives() {
+template
+unsigned AdjacencyMatrixBase::getNumberOfDerivatives() {
return 3*getNumberOfAtoms() + 9;
}
-template
-void AdjacencyMatrixBase::setupThirdAtomBlock( const std::vector& tc,
+template
+void AdjacencyMatrixBase::setupThirdAtomBlock( const std::vector& tc,
std::vector& t ) {
threeblocks.resize( tc.size() );
unsigned base=t.size();
@@ -323,8 +329,8 @@ void AdjacencyMatrixBase::setupThirdAtomBlock( const std::vector&
log.printf("\n");
}
-template
-void AdjacencyMatrixBase::setLinkCellCutoff( const bool& symmetric,
+template
+void AdjacencyMatrixBase::setLinkCellCutoff( const bool& symmetric,
const double& lcut,
double tcut ) {
if( read_one_group && symmetric ) {
@@ -348,8 +354,8 @@ void AdjacencyMatrixBase::setLinkCellCutoff( const bool& symmetric,
threecells.setCutoff( tcut );
}
-template
-void AdjacencyMatrixBase::getInputData( std::vector& inputdata ) const {
+template
+void AdjacencyMatrixBase::getInputData( std::vector& inputdata ) const {
if( inputdata.size()!=3*getNumberOfAtoms() ) {
inputdata.resize( 3*getNumberOfAtoms() );
}
@@ -366,8 +372,26 @@ void AdjacencyMatrixBase::getInputData( std::vector& inputdata ) cons
}
}
-template
-void AdjacencyMatrixBase::getMatrixColumnTitles( std::vector& argnames ) const {
+template
+void AdjacencyMatrixBase::getInputData( std::vector& inputdata ) const {
+ if( inputdata.size()!=3*getNumberOfAtoms() ) {
+ inputdata.resize( 3*getNumberOfAtoms() );
+ }
+
+ std::size_t k=0;
+ for(unsigned i=0; i
+void AdjacencyMatrixBase::getMatrixColumnTitles( std::vector& argnames ) const {
std::string num;
for(unsigned i=0; igetShape()[1]; ++i) {
Tools::convert( i+1, num );
@@ -375,8 +399,8 @@ void AdjacencyMatrixBase::getMatrixColumnTitles( std::vector& ar
}
}
-template
-void AdjacencyMatrixBase::calculate() {
+template
+void AdjacencyMatrixBase::calculate() {
Value* myval = getPntrToComponent(0);
// Retrieve the task list
std::vector & pTaskList( getListOfActiveTasks(this) );
@@ -481,9 +505,9 @@ void AdjacencyMatrixBase::calculate() {
taskmanager.runAllTasks();
}
-template
-void AdjacencyMatrixBase::performTask( std::size_t task_index,
- const AdjacencyMatrixData& actiondata,
+template
+void AdjacencyMatrixBase::performTask( std::size_t task_index,
+ const AdjacencyMatrixData& actiondata,
ParallelActionsInput& input,
ParallelActionsOutput output ) {
const unsigned nneigh=actiondata.nlist[task_index];
@@ -545,7 +569,7 @@ void AdjacencyMatrixBase::performTask( std::size_t task_index,
const std::size_t valpos = (i-1)*ncomponents;
MatrixOutput adjout{View{&output.values[ valpos]},
View{output.derivatives.data() + valpos*nderiv,nderiv}};
- T::calculateWeight( actiondata.matrixdata, adjinp, adjout );
+ CV::calculateWeight( actiondata.matrixdata, adjinp, adjout );
if( !actiondata.components ) {
continue ;
}
@@ -557,7 +581,7 @@ void AdjacencyMatrixBase::performTask( std::size_t task_index,
}
//sugar for not having to repeat [valpos*nderiv+something]
for(int ii=1; ii<4; ++ii) {
- auto derivs = output.derivatives.subview_n<5>(valpos*nderiv+ii*nderiv);
+ auto derivs = output.derivatives.template subview_n<5>(valpos*nderiv+ii*nderiv);
derivs[0] = -1.0;
derivs[1] = 1.0;
derivs[2] = -atoms[i][0];
@@ -568,22 +592,22 @@ void AdjacencyMatrixBase::performTask( std::size_t task_index,
}
}
-template
-void AdjacencyMatrixBase::applyNonZeroRankForces( std::vector& outforces ) {
+template
+void AdjacencyMatrixBase::applyNonZeroRankForces( std::vector& outforces ) {
taskmanager.applyForces( outforces );
}
-template
-int AdjacencyMatrixBase::getNumberOfValuesPerTask( std::size_t task_index,
- const AdjacencyMatrixData& actiondata ) {
+template
+int AdjacencyMatrixBase::getNumberOfValuesPerTask( std::size_t task_index,
+ const AdjacencyMatrixData& actiondata ) {
return actiondata.nlist[task_index] - 1;
}
-template
-void AdjacencyMatrixBase::getForceIndices( const std::size_t task_index,
+template
+void AdjacencyMatrixBase::getForceIndices( const std::size_t task_index,
const std::size_t colno,
const std::size_t ntotal_force,
- const AdjacencyMatrixData& actiondata,
+ const AdjacencyMatrixData& actiondata,
const ParallelActionsInput& /*input*/,
ForceIndexHolder force_indices ) {
diff --git a/src/adjmat/ContactMatrix.cpp b/src/adjmat/ContactMatrix.cpp
index 36afef2fca..633a5ee3b5 100644
--- a/src/adjmat/ContactMatrix.cpp
+++ b/src/adjmat/ContactMatrix.cpp
@@ -20,6 +20,7 @@
along with plumed. If not, see .
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
#include "ContactMatrix.h"
+#include "ContactMatrixShortcut.h"
#include "core/ActionRegister.h"
//+PLUMEDOC MATRIX CONTACT_MATRIX_PROPER
@@ -55,80 +56,300 @@ PRINT ARG=csums FILE=colvar
*/
//+ENDPLUMEDOC
+//+PLUMEDOC MATRIX CONTACT_MATRIX
+/*
+Adjacency matrix in which two atoms are adjacent if they are within a certain cutoff.
+
+A useful tool for developing complex collective variables is the notion of the
+so called adjacency matrix. An adjacency matrix can be an $N \times N$ matrix in which the $i$th, $j$th element tells you whether
+or not the $i$th and $j$th atoms/molecules from a set of $N$ atoms/molecules are adjacent or not. Alternatively, you can calculate
+an adjacency matrix between a set of $N$ atoms and a second set of $M$ atoms. For this type of matrix the $i$th, $j$th element tells you
+whether the whether the $i$th atom in the first group and the $j$th atom in the second group are adjacent or not. The adjacency matrix in this
+case is thus $N \times M$.
+
+The simplest type of adjacency matrix is a contact matrix. The elements of a contact matrix are calculated using:
+
+$$
+a_{ij} = \sigma( r_{ij} )
+$$
+
+where $r_{ij}$ is the magnitude of the vector connecting atoms $i$ and $j$ and where $\sigma$ is a switching function. If you want to calculate a
+contact matrix for one group of atoms the input would look something like this:
+
+```plumed
+c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
+```
+
+Alternatively, if you want to calculate the contact matrix between two groups of atoms you would use an input like following:
+
+```plumed
+c2: CONTACT_MATRIX GROUPA=1-7 GROUPB=8-20 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
+```
+
+Once you have calculated a contact matrix you can perform various matrix operations by using the tools in the matrixtools or clusters modules.
+
+## Coordination numbers
+
+If a contact matrix, $\mathbf{C}$, is multiplied from the back by a vector of ones the $i$th element of the resulting matrix tells you the number of atoms that are
+within $r_c$ of atom $i$. In other words, the coordination numbers of the atoms can be calculated from the contact matrix by doing matrix vector multiplication.
+
+This realisation about the relationship between the contact map and the coordination number is heavily used in PLUMED. For example, to calculate
+and print the coordination numbers of the first 7 atoms in the system with themselves you would use an input something like this:
+
+```plumed
+c1: CONTACT_MATRIX GROUP=1-7 D_0=0.0 R_0=2.6 NN=6 MM=12
+ones: ONES SIZE=7
+cc: MATRIX_VECTOR_PRODUCT ARG=c1,ones
+PRINT ARG=cc FILE=colvar
+```
+
+This input transforms the distances using the RATIONAL switching function that is discussed in the documentation for [LESS_THAN](LESS_THAN.md)
+The parameters for this type of switching function can be specified using `D_0`, `R_0`, `NN` and `MM` keywords as indicated above. However, we would recommend
+using the following syntax instead as this allows you to use the full range of switching function types. Most importantly, if you use the following syntax you can
+set the D_MAX parameter, as shown below. As discussed in the optimization details section below, __if you want good computational performance on large systems it is essential to set the D_MAX parameter.__
+
+
+```plumed
+c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12 D_MAX=5.0}
+ones: ONES SIZE=7
+cc: MATRIX_VECTOR_PRODUCT ARG=c1,ones
+PRINT ARG=cc FILE=colvar
+```
+
+Implmenting the coordination number as a product of a matrix and a vector is useful as there are many different ways to define whether two atoms/molecules and to construct a "contact" matrix based on
+the result. For example:
+
+* You could say that two molecules are connected if they are within a certain distance of each other and if they have the same orientation (see [TORSIONS_MATRIX](TORSIONS_MATRIX.md)).
+* You could say that two water molecules are connected if they are hydrogen bonded to each other (see [HBOND_MATRIX](HBOND_MATRIX.md)).
+* You could say that two atoms are connected if they are within a certain distance of each other and if they have similar values for a CV (see [OUTER_PRODUCT](OUTER_PRODUCT.md)).
+
+When the coordination numbers is implemented in the way described above (by doing the matrix-vector multiplication) you have the flexibility to define the contact matrix that
+is used in the multiplication in whatever way you choose. In other words, this implementation of the coordination number is much more flexible. For example, suppose you want
+to calculate the number of atoms that have a coordination is greater than 3.0. You can do this with PLUMED using the following input:
+
+```plumed
+# Calculate the contact matrix for the first seven atoms in the system
+c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
+# Calculate the coordination numbers for the first seven atoms in the system
+ones: ONES SIZE=7
+cc: MATRIX_VECTOR_PRODUCT ARG=c1,ones
+# Set the ith element of the vector mtc equal to one if the coordination number of atom i is greater than 3.
+mtc: MORE_THAN ARG=cc SWITCH={RATIONAL D_0=3 R_0=1}
+# Calculate the number of atoms with a coordination number greater than 3.
+s: SUM ARG=mtc PERIODIC=NO
+PRINT ARG=s FILE=colvar
+```
+
+Alternatively, consider the CV that was used to study perovskite nucleation in [this paper](https://pubs.acs.org/doi/abs/10.1021/acs.chemmater.9b04259). The CV here measures the number of
+methylamonium molecules that are attached to at least 5 other methylamoniusm molecules, at least 7 lead atoms and at least 11 ionide ions. We can calculate something akin to this
+CV and apply a restraint on the resulting quantity by using the following input file:
+
+```plumed
+# Lead ions
+Pb: GROUP ATOMS=1-64
+# Iodide atoms
+I: GROUP ATOMS=65-256
+# Methylamonium "atoms" -- in the real CV these are centers of mass rather than single atoms
+cn: GROUP ATOMS=257-320
+
+ones64: ONES SIZE=64
+# Contact matrix that determines if methylamonium molecules are within 8 A of each other
+cm_cncn: CONTACT_MATRIX GROUP=cn SWITCH={RATIONAL R_0=0.8}
+# Coordination number of methylamounium with methylamonium
+cc_cncn: MATRIX_VECTOR_PRODUCT ARG=cm_cncn,ones64
+#Â Vector with elements that are one if coordiantion of methylamonium with methylamonium >5
+mt_cncn: MORE_THAN ARG=cc_cncn SWITCH={RATIONAL R_0=5 NN=12 MM=24}
+
+#Â Contact matrix that determines if methylamoinium moleulcule and Pb atom are within 7.5 A of each other
+cm_cnpb: CONTACT_MATRIX GROUPA=cn GROUPB=Pb SWITCH={RATIONAL R_0=0.75}
+# Coordination number of methylamonium with Pb
+cc_cnpb: MATRIX_VECTOR_PRODUCT ARG=cm_cnpb,ones64
+#Â Vector with elements that are one if coordination of methylamounium with lead is >7
+mt_cnpb: MORE_THAN ARG=cc_cnpb SWITCH={RATIONAL R_0=7 NN=12 MM=24}
+
+ones192: ONES SIZE=192
+#Â Contact matrix that determines if methylamoinium moleulcule and I atom are within 6.5 A of each other
+cm_cnI: CONTACT_MATRIX GROUPA=cn GROUPB=I SWITCH={RATIONAL R_0=0.65}
+# Coordination number of methylamonium with I
+cc_cnI: MATRIX_VECTOR_PRODUCT ARG=cm_cnI,ones192
+#Â Vector with elements that are one if coordination of methylamounium with lead is >11
+mt_cnI: MORE_THAN ARG=cc_cnI SWITCH={RATIONAL R_0=11 NN=12 MM=24}
+
+# Element wise product of these three input vectors.
+# mm[i]==1 if coordination number of corrsponding methylamounium with methylamonium is >5
+# and if coordination of methylamounium with Pb is >7 and if coordination of methylamounium with I > 11
+mm: CUSTOM ARG=mt_cncn,mt_cnpb,mt_cnI FUNC=x*y*z PERIODIC=NO
+
+#Â Sum of coordination numbers and thus equal to number of methylamoniums with desired coordination numbers
+ff: SUM ARG=mm PERIODIC=NO
+
+rr: RESTRAINT ARG=ff AT=62 KAPPA=10
+```
+
+##Â COMPONENTS flag
+
+If you add the flag COMPONENTS to the input as shown below:
+
+```plumed
+c4: CONTACT_MATRIX GROUP=1-7 COMPONENTS SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
+```
+
+then four matrices with the labels `c4.w`, `c4.x`, `c4.y` and `c4.z` are output by the action. The matrix with the label `c4.w` is the adjacency matrix
+that would be output if you had not added the COMPONENTS flag. The $i,j$ component of the matrices `c4.x`, `c4.y` and `c4.z` contain the $x$, $y$ and $z$
+components of the vector connecting atoms $i$ and $j$. Importantly, however, the components of these vectors are only stored in `c4.x`, `c4.y` and `c4.z`
+if the elements of `c4.w` are non-zero.
+
+## NOPBC flag
+
+By default PLUMED calculates the distances that are transformed by the switching function in the CONTACT_MATRIX action in a way that accounts for the periodic boundary
+conditions. If for any reason you do not want PLUMED to account for the periodic boundary conditions you can use the NOPBC flag as shown below:
+
+```plumed
+c: CONTACT_MATRIX GROUP=1-7 NOPBC SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
+```
+
+If you also add the COMPONENTS flag in this input then the vector connecting each pairs of atoms will also be calculated without taking the periodic boundary conditions into account.
+
+## Optimisation details
+
+Adjacency matrices are sparse. Each atom is only be connected to a small number of neighbours and the vast majority of the elements of the contact matrix are thus zero. To reduce
+the amount of memory that PLUMED requires PLUMED uses sparse matrix storage. Consequently, whenever you calculate and store a contact matrix only the elements of the matrix that are
+non-zero are stored. The same thing holds for the additional values that are created when you use the COMPONENTS flag. The components of the vectors connecting atoms are only stored
+when the elements of `c4.w` are non-zero.
+
+We can also use the sparsity of the adjacency matrix to make the time required to compute a contact matrix scale linearly rather than quadratically with the number of atoms. Element
+$i,j$ of the contact matrix is only non-zero if two atoms are within a cutoff, $r_c$. We can determine that many pairs of atoms are further appart than $r_c$ without computing the
+distance between these atoms by using divide and conquer strategies such as linked lists and neighbour lists. __To turn on these features you need to set the `D_MAX` parameter in the
+switching functions.__ The value you pass to the `D_MAX` keyword is used as the cutoff in the link cell algorithm.
+
+In theory we could further optimize the implementation of the CONTACT_MATRIX action by exploiting neighbor lists. If we were to do this we would likely add two further keywords as shown
+below:
+
+```plumed
+c4: CONTACT_MATRIX GROUP=1-10000 SWITCH={RATIONAL R_0=0.1 NN=6 MM=12 D_MAX=0.5} NL_CUTOFF=0.7 NL_STRIDE=5
+```
+
+The `NL_CUTOFF` keyword would be used to specify the cutoff (in nm) to use when constructing neighbor lists. This value would need to be slightly larger than the D_MAX parameter for the switching function.
+The `NL_STRIDE` keyword would then be used to specify how frequently the neighbour list should be updated. Thus far we have not found it necessary to implement this algorithm. We have been happy with the
+performance even if we use the linked list algorithm to update the neighbors on every step. If you feel that you need this CV to perform better please get in touch as adding a neighbor list for this action
+should be relatively straightforward.
+
+## The MASK keyword
+
+Suppose that you want to calculate the average coordination number for the atoms that are within a sphere in the center of your simulation box. You can do so by exploiting an input similar to the one shown
+below:
+
+```plumed
+# The atoms that are of interest
+ow: GROUP ATOMS=1-16500
+# Fixed virtual atom which serves as the probe volume's center (pos. in nm)
+center: FIXEDATOM AT=2.5,2.5,2.5
+# Vector in which element i is one if atom i is in sphere of interest and zero otherwise
+sphere: INSPHERE ATOMS=ow CENTER=center RADIUS={GAUSSIAN D_0=0.5 R_0=0.01 D_MAX=0.52}
+# Calculates cooordination numbers
+cmap: CONTACT_MATRIX GROUP=ow SWITCH={GAUSSIAN D_0=0.32 R_0=0.01 D_MAX=0.34}
+ones: ONES SIZE=16500
+cc: MATRIX_VECTOR_PRODUCT ARG=cmap,ones
+# Multiply coordination numbers by sphere vector
+prod: CUSTOM ARG=cc,sphere FUNC=x*y PERIODIC=NO
+# Sum of coordination numbers for atoms that are in the sphere of interest
+numer: SUM ARG=prod PERIODIC=NO
+# Number of atoms that are in sphere of interest
+denom: SUM ARG=sphere PERIODIC=NO
+# Average coordination number for atoms in sphere of interest
+av: CUSTOM ARG=prod,sphere FUNC=x/y PERIODIC=NO
+# And print out final CV to a file
+PRINT ARG=av FILE=colvar STRIDE=1
+```
+
+This calculation is slow because you have to calculate the coordination numbers of all the atoms even though only a small subset of these quanitties are required to compute the average coordination number in the
+sphere. To avoid all these unecessary calculations you use the `MASK` keyword as shown below:
+
+```plumed
+# The atoms that are of interest
+ow: GROUP ATOMS=1-16500
+# Fixed virtual atom which serves as the probe volume's center (pos. in nm)
+center: FIXEDATOM AT=2.5,2.5,2.5
+# Vector in which element i is one if atom i is in sphere of interest and zero otherwise
+sphere: INSPHERE ATOMS=ow CENTER=center RADIUS={GAUSSIAN D_0=0.5 R_0=0.01 D_MAX=0.52}
+# Calculates cooordination numbers
+cmap: CONTACT_MATRIX GROUP=ow SWITCH={GAUSSIAN D_0=0.32 R_0=0.01 D_MAX=0.34} MASK=sphere
+ones: ONES SIZE=16500
+cc: MATRIX_VECTOR_PRODUCT ARG=cmap,ones
+# Multiply coordination numbers by sphere vector
+prod: CUSTOM ARG=cc,sphere FUNC=x*y PERIODIC=NO
+# Sum of coordination numbers for atoms that are in the sphere of interest
+numer: SUM ARG=prod PERIODIC=NO
+# Number of atoms that are in sphere of interest
+denom: SUM ARG=sphere PERIODIC=NO
+# Average coordination number for atoms in sphere of interest
+av: CUSTOM ARG=prod,sphere FUNC=x/y PERIODIC=NO
+# And print out final CV to a file
+PRINT ARG=av FILE=colvar STRIDE=1
+```
+
+Adding the instruction `MASK=sphere` to the CONTACT_MATRIX line in this input tells PLUMED to only calculate the $i$th row in the adjacency matrix if the $i$th element of the vector `sphere` is non-zero.
+In other words, by adding this command we have ensured that we are not calculating coordination numbers for atoms that are not in the sphere that is of interest. In this way we can thus reduce the computational
+expense of the calculation enormously.
+
+Notice, that there are other places where we can use this same trick. For example, we could have used MASK as shown below for our calculation of the CV for perovskite nucleation as shown below:
+
+```plumed
+# Lead ions
+Pb: GROUP ATOMS=1-64
+# Iodide atoms
+I: GROUP ATOMS=65-256
+# Methylamonium "atoms" -- in the real CV these are centers of mass rather than single atoms
+cn: GROUP ATOMS=257-320
+
+ones192: ONES SIZE=192
+#Â Contact matrix that determines if methylamoinium moleulcule and I atom are within 6.5 A of each other
+cm_cnI: CONTACT_MATRIX GROUPA=cn GROUPB=I SWITCH={RATIONAL R_0=0.65 D_MAX=1.0}
+# Coordination number of methylamonium with I
+cc_cnI: MATRIX_VECTOR_PRODUCT ARG=cm_cnI,ones192
+#Â Vector with elements that are one if coordination of methylamounium with lead is >11
+mt_cnI: MORE_THAN ARG=cc_cnI SWITCH={RATIONAL R_0=11 NN=12 MM=24}
+
+ones64: ONES SIZE=64
+#Â Contact matrix that determines if methylamoinium moleulcule and Pb atom are within 7.5 A of each other
+cm_cnpb: CONTACT_MATRIX GROUPA=cn GROUPB=Pb SWITCH={RATIONAL R_0=0.75 D_MAX=1.5} MASK=mt_cnI
+# Coordination number of methylamonium with Pb
+cc_cnpb: MATRIX_VECTOR_PRODUCT ARG=cm_cnpb,ones64
+#Â Vector with elements that are one if coordination of methylamounium with lead is >7
+mt_cnpb: MORE_THAN ARG=cc_cnpb SWITCH={RATIONAL R_0=7 NN=12 MM=24}
+
+# Contact matrix that determines if methylamonium molecules are within 8 A of each other
+cm_cncn: CONTACT_MATRIX GROUP=cn SWITCH={RATIONAL R_0=0.8 D_MAX=1.75} MASK=mt_cnI
+# Coordination number of methylamounium with methylamonium
+cc_cncn: MATRIX_VECTOR_PRODUCT ARG=cm_cncn,ones64
+#Â Vector with elements that are one if coordiantion of methylamonium with methylamonium >5
+mt_cncn: MORE_THAN ARG=cc_cncn SWITCH={RATIONAL R_0=5 NN=12 MM=24}
+
+# Element wise product of these three input vectors.
+# mm[i]==1 if coordination number of corrsponding methylamounium with methylamonium is >5
+# and if coordination of methylamounium with Pb is >7 and if coordination of methylamounium with I > 11
+mm: CUSTOM ARG=mt_cncn,mt_cnpb,mt_cnI FUNC=x*y*z PERIODIC=NO
+
+#Â Sum of coordination numbers and thus equal to number of methylamoniums with desired coordination numbers
+ff: SUM ARG=mm PERIODIC=NO
+
+rr: RESTRAINT ARG=ff AT=62 KAPPA=10
+```
+
+This trick works here because when we find that there are methylamoinium moleulcules with fewer than 11 lead atoms in there first coordination sphere we know that there
+is no point calculating the second two coordination numbers.
+
+*/
+//+ENDPLUMEDOC
+
namespace PLMD {
namespace adjmat {
+
typedef AdjacencyMatrixBase cmap;
PLUMED_REGISTER_ACTION(cmap,"CONTACT_MATRIX_PROPER")
-
-void ContactMatrix::registerKeywords( Keywords& keys ) {
- keys.setDisplayName("CONTACT_MATRIX");
- keys.add("compulsory","NN","6","The n parameter of the switching function ");
- keys.add("compulsory","MM","0","The m parameter of the switching function; 0 implies 2*NN");
- keys.add("compulsory","D_0","0.0","The d_0 parameter of the switching function");
- keys.add("compulsory","R_0","The r_0 parameter of the switching function");
- keys.add("optional","SWITCH","This keyword is used if you want to employ an alternative to the continuous swiching function defined above. "
- "The following provides information on the \\ref switchingfunction that are available. "
- "When this keyword is present you no longer need the NN, MM, D_0 and R_0 keywords.");
- keys.linkActionInDocs("SWITCH","LESS_THAN");
-}
-
-void ContactMatrix::parseInput( AdjacencyMatrixBase* action ) {
- std::string errors;
- std::string swinput;
- action->parse("SWITCH",swinput);
- if( swinput.length()>0 ) {
- switchingFunction.set( swinput, errors );
- if( errors.length()!=0 ) {
- action->error("problem reading switching function description " + errors);
- }
- } else {
- int nn=0;
- int mm=0;
- double r_0=-1.0;
- double d_0= 0.0;
- action->parse("NN",nn);
- action->parse("MM",mm);
- action->parse("R_0",r_0);
- action->parse("D_0",d_0);
- if( r_0<0.0 ) {
- action->error("you must set a value for R_0");
- }
- switchingFunction.set(nn,mm,r_0,d_0);
- }
- // And set the link cell cutoff
- action->log.printf(" switching function cutoff is %s \n",switchingFunction.description().c_str() );
- action->setLinkCellCutoff( true, switchingFunction.get_dmax() );
-}
-
-void ContactMatrix::calculateWeight( const ContactMatrix& data,
- const AdjacencyMatrixInput& input,
- MatrixOutput output ) {
- const double mod2 = input.pos.modulo2();
- if( mod2 CMshort;
+PLUMED_REGISTER_ACTION(CMshort,"CONTACT_MATRIX")
} // namespace adjmat
} // namespace PLMD
diff --git a/src/adjmat/ContactMatrix.h b/src/adjmat/ContactMatrix.h
index 833a5d726e..b63307bd50 100644
--- a/src/adjmat/ContactMatrix.h
+++ b/src/adjmat/ContactMatrix.h
@@ -22,27 +22,24 @@
#ifndef __PLUMED_adjmat_ContactMatrix_h
#define __PLUMED_adjmat_ContactMatrix_h
-#ifdef __PLUMED_HAS_OPENACC
-#define __PLUMED_USE_OPENACC 1
-#endif //__PLUMED_HAS_OPENACC
-
#include "AdjacencyMatrixBase.h"
#include "tools/SwitchingFunction.h"
namespace PLMD {
namespace adjmat {
struct ContactMatrix {
-#ifdef __PLUMED_USE_OPENACC
+#ifdef __PLUMED_HAS_OPENACC
SwitchingFunctionAccelerable switchingFunction;
#else
SwitchingFunction switchingFunction;
#endif
static void registerKeywords( Keywords& keys );
- void parseInput( AdjacencyMatrixBase* action );
+ template
+ void parseInput( AdjacencyMatrixBase* action );
static void calculateWeight( const ContactMatrix& data,
const AdjacencyMatrixInput& input,
MatrixOutput output );
-#ifdef __PLUMED_USE_OPENACC
+#ifdef __PLUMED_HAS_OPENACC
void toACCDevice() const {
#pragma acc enter data copyin(this[0:1])
switchingFunction.toACCDevice();
@@ -51,9 +48,78 @@ struct ContactMatrix {
switchingFunction.removeFromACCDevice();
#pragma acc exit data delete(this[0:1])
}
-#endif //__PLUMED_USE_OPENACC
+#endif //__PLUMED_HAS_OPENACC
};
+void ContactMatrix::registerKeywords( Keywords& keys ) {
+ keys.setDisplayName("CONTACT_MATRIX");
+ keys.add("compulsory","NN","6","The n parameter of the switching function ");
+ keys.add("compulsory","MM","0","The m parameter of the switching function; 0 implies 2*NN");
+ keys.add("compulsory","D_0","0.0","The d_0 parameter of the switching function");
+ keys.add("compulsory","R_0","The r_0 parameter of the switching function");
+ keys.add("optional","SWITCH","This keyword is used if you want to employ an alternative to the continuous swiching function defined above. "
+ "The following provides information on the \\ref switchingfunction that are available. "
+ "When this keyword is present you no longer need the NN, MM, D_0 and R_0 keywords.");
+ keys.linkActionInDocs("SWITCH","LESS_THAN");
+}
+
+template
+void ContactMatrix::parseInput( AdjacencyMatrixBase* action ) {
+ std::string errors;
+ std::string swinput;
+ action->parse("SWITCH",swinput);
+ if( swinput.length()>0 ) {
+ switchingFunction.set( swinput, errors );
+ if( errors.length()!=0 ) {
+ action->error("problem reading switching function description " + errors);
+ }
+ } else {
+ int nn=0;
+ int mm=0;
+ double r_0=-1.0;
+ double d_0= 0.0;
+ action->parse("NN",nn);
+ action->parse("MM",mm);
+ action->parse("R_0",r_0);
+ action->parse("D_0",d_0);
+ if( r_0<0.0 ) {
+ action->error("you must set a value for R_0");
+ }
+ switchingFunction.set(nn,mm,r_0,d_0);
+ }
+ // And set the link cell cutoff
+ action->log.printf(" switching function cutoff is %s \n",switchingFunction.description().c_str() );
+ action->setLinkCellCutoff( true, switchingFunction.get_dmax() );
+}
+
+void ContactMatrix::calculateWeight( const ContactMatrix& data,
+ const AdjacencyMatrixInput& input,
+ MatrixOutput output ) {
+ const double mod2 = input.pos.modulo2();
+ if( mod2.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
-#include "core/ActionShortcut.h"
-#include "core/ActionRegister.h"
-#include "core/PlumedMain.h"
-#include "core/ActionSet.h"
-#include "core/Group.h"
-#include "ContactMatrix.h"
-
-//+PLUMEDOC MATRIX CONTACT_MATRIX
-/*
-Adjacency matrix in which two atoms are adjacent if they are within a certain cutoff.
-
-A useful tool for developing complex collective variables is the notion of the
-so called adjacency matrix. An adjacency matrix can be an $N \times N$ matrix in which the $i$th, $j$th element tells you whether
-or not the $i$th and $j$th atoms/molecules from a set of $N$ atoms/molecules are adjacent or not. Alternatively, you can calculate
-an adjacency matrix between a set of $N$ atoms and a second set of $M$ atoms. For this type of matrix the $i$th, $j$th element tells you
-whether the whether the $i$th atom in the first group and the $j$th atom in the second group are adjacent or not. The adjacency matrix in this
-case is thus $N \times M$.
-
-The simplest type of adjacency matrix is a contact matrix. The elements of a contact matrix are calculated using:
-
-$$
-a_{ij} = \sigma( r_{ij} )
-$$
-
-where $r_{ij}$ is the magnitude of the vector connecting atoms $i$ and $j$ and where $\sigma$ is a switching function. If you want to calculate a
-contact matrix for one group of atoms the input would look something like this:
-
-```plumed
-c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
-```
-
-Alternatively, if you want to calculate the contact matrix between two groups of atoms you would use an input like following:
-
-```plumed
-c2: CONTACT_MATRIX GROUPA=1-7 GROUPB=8-20 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
-```
-
-Once you have calculated a contact matrix you can perform various matrix operations by using the tools in the matrixtools or clusters modules.
-
-## Coordination numbers
-
-If a contact matrix, $\mathbf{C}$, is multiplied from the back by a vector of ones the $i$th element of the resulting matrix tells you the number of atoms that are
-within $r_c$ of atom $i$. In other words, the coordination numbers of the atoms can be calculated from the contact matrix by doing matrix vector multiplication.
-
-This realisation about the relationship between the contact map and the coordination number is heavily used in PLUMED. For example, to calculate
-and print the coordination numbers of the first 7 atoms in the system with themselves you would use an input something like this:
-
-```plumed
-c1: CONTACT_MATRIX GROUP=1-7 D_0=0.0 R_0=2.6 NN=6 MM=12
-ones: ONES SIZE=7
-cc: MATRIX_VECTOR_PRODUCT ARG=c1,ones
-PRINT ARG=cc FILE=colvar
-```
-
-This input transforms the distances using the RATIONAL switching function that is discussed in the documentation for [LESS_THAN](LESS_THAN.md)
-The parameters for this type of switching function can be specified using `D_0`, `R_0`, `NN` and `MM` keywords as indicated above. However, we would recommend
-using the following syntax instead as this allows you to use the full range of switching function types. Most importantly, if you use the following syntax you can
-set the D_MAX parameter, as shown below. As discussed in the optimization details section below, __if you want good computational performance on large systems it is essential to set the D_MAX parameter.__
-
-
-```plumed
-c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12 D_MAX=5.0}
-ones: ONES SIZE=7
-cc: MATRIX_VECTOR_PRODUCT ARG=c1,ones
-PRINT ARG=cc FILE=colvar
-```
-
-Implmenting the coordination number as a product of a matrix and a vector is useful as there are many different ways to define whether two atoms/molecules and to construct a "contact" matrix based on
-the result. For example:
-
-* You could say that two molecules are connected if they are within a certain distance of each other and if they have the same orientation (see [TORSIONS_MATRIX](TORSIONS_MATRIX.md)).
-* You could say that two water molecules are connected if they are hydrogen bonded to each other (see [HBOND_MATRIX](HBOND_MATRIX.md)).
-* You could say that two atoms are connected if they are within a certain distance of each other and if they have similar values for a CV (see [OUTER_PRODUCT](OUTER_PRODUCT.md)).
-
-When the coordination numbers is implemented in the way described above (by doing the matrix-vector multiplication) you have the flexibility to define the contact matrix that
-is used in the multiplication in whatever way you choose. In other words, this implementation of the coordination number is much more flexible. For example, suppose you want
-to calculate the number of atoms that have a coordination is greater than 3.0. You can do this with PLUMED using the following input:
-
-```plumed
-# Calculate the contact matrix for the first seven atoms in the system
-c1: CONTACT_MATRIX GROUP=1-7 SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
-# Calculate the coordination numbers for the first seven atoms in the system
-ones: ONES SIZE=7
-cc: MATRIX_VECTOR_PRODUCT ARG=c1,ones
-# Set the ith element of the vector mtc equal to one if the coordination number of atom i is greater than 3.
-mtc: MORE_THAN ARG=cc SWITCH={RATIONAL D_0=3 R_0=1}
-# Calculate the number of atoms with a coordination number greater than 3.
-s: SUM ARG=mtc PERIODIC=NO
-PRINT ARG=s FILE=colvar
-```
-
-Alternatively, consider the CV that was used to study perovskite nucleation in [this paper](https://pubs.acs.org/doi/abs/10.1021/acs.chemmater.9b04259). The CV here measures the number of
-methylamonium molecules that are attached to at least 5 other methylamoniusm molecules, at least 7 lead atoms and at least 11 ionide ions. We can calculate something akin to this
-CV and apply a restraint on the resulting quantity by using the following input file:
-
-```plumed
-# Lead ions
-Pb: GROUP ATOMS=1-64
-# Iodide atoms
-I: GROUP ATOMS=65-256
-# Methylamonium "atoms" -- in the real CV these are centers of mass rather than single atoms
-cn: GROUP ATOMS=257-320
-
-ones64: ONES SIZE=64
-# Contact matrix that determines if methylamonium molecules are within 8 A of each other
-cm_cncn: CONTACT_MATRIX GROUP=cn SWITCH={RATIONAL R_0=0.8}
-# Coordination number of methylamounium with methylamonium
-cc_cncn: MATRIX_VECTOR_PRODUCT ARG=cm_cncn,ones64
-#Â Vector with elements that are one if coordiantion of methylamonium with methylamonium >5
-mt_cncn: MORE_THAN ARG=cc_cncn SWITCH={RATIONAL R_0=5 NN=12 MM=24}
-
-#Â Contact matrix that determines if methylamoinium moleulcule and Pb atom are within 7.5 A of each other
-cm_cnpb: CONTACT_MATRIX GROUPA=cn GROUPB=Pb SWITCH={RATIONAL R_0=0.75}
-# Coordination number of methylamonium with Pb
-cc_cnpb: MATRIX_VECTOR_PRODUCT ARG=cm_cnpb,ones64
-#Â Vector with elements that are one if coordination of methylamounium with lead is >7
-mt_cnpb: MORE_THAN ARG=cc_cnpb SWITCH={RATIONAL R_0=7 NN=12 MM=24}
-
-ones192: ONES SIZE=192
-#Â Contact matrix that determines if methylamoinium moleulcule and I atom are within 6.5 A of each other
-cm_cnI: CONTACT_MATRIX GROUPA=cn GROUPB=I SWITCH={RATIONAL R_0=0.65}
-# Coordination number of methylamonium with I
-cc_cnI: MATRIX_VECTOR_PRODUCT ARG=cm_cnI,ones192
-#Â Vector with elements that are one if coordination of methylamounium with lead is >11
-mt_cnI: MORE_THAN ARG=cc_cnI SWITCH={RATIONAL R_0=11 NN=12 MM=24}
-
-# Element wise product of these three input vectors.
-# mm[i]==1 if coordination number of corrsponding methylamounium with methylamonium is >5
-# and if coordination of methylamounium with Pb is >7 and if coordination of methylamounium with I > 11
-mm: CUSTOM ARG=mt_cncn,mt_cnpb,mt_cnI FUNC=x*y*z PERIODIC=NO
-
-#Â Sum of coordination numbers and thus equal to number of methylamoniums with desired coordination numbers
-ff: SUM ARG=mm PERIODIC=NO
-
-rr: RESTRAINT ARG=ff AT=62 KAPPA=10
-```
-
-##Â COMPONENTS flag
-
-If you add the flag COMPONENTS to the input as shown below:
-
-```plumed
-c4: CONTACT_MATRIX GROUP=1-7 COMPONENTS SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
-```
-
-then four matrices with the labels `c4.w`, `c4.x`, `c4.y` and `c4.z` are output by the action. The matrix with the label `c4.w` is the adjacency matrix
-that would be output if you had not added the COMPONENTS flag. The $i,j$ component of the matrices `c4.x`, `c4.y` and `c4.z` contain the $x$, $y$ and $z$
-components of the vector connecting atoms $i$ and $j$. Importantly, however, the components of these vectors are only stored in `c4.x`, `c4.y` and `c4.z`
-if the elements of `c4.w` are non-zero.
-
-## NOPBC flag
-
-By default PLUMED calculates the distances that are transformed by the switching function in the CONTACT_MATRIX action in a way that accounts for the periodic boundary
-conditions. If for any reason you do not want PLUMED to account for the periodic boundary conditions you can use the NOPBC flag as shown below:
-
-```plumed
-c: CONTACT_MATRIX GROUP=1-7 NOPBC SWITCH={RATIONAL R_0=2.6 NN=6 MM=12}
-```
-
-If you also add the COMPONENTS flag in this input then the vector connecting each pairs of atoms will also be calculated without taking the periodic boundary conditions into account.
-
-## Optimisation details
-
-Adjacency matrices are sparse. Each atom is only be connected to a small number of neighbours and the vast majority of the elements of the contact matrix are thus zero. To reduce
-the amount of memory that PLUMED requires PLUMED uses sparse matrix storage. Consequently, whenever you calculate and store a contact matrix only the elements of the matrix that are
-non-zero are stored. The same thing holds for the additional values that are created when you use the COMPONENTS flag. The components of the vectors connecting atoms are only stored
-when the elements of `c4.w` are non-zero.
-
-We can also use the sparsity of the adjacency matrix to make the time required to compute a contact matrix scale linearly rather than quadratically with the number of atoms. Element
-$i,j$ of the contact matrix is only non-zero if two atoms are within a cutoff, $r_c$. We can determine that many pairs of atoms are further appart than $r_c$ without computing the
-distance between these atoms by using divide and conquer strategies such as linked lists and neighbour lists. __To turn on these features you need to set the `D_MAX` parameter in the
-switching functions.__ The value you pass to the `D_MAX` keyword is used as the cutoff in the link cell algorithm.
-
-In theory we could further optimize the implementation of the CONTACT_MATRIX action by exploiting neighbor lists. If we were to do this we would likely add two further keywords as shown
-below:
-
-```plumed
-c4: CONTACT_MATRIX GROUP=1-10000 SWITCH={RATIONAL R_0=0.1 NN=6 MM=12 D_MAX=0.5} NL_CUTOFF=0.7 NL_STRIDE=5
-```
-
-The `NL_CUTOFF` keyword would be used to specify the cutoff (in nm) to use when constructing neighbor lists. This value would need to be slightly larger than the D_MAX parameter for the switching function.
-The `NL_STRIDE` keyword would then be used to specify how frequently the neighbour list should be updated. Thus far we have not found it necessary to implement this algorithm. We have been happy with the
-performance even if we use the linked list algorithm to update the neighbors on every step. If you feel that you need this CV to perform better please get in touch as adding a neighbor list for this action
-should be relatively straightforward.
-
-## The MASK keyword
-
-Suppose that you want to calculate the average coordination number for the atoms that are within a sphere in the center of your simulation box. You can do so by exploiting an input similar to the one shown
-below:
-
-```plumed
-# The atoms that are of interest
-ow: GROUP ATOMS=1-16500
-# Fixed virtual atom which serves as the probe volume's center (pos. in nm)
-center: FIXEDATOM AT=2.5,2.5,2.5
-# Vector in which element i is one if atom i is in sphere of interest and zero otherwise
-sphere: INSPHERE ATOMS=ow CENTER=center RADIUS={GAUSSIAN D_0=0.5 R_0=0.01 D_MAX=0.52}
-# Calculates cooordination numbers
-cmap: CONTACT_MATRIX GROUP=ow SWITCH={GAUSSIAN D_0=0.32 R_0=0.01 D_MAX=0.34}
-ones: ONES SIZE=16500
-cc: MATRIX_VECTOR_PRODUCT ARG=cmap,ones
-# Multiply coordination numbers by sphere vector
-prod: CUSTOM ARG=cc,sphere FUNC=x*y PERIODIC=NO
-# Sum of coordination numbers for atoms that are in the sphere of interest
-numer: SUM ARG=prod PERIODIC=NO
-# Number of atoms that are in sphere of interest
-denom: SUM ARG=sphere PERIODIC=NO
-# Average coordination number for atoms in sphere of interest
-av: CUSTOM ARG=prod,sphere FUNC=x/y PERIODIC=NO
-# And print out final CV to a file
-PRINT ARG=av FILE=colvar STRIDE=1
-```
-
-This calculation is slow because you have to calculate the coordination numbers of all the atoms even though only a small subset of these quanitties are required to compute the average coordination number in the
-sphere. To avoid all these unecessary calculations you use the `MASK` keyword as shown below:
-
-```plumed
-# The atoms that are of interest
-ow: GROUP ATOMS=1-16500
-# Fixed virtual atom which serves as the probe volume's center (pos. in nm)
-center: FIXEDATOM AT=2.5,2.5,2.5
-# Vector in which element i is one if atom i is in sphere of interest and zero otherwise
-sphere: INSPHERE ATOMS=ow CENTER=center RADIUS={GAUSSIAN D_0=0.5 R_0=0.01 D_MAX=0.52}
-# Calculates cooordination numbers
-cmap: CONTACT_MATRIX GROUP=ow SWITCH={GAUSSIAN D_0=0.32 R_0=0.01 D_MAX=0.34} MASK=sphere
-ones: ONES SIZE=16500
-cc: MATRIX_VECTOR_PRODUCT ARG=cmap,ones
-# Multiply coordination numbers by sphere vector
-prod: CUSTOM ARG=cc,sphere FUNC=x*y PERIODIC=NO
-# Sum of coordination numbers for atoms that are in the sphere of interest
-numer: SUM ARG=prod PERIODIC=NO
-# Number of atoms that are in sphere of interest
-denom: SUM ARG=sphere PERIODIC=NO
-# Average coordination number for atoms in sphere of interest
-av: CUSTOM ARG=prod,sphere FUNC=x/y PERIODIC=NO
-# And print out final CV to a file
-PRINT ARG=av FILE=colvar STRIDE=1
-```
-
-Adding the instruction `MASK=sphere` to the CONTACT_MATRIX line in this input tells PLUMED to only calculate the $i$th row in the adjacency matrix if the $i$th element of the vector `sphere` is non-zero.
-In other words, by adding this command we have ensured that we are not calculating coordination numbers for atoms that are not in the sphere that is of interest. In this way we can thus reduce the computational
-expense of the calculation enormously.
-
-Notice, that there are other places where we can use this same trick. For example, we could have used MASK as shown below for our calculation of the CV for perovskite nucleation as shown below:
-
-```plumed
-# Lead ions
-Pb: GROUP ATOMS=1-64
-# Iodide atoms
-I: GROUP ATOMS=65-256
-# Methylamonium "atoms" -- in the real CV these are centers of mass rather than single atoms
-cn: GROUP ATOMS=257-320
-
-ones192: ONES SIZE=192
-#Â Contact matrix that determines if methylamoinium moleulcule and I atom are within 6.5 A of each other
-cm_cnI: CONTACT_MATRIX GROUPA=cn GROUPB=I SWITCH={RATIONAL R_0=0.65 D_MAX=1.0}
-# Coordination number of methylamonium with I
-cc_cnI: MATRIX_VECTOR_PRODUCT ARG=cm_cnI,ones192
-#Â Vector with elements that are one if coordination of methylamounium with lead is >11
-mt_cnI: MORE_THAN ARG=cc_cnI SWITCH={RATIONAL R_0=11 NN=12 MM=24}
-
-ones64: ONES SIZE=64
-#Â Contact matrix that determines if methylamoinium moleulcule and Pb atom are within 7.5 A of each other
-cm_cnpb: CONTACT_MATRIX GROUPA=cn GROUPB=Pb SWITCH={RATIONAL R_0=0.75 D_MAX=1.5} MASK=mt_cnI
-# Coordination number of methylamonium with Pb
-cc_cnpb: MATRIX_VECTOR_PRODUCT ARG=cm_cnpb,ones64
-#Â Vector with elements that are one if coordination of methylamounium with lead is >7
-mt_cnpb: MORE_THAN ARG=cc_cnpb SWITCH={RATIONAL R_0=7 NN=12 MM=24}
-
-# Contact matrix that determines if methylamonium molecules are within 8 A of each other
-cm_cncn: CONTACT_MATRIX GROUP=cn SWITCH={RATIONAL R_0=0.8 D_MAX=1.75} MASK=mt_cnI
-# Coordination number of methylamounium with methylamonium
-cc_cncn: MATRIX_VECTOR_PRODUCT ARG=cm_cncn,ones64
-#Â Vector with elements that are one if coordiantion of methylamonium with methylamonium >5
-mt_cncn: MORE_THAN ARG=cc_cncn SWITCH={RATIONAL R_0=5 NN=12 MM=24}
-
-# Element wise product of these three input vectors.
-# mm[i]==1 if coordination number of corrsponding methylamounium with methylamonium is >5
-# and if coordination of methylamounium with Pb is >7 and if coordination of methylamounium with I > 11
-mm: CUSTOM ARG=mt_cncn,mt_cnpb,mt_cnI FUNC=x*y*z PERIODIC=NO
-
-#Â Sum of coordination numbers and thus equal to number of methylamoniums with desired coordination numbers
-ff: SUM ARG=mm PERIODIC=NO
-
-rr: RESTRAINT ARG=ff AT=62 KAPPA=10
-```
-
-This trick works here because when we find that there are methylamoinium moleulcules with fewer than 11 lead atoms in there first coordination sphere we know that there
-is no point calculating the second two coordination numbers.
-
-*/
-//+ENDPLUMEDOC
-
-namespace PLMD {
-namespace adjmat {
-
-class ContactMatrixShortcut : public ActionShortcut {
-public:
- static void registerKeywords(Keywords& keys);
- explicit ContactMatrixShortcut(const ActionOptions&);
-};
-
-PLUMED_REGISTER_ACTION(ContactMatrixShortcut,"CONTACT_MATRIX")
-
-void ContactMatrixShortcut::registerKeywords(Keywords& keys) {
- AdjacencyMatrixBase::registerKeywords( keys );
- keys.remove("GROUP");
- keys.remove("SWITCH");
- keys.add("numbered","GROUP","specifies the list of atoms that should be assumed indistinguishable");
- keys.add("numbered","SWITCH","the input for the switching function that acts upon the distance between each pair of atoms");
- keys.linkActionInDocs("SWITCH","LESS_THAN");
- keys.addActionNameSuffix("_PROPER");
- keys.needsAction("TRANSPOSE");
- keys.needsAction("CONCATENATE");
-}
-
-ContactMatrixShortcut::ContactMatrixShortcut(const ActionOptions& ao):
- Action(ao),
- ActionShortcut(ao) {
- std::vector grp_str;
- std::string atomsstr="";
- std::vector atomsvec;
- parseVector("ATOMS",atomsvec);
- if( atomsvec.size()>0 ) {
- for(unsigned i=0; i( atomsvec[i] );
- if( gg ) {
- grp_str.push_back( atomsvec[i] );
- }
- }
- if( grp_str.size()!=atomsvec.size() ) {
- grp_str.resize(0);
- atomsstr = " ATOMS=" + atomsvec[0];
- for(unsigned i=1; i9 ) {
- error("cannot handle more than 9 groups");
- }
- if( grp_str.size()==0 ) {
- readInputLine( getShortcutLabel() + ": CONTACT_MATRIX_PROPER " + atomsstr + " " + convertInputLineToString() );
- return;
- }
-
- for(unsigned i=0; i