calculate approximate TM-score given rotation matrix */
| 5746 | |
| 5747 | /* calculate approximate TM-score given rotation matrix */ |
| 5748 | double approx_TM(const int xlen, const int ylen, const int a_opt, |
| 5749 | double **xa, double **ya, double t[3], double u[3][3], |
| 5750 | const int invmap0[], const int mol_type) |
| 5751 | { |
| 5752 | double Lnorm_0=ylen; // normalized by the second protein |
| 5753 | if (a_opt==-2 && xlen>ylen) Lnorm_0=xlen; // longer |
| 5754 | else if (a_opt==-1 && xlen<ylen) Lnorm_0=xlen; // shorter |
| 5755 | else if (a_opt==1) Lnorm_0=(xlen+ylen)/2.; // average |
| 5756 | |
| 5757 | double D0_MIN; |
| 5758 | double Lnorm; |
| 5759 | double d0; |
| 5760 | double d0_search; |
| 5761 | parameter_set4final(Lnorm_0, D0_MIN, Lnorm, d0, d0_search, mol_type); |
| 5762 | double TMtmp=0; |
| 5763 | double d; |
| 5764 | double xtmp[3]={0,0,0}; |
| 5765 | |
| 5766 | for(int i=0,j=0; j<ylen; j++) |
| 5767 | { |
| 5768 | i=invmap0[j]; |
| 5769 | if(i>=0)//aligned |
| 5770 | { |
| 5771 | transform(t, u, &xa[i][0], &xtmp[0]); |
| 5772 | d=sqrt(dist(&xtmp[0], &ya[j][0])); |
| 5773 | TMtmp+=1/(1+(d/d0)*(d/d0)); |
| 5774 | //if (d <= score_d8) TMtmp+=1/(1+(d/d0)*(d/d0)); |
| 5775 | } |
| 5776 | } |
| 5777 | TMtmp/=Lnorm_0; |
| 5778 | return TMtmp; |
| 5779 | } |
| 5780 | |
| 5781 | void clean_up_after_approx_TM(int *invmap0, int *invmap, |
| 5782 | double **score, bool **path, double **val, double **xtm, double **ytm, |
no test coverage detected