diff --git a/modules/conop/src/conop.cc b/modules/conop/src/conop.cc index 76b45d7bf020e400aad5666dd54c3e8f1968da4a..b1448aa8ff32522b4e9a2c4444eb7e4711e17b77 100644 --- a/modules/conop/src/conop.cc +++ b/modules/conop/src/conop.cc @@ -229,9 +229,10 @@ private: class Connector: public mol::EntityVisitor { public: - Connector(const BuilderP& b): + Connector(const BuilderP& b, bool peptide_bonds): builder_(b), - prev_() + prev_(), + peptide_bonds_(peptide_bonds) {} virtual bool VisitChain(const mol::ChainHandle& chain) { @@ -241,7 +242,7 @@ public: virtual bool VisitResidue(const mol::ResidueHandle& res) { builder_->ConnectAtomsOfResidue(res); - if (prev_) { + if (peptide_bonds_ && prev_) { builder_->ConnectResidueToPrev(res,prev_); } prev_=res; @@ -251,6 +252,7 @@ public: private: BuilderP builder_; mol::ResidueHandle prev_; + bool peptide_bonds_; }; class TorsionMaker: public mol::EntityVisitor @@ -270,7 +272,7 @@ private: }; } // ns -void Conopology::ConnectAll(const BuilderP& b, mol::EntityHandle eh, int flag) +void Conopology::ConnectAll(const BuilderP& b, mol::EntityHandle eh, int flags) { Profile profile_connect("ConnectAll"); LOG_DEBUG("Conopology: ConnectAll: building internal coordinate system"); @@ -280,7 +282,7 @@ void Conopology::ConnectAll(const BuilderP& b, mol::EntityHandle eh, int flag) ChemClassAssigner cca(b); eh.Apply(cca); LOG_DEBUG("Conopology: ConnectAll: connecting all bonds"); - Connector connector(b); + Connector connector(b, !(flags & NO_PEPTIDE_BONDS)); eh.Apply(connector); LOG_DEBUG("Conopology: ConnectAll: assigning all torsions"); diff --git a/modules/conop/src/conop.hh b/modules/conop/src/conop.hh index 7109c83aaed031112376eed5e5dca2cf1732d673..0d9fccf7b9c2d9db2c3e7b4f559ebdfe304fc44b 100644 --- a/modules/conop/src/conop.hh +++ b/modules/conop/src/conop.hh @@ -26,6 +26,12 @@ namespace ost { namespace conop { + +typedef enum { + NO_PEPTIDE_BONDS=1, +} ConopFlag; + + class DLLEXPORT_OST_CONOP Conopology { typedef std::map<String,BuilderP> BuilderMap; @@ -42,7 +48,8 @@ public: does this need to live within Conopology ? */ - void ConnectAll(const BuilderP& b, mol::EntityHandle eh, int flag=0); + void ConnectAll(const BuilderP& b, mol::EntityHandle eh, + int flags=0); void RegisterBuilder(const BuilderP& b, const String& name); void SetDefaultBuilder(const String& default_name);