tepkit.io.vasp.Poscar#
- class tepkit.io.vasp.Poscar#
Bases:
tepkit.io.StructuredTextFile
Attributes#
Attribute |
Default Value |
Description |
---|---|---|
|
|
The default name of file when use |
|
|
The first line of POSCAR. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Properties#
|
|
|
|
|
|
|
|
|
|
|
Returns a list of species indexes for each ion. |
|
Returns a list of species names for each ion. |
|
Returns thickness-related data. |
Methods#
|
Parse the string to structured data. |
|
|
|
|
|
|
|
Returns a list of integers for ShengBTE-CONTROL-crystal-types. |
|
Return the Cartesian coordinates of ions. |
|
Return the fractional coordinates of ions. |
|
|
|
Get the absolute and relative coordinates of all possible high symmetry points of a 2D material. |
|
Return the distances between ions. |
|
Return the distances of the n-th neighbors. |
|
|
|
|
|
All Members#
- default_file_name = 'POSCAR'
The default name of file when use
from_dir()
.
- comment: str = 'POSCAR'
The first line of POSCAR.
- scaling_factor: float | list[float] = 1.0
- has_species_names: bool = True
- species_names: list[str] = ['Unknown']
- ions_per_species: list[int] = [1]
- ion_coordinates_mode: VaspCoordinatesMode
- has_selective_dynamics: bool = False
- selective_dynamics: NumpyArrayNx3[bool] | None = None
- has_lattice_velocities: bool = False
- lattice_velocities: NumpyArrayNx3[float] | None = None
- has_ion_velocities: bool = False
- ion_velocities: NumpyArrayNx3[float] | None = None
- md_extra: str | None = None
- property unscale_lattice: NumpyArray3x3[float]
- property ion_positions: NumpyArrayNx3[float]
- classmethod from_string(string: str) Self
Parse the string to structured data.
- __str__()
- get_lattice() NumpyArray3x3[float]
- get_reciprocal_lattice(with_2pi=True) NumpyArray3x3[float]
- Parameters:
with_2pi – VASP Cartesian KPOINTS use with_2pi=False
- Returns:
- property lattice: NumpyArray3x3[float]
- property reciprocal_lattice: NumpyArray3x3[float]
- property n_ions: int
- property species_index_per_ion: list[int]
Returns a list of species indexes for each ion. e.g. [0, 0, 1, 1, 2] from Bi2Se2Te
- get_shengbte_types() list[int]
Returns a list of integers for ShengBTE-CONTROL-crystal-types. e.g. [1, 1, 2, 2, 3] from Bi2Se2Te
- property species_name_per_ion: list[str]
Returns a list of species names for each ion. e.g. [“Bi”, “Bi”, “Se”, “Se”, “Te”] from Bi2Se2Te
- property thickness_info: dict
Returns thickness-related data. Such as effective thickness, van der Waals radius of edge atoms, etc.
- get_cartesian_ion_positions(*, threshold: float | None = None) NumpyArrayNx3[float]
Return the Cartesian coordinates of ions.
- Parameters:
threshold – The absolute values smaller than this value will be set to zero. (Recommended value: 1e-13)
- get_fractional_ion_positions() NumpyArrayNx3[float]
Return the fractional coordinates of ions.
- get_volume(unit: str = 'Angstrom^3') float
- get_high_symmetry_points_2d(decimal, with_2pi=True)
Get the absolute and relative coordinates of all possible high symmetry points of a 2D material.
- Parameters:
decimal
with_2pi – VASP Cartesian KPOINTS use with_2pi=False
- Returns:
- get_interatomic_distances() NumpyArrayNxN[float]
Return the distances between ions.
- get_neighbor_distances(max_nth=100) list[float]
Return the distances of the n-th neighbors.
- get_atomic_numbers(per_ion=False) list[int]
>>> poscar = Poscar.from_file("Bi2Te3.poscar") >>> poscar.get_atomic_numbers() # noinspection PyDocstringTypes [83, 52] >>> poscar.get_atomic_numbers(per_ion=True) [83, 83, 52, 52, 52]
- get_pymatgen_poscar()
- to_supercell(na: int, nb: int, nc: int) Self