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

properly connect DNA/RNA

parent d11ad124
Branches
Tags
No related merge requests found
......@@ -187,6 +187,7 @@ HeuristicBuilder::HeuristicBuilder():
emap_[def_entry.abbrev]=entry;
}
}
default_nucleotide_=LookupResEntry("G").first;
LOG_DEBUG("done importing internal tables");
}
......@@ -321,6 +322,10 @@ void ConnectPrevNext(HeuristicBuilder* builder,mol::ResidueHandle res0,
res0_ret.first=builder->DefaultPeptide();
res0_ret.second=true;
}
if (res0.FindAtom("C3'") && res0.FindAtom("P")) {
res0_ret.first=builder->DefaultNucleotide();
res0_ret.second=true;
}
}
if(!res1_ret.second) {
......@@ -329,6 +334,10 @@ void ConnectPrevNext(HeuristicBuilder* builder,mol::ResidueHandle res0,
res1_ret.first=builder->DefaultPeptide();
res1_ret.second=true;
}
if (res1.FindAtom("C3'") && res1.FindAtom("P")) {
res1_ret.first=builder->DefaultNucleotide();
res1_ret.second=true;
}
}
if(res0_ret.second && res1_ret.second) {
......@@ -348,16 +357,19 @@ void ConnectPrevNext(HeuristicBuilder* builder,mol::ResidueHandle res0,
if(flag) {
if (builder->DoesPeptideBondExist(res0_atom, res1_atom)) {
editor.Connect(res0_atom,res1_atom);
res0.SetIsProtein(true);
res1.SetIsProtein(true);
if (res0_ret.first.GetChemClass().IsPeptideLinking()) {
res0.SetIsProtein(true);
res1.SetIsProtein(true);
}
}
} else {
if (builder->DoesPeptideBondExist(res1_atom, res0_atom)) {
editor.Connect(res1_atom, res0_atom);
res0.SetIsProtein(true);
res1.SetIsProtein(true);
if (res0_ret.first.GetChemClass().IsPeptideLinking()) {
res0.SetIsProtein(true);
res1.SetIsProtein(true);
}
}
}
}
} else {
......
......@@ -110,6 +110,7 @@ public:
virtual void FillAtomProps(mol::AtomHandle atom);
const detail::ConnResEntry& DefaultPeptide() const {return default_peptide_;}
const detail::ConnResEntry& DefaultNucleotide() const {return default_nucleotide_;}
protected:
void ConnectivityFromAtomNames(const mol::ResidueHandle& res,
detail::ConnResEntry& centry,
......@@ -117,6 +118,7 @@ protected:
private:
detail::ConnResEntryMap emap_;
detail::ConnResEntry default_peptide_;
detail::ConnResEntry default_nucleotide_;
};
......
......@@ -267,31 +267,31 @@ CONN_DEF_ENTRY def_entry_table[]={
{{0,0,0,0,""}},1,
{0},1
},
{"Adenosin","A",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"Adenosin","DA",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"P","O5'","C5'","C4'","O4'","C3'","O3'","C2'","C1'","O1P","O2P","N9","C8","N7","C5","C6","N6","N1","C2","N3","C4","O2'"},12,
{{-2,1},{1,2},{2,3},{3,4},{4,5},{4,6},{6,7},{6,8},{8,9},{5,9},{1,10},{1,11},{8,22},{9,12},{7,-3}},15,
{{0,0,0,0,""}},1,
{0},1
},
{"Cytosin","C",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"Cytosin","DC",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"P","O5'","C5'","C4'","O4'","C3'","O3'","C2'","C1'","O1P","O2P","O2'"},12,
{{-2,1},{1,2},{2,3},{3,4},{4,5},{4,6},{6,7},{6,8},{8,9},{5,9},{1,10},{1,11},{8,12},{7,-3}},14,
{{0,0,0,0,""}},1,
{0},1
},
{"Guanidin","G",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"Guanidin","DG",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"P","O5'","C5'","C4'","O4'","C3'","O3'","C2'","C1'","O1P","O2P","O2'"},12,
{{-2,1},{1,2},{2,3},{3,4},{4,5},{4,6},{6,7},{6,8},{8,9},{5,9},{7,-3},{1,10},{1,11},{8,12}},14,
{{0,0,0,0,""}},1,
{0},1
},
{"Thymidin","T",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"Thymidin","DT",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"P","O5'","C5'","C4'","O4'","C3'","O3'","C2'","C1'","O1P","O2P","O2'"},12,
{{-2,1},{1,2},{2,3},{3,4},{4,5},{4,6},{6,7},{6,8},{8,9},{5,9},{7,-3},{1,10},{8,12},{1,11}},15,
{{0,0,0,0,""}},1,
{0},1
},
{"Uracil","U",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"Uracil","DU",'?', mol::ChemClass(mol::ChemClass::DNA_LINKING),
{"P","O5'","C5'","C4'","O4'","C3'","O3'","C2'","C1'","O1P","O2P","O2'"},12,
{{-2,1},{1,2},{2,3},{3,4},{4,5},{4,6},{6,7},{6,8},{8,9},{5,9},{7,-3},{1,10},{1,11},{8,12}},14,
{{0,0,0,0,""}},1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment