mailRe: Bug in structure.create diff tensor pdb


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Sébastien Morin on March 12, 2009 - 18:06:
Hi,

In an attempt to find the problem causing this bug, I dug into the code
and found something which could be erroneous... This alone does not fix
the bug, but may be part of the fix (or not)...

In function math_fns/direction_cosine.calc_ellipsoid_di(), there could
be an error at line 229:

    diff_data.dz[1] =  data.sin_b * data.sin_g

If I am right (?), this part of the code is related to page 193 of
Edward  d'Auvergne's thesis:

    c11  =  diff_data.dx[0]
    c21  =  diff_data.dx[1]
    c31  =  diff_data.dx[2]

    c12  =  diff_data.dy[0]
    c22  =  diff_data.dy[1]
    c32  =  diff_data.dy[2]

    c13  =  diff_data.dz[0]
    c23  =  diff_data.dz[1]  -->  FALSE !!!!
    c33  =  diff_data.dz[2]

Indeed,
    c23 = sin(beta) * cos(gamma),
whereas
    diff_data.dz[1] =  data.sin_b * data.sin_g


Thus, either me, the code or Edward's thesis are erroneous here...

Am I right ?

Regards,


Séb  :)



Sébastien Morin wrote:
Hi,

We (Pierre-Yves Savard and I) have found a problem with the 
structure.create_diff_tensor_pdb() function.

If you use either results.read() or diffusion_tensor.init() to load a 
diffusion tensor and, then, display it, it is fine, except for the 
ellipsoid where some weird things happen...

Indeed, with the ellipsoid, you get a weird shaped tensor, depending on the 
angles input. With angles set to 0, the tensor is fine. With alpha and beta 
set to non-zero values, the shape of the tensor changes drastically as it 
becomes completely flat. With gamma set to a non-zero value, the shape is 
fine, with the tensor just turned around the Dz axis...

I submitted a bug report and attached 7 files:

tensor.pdb
    With all angles set to 0.

tensor__angles__alpha_90.pdb
    With alpha = 90 degrees.

tensor__angles__beta_90.pdb
    With beta = 90 degrees.

tensor__angles__gamma_90.pdb
    With gamma = 90 degrees.

tensor__angles__all_90.pdb
    With all angles set to 90 degrees.

tensor__angles__all_45.pdb
    With all angles set to 45 degrees.

tensor__angles__45_0_45.pdb
    With all angles set to 45, 0 and 45 (alpha, beta and gamma, 
respectively).


As you will see, the tensor is fine if both alpha and beta are equal 
(files:  tensor__angles__all_45.pdb and tensor__angles__all_90.pdb), but 
weird shaped when alpha and beta are not equal 
(tensor__angles__45_0_45.pdb)...

These observations were made with the subversion repository. I verified 
with relax-1.3.1 / relax-1.3.2 / relax-1.3.3 and the same problem arises... 
so the problem as been there for a long time...

Shouldn't the tensor always keep a symmetric shape, with angles only 
changing the orientation, not the shape..?

Thanks for help.


Séb   :) 
-- Sébastien Morin PhD Student S. Gagné NMR Laboratory Université Laval
& PROTEO Québec, Canada



_______________________________________________
relax (http://nmr-relax.com)

This is the relax-users mailing list
relax-users@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-users
  


-- 
Sébastien Morin
PhD Student
S. Gagné NMR Laboratory
Université Laval & PROTEO
Québec, Canada




Related Messages


Powered by MHonArc, Updated Wed Mar 25 19:40:52 2009