13
$\begingroup$

I have a 9 x 9 x 9 periodic crystal structure in .xyz format and I would like to change it to .cif file format.

Does anyone know how to convert the file? (e.g. 9 x 9 x 9 to unit cell then cif)

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ I think the difficult part of your question is finding the unit cell. Eventually, I would adapt the title to something like "Recover unit cell from super cell and write to cif format" $\endgroup$
    – CKl
    Jun 16, 2020 at 11:04

3 Answers 3

13
$\begingroup$

You can use for example pymatgen in python to do this. The tricky part of your question is to find a unit cell in step 2.

I outline the steps here:

  1. Read your xyz file into a pymatgen structure.
  2. Use the SpacegroupAnalyzer class to determine the unit cell.
  3. Write the cif file using the class CifWriter.
$\endgroup$
2
  • 1
    $\begingroup$ I will give it a try! $\endgroup$
    – DGKang
    Jun 17, 2020 at 12:22
  • $\begingroup$ It will be a good exercise. If you need more hints, let me know. $\endgroup$
    – CKl
    Jun 17, 2020 at 13:24
3
$\begingroup$

There are probably quite a few software packages that automate this process. One I like to use is c2x, which provides support for structure files for multiple DFT packages (VASP, QE, Abinit, Castep, etc.) and visualization tools (VESTA, XCrysDen, JMol, etc.). You can download it from their website: https://www.c2x.org.uk

$\endgroup$
1
$\begingroup$

You can upload your .xyz file into VESTA, then under the Edit -> Edit Data, you can find the Unit Cell option. Then you can export your data to a .cif format under the File tab.

$\endgroup$
1
  • 2
    $\begingroup$ Thank you for your reply. However, this answer did not include the obtaining unit cell structure from the 9x9x9 Wurtzite structure $\endgroup$
    – DGKang
    Jun 17, 2020 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .