[ase-users] Finding a permutation between two Atoms

Michael Lamparski diagonaldevice at gmail.com
Thu Dec 10 03:00:55 CET 2020


Hi all,

A simple problem I frequently run into is to find a correspondence between
the indices of atoms in two Atoms that mathematically represent the same
set of coordinates, up to small numerical errors.  Note that I'm talking
very simple cases here; cases where it isn't necessary (or is even
undesirable) to rotate or translate one to look like the other, though
it may be the case that different periodic images have been chosen for some
of the atoms.

A common example is working with symmetry; oftentimes I want to represent a
spacegroup operator as a permutation, which requires finding such a
correspondence of indices between the original and transformed
coordinates.  I've also found permutations useful for writing software that
is robust to the ordering of atoms in a supercell, for easier
interoperation with other tools.

On some occasions I've thrown together my own helper functions to solve
this problem, but I am wondering if there is an idiomatic way to do this
using existing functionality provided by ASE that I have missed?

---
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20201209/bb1c3861/attachment.html>


More information about the ase-users mailing list