From 715eb737818261f5e923d4ad1e0070b1d1331ccd Mon Sep 17 00:00:00 2001 From: pascal <pascal@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Fri, 23 Apr 2010 14:43:27 +0000 Subject: [PATCH] res_num to index change in calculating sequence separation; minor changes in float-offsets due to Double->Float git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2112 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/qa/src/all_atom_potential.cc | 5 ++++- modules/qa/src/multi_classifier.hh | 1 + modules/qa/src/torsion_potential.cc | 12 ++++++------ modules/qa/src/torsion_statistics.cc | 12 ++++++------ 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/modules/qa/src/all_atom_potential.cc b/modules/qa/src/all_atom_potential.cc index 8ec0123c3..b59337914 100644 --- a/modules/qa/src/all_atom_potential.cc +++ b/modules/qa/src/all_atom_potential.cc @@ -81,7 +81,7 @@ public: if (d<0) d=0.0; if (d>options_.lower_cutoff) { - if (abs(atom_handle.GetResidue().GetNumber().GetNum()-a.GetResidue().GetNumber().GetNum())<options_.sequence_sep) { + if (abs(atom_handle.GetResidue().GetIndex()-a.GetResidue().GetIndex())<options_.sequence_sep) { continue; } energy_+=energies_.Get(type_a, type_b, d); @@ -89,6 +89,9 @@ public: //std::cout << type_a << "(" << atom_handle.GetQualifiedName() << ")" << " " << type_b << "(" << a.GetQualifiedName() << ")" << " : " << d << " " << energies_.Get(type_a, type_b, d) << std::endl; } } +// else { +// std::cout << "Unknown type: " << type_b << std::endl; +// } } } return false; diff --git a/modules/qa/src/multi_classifier.hh b/modules/qa/src/multi_classifier.hh index 28107bd91..371b4f4d3 100644 --- a/modules/qa/src/multi_classifier.hh +++ b/modules/qa/src/multi_classifier.hh @@ -176,6 +176,7 @@ public: uint32_t GetIndexOf(Real value) const { Real factor=(value-lower_bound_)/(upper_bound_-lower_bound_); uint32_t idx=uint32_t(floor(this->GetNumberOfClasses()*factor)); +// std::cout << value << " " << factor << std::endl; assert(this->GetNumberOfClasses()>idx); return idx; } diff --git a/modules/qa/src/torsion_potential.cc b/modules/qa/src/torsion_potential.cc index d40ae0e03..828c6365b 100644 --- a/modules/qa/src/torsion_potential.cc +++ b/modules/qa/src/torsion_potential.cc @@ -68,12 +68,12 @@ public: if (!prev_phit || !prev_psit || !central_phit || !central_psit || !next_phit || !next_psit) return false; - Real prev_phi=prev_phit.GetAngle()*180/M_PI - 0.000000001; - Real prev_psi=prev_psit.GetAngle()*180/M_PI - 0.000000001; - Real central_phi=central_phit.GetAngle()*180/M_PI - 0.000000001; - Real central_psi=central_psit.GetAngle()*180/M_PI - 0.000000001; - Real next_phi=next_phit.GetAngle()*180/M_PI - 0.000000001; - Real next_psi=next_psit.GetAngle()*180/M_PI - 0.000000001; + Real prev_phi=prev_phit.GetAngle()*180/M_PI - 0.001; if (prev_phi<-180) prev_phi=-180; + Real prev_psi=prev_psit.GetAngle()*180/M_PI - 0.001; if (prev_psi<-180) prev_psi=-180; + Real central_phi=central_phit.GetAngle()*180/M_PI - 0.001; if (central_phi<-180) central_phi=-180; + Real central_psi=central_psit.GetAngle()*180/M_PI - 0.001; if (central_psi<-180) central_psi=-180; + Real next_phi=next_phit.GetAngle()*180/M_PI - 0.001; if (next_phi<-180) next_phi=-180; + Real next_psi=next_psit.GetAngle()*180/M_PI - 0.001; if (next_psi<-180) next_psi=-180; // calculate position of the amino acid in the alphabet int icenter=this->GetAAIndex(ca); diff --git a/modules/qa/src/torsion_statistics.cc b/modules/qa/src/torsion_statistics.cc index e1b427e01..d1cb11026 100644 --- a/modules/qa/src/torsion_statistics.cc +++ b/modules/qa/src/torsion_statistics.cc @@ -62,12 +62,12 @@ public: if (!prev_phit || !prev_psit || !central_phit || !central_psit || !next_phit || !next_psit) return false; - Real prev_phi=prev_phit.GetAngle()*180/M_PI - 0.000000001; - Real prev_psi=prev_psit.GetAngle()*180/M_PI - 0.000000001; - Real central_phi=central_phit.GetAngle()*180/M_PI - 0.000000001; - Real central_psi=central_psit.GetAngle()*180/M_PI - 0.000000001; - Real next_phi=next_phit.GetAngle()*180/M_PI - 0.000000001; - Real next_psi=next_psit.GetAngle()*180/M_PI - 0.000000001; + Real prev_phi=prev_phit.GetAngle()*180/M_PI - 0.001; + Real prev_psi=prev_psit.GetAngle()*180/M_PI - 0.001; + Real central_phi=central_phit.GetAngle()*180/M_PI - 0.001; + Real central_psi=central_psit.GetAngle()*180/M_PI - 0.001; + Real next_phi=next_phit.GetAngle()*180/M_PI - 0.001; + Real next_psi=next_psit.GetAngle()*180/M_PI - 0.001; histo_.Add(1, ca, prev_phi, prev_psi, central_phi, central_psi, next_phi, next_psi); return false; -- GitLab