diff --git a/modules/conop/src/heuristic_builder.cc b/modules/conop/src/heuristic_builder.cc index 458370078ea9171766bee2013506a170d0ac869d..07922d6a2dab0aa5fd162323749ebb4c9a4efaaa 100644 --- a/modules/conop/src/heuristic_builder.cc +++ b/modules/conop/src/heuristic_builder.cc @@ -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 { diff --git a/modules/conop/src/heuristic_builder.hh b/modules/conop/src/heuristic_builder.hh index bc3930bcaf37a29d2cda545eca0cbc40bf2fb5c6..09a991345264b6031265c9bf2505a874f730daac 100644 --- a/modules/conop/src/heuristic_builder.hh +++ b/modules/conop/src/heuristic_builder.hh @@ -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_; }; diff --git a/modules/conop/src/heuristic_connect_table.hh b/modules/conop/src/heuristic_connect_table.hh index aa5c0b651a5d2d13364946146d5a49f603d3528b..15e0f1a25eeada4159f10cc60140eeaa4bea55fc 100644 --- a/modules/conop/src/heuristic_connect_table.hh +++ b/modules/conop/src/heuristic_connect_table.hh @@ -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,