[ase-users] Translate only atoms of a certain type
Jens Jørgen Mortensen
jjmo at dtu.dk
Thu Nov 16 11:02:39 CET 2017
On 11/15/2017 03:59 PM, fabian via ase-users wrote:
> Dear all
>
> I want to translate a molecule on my surface slab. At the moment i am
> doing this "by Hand" in the CONTCAR file after a calculation is done.
>
> Is there a way to translated all the atoms of a certain type or over a
> certain height threshold by for example half a lattice vector within ASE?
>
> I would be glad for any pointers in the right direction
Here is another way to do it:
z0 = 14.5
p = atoms.positions
z = p[:, 2]
p[z > z0] += atoms.cell[0] / 2
Jens Jørgen
>
>
> All the best
>
>
> fabian
>
> _______________________________________________
> 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