How to convert primitive cell to conventional cell?

I have used ase to read atoms object with a primitive cell. When using module to cleave surface, a conventional cell is needed.

How can i convert the atoms object from primitive cell to conventional cell? ( there is magmom information in primitive cell, and hoping it still exists after converting)

Thank you !!!

Hi zihao

Atoms objects aren’t really aware of whether they are primitive or conventional or something else.

If you know that a cell is primitive, you can in principle transform it to conventional by means of the information on the Bravais objects inside ase.lattice. They have a matrix called conventional_cellmap which serves as a transformation that maps to the conventional lattice. But it’s a bit involved as I/someone never got around to making a very clean programming interface for using it.

…also your primitive cell probably needs to be in AFlow form in order for that mapping to be necessarily correct. So yes, it’s a little bit involved.

I’d suggest one has to identify the space group using spglib.get_spacegroup and the corresponding standard unit cell using spglib.standardize_cell (see the API docs). The standardize_cell method has a boolean flag to_primitive (which on my experience should be however carefully aligned with the symprec tolerance).