Matrix.cpp (pymol-v1.8.6.0.tar.bz2) | : | Matrix.cpp (pymol-v2.1.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 1164 | skipping to change at line 1164 | |||
} | } | |||
} | } | |||
if(!got_kabsch) { | if(!got_kabsch) { | |||
/* use PyMOL's original iteration algorithm if Kabsch is | /* use PyMOL's original iteration algorithm if Kabsch is | |||
disabled or fails (quite common). */ | disabled or fails (quite common). */ | |||
/* Primary iteration scheme to determine rotation matrix for molecule 2 */ | /* Primary iteration scheme to determine rotation matrix for molecule 2 */ | |||
double sg, bb, cc; | double sg, bb, cc; | |||
int iters, ix, iy, iz, unchanged = 0; | int iters, iy, iz, unchanged = 0; | |||
double sig, gam; | double sig, gam; | |||
double tmp; | double tmp; | |||
double save[3][3]; | double save[3][3]; | |||
int perturbed = false; | int perturbed = false; | |||
for(a = 0; a < 3; a++) { | for(a = 0; a < 3; a++) { | |||
for(b = 0; b < 3; b++) { | for(b = 0; b < 3; b++) { | |||
m[a][b] = 0.0; | m[a][b] = 0.0; | |||
save[a][b] = aa[a][b]; | save[a][b] = aa[a][b]; | |||
} | } | |||
m[a][a] = 1.0; | m[a][a] = 1.0; | |||
} | } | |||
iters = 0; | iters = 0; | |||
while(1) { | while(1) { | |||
/* IX, IY, and IZ rotate 1-2-3, 2-3-1, 3-1-2, etc. */ | /* IX, IY, and IZ rotate 1-2-3, 2-3-1, 3-1-2, etc. */ | |||
iz = (iters + 1) % 3; | iz = (iters + 1) % 3; | |||
iy = (iz + 1) % 3; | iy = (iz + 1) % 3; | |||
ix = (iy + 1) % 3; | ||||
sig = aa[iz][iy] - aa[iy][iz]; | sig = aa[iz][iy] - aa[iy][iz]; | |||
gam = aa[iy][iy] + aa[iz][iz]; | gam = aa[iy][iy] + aa[iz][iz]; | |||
if(iters >= maxiter) { | if(iters >= maxiter) { | |||
PRINTFB(G, FB_Matrix, FB_Details) | PRINTFB(G, FB_Matrix, FB_Details) | |||
" Matrix: Warning: no convergence (%1.8f<%1.8f after %d iterations). \n", | " Matrix: Warning: no convergence (%1.8f<%1.8f after %d iterations). \n", | |||
(float) tol, (float) gam, iters ENDFB(G); | (float) tol, (float) gam, iters ENDFB(G); | |||
break; | break; | |||
} | } | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 1 lines changed or added |