diff --git a/src/tools/MolDataClass.cpp b/src/tools/MolDataClass.cpp index a080268d56094264be07e7cce632e266030f68b0..c29f1382045859f8415092170f0aa3cd9a58bc35 100644 --- a/src/tools/MolDataClass.cpp +++ b/src/tools/MolDataClass.cpp @@ -124,6 +124,16 @@ void MolDataClass::specialSymbol( const std::string& type, const std::string& sy numbers[1]=mypdb.getNamedAtomFromResidue("CA",resnum); numbers[2]=mypdb.getNamedAtomFromResidue("C",resnum); numbers[3]=mypdb.getNamedAtomFromResidue("N",resnum+1); + } else if( symbol.find("omega")!=std::string::npos ){ + std::size_t dash=symbol.find_first_of('-'); + unsigned resnum; Tools::convert( symbol.substr(dash+1), resnum ); + std::string resname = mypdb.getResidueName(resnum); + if( !allowedResidue( type, resname ) || isTerminalGroup( type, resname ) ) return ; + numbers.resize(4); + numbers[0]=mypdb.getNamedAtomFromResidue("CA",resnum); + numbers[1]=mypdb.getNamedAtomFromResidue("C",resnum); + numbers[2]=mypdb.getNamedAtomFromResidue("N",resnum+1); + numbers[3]=mypdb.getNamedAtomFromResidue("CA",resnum+1); } } else { plumed_merror(type + " is not a valid molecule type"); diff --git a/src/tools/MolDataClass.h b/src/tools/MolDataClass.h index 6247795da56a5cf8df72eb8104b7ce4dd464de70..8e2804f12ca80e1f429b50aa7a5f595b92ac4cd6 100644 --- a/src/tools/MolDataClass.h +++ b/src/tools/MolDataClass.h @@ -43,7 +43,7 @@ public: static void getBackboneForResidue( const std::string& type, const unsigned& residuenum, const PDB& mypdb, std::vector<AtomNumber>& atoms ); /// Return true if the residue is a terminal group e.g. ACE, NME for proteins static bool isTerminalGroup( const std::string& type, const std::string& residuename ); -/// Used to interpret special symbols - currently phi and psi +/// Used to interpret special symbols - currently phi and psi and omega static void specialSymbol( const std::string& type, const std::string& symbol, const PDB& mypdb, std::vector<AtomNumber>& numbers ); };