Putting atoms object in standard form

I believe I have to put the lattices which are to be used in a solid-state NEB calculation in lower triangular form. From perusing the documentation, it appears that there is a method for a “cell” object to do so (I tried it and it works). As I am not very familiar with ASE, I would like to know how to transform an atoms object (lattice plus atom positions) into standard form. Can anyone offer a simple few lines of code on how to do so?

I believe

atoms.set_cell(atoms.cell.standard_form()[0], scale_atoms=True)

will work, but would strongly recommend to test that carefully before using in production :sweat_smile:

I’m afraid that would go wrong for funny Bravais lattices, since the reduction operation implemented by standard_form() is a general 3x3 integer operation with determinant 1 (it could be a permutation), whereas I don’t think set_cell() is capable of expressing a permutation.

You would need something along the lines of make_supercell() and then pass the 3x3 integer operation to that.

(Well, we’re not talking general lattice reduction, only mapping the directions to upper/lower. So maybe it works, but most of the reduction functions have cases where they probably don’t, so I’d just advise to be careful)

(Actually sorry, I confused this operation with the others like Niggli/Minkowski, but this one only performs a rotation which is then not an integer matrix. Thus my comments above don’t apply)