diff --git a/src/CLToolDriver.cpp b/src/CLToolDriver.cpp index 8eac390d524c616773ffbd11e6da3c3386419985..284c663eee619d8385d16717b7ae09996508cb4d 100644 --- a/src/CLToolDriver.cpp +++ b/src/CLToolDriver.cpp @@ -315,10 +315,9 @@ int CLToolDriver<real>::main(int argc,char**argv,FILE*in,FILE*out,PlumedCommunic return 0; } -typedef CLToolDriver<double> Driver; -typedef CLToolDriver<float> DriverSp; +typedef CLToolDriver<double> CLToolDriverDouble; -PLUMED_REGISTER_CLTOOL(Driver,"driver") +PLUMED_REGISTER_CLTOOL(CLToolDriverDouble,"driver") diff --git a/src/ContactMap.cpp b/src/ColvarContactMap.cpp similarity index 94% rename from src/ContactMap.cpp rename to src/ColvarContactMap.cpp index 4fc37998b88b43076804e68e22d14116da896488..e6d96ba6102bb7278601b7ba54c24caa50e98bcd 100644 --- a/src/ContactMap.cpp +++ b/src/ColvarContactMap.cpp @@ -51,7 +51,7 @@ PRINT ARG=f1.* FILE=colvar */ //+ENDPLUMEDOC -class ContactMap : public Colvar { +class ColvarContactMap : public Colvar { private: bool pbc, dosum; NeighborList *nl; @@ -59,16 +59,16 @@ private: bool reduceListAtNextStep; public: static void registerKeywords( Keywords& keys ); - ContactMap(const ActionOptions&); - ~ContactMap(); + ColvarContactMap(const ActionOptions&); + ~ColvarContactMap(); // active methods: virtual void calculate(); void checkFieldsAllowed(){}; }; -PLUMED_REGISTER_ACTION(ContactMap,"CONTACTMAP") +PLUMED_REGISTER_ACTION(ColvarContactMap,"CONTACTMAP") -void ContactMap::registerKeywords( Keywords& keys ){ +void ColvarContactMap::registerKeywords( Keywords& keys ){ Colvar::registerKeywords( keys ); keys.add("numbered","ATOMS","the atoms involved in each of the contacts you wish to calculate. " "Keywords like ATOMS1, ATOMS2, ATOMS3,... should be listed and one contact will be " @@ -78,7 +78,7 @@ void ContactMap::registerKeywords( Keywords& keys ){ keys.addFlag("SUM",false,"calculate the sum of all the contacts in the input"); } -ContactMap::ContactMap(const ActionOptions&ao): +ColvarContactMap::ColvarContactMap(const ActionOptions&ao): PLUMED_COLVAR_INIT(ao), pbc(true), dosum(false), @@ -143,11 +143,11 @@ reduceListAtNextStep(false) checkRead(); } -ContactMap::~ContactMap(){ +ColvarContactMap::~ColvarContactMap(){ delete nl; } -void ContactMap::calculate(){ +void ColvarContactMap::calculate(){ double ncoord=0., coord; Tensor virial; diff --git a/src/ColvarTarget.cpp b/src/FunctionTarget.cpp similarity index 90% rename from src/ColvarTarget.cpp rename to src/FunctionTarget.cpp index 7155ac0a0d7dd17e63da2b7806859ec6e46f9b5d..b4cc1821c5af136c1ac2ba745a4fbbe42b98f784 100644 --- a/src/ColvarTarget.cpp +++ b/src/FunctionTarget.cpp @@ -41,26 +41,26 @@ set of collective variables. */ //+ENDPLUMEDOC -class TargetFrame : public Function { +class FunctionTarget : public Function { private: TargetDist target; std::vector<double> derivs; public: - TargetFrame(const ActionOptions&); + FunctionTarget(const ActionOptions&); virtual void calculate(); static void registerKeywords(Keywords& keys ); }; -PLUMED_REGISTER_ACTION(TargetFrame,"TARGET") +PLUMED_REGISTER_ACTION(FunctionTarget,"TARGET") -void TargetFrame::registerKeywords(Keywords& keys){ +void FunctionTarget::registerKeywords(Keywords& keys){ Function::registerKeywords(keys); keys.use("ARG"); keys.add("compulsory","REFERENCE","a file in pdb format containing the reference structure. " + PDB::documentation() ); keys.add("optional","REFERENCE_VEC","the vector of values for the CVs at the reference point (if you use this you don't need REFERENCE)"); } -TargetFrame::TargetFrame(const ActionOptions&ao): +FunctionTarget::FunctionTarget(const ActionOptions&ao): Action(ao), Function(ao), target(log) @@ -82,7 +82,7 @@ target(log) addValueWithDerivatives(); setNotPeriodic(); } -void TargetFrame::calculate(){ +void FunctionTarget::calculate(){ double r=target.calculate( derivs ); setValue(r); for(unsigned i=0;i<derivs.size();i++) setDerivative(i,derivs[i]); diff --git a/src/GenericWholeMolecules.cpp b/src/GenericWholeMolecules.cpp index 5fd6c7e479c9496d2bc6732c358d1b91b6d83820..844acece3966bf901f44aedb8bc52803f4c63ece 100644 --- a/src/GenericWholeMolecules.cpp +++ b/src/GenericWholeMolecules.cpp @@ -28,7 +28,7 @@ #include "Atoms.h" #include "PlumedMain.h" #include "ActionSet.h" -#include "MolInfo.h" +#include "SetupMolInfo.h" #include <vector> #include <string> @@ -131,7 +131,7 @@ ActionAtomistic(ao) if( resstrings.size()>0 ){ vector<string> backnames; parseVector("RES_ATOMS",backnames); if(backnames.size()==0) error("Found RESIDUES keyword without any specification of the atoms that should be in a residue - use RES_ATOMS"); - std::vector<MolInfo*> moldat=plumed.getActionSet().select<MolInfo*>(); + std::vector<SetupMolInfo*> moldat=plumed.getActionSet().select<SetupMolInfo*>(); if( moldat.size()==0 ) error("Unable to find MOLINFO in input"); std::vector< std::vector<AtomNumber> > backatoms; moldat[0]->getBackbone( resstrings, backnames, backatoms ); diff --git a/src/MultiColvar.cpp b/src/MultiColvar.cpp index ca312450c8edf85f7b6de2299553294b6f72a315..50239b4f71868b0894e3ac7aa93dd72d6ba17a42 100644 --- a/src/MultiColvar.cpp +++ b/src/MultiColvar.cpp @@ -23,7 +23,7 @@ #include "PlumedMain.h" #include "DistributionFunctions.h" #include "ActionSet.h" -#include "MolInfo.h" +#include "SetupMolInfo.h" #include <vector> #include <string> @@ -237,7 +237,7 @@ void MultiColvar::readBackboneAtoms( const std::vector<std::string>& backnames, plumed_massert( keywords.exists("RESIDUES"), "To read in the backbone atoms the keyword RESIDUES must be registered"); readatoms=true; - std::vector<MolInfo*> moldat=plumed.getActionSet().select<MolInfo*>(); + std::vector<SetupMolInfo*> moldat=plumed.getActionSet().select<SetupMolInfo*>(); if( moldat.size()==0 ) error("Unable to find MOLINFO in input"); std::vector<std::string> resstrings; parseVector( "RESIDUES", resstrings ); diff --git a/src/MolInfo.cpp b/src/SetupMolInfo.cpp similarity index 94% rename from src/MolInfo.cpp rename to src/SetupMolInfo.cpp index 63447f69e53473e0b1e85f4f9c82f72174845c39..8ffdab74c414311dadb40543fcdd65bd60b88af2 100644 --- a/src/MolInfo.cpp +++ b/src/SetupMolInfo.cpp @@ -19,7 +19,7 @@ You should have received a copy of the GNU Lesser General Public License along with PLUMED. If not, see <http://www.gnu.org/licenses/>. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ -#include "MolInfo.h" +#include "SetupMolInfo.h" #include "Atoms.h" #include "ActionRegister.h" #include "ActionSet.h" @@ -59,21 +59,21 @@ ALPHARMSD BACKBONE=all TYPE=DRMSD LESS_THAN=(RATIONAL R_0=0.08 NN=8 MM=12) LABEL //+ENDPLUMEDOC -PLUMED_REGISTER_ACTION(MolInfo,"MOLINFO") +PLUMED_REGISTER_ACTION(SetupMolInfo,"MOLINFO") -void MolInfo::registerKeywords( Keywords& keys ){ +void SetupMolInfo::registerKeywords( Keywords& keys ){ ActionSetup::registerKeywords(keys); keys.add("compulsory","STRUCTURE","a file in pdb format containing a reference structure. " "This is used to defines the atoms in the various residues, chains, etc . " + PDB::documentation() ); keys.add("atoms","CHAIN","(for masochists ( a.k.a. Davide Branduardi ) ) The atoms involved in each of the chains of interest in the structure."); } -MolInfo::MolInfo( const ActionOptions&ao ): +SetupMolInfo::SetupMolInfo( const ActionOptions&ao ): Action(ao), ActionSetup(ao), ActionAtomistic(ao) { - std::vector<MolInfo*> moldat=plumed.getActionSet().select<MolInfo*>(); + std::vector<SetupMolInfo*> moldat=plumed.getActionSet().select<SetupMolInfo*>(); if( moldat.size()!=0 ) error("cannot use more than one MOLINFO action in input"); std::vector<AtomNumber> backbone; @@ -106,7 +106,7 @@ ActionAtomistic(ao) pdb.renameAtoms("HA1","CB"); // This is a hack to make this work with GLY residues } -void MolInfo::getBackbone( std::vector<std::string>& restrings, const std::vector<std::string>& atnames, std::vector< std::vector<AtomNumber> >& backbone ){ +void SetupMolInfo::getBackbone( std::vector<std::string>& restrings, const std::vector<std::string>& atnames, std::vector< std::vector<AtomNumber> >& backbone ){ if( read_backbone.size()!=0 ){ if( restrings.size()!=1 ) error("cannot interpret anything other than all for residues when using CHAIN keywords"); if( restrings[0]!="all" ) error("cannot interpret anything other than all for residues when using CHAIN keywords"); diff --git a/src/MolInfo.h b/src/SetupMolInfo.h similarity index 96% rename from src/MolInfo.h rename to src/SetupMolInfo.h index 0378506c2c5d6d50418b8043d3073e74aaf2846b..57712c1f3de69ab08dd9a7ba9d01c2b722b246d9 100644 --- a/src/MolInfo.h +++ b/src/SetupMolInfo.h @@ -30,7 +30,7 @@ namespace PLMD { -class MolInfo : +class SetupMolInfo : public ActionSetup, public ActionAtomistic { private: @@ -38,7 +38,7 @@ private: std::vector< std::vector<AtomNumber> > read_backbone; public: static void registerKeywords( Keywords& keys ); - MolInfo(const ActionOptions&ao); + SetupMolInfo(const ActionOptions&ao); void getBackbone( std::vector<std::string>& resstrings, const std::vector<std::string>& atnames, std::vector< std::vector<AtomNumber> >& backbone ); };