Input-output#
For the full technical reference see wulfric.io.
In the examples of this page we assume that wulfric is imported as
>>> import wulfric
VASP#
Wulfric can read and write VASP POSCAR files.
Reading#
>>> # Load a POSCAR file
>>> cell, atoms, comment = wulfric.io.load_poscar('POSCAR')
Writing#
>>> # Dump a POSCAR file
>>> wulfric.io.dump_poscar(cell, atoms, 'POSCAR')
>>> # If you want to write a comment as well:
>>> wulfric.io.dump_poscar(cell, atoms, 'POSCAR', comment='This is a comment')
>>> # You can control the amount of decimals in the output:
>>> wulfric.io.dump_poscar(cell, atoms, 'POSCAR', decimals=6)
>>> # You can switch the mode of coordinates between 'Cartesian' and 'Direct' (default):
>>> wulfric.io.dump_poscar(cell, atoms, 'POSCAR', mode="Cartesian")