12
$\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
    $\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 at 11:04
11
$\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.
| cite | improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ I will give it a try! $\endgroup$ – Dong gi Kang Jun 17 at 12:22
  • $\begingroup$ It will be a good exercise. If you need more hints, let me know. $\endgroup$ – CKl Jun 17 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

| cite | improve this answer | |
$\endgroup$
2
$\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.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you for your reply. However, this answer did not include the obtaining unit cell structure from the 9x9x9 Wurtzite structure $\endgroup$ – Dong gi Kang Jun 17 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.