vaspparser.vasp.structure.get_poscar_content

vaspparser.vasp.structure.get_poscar_content#

vaspparser.vasp.structure.get_poscar_content(structure: Atoms, write_species: bool = True, cartesian: bool = True) List[str][source]#

Generate the lines of a POSCAR-format file from a structure object.

Atoms are written grouped by species (alphabetical order) as required by VASP. If the structure has FixCartesian constraints, the file is written in Direct (fractional) coordinates with a Selective dynamics block.

Parameters:
  • structure (ase.atoms.Atoms) – The structure to write

  • write_species (bool) – If True, include the species line (VASP5+ format)

  • cartesian (bool) – If True, write Cartesian coordinates; otherwise Direct. Overridden to False when selective dynamics are present.

Returns:

Lines of the POSCAR file as strings (each ending with \n)

Return type:

list