Skip to content
Snippets Groups Projects
Commit 715eb737 authored by pascal's avatar pascal
Browse files

res_num to index change in calculating sequence separation; minor changes in...

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
parent eac0800a
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment