[ase-users] Version confusion

Martin Baeker martin.baeker at tu-bs.de
Tue May 2 10:48:34 CEST 2017


Dear ASE experts,

I just downloaded the current ASE version (3.13) and noted the following:

in atoms.py in this version, angles are used in radians:

    def rotate(self, v, a=None, center=(0, 0, 0), rotate_cell=False):
    ......
         norm = np.linalg.norm
         v = string2vector(v)
         if a is None:
             a = norm(v)
         if isinstance(a, (float, int)):
             v /= norm(v)
             c = cos(a)
             s = sin(a)
         else:

This seems also to agree with the behaviour in the program, If I perform
cell.rotate(a=2*3.1415926, v='z')
on an Atoms object, the positions are unchanged

However, the atoms.py linked at the documentation site has an
additional conversion from grad to rad:

https://wiki.fysik.dtu.dk/ase/_modules/ase/atoms.html#Atoms.rotate

         if isinstance(a, (float, int)):
             a *= pi / 180
             v /= norm(v)
             c = cos(a)
             s = sin(a)

I'm a bit confused by that - am I overlooking something or is this a disagreement?

Which behaviour is correct?

Thanks for any help,

Martin.



                    Priv.-Doz. Dr. Martin Bäker
                    Institut für Werkstoffe
                    Technische Universität Braunschweig
                    Langer Kamp 8
                    38106 Braunschweig
                    Germany
                    Tel.: 00-49-531-391-3065
                    Fax   00-49-531-391-3058
                    e-mail <martin.baeker at tu-bs.de>
 		   http://www.tu-braunschweig.de/ifw/institut/mitarbeiter/baeker
               	   http://www.scienceblogs.de/hier-wohnen-drachen


More information about the ase-users mailing list