pyiron.vasp.structure module¶
-
pyiron.vasp.structure.
atoms_from_string
(string, read_velocities=False, species_list=None)[source]¶ Routine to convert a string list read from a input/output structure file and convert into Atoms instance
- Parameters
string (list) – A list of strings (lines) read from the POSCAR/CONTCAR/CHGCAR/LOCPOT file
read_velocities (bool) – True if the velocities from a CONTCAR file should be read (predictor corrector)
species_list (list/numpy.ndarray) – A list of species of the atoms
- Returns
The required structure object
- Return type
-
pyiron.vasp.structure.
get_species_list_from_potcar
(filename='POTCAR')[source]¶ Generates the species list from a POTCAR type file
- Parameters
filename (str) – Input filename
- Returns
A list of species symbols
- Return type
list
-
pyiron.vasp.structure.
manip_contcar
(filename, new_filename, add_pos)[source]¶ Manipulate a CONTCAR/POSCAR file by adding something to the positions
- Parameters
filename (str) – Filename/path of the input file
new_filename (str) – Filename/path of the output file
add_pos (list/numpy.ndarray) – Array of values to be added to the positions of the input
-
pyiron.vasp.structure.
read_atoms
(filename='CONTCAR', return_velocities=False, species_list=None, species_from_potcar=False)[source]¶ Routine to read structural static from a POSCAR type file
- Parameters
filename (str) – Input filename
return_velocities (bool) – True if the predictor corrector velocities are read (only from MD output)
species_list (list/numpy.ndarray) – A list of the species (if not present in the POSCAR file or a POTCAR in the
directory) (same) –
species_from_potcar (bool) – True if the species list should be read from the POTCAR file in the same directory
- Returns
The generated structure object
- Return type
-
pyiron.vasp.structure.
vasp_sorter
(structure)[source]¶ Routine to sort the indices of a structure as it would be when written to a POSCAR file
- Parameters
structure (pyiron.atomistics.structure.atoms.Atoms) – The structure whose indices need to be sorted
- Returns
A list of indices which is sorted by the corresponding species for writing to POSCAR
- Return type
list
-
pyiron.vasp.structure.
write_poscar
(structure, filename='POSCAR', write_species=True, cartesian=True)[source]¶ Writes a POSCAR type file from a structure object
- Parameters
structure (pyiron.atomistics.structure.atoms.Atoms) – The structure instance to be written to the POSCAR format
filename (str) – Output filename
write_species (bool) – True if the species should be written to the file
cartesian (bool) – True if the positions are written in Cartesian coordinates