diff --git a/regtest/analysis/rt-calc-dissims/plumed.dat b/regtest/analysis/rt-calc-dissims/plumed.dat index e1f37516f336443365ad7af34836819be4030afd..f55414cd7030a48a661e219dc0f2ec2638470522 100644 --- a/regtest/analysis/rt-calc-dissims/plumed.dat +++ b/regtest/analysis/rt-calc-dissims/plumed.dat @@ -3,7 +3,7 @@ d1: READ FILE=colv_in VALUES=data ss1: EUCLIDEAN_DISSIMILARITIES STRIDE=1 USE_ALL_DATA ARG=d1 PRINT_DISSIMILARITY_MATRIX USE_OUTPUT_DATA_FROM=ss1 FILE=mymatrix.dat FMT=%8.4f -ll1: LANDMARK_SELECT_STRIDE ARG=d1 USE_OUTPUT_DATA_FROM=ss1 NLANDMARKS=5 +ll1: LANDMARK_SELECT_STRIDE USE_OUTPUT_DATA_FROM=ss1 NLANDMARKS=5 ss2: EUCLIDEAN_DISSIMILARITIES USE_OUTPUT_DATA_FROM=ll1 OUTPUT_ANALYSIS_DATA_TO_PDB USE_OUTPUT_DATA_FROM=ll1 FILE=output-stride.pdb PRINT_DISSIMILARITY_MATRIX USE_OUTPUT_DATA_FROM=ll1 FILE=mymatrix2.dat FMT=%8.4f diff --git a/regtest/analysis/rt-store-print/plumed.dat b/regtest/analysis/rt-store-print/plumed.dat index 89c6f78faa26f503a317300c4bd553b1c4c185a1..74f5b88fdebc498401d6df0a7dd4f29603a85290 100644 --- a/regtest/analysis/rt-store-print/plumed.dat +++ b/regtest/analysis/rt-store-print/plumed.dat @@ -4,8 +4,8 @@ ss1: OUTPUT_ANALYSIS_DATA_TO_COLVAR STRIDE=1 RUN=6 ARG=d1 FILE=output-half.pdb ss2: OUTPUT_ANALYSIS_DATA_TO_COLVAR STRIDE=1 USE_ALL_DATA ARG=d1 FILE=output-all.pdb ss3: OUTPUT_ANALYSIS_DATA_TO_COLVAR REUSE_INPUT_DATA_FROM=ss2 FILE=output-reuse.pdb -ll1: LANDMARK_SELECT_STRIDE ARG=d1 REUSE_INPUT_DATA_FROM=ss3 NLANDMARKS=5 NOVORONOI +ll1: LANDMARK_SELECT_STRIDE USE_OUTPUT_DATA_FROM=ss3 NLANDMARKS=5 NOVORONOI OUTPUT_ANALYSIS_DATA_TO_COLVAR USE_OUTPUT_DATA_FROM=ll1 FILE=output-stride.pdb -ll2: LANDMARK_SELECT_STRIDE ARG=d1 REUSE_INPUT_DATA_FROM=ss1 NLANDMARKS=3 NOVORONOI +ll2: LANDMARK_SELECT_STRIDE USE_OUTPUT_DATA_FROM=ss1 NLANDMARKS=3 NOVORONOI OUTPUT_ANALYSIS_DATA_TO_COLVAR USE_OUTPUT_DATA_FROM=ll2 FILE=output-stride2.pdb diff --git a/src/analysis/FarthestPointSampling.cpp b/src/analysis/FarthestPointSampling.cpp index 6461cb90c8852c1133e519d5bac09c2fe5a9cc84..07496067a904150dba97855f9c58cf8b7d243a39 100644 --- a/src/analysis/FarthestPointSampling.cpp +++ b/src/analysis/FarthestPointSampling.cpp @@ -48,7 +48,6 @@ PLUMED_REGISTER_ACTION(FarthestPointSampling,"LANDMARK_SELECT_FPS") void FarthestPointSampling::registerKeywords( Keywords& keys ){ LandmarkSelectionBase::registerKeywords(keys); - LandmarkSelectionBase::removeDataCollectionKeywords( keys ); keys.add("compulsory","SEED","1234","a random number seed"); } diff --git a/src/analysis/LandmarkSelectionBase.cpp b/src/analysis/LandmarkSelectionBase.cpp index 1cd4863c5ede4e261b47e37420f5211cbce797f0..d6ecce52ed847d9c2546992089641df9a6178bb1 100644 --- a/src/analysis/LandmarkSelectionBase.cpp +++ b/src/analysis/LandmarkSelectionBase.cpp @@ -24,15 +24,8 @@ namespace PLMD { namespace analysis { -void LandmarkSelectionBase::removeDataCollectionKeywords( Keywords& keys ){ - keys.remove("ATOMS"); keys.remove("STRIDE"); keys.remove("RUN"); keys.remove("USE_ALL_DATA"); - keys.remove("REWEIGHT_BIAS"); keys.remove("REWEIGHT_TEMP"); keys.remove("TEMP"); - keys.remove("REUSE_INPUT_DATA_FROM"); keys.remove("WRITE_CHECKPOINT"); keys.remove("NOMEMORY"); - keys.remove("RESTART"); keys.remove("UPDATE_FROM"); keys.remove("UPDATE_UNTIL"); keys.remove("ARG"); -} - void LandmarkSelectionBase::registerKeywords( Keywords& keys ){ - AnalysisWithDataCollection::registerKeywords( keys ); + AnalysisBase::registerKeywords( keys ); keys.add("compulsory","NLANDMARKS","the number of landmarks that you would like to select"); keys.addFlag("NOVORONOI",false,"do not do a Voronoi analysis of the data to determine weights of final points"); keys.addFlag("IGNORE_WEIGHTS",false,"ignore the weights in the underlying analysis object"); @@ -40,7 +33,7 @@ void LandmarkSelectionBase::registerKeywords( Keywords& keys ){ LandmarkSelectionBase::LandmarkSelectionBase( const ActionOptions& ao ): Action(ao), -AnalysisWithDataCollection(ao) +AnalysisBase(ao) { if( keywords.exists("NLANDMARKS") ) parse("NLANDMARKS",nlandmarks); log.printf(" selecting %d landmark points \n",nlandmarks); diff --git a/src/analysis/LandmarkSelectionBase.h b/src/analysis/LandmarkSelectionBase.h index 09d56554559db50f199d2da098adc0d08ec6fce6..61da3a215a72c87a926a3bd7136443797470f847 100644 --- a/src/analysis/LandmarkSelectionBase.h +++ b/src/analysis/LandmarkSelectionBase.h @@ -22,12 +22,12 @@ #ifndef __PLUMED_analysis_LandmarkSelectionBase_h #define __PLUMED_analysis_LandmarkSelectionBase_h -#include "AnalysisWithDataCollection.h" +#include "AnalysisBase.h" namespace PLMD { namespace analysis { -class LandmarkSelectionBase : public AnalysisWithDataCollection { +class LandmarkSelectionBase : public AnalysisBase { friend class ReselectLandmarks; private: /// The number of landmarks we are selecting @@ -43,7 +43,6 @@ protected: void selectFrame( const unsigned& ); public: static void registerKeywords( Keywords& keys ); - static void removeDataCollectionKeywords( Keywords& keys ); LandmarkSelectionBase( const ActionOptions& ao ); /// Return the number of data points unsigned getNumberOfDataPoints() const ; @@ -71,7 +70,7 @@ unsigned LandmarkSelectionBase::getNumberOfDataPoints() const { inline unsigned LandmarkSelectionBase::getDataPointIndexInBase( const unsigned& idata ) const { - return AnalysisWithDataCollection::getDataPointIndexInBase( landmark_indices[idata] ); + return AnalysisBase::getDataPointIndexInBase( landmark_indices[idata] ); } inline @@ -81,12 +80,12 @@ double LandmarkSelectionBase::getWeight( const unsigned& idata ) const { inline void LandmarkSelectionBase::getDataPoint( const unsigned& idata, std::vector<double>& point, double& weight ) const { - AnalysisWithDataCollection::getDataPoint( landmark_indices[idata], point, weight ); + AnalysisBase::getDataPoint( landmark_indices[idata], point, weight ); } inline ReferenceConfiguration* LandmarkSelectionBase::getReferenceConfiguration( const unsigned& idat ){ - return AnalysisWithDataCollection::getReferenceConfiguration( landmark_indices[idat] ); + return AnalysisBase::getReferenceConfiguration( landmark_indices[idat] ); } inline diff --git a/src/analysis/ReselectLandmarks.cpp b/src/analysis/ReselectLandmarks.cpp index bb7dc5d8fa734589708896b7acf5a9f677e88d24..ac904854b1dd8d9f79d79d47a95ac6c1bdc33cb2 100644 --- a/src/analysis/ReselectLandmarks.cpp +++ b/src/analysis/ReselectLandmarks.cpp @@ -50,7 +50,6 @@ PLUMED_REGISTER_ACTION(ReselectLandmarks,"RESELECT_LANDMARKS") void ReselectLandmarks::registerKeywords( Keywords& keys ){ LandmarkSelectionBase::registerKeywords(keys); - LandmarkSelectionBase::removeDataCollectionKeywords( keys ); keys.remove("NLANDMARKS"); keys.add("compulsory","LANDMARKS","the action that selects the landmarks that you want to reselect using this action"); } diff --git a/user-doc/Analysis.txt b/user-doc/Analysis.txt index 0491904070a9dc790b2463f763be726f4775107b..4b6ca1ae9ca6de42d35420d2f3cd80f8e6a2e398 100644 --- a/user-doc/Analysis.txt +++ b/user-doc/Analysis.txt @@ -120,13 +120,12 @@ external file <table align=center frame=void width=95%% cellpadding=5%%> <tr> <td width=5%> \subpage READ_DISSIMILARITY_MATRIX </td> <td> Read a matrix of dissimilarities between a trajectory of atomic configurations from a file. </td> </tr> +<tr> <td width=5%> \subpage READ_ANALYSIS_FRAMES </td> <td> Store the frames in trajectory to use in tandem with a dissimilarity matrix read using \ref READ_DISSIMILARITY_MATRIX </td> </tr> </table> -N.B. You can only use the \ref READ_DISSIMILARITY_MATRIX command when you are doing post-processing. If you have a -trajectory that contains the configurations you read in the configurations from the trajectory using -\ref READ_ANALYSIS_FRAMES +N.B. You can only use the two commands above when you are doing post-processing. -\ref landmarks Landmark Selection +\section landmarks Landmark Selection Many of the techniques described in the following sections are very computationally expensive to run on large trajectories. A common strategy is thus to use a landmark selection algorithm to pick a particularly-reprentative subset of trajectory @@ -135,8 +134,7 @@ that are available in PLUMED are as follows @LANDMARKS@ -Some of these algorithms (e.g. \ref LANDMARK_SELECT_STRIDE) can collect data from the trajectory themselves. Others such as -\ref LANDMARK_SELECT_FPS must take a dissimilarity matrix action as input. That is to say they must be used as follows: +In general most of these landmark selection algorithms must be used in tandem with a \ref dissimilaritym "dissimilarity matrix" object as as follows: \verbatim ss1: EUCLIDEAN_DISSIMILARITIES STRIDE=1 USE_ALL_DATA ARG=d1 @@ -196,7 +194,7 @@ a number of different algorithms. The various algorithms that can be used to op @DIMRED@ -\ref output Outputting the results from analysis algorithms +\section output Outputting the results from analysis algorithms The following methods are available for printing the result output by the various analysis algorithms: