Skip to content
Snippets Groups Projects
Commit 7f0829b6 authored by Marco Biasini's avatar Marco Biasini
Browse files

added NO_PEPTIDE_BONDS flag to ConnectAll.

If set, no peptide bonds will be added. Defaults to off, of course.
parent d337d5bd
No related branches found
No related tags found
No related merge requests found
......@@ -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");
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment