diff --git a/regtest/crystallization/rt-dfg1/Makefile b/regtest/adjmat/rt-dfg1/Makefile similarity index 100% rename from regtest/crystallization/rt-dfg1/Makefile rename to regtest/adjmat/rt-dfg1/Makefile diff --git a/regtest/crystallization/rt-dfg1/colvar.reference b/regtest/adjmat/rt-dfg1/colvar.reference similarity index 100% rename from regtest/crystallization/rt-dfg1/colvar.reference rename to regtest/adjmat/rt-dfg1/colvar.reference diff --git a/regtest/crystallization/rt-dfg1/conf.gro b/regtest/adjmat/rt-dfg1/conf.gro similarity index 100% rename from regtest/crystallization/rt-dfg1/conf.gro rename to regtest/adjmat/rt-dfg1/conf.gro diff --git a/regtest/crystallization/rt-dfg1/config b/regtest/adjmat/rt-dfg1/config similarity index 100% rename from regtest/crystallization/rt-dfg1/config rename to regtest/adjmat/rt-dfg1/config diff --git a/regtest/crystallization/rt-dfg1/config.xyz b/regtest/adjmat/rt-dfg1/config.xyz similarity index 100% rename from regtest/crystallization/rt-dfg1/config.xyz rename to regtest/adjmat/rt-dfg1/config.xyz diff --git a/regtest/crystallization/rt-dfg1/deriv.reference b/regtest/adjmat/rt-dfg1/deriv.reference similarity index 100% rename from regtest/crystallization/rt-dfg1/deriv.reference rename to regtest/adjmat/rt-dfg1/deriv.reference diff --git a/regtest/crystallization/rt-dfg1/plumed.dat b/regtest/adjmat/rt-dfg1/plumed.dat similarity index 100% rename from regtest/crystallization/rt-dfg1/plumed.dat rename to regtest/adjmat/rt-dfg1/plumed.dat diff --git a/regtest/crystallization/rt-dfg2/Makefile b/regtest/adjmat/rt-dfg2/Makefile similarity index 100% rename from regtest/crystallization/rt-dfg2/Makefile rename to regtest/adjmat/rt-dfg2/Makefile diff --git a/regtest/crystallization/rt-dfg2/colvar.reference b/regtest/adjmat/rt-dfg2/colvar.reference similarity index 100% rename from regtest/crystallization/rt-dfg2/colvar.reference rename to regtest/adjmat/rt-dfg2/colvar.reference diff --git a/regtest/crystallization/rt-dfg2/config b/regtest/adjmat/rt-dfg2/config similarity index 100% rename from regtest/crystallization/rt-dfg2/config rename to regtest/adjmat/rt-dfg2/config diff --git a/regtest/crystallization/rt-dfg2/plumed.dat b/regtest/adjmat/rt-dfg2/plumed.dat similarity index 100% rename from regtest/crystallization/rt-dfg2/plumed.dat rename to regtest/adjmat/rt-dfg2/plumed.dat diff --git a/regtest/crystallization/rt-dfg2/traj.xyz b/regtest/adjmat/rt-dfg2/traj.xyz similarity index 100% rename from regtest/crystallization/rt-dfg2/traj.xyz rename to regtest/adjmat/rt-dfg2/traj.xyz diff --git a/regtest/multicolvar/rt-sprint/Makefile b/regtest/adjmat/rt-sprint/Makefile similarity index 100% rename from regtest/multicolvar/rt-sprint/Makefile rename to regtest/adjmat/rt-sprint/Makefile diff --git a/regtest/multicolvar/rt-sprint/colvar.reference b/regtest/adjmat/rt-sprint/colvar.reference similarity index 100% rename from regtest/multicolvar/rt-sprint/colvar.reference rename to regtest/adjmat/rt-sprint/colvar.reference diff --git a/regtest/multicolvar/rt-sprint/config b/regtest/adjmat/rt-sprint/config similarity index 100% rename from regtest/multicolvar/rt-sprint/config rename to regtest/adjmat/rt-sprint/config diff --git a/regtest/multicolvar/rt-sprint/deriv.reference b/regtest/adjmat/rt-sprint/deriv.reference similarity index 100% rename from regtest/multicolvar/rt-sprint/deriv.reference rename to regtest/adjmat/rt-sprint/deriv.reference diff --git a/regtest/multicolvar/rt-sprint/isomers.xyz b/regtest/adjmat/rt-sprint/isomers.xyz similarity index 100% rename from regtest/multicolvar/rt-sprint/isomers.xyz rename to regtest/adjmat/rt-sprint/isomers.xyz diff --git a/regtest/multicolvar/rt-sprint/plumed.dat b/regtest/adjmat/rt-sprint/plumed.dat similarity index 100% rename from regtest/multicolvar/rt-sprint/plumed.dat rename to regtest/adjmat/rt-sprint/plumed.dat diff --git a/src/.gitignore b/src/.gitignore index 838ba6a71f6df12856a06c1dcd9cb7ca4f03f657..be04342c3a1cb27702e7a962dc779f20dce70256 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -3,6 +3,7 @@ # Only track modules that are part of the plumed core !/Makefile !/README +!/adjmat !/analysis !/bias !/blas diff --git a/src/adjmat/.gitignore b/src/adjmat/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..4888552338441b5d99a97ec7a2cb2ce448e9e4e6 --- /dev/null +++ b/src/adjmat/.gitignore @@ -0,0 +1,9 @@ +/* +# in this directory, only accept source, Makefile and README +!/.gitignore +!/*.c +!/*.cpp +!/*.h +!/Makefile +!/README +!/module.type diff --git a/src/multicolvar/AdjacencyMatrixAction.cpp b/src/adjmat/AdjacencyMatrixAction.cpp similarity index 95% rename from src/multicolvar/AdjacencyMatrixAction.cpp rename to src/adjmat/AdjacencyMatrixAction.cpp index b409cbc07cbb84cf762c9a0c64e36200b48e9ec0..9a017c01fae03302f70ba7b73598a60ccc16decc 100644 --- a/src/multicolvar/AdjacencyMatrixAction.cpp +++ b/src/adjmat/AdjacencyMatrixAction.cpp @@ -22,10 +22,10 @@ #include "AdjacencyMatrixAction.h" namespace PLMD { -namespace multicolvar { +namespace adjmat { void AdjacencyMatrixAction::registerKeywords( Keywords& keys ){ - MultiColvarFunction::registerKeywords( keys ); + multicolvar::MultiColvarFunction::registerKeywords( keys ); keys.reserveFlag("USE_ORIENTATION",false,"When computing whether two atoms/molecules are adjacent also take their orientations into account"); keys.add("numbered","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. " @@ -117,13 +117,13 @@ void AdjacencyMatrixAction::doJobsRequiredBeforeTaskList(){ else dertime=true; } -void AdjacencyMatrixAction::calculateWeight( AtomValuePack& myatoms ) const { +void AdjacencyMatrixAction::calculateWeight( multicolvar::AtomValuePack& myatoms ) const { Vector distance = getSeparation( myatoms.getPosition(0), myatoms.getPosition(1) ); double dfunc, sw = switchingFunction( getBaseColvarNumber( myatoms.getIndex(0) ),getBaseColvarNumber( myatoms.getIndex(1) ) ).calculate( distance.modulo(), dfunc ); myatoms.setValue(0,sw); } -double AdjacencyMatrixAction::compute( const unsigned& tindex, AtomValuePack& myatoms ) const { +double AdjacencyMatrixAction::compute( const unsigned& tindex, multicolvar::AtomValuePack& myatoms ) const { // active_elements.activate( tindex ); double f_dot, dot_df; @@ -148,9 +148,9 @@ double AdjacencyMatrixAction::compute( const unsigned& tindex, AtomValuePack& my // Add contribution due to separation between atoms Vector distance = getSeparation( myatoms.getPosition(0), myatoms.getPosition(1) ); double dfunc, sw = switchingFunction( getBaseColvarNumber( myatoms.getIndex(0) ), getBaseColvarNumber( myatoms.getIndex(0) ) ).calculate( distance.modulo(), dfunc ); - CatomPack atom0=getCentralAtomPackFromInput( myatoms.getIndex(0) ); + multicolvar::CatomPack atom0=getCentralAtomPackFromInput( myatoms.getIndex(0) ); myatoms.addComDerivatives( 1, (-dfunc)*f_dot*distance, atom0 ); - CatomPack atom1=getCentralAtomPackFromInput( myatoms.getIndex(1) ); + multicolvar::CatomPack atom1=getCentralAtomPackFromInput( myatoms.getIndex(1) ); myatoms.addComDerivatives( 1, (dfunc)*f_dot*distance, atom1 ); myatoms.addBoxDerivatives( 1, (-dfunc)*f_dot*Tensor(distance,distance) ); diff --git a/src/multicolvar/AdjacencyMatrixAction.h b/src/adjmat/AdjacencyMatrixAction.h similarity index 89% rename from src/multicolvar/AdjacencyMatrixAction.h rename to src/adjmat/AdjacencyMatrixAction.h index 6cf1b667d2942d2f0e243a559b39a2b4ed2485d1..0b92ba6565d666805892a51f62fc3036e8077880 100644 --- a/src/multicolvar/AdjacencyMatrixAction.h +++ b/src/adjmat/AdjacencyMatrixAction.h @@ -19,18 +19,18 @@ You should have received a copy of the GNU Lesser General Public License along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ -#ifndef __PLUMED_multicolvar_AdjacencyMatrixAction_h -#define __PLUMED_multicolvar_AdjacencyMatrixAction_h +#ifndef __PLUMED_adjmat_AdjacencyMatrixAction_h +#define __PLUMED_adjmat_AdjacencyMatrixAction_h -#include "MultiColvarFunction.h" +#include "multicolvar/MultiColvarFunction.h" #include "tools/SwitchingFunction.h" #include "tools/Matrix.h" #include "AdjacencyMatrixVessel.h" namespace PLMD { -namespace multicolvar { +namespace adjmat { -class AdjacencyMatrixAction : public MultiColvarFunction { +class AdjacencyMatrixAction : public multicolvar::MultiColvarFunction { friend class AdjacencyMatrixVessel; private: /// Are we including the orientation in our measure of adjacency @@ -64,8 +64,8 @@ protected: public: static void registerKeywords( Keywords& keys ); explicit AdjacencyMatrixAction(const ActionOptions&); - double compute( const unsigned& tindex, AtomValuePack& myatoms ) const ; - void calculateWeight( AtomValuePack& myatoms ) const ; + double compute( const unsigned& tindex, multicolvar::AtomValuePack& myatoms ) const ; + void calculateWeight( multicolvar::AtomValuePack& myatoms ) const ; void doJobsRequiredBeforeTaskList(); /// Finish the calculation virtual void completeCalculation()=0; diff --git a/src/multicolvar/AdjacencyMatrixVessel.cpp b/src/adjmat/AdjacencyMatrixVessel.cpp similarity index 98% rename from src/multicolvar/AdjacencyMatrixVessel.cpp rename to src/adjmat/AdjacencyMatrixVessel.cpp index 56d0938e7502e148ea4dc653a31ba2633f6121ee..92bbd4a253e0ef15822284e190e970c529ce1931 100644 --- a/src/multicolvar/AdjacencyMatrixVessel.cpp +++ b/src/adjmat/AdjacencyMatrixVessel.cpp @@ -24,7 +24,7 @@ #include "AdjacencyMatrixAction.h" namespace PLMD { -namespace multicolvar { +namespace adjmat { void AdjacencyMatrixVessel::registerKeywords( Keywords& keys ){ StoreDataVessel::registerKeywords(keys); diff --git a/src/multicolvar/AdjacencyMatrixVessel.h b/src/adjmat/AdjacencyMatrixVessel.h similarity index 98% rename from src/multicolvar/AdjacencyMatrixVessel.h rename to src/adjmat/AdjacencyMatrixVessel.h index 373d390d8b8ee33b7ba17b80fb7ea574ef9696d0..dc35a7cf125e260dc2b2e296518ce5a229de0990 100644 --- a/src/multicolvar/AdjacencyMatrixVessel.h +++ b/src/adjmat/AdjacencyMatrixVessel.h @@ -25,7 +25,7 @@ #include "vesselbase/StoreDataVessel.h" namespace PLMD { -namespace multicolvar { +namespace adjmat { class AdjacencyMatrixAction; diff --git a/src/crystallization/DFSBasic.cpp b/src/adjmat/DFSBasic.cpp similarity index 99% rename from src/crystallization/DFSBasic.cpp rename to src/adjmat/DFSBasic.cpp index 58f9d053b161e65813a2e0ddcf23479b83a79c6c..f5d062be75f1b211e29e65e45052ede373ec26bb 100644 --- a/src/crystallization/DFSBasic.cpp +++ b/src/adjmat/DFSBasic.cpp @@ -125,7 +125,7 @@ clust: DFSCLUSTERING DATA=cf WTOL=0.03 CLUSTER=1 SWITCH={CUBIC D_0=0.4 D_MAX=0 //+ENDPLUMEDOC namespace PLMD { -namespace crystallization { +namespace adjmat { class DFSBasic : public DFSClustering { private: diff --git a/src/crystallization/DFSClusterRadius.cpp b/src/adjmat/DFSClusterRadius.cpp similarity index 99% rename from src/crystallization/DFSClusterRadius.cpp rename to src/adjmat/DFSClusterRadius.cpp index d72bf626adf22f9bf2eb4dd861d4cdb06ac11e34..64d95feb5e0802bf96c7167faf01d8f4b67a8e5f 100644 --- a/src/crystallization/DFSClusterRadius.cpp +++ b/src/adjmat/DFSClusterRadius.cpp @@ -38,7 +38,7 @@ done by this action. //+ENDPLUMEDOC namespace PLMD { -namespace crystallization { +namespace adjmat { class DFSClusterDiameter : public DFSClustering { private: diff --git a/src/crystallization/DFSClustering.cpp b/src/adjmat/DFSClustering.cpp similarity index 98% rename from src/crystallization/DFSClustering.cpp rename to src/adjmat/DFSClustering.cpp index 295ed4e9ed6f04433f0d1c686d885b671550cfd5..b5aad90a810aec6b085118377278f8409c9b9d56 100644 --- a/src/crystallization/DFSClustering.cpp +++ b/src/adjmat/DFSClustering.cpp @@ -23,10 +23,10 @@ namespace PLMD { -namespace crystallization { +namespace adjmat { void DFSClustering::registerKeywords( Keywords& keys ){ - multicolvar::AdjacencyMatrixAction::registerKeywords( keys ); + AdjacencyMatrixAction::registerKeywords( keys ); } DFSClustering::DFSClustering(const ActionOptions&ao): diff --git a/src/crystallization/DFSClustering.h b/src/adjmat/DFSClustering.h similarity index 91% rename from src/crystallization/DFSClustering.h rename to src/adjmat/DFSClustering.h index 3ad613abe78aafc14fa2d90342939dc13fcca929..9d28d26c8b085f959de04a95a432649d2fd974e2 100644 --- a/src/crystallization/DFSClustering.h +++ b/src/adjmat/DFSClustering.h @@ -19,15 +19,15 @@ You should have received a copy of the GNU Lesser General Public License along with plumed. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ -#ifndef __PLUMED_crystallization_DFSClustering_h -#define __PLUMED_crystallization_DFSClustering_h +#ifndef __PLUMED_adjmat_DFSClustering_h +#define __PLUMED_adjmat_DFSClustering_h -#include "multicolvar/AdjacencyMatrixAction.h" +#include "AdjacencyMatrixAction.h" namespace PLMD { -namespace crystallization { +namespace adjmat { -class DFSClustering : public multicolvar::AdjacencyMatrixAction { +class DFSClustering : public AdjacencyMatrixAction { private: /// Used to identify the cluster we are working on int number_of_cluster; diff --git a/src/crystallization/DFSMaxSize.cpp b/src/adjmat/DFSMaxSize.cpp similarity index 99% rename from src/crystallization/DFSMaxSize.cpp rename to src/adjmat/DFSMaxSize.cpp index 93e59f1d399e97748c8933716c1351cd13165d97..5843d5f095e279177293225953ed5324a98a2cc8 100644 --- a/src/crystallization/DFSMaxSize.cpp +++ b/src/adjmat/DFSMaxSize.cpp @@ -65,7 +65,7 @@ clust: DFSMAXCLUSTER DATA=cf BETA=0.5 SWITCH={CUBIC D_0=0.4 D_MAX=0.5} TRANSFO //+ENDPLUMEDOC namespace PLMD { -namespace crystallization { +namespace adjmat { class DFSMaxCluster : public DFSClustering { private: diff --git a/src/crystallization/DFSNumberOfClusters.cpp b/src/adjmat/DFSNumberOfClusters.cpp similarity index 99% rename from src/crystallization/DFSNumberOfClusters.cpp rename to src/adjmat/DFSNumberOfClusters.cpp index 6db6912e0ad8eb6908c629414fb18f01aa1f4664..3c592611c109e12c3468e0485b3a0b86d002140a 100644 --- a/src/crystallization/DFSNumberOfClusters.cpp +++ b/src/adjmat/DFSNumberOfClusters.cpp @@ -32,7 +32,7 @@ Find the number of clusters that have a size larger than a certain cutoff //+ENDPLUMEDOC namespace PLMD { -namespace crystallization { +namespace adjmat { class DFSNumberOfClusters : public DFSClustering { private: diff --git a/src/adjmat/Makefile b/src/adjmat/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..f68246671ed0ea23ad4d282dde1568ae2024d9e4 --- /dev/null +++ b/src/adjmat/Makefile @@ -0,0 +1,4 @@ +USE=core tools vesselbase multicolvar + +# generic makefile +include ../maketools/make.module diff --git a/src/multicolvar/Sprint.cpp b/src/adjmat/Sprint.cpp similarity index 99% rename from src/multicolvar/Sprint.cpp rename to src/adjmat/Sprint.cpp index f4ceaab182b2ba04669e72691818cda1461ef0fb..e3f827799abc354ee424aaca9255a6a9715a2d9d 100644 --- a/src/multicolvar/Sprint.cpp +++ b/src/adjmat/Sprint.cpp @@ -74,7 +74,7 @@ PRINT ARG=ss.* FILE=colvar namespace PLMD { -namespace multicolvar { +namespace adjmat { class Sprint : public AdjacencyMatrixAction { private: diff --git a/src/adjmat/module.type b/src/adjmat/module.type new file mode 100644 index 0000000000000000000000000000000000000000..de832730330473a1870bd368868640da677460ae --- /dev/null +++ b/src/adjmat/module.type @@ -0,0 +1 @@ +default-off