5
$\begingroup$

How do I convert a POSCAR-format-like file to a XSF file (visualized by XCrySDen)?

I'm looking for a step by step tutorial on the process and what tools/programs are needed.

$\endgroup$
3
  • 2
    $\begingroup$ Vesta can handle both POSCAR and XSF. Try opening the file in Vesta and exporting it. If that doesn't work, try searching for previous questions such as this, where the ASE package is used. $\endgroup$
    – PBH
    Feb 3, 2022 at 1:15
  • 4
    $\begingroup$ Just type atomsk POSCAR xsf check documetation of atomsk atomsk.univ-lille.fr/doc/en/formats.html $\endgroup$ Feb 3, 2022 at 7:58
  • $\begingroup$ @pranavkumar seems you can write an answer! $\endgroup$ Feb 5, 2022 at 7:12

1 Answer 1

5
$\begingroup$

There are couple of tools which can quickly convert POSCAR to xsf format.

Atomsk

The basic syntax to convert POSCAR to xsf: atomsk POSCAR xsf

VASPKIT

Inside the structure editor there is the option

406) Convert POSCAR/CONTCAR to Other Formats

The xsf format is one of the available options.

ASE

from ase.io import vasp
from ase.io import xsf
a=vasp.read_vasp('POSCAR')
xsf.write_xsf('new.xsf',a)

The above Python script should convert a POSCAR file to new.xsf You can also look at another python script which can convert other types of VASP files.

Custom Bash script

This GitHub repo made by user houzf has a bash script to do this conversion.

$\endgroup$

You must log in to answer this question.

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