[ase-users] Sort Atoms in specific Order
Mikkel Strange
mikst at fysik.dtu.dk
Fri Apr 7 13:12:04 CEST 2017
Hi Fabian,
perhaps you could use a list of indices to reorder the atoms the way you like them.
Here is a simple example:
from ase import Atoms
slab = Atoms(symbols='HHeLi')
perm = [2, 0, 1]
slab = slab[perm]
which produces
Atoms(symbols='LiHHe')
best regards,
Mikkel
________________________________________
From: ase-users-bounces at listserv.fysik.dtu.dk [ase-users-bounces at listserv.fysik.dtu.dk] on behalf of fabian via ase-users [ase-users at listserv.fysik.dtu.dk]
Sent: Friday, April 07, 2017 12:05 PM
To: ase-users
Subject: [ase-users] Sort Atoms in specific Order
Dear all ,
I want to sort the order of the atoms in my Output files
in a specific order.
currently i use:
slab=sort(slab, tags=None)
Which sets them in alphabetical order. I want to determine the order myself
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