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

added option to disable connecting adjacent residues

parent 19bc7445
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,8 @@ void HeuristicProcessor::DoProcess(DiagnosticsPtr diags, ...@@ -70,7 +70,8 @@ void HeuristicProcessor::DoProcess(DiagnosticsPtr diags,
this->FillResidueProps(residue, compound); this->FillResidueProps(residue, compound);
if (this->GetConnect()) { if (this->GetConnect()) {
this->ConnectAtomsOfResidue(residue, compound, false); this->ConnectAtomsOfResidue(residue, compound, false);
this->ConnectResidues(prev, residue); if (this->GetConnectAminoAcids())
this->ConnectResidues(prev, residue);
} }
prev = residue; prev = residue;
if (!this->GetConnect()) { continue; } if (!this->GetConnect()) { continue; }
......
...@@ -66,7 +66,7 @@ protected: ...@@ -66,7 +66,7 @@ protected:
mol::AtomHandle LocateAtom(const mol::AtomHandleList&, int ordinal) const; mol::AtomHandle LocateAtom(const mol::AtomHandleList&, int ordinal) const;
public: public:
Processor(): check_bond_feasibility_(false), Processor(): check_bond_feasibility_(false),
assign_torsions_(false), connect_(true), assign_torsions_(false), connect_(true), connect_aa_(true),
zero_occ_treatment_(CONOP_SILENT) {} zero_occ_treatment_(CONOP_SILENT) {}
void SetConnect(bool connect) { void SetConnect(bool connect) {
connect_ = connect; connect_ = connect;
...@@ -82,6 +82,12 @@ public: ...@@ -82,6 +82,12 @@ public:
return assign_torsions_; return assign_torsions_;
} }
bool GetConnectAminoAcids() const {
return connect_aa_;
}
void SetConnectAminoAcids(bool c) {
connect_aa_ = c;
}
bool GetCheckBondFeasibility() const { bool GetCheckBondFeasibility() const {
return check_bond_feasibility_; return check_bond_feasibility_;
} }
...@@ -103,6 +109,7 @@ private: ...@@ -103,6 +109,7 @@ private:
bool check_bond_feasibility_; bool check_bond_feasibility_;
bool assign_torsions_; bool assign_torsions_;
bool connect_; bool connect_;
bool connect_aa_;
ConopAction zero_occ_treatment_; ConopAction zero_occ_treatment_;
}; };
......
...@@ -73,7 +73,8 @@ void RuleBasedProcessor::DoProcess(DiagnosticsPtr diags, ...@@ -73,7 +73,8 @@ void RuleBasedProcessor::DoProcess(DiagnosticsPtr diags,
if (this->GetConnect()) { if (this->GetConnect()) {
this->ConnectAtomsOfResidue(residue, compound, this->ConnectAtomsOfResidue(residue, compound,
this->GetStrictHydrogens()); this->GetStrictHydrogens());
this->ConnectResidues(prev, residue); if (this->GetConnectAminoAcids())
this->ConnectResidues(prev, residue);
for (mol::AtomHandleList::iterator k = atoms_to_connect.begin(), for (mol::AtomHandleList::iterator k = atoms_to_connect.begin(),
e3=atoms_to_connect.end(); k!= e3; ++k) { e3=atoms_to_connect.end(); k!= e3; ++k) {
this->DistanceBasedConnect(*k); this->DistanceBasedConnect(*k);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment