[ase-users] Arranging atoms in the cell of a POSCAR file

Gael Donval Gael.Donval at cnrs-imn.fr
Sun Apr 7 19:49:19 CEST 2013


Quoting Clemens Barth <barth at root-1.de>:

> Dear all.
>
> I have a POSCAR file, which describes the positions of atoms within a
> cell. When I load this
> file with, e.g., VMD the atoms are somewhat split up into groups. For
> instance, one part is located
> at the upper border of the cell along +z whereas the other part is at
> the lower border of the
> cell along -z - the atoms do not form one complete structure as one
> would expect.
If possible, to make sure there is no problem, please provide the  
problematic file.
Please keep in mind that atoms sitting at a cell boundary can be  
replaced by an equivalent atom
positioned on the opposite boundary.

Reproducible positioning has not been implemented yet when reading  
from a file (mainly because this is irrelevant). For the time being,  
the most straightforward workaround should be:

      atoms.set_scaled_position(atoms.get_scaled_position())

If this is not working, chances are high that the positions are not  
equivalent. In this case, just shift the atoms using the  
"atoms.translate" method and reset scaled position as described above.

> However, when
> repeating the cell all is okay - the structure is well represented. -
> somebody told me that this 'problem'
> is somewhat normal when doing VASP calculations
>
> However, due to some specific reasons I would like to rearrange the atom
> positions such that they
> are centered in the cell and that they are together forming one complete
> structure.
If you just want to center your current cell in the middle of a bigger  
cell "filled" with any amount of vacuum,
you should use the "atoms.center" method.

If you want to "roll" the atoms and fold them back in such a way that  
the atom number "X" is centered into the cell, I've just implemented  
that in my last patch (not in tree yet) in the form of  
"atoms.shift_in_unit_cell(X)".
I don't know if the function will make its way to the official repo  
but in the time being, you can apply the patch or recreate a similar  
function yourself (here:  
https://github.com/Gedeonval/ase-python/blob/master/ase/atoms.py#L936  
and there:  
https://github.com/Gedeonval/ase-python/blob/master/ase/atoms.py#L1345 )

> Is there a mean to do this by some ASE function? Is there some function,
> which makes some
> 'order' in the cell without destroying the structure itself?
I'm not sure I've really understood what you meant, please tell me if  
I missed the point.

Gaël
>
> Any help is highly appreciated.
>
> CB.
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users






More information about the ase-users mailing list