Skip to content
Snippets Groups Projects
Commit 45895eac authored by Carlo Camilloni's avatar Carlo Camilloni
Browse files

added omega as additional symbol for atom selection in proteins

parent 8e9ce48f
No related branches found
No related tags found
No related merge requests found
......@@ -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");
......
......@@ -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 );
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment