[ase-users] Version confusion

Martin Baeker martin.baeker at tu-bs.de
Tue May 2 14:43:27 CEST 2017


Hi Jens,

thanks for the explanation; it's clear now.

Best regards,

Martin.

> On 05/02/2017 02:32 PM, Jens Jørgen Mortensen via ase-users wrote:
>> On 05/02/2017 10:48 AM, Martin Baeker via ase-users wrote:
>>> 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:
>> 
>> Yes, this is a bit confusing.  The link to atoms.py you mention is some 
>> version in the middle of 3.13 and what will become 3.14.  It should have 
>> been a link to the 3.13 version :-(
>> 
>> You can read here about the changes for 3.14 where we will start to use 
>> degrees everywhere:
>> 
>> https://wiki.fysik.dtu.dk/ase/releasenotes.html#git-master-branch
>
> That should have been:
>
> https://wiki.fysik.dtu.dk/ase/dev/releasenotes.html#git-master-branch
>
> Jens Jørgen
>
>> 
>> Jens Jørgen
>> 
>>> 
>>> 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
>>> 
>>> 
>>> _______________________________________________
>>> ase-users mailing list
>>> ase-users at listserv.fysik.dtu.dk
>>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>> 
>> _______________________________________________
>> ase-users mailing list
>> ase-users at listserv.fysik.dtu.dk
>> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
>

                    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