aiida_phonopy.data
#
DataTypes for handling phonopy and frozen phonons calculations.
Submodules#
Package Contents#
Classes#
Base class containing the information for the other phonon related data types. |
|
Self-contained class for force constants data and non-analytical constants. |
|
Class for pre-processing of frozen-phonon calculations. |
|
Class wrapping the |
|
Base class containing the information for the other phonon related data types. |
|
Class for pre-processing of frozen-phonon calculations. |
|
Base class containing the information for the other phonon related data types. |
- class aiida_phonopy.data.RawData(structure: aiida.orm.StructureData | None = None, phonopy_atoms: phonopy.structure.cells.PhonopyAtoms | None = None, supercell_matrix: list | None = None, primitive_matrix: list | str | None = None, symprec: float = 1e-05, is_symmetry: bool = True, distinguish_kinds: bool = True, **kwargs)[source]#
Bases:
aiida.orm.nodes.data.ArrayData
Base class containing the information for the other phonon related data types.
- property numbers: numpy.ndarray#
Get the array corresponding to the atomic number in periodic table of the sturcture.
- Returns:
(nat,) shaper array
- property masses: numpy.ndarray#
Get the array of the atomic masses in the cell.
- Returns:
(nat,) shape array
- property positions: numpy.ndarray#
Get the array of the atomic positions in the cell.
- Returns:
(nat, 3) shape array
- property cell: numpy.ndarray#
Get the lattice matrix of the structure.
- Returns:
(3,3) shape array
- property is_symmetry: bool#
Get is_symmetry value.
It refers to whether Phonopy will use symmetries to reduce the number of displacements for frozen phonons.
- property distinguish_kinds: bool#
Get whether or not kinds with same chemical symbol will be distinguished by symmetry.
- property dielectric: numpy.ndarray | None#
Get the high-frequency dielectric tensor in Cartesian coordinates.
- property born_charges: numpy.ndarray#
Get the effective Born charges tensors in Cartesian coordinates.
- ..note:
- The indecis refers to:
Atomic index.
Polarization index.
Atomic displacement index.
- Returns:
numpy.ndarray, shape (num primitive cell atoms, 3, 3)
- _set_unitcell_attributes(phonopy_atoms: phonopy.structure.cells.PhonopyAtoms, pbc: tuple[bool, bool, bool])[source]#
Set the attributes for full reproducibility of the PhonopyAtoms class.
- _set_supercell_matrix(value: list | numpy.ndarray)[source]#
Set the Phonopy supercell matrix.
- Parameters:
value (
list
,List
,numpy.ndarray
) – (3,3) or (3,1) shape array- Raises:
ModificationNotAllowed – if object is already stored
- _set_symprec(value: float)[source]#
Set the symmetry tolerance.
- Parameters:
value – tolerance for symmetry analysis. Check that you get
the right symmetry of your structure before starting any calculation. Default is 1e-05. :type value: float :raises:
ModificationNotAllowed: if object is already stored
TypeError: if the input is not of type float
- _set_is_symmetry(value: bool)[source]#
Set whether to use the symmetries.
Use with care and if you know what your are doing.
- Parameters:
value (bool) – whether to use or not the symmetries. Deafault is True.
- Raises:
ModificationNotAllowed: if object is already stored
TypeError: if the input is not of type bool
- _set_kinds_map(value: dict)[source]#
Set the kind names map between the PhonopyAtoms unitcell and a reference structure.
This is needed since PhonopyAtoms does not support kind names. This attribute allows to get proper StructureData supercells with displacements.
- Parameters:
value – tuple with two dictionaries (numbers_to_names, numbers_to_symbols)
- _get_phonopy_atoms_unitcell(distinguish_kinds: bool) phonopy.structure.cells.PhonopyAtoms [source]#
Get the PhonopyAtoms object using the internal attributes.
- get_phonopy_instance(symmetrize_nac: bool | None = None, factor_nac: float | None = None, **kwargs) phonopy.Phonopy [source]#
Return a
phonopy.Phonopy
object with the current values.
- get_primitive_cell() aiida.orm.StructureData [source]#
Get the primitive cell as StructureData (not stored).
- get_supercell() aiida.orm.StructureData [source]#
Get the pristine supercell as StructureData (not stored).
- get_cells_mappings() dict[dict[list]] [source]#
Return a dictionary containing the mappings among unit-, super- and primitive cell.
- Returns:
dictionary with the following key:pair structure: * primitive: {p2p_map: list, p2s_map: list, s2p_map: list} * supercell: {u2u_map: list, u2s_map: list, s2u_map: list}
- set_dielectric(dielectric: list | numpy.ndarray)[source]#
Set the high-frequency dielectric tensor in Cartesian coordinates.
- Parameters:
dielectric – (3, 3) array like
- Raises:
TypeError: if the format is not compatible or of the correct type
ValueError: if the format is not compatible or of the correct type
- set_born_charges(born_charges: list | numpy.ndarray)[source]#
Set the Born effective charge tensors in Cartesian coordinates.
- ..note:
- The indecis refers to:
Atomic index.
Polarization index.
Atomic displacement index.
- Parameters:
born_charges – (number of atoms in the primitive cell, 3, 3) shape array like
- Raises:
TypeError: if the format is not compatible or of the correct type
ValueError: if the format is not compatible or of the correct type
- class aiida_phonopy.data.ForceConstantsData(structure: aiida.orm.StructureData | None = None, phonopy_atoms: phonopy.structure.cells.PhonopyAtoms | None = None, supercell_matrix: list | None = None, primitive_matrix: list | None = None, symprec: float = 1e-05, is_symmetry: bool = True, distinguish_kinds: bool = True, **kwargs)[source]#
Bases:
aiida_phonopy.data.raw.RawData
Self-contained class for force constants data and non-analytical constants.
It stores also the structure information (unitcell, supercell, …), for a complete transferable data type.
- property force_constants: numpy.ndarray#
Get force force constants matrix.
- get_phonopy_instance(**kwargs)[source]#
Return a
Phonopy
object with force and nac parameters (if set).- Parameters:
kwargs –
see
aiida_phonopy.data.preprocess.PreProcessData.get_phonopy_instance()
* symmetrize_nac: whether or not to symmetrize the nac parametersusing point group symmetry; bool, defaults to self.is_symmetry
- factor_nac: factor for non-analytical corrections;
float, defaults to Hartree*Bohr
- set_force_constants(force_constants: list | numpy.ndarray)[source]#
Set force constants matrix.
- Parameters:
force_constants – array of force constants matrix in compact or full format
type – (n_patom = atoms in primitive cell, n_satom = atoms in supercell) * Compact format: (n_patom, n_satom, 3, 3) * Full format: (n_satom, n_satom, 3, 3)
- Raises:
TypeError: if the format is not of the correct type
ValueError: if the format is not compatible
RuntimeError: if the displacement dataset was not initialize in input
- class aiida_phonopy.data.PreProcessData(structure: aiida.orm.StructureData | None = None, phonopy_atoms: phonopy.structure.cells.PhonopyAtoms | None = None, supercell_matrix: list | None = None, primitive_matrix: list | None = None, symprec: float = 1e-05, is_symmetry: bool = True, distinguish_kinds: bool = True, **kwargs)[source]#
Bases:
aiida_phonopy.data.raw.RawData
Class for pre-processing of frozen-phonon calculations.
This class is designed for handling the pre-process information regarding a frozen phonon calculation using
Phonopy
. These regard the unitcell structure, the supercell and primitive matrix, as well as other symmetry information.- property displacement_dataset: dict | list | None#
Get the dispacement dataset in a readible format for phonopy.
If not set, None is returned.
- property displacements: list | dict#
Get the displacements to apply to the supercell.
- Returns:
array with displacements; can be type-I or type-II (see
phonopy.Phonopy.displacements()
)
- property calcfunctions#
Namespace to access the calcfunction utilities.
- set_displacements(distance: float = 0.01, is_plusminus: str = 'auto', is_diagonal: bool = True, is_trigonal: bool = False, number_of_snapshots: int | None = None, random_seed: int | None = None, temperature: float | None = None, cutoff_frequency: float | None = None)[source]#
Set displacements for frozen phonon calculation.
Refer to
phonopy.Phonopy.generate_displacements()
for a complete description of the inputs.Thus, in the PreProcessData value different from zero will raise an error.
- Raises:
ValueError – if the inputs are not compatible with phonopy standards
- _set_displacements(value: list | dict)[source]#
Put in the repository the displacement dataset in json format.
- set_displacements_from_dataset(dataset: dict | list)[source]#
Set displacements for frozen phonon calculation from a dataset.
Useful if you want to set displacements from a previously random generated displacement dataset, or for setting dataset for self-consistent harmonic approximation.
- Parameters:
dataset – dictionary or array like (numpy or list), compatible with phonopy
- Raises:
ValueError – if the inputs are not compatible with phonopy standards
- get_phonopy_instance(symmetrize_nac: bool = None, factor_nac: float | None = None, **kwargs)[source]#
Return a
Phonopy
object with the current values.
- get_supercells_with_displacements() dict[aiida.orm.StructureData] [source]#
Get the supercells with displacements for frozen phonon calculation.
- Returns:
dictionary with StructureData nodes, None if the displacement dataset has not been set
- generate_displacement_dataset(distance: float = 0.01, is_plusminus: str = 'auto', is_diagonal: bool = True, is_trigonal: bool = False, number_of_snapshots: int | None = None, random_seed: int | None = None, temperature: float | None = None, cutoff_frequency: float | None = None)[source]#
Return the displacement dataset for frozen phonon calculation.
Refer to
phonopy.Phonopy.generate_displacements()
for a complete description of the inputs.- Raises:
ValueError – if the inputs are not compatible with phonopy standards
- static generate_preprocess_data(structure: aiida.orm.StructureData, displacement_generator: dict | None = None, supercell_matrix: list | None = None, primitive_matrix: list | None = None, symprec: float | None = None, is_symmetry: bool | None = None, distinguish_kinds: bool | None = None)[source]#
Return a complete stored PreProcessData node.
- Parameters:
structure (
StructureData
) – structure data node representing the unitcelldisplacement_generator (orm.Dict) – dictionary containing the info for generating the displacements, defaults to phonopy default (see phonopy doc)
supercell_matrix (
List
, Optional) – supercell matrix, defaults to diag(1,1,1)primitive_matrix (
List
, Optional) – primitive matrix, defaults to “auto”symprec (
Float
, Optional) – symmetry precision on atoms, defaults to 1e-5is_symmetry (
Bool
, Optional) – if using space group symmetry, defaults to Truedistinguish_kinds (
Bool
, Optional) – if distinguish names of same specie by symmetry, defaults to True
- Returns:
PreProcessData node
- class aiida_phonopy.data.PhonopyData(preprocess_data: aiida_phonopy.data.preprocess.PreProcessData, **kwargs)[source]#
Bases:
aiida_phonopy.data.preprocess.PreProcessData
Class wrapping the
phonopy.Phonopy
class.It represents the final Data node status of a frozen phonon calculaiton. It stores information regarding the pre-processing, the displacements and forces dataset, and the (eventual) non-analytical constants.
- property residual_forces: numpy.ndarray#
Get the residual forces calculated on the pristine (i.e. no displaced) supercell structure (if set).
..note: if you have specified the forces_index this will be used as well here.
- property forces: numpy.ndarray#
Get forces for each supercell with displacements in the dataset as a unique array.
- get_phonopy_instance(subtract_residual_forces: bool | None = None, **kwargs) phonopy.Phonopy [source]#
Return a
Phonopy
object with forces and nac parameters (if set).- Parameters:
subtract_residual_forces (bool) – whether or not subract residual forces (if set)
kwargs –
see
aiida_phonopy.data.preprocess.PreProcessData.get_phonopy_instance()
* symmetrize_nac: whether or not to symmetrize the nac parametersusing point group symmetry; bool, defaults to self.is_symmetry
- factor_nac: factor for non-analytical corrections;
float, defaults to Hartree*Bohr
- set_residual_forces(forces: list | numpy.ndarray)[source]#
Set the residual forces of the pristine supercell.
- Parameters:
forces – (atoms in supercell, 3) array shape
- Raises:
TypeError: if the format is not of the correct type
ValueError: if the format is not compatible
- set_forces(sets_of_forces: list | numpy.ndarray | None = None, dict_of_forces: dict | None = None, forces_index: int | None = None)[source]#
Set forces per each supercell with displacement in the dataset.
- Parameters:
sets_of_forces – a set of atomic forces in displaced supercells. The order of displaced supercells has to match with that in displacement dataset.
type – (supercells with displacements, atoms in supercell, 3) array shape
dict_of_forces – dictionary of forces, in numpy.ndarray to store for each displacement. They keys for the dictionary must be passed as forces_{num}, where num corresponds to the associated supercell in the dataset. num starts from 1.
forces_index – an integer storing in the database the index for forces. The dict_of_forces may be specified from TrajectoryData to reduce the amount of data saved in the repository. For example: forces_1 = [[actual array]] ==> forces_index = 0
- Raises:
TypeError: if the format is not of the correct type
ValueError: if the format is not compatible
RuntimeError: if the displacement dataset was not initialize in input
- class aiida_phonopy.data.RawData(structure: aiida.orm.StructureData | None = None, phonopy_atoms: phonopy.structure.cells.PhonopyAtoms | None = None, supercell_matrix: list | None = None, primitive_matrix: list | str | None = None, symprec: float = 1e-05, is_symmetry: bool = True, distinguish_kinds: bool = True, **kwargs)[source]#
Bases:
aiida.orm.nodes.data.ArrayData
Base class containing the information for the other phonon related data types.
- property numbers: numpy.ndarray#
Get the array corresponding to the atomic number in periodic table of the sturcture.
- Returns:
(nat,) shaper array
- property masses: numpy.ndarray#
Get the array of the atomic masses in the cell.
- Returns:
(nat,) shape array
- property positions: numpy.ndarray#
Get the array of the atomic positions in the cell.
- Returns:
(nat, 3) shape array
- property cell: numpy.ndarray#
Get the lattice matrix of the structure.
- Returns:
(3,3) shape array
- property is_symmetry: bool#
Get is_symmetry value.
It refers to whether Phonopy will use symmetries to reduce the number of displacements for frozen phonons.
- property distinguish_kinds: bool#
Get whether or not kinds with same chemical symbol will be distinguished by symmetry.
- property dielectric: numpy.ndarray | None#
Get the high-frequency dielectric tensor in Cartesian coordinates.
- property born_charges: numpy.ndarray#
Get the effective Born charges tensors in Cartesian coordinates.
- ..note:
- The indecis refers to:
Atomic index.
Polarization index.
Atomic displacement index.
- Returns:
numpy.ndarray, shape (num primitive cell atoms, 3, 3)
- _set_unitcell_attributes(phonopy_atoms: phonopy.structure.cells.PhonopyAtoms, pbc: tuple[bool, bool, bool])[source]#
Set the attributes for full reproducibility of the PhonopyAtoms class.
- _set_supercell_matrix(value: list | numpy.ndarray)[source]#
Set the Phonopy supercell matrix.
- Parameters:
value (
list
,List
,numpy.ndarray
) – (3,3) or (3,1) shape array- Raises:
ModificationNotAllowed – if object is already stored
- _set_symprec(value: float)[source]#
Set the symmetry tolerance.
- Parameters:
value – tolerance for symmetry analysis. Check that you get
the right symmetry of your structure before starting any calculation. Default is 1e-05. :type value: float :raises:
ModificationNotAllowed: if object is already stored
TypeError: if the input is not of type float
- _set_is_symmetry(value: bool)[source]#
Set whether to use the symmetries.
Use with care and if you know what your are doing.
- Parameters:
value (bool) – whether to use or not the symmetries. Deafault is True.
- Raises:
ModificationNotAllowed: if object is already stored
TypeError: if the input is not of type bool
- _set_kinds_map(value: dict)[source]#
Set the kind names map between the PhonopyAtoms unitcell and a reference structure.
This is needed since PhonopyAtoms does not support kind names. This attribute allows to get proper StructureData supercells with displacements.
- Parameters:
value – tuple with two dictionaries (numbers_to_names, numbers_to_symbols)
- _get_phonopy_atoms_unitcell(distinguish_kinds: bool) phonopy.structure.cells.PhonopyAtoms [source]#
Get the PhonopyAtoms object using the internal attributes.
- get_phonopy_instance(symmetrize_nac: bool | None = None, factor_nac: float | None = None, **kwargs) phonopy.Phonopy [source]#
Return a
phonopy.Phonopy
object with the current values.
- get_primitive_cell() aiida.orm.StructureData [source]#
Get the primitive cell as StructureData (not stored).
- get_supercell() aiida.orm.StructureData [source]#
Get the pristine supercell as StructureData (not stored).
- get_cells_mappings() dict[dict[list]] [source]#
Return a dictionary containing the mappings among unit-, super- and primitive cell.
- Returns:
dictionary with the following key:pair structure: * primitive: {p2p_map: list, p2s_map: list, s2p_map: list} * supercell: {u2u_map: list, u2s_map: list, s2u_map: list}
- set_dielectric(dielectric: list | numpy.ndarray)[source]#
Set the high-frequency dielectric tensor in Cartesian coordinates.
- Parameters:
dielectric – (3, 3) array like
- Raises:
TypeError: if the format is not compatible or of the correct type
ValueError: if the format is not compatible or of the correct type
- set_born_charges(born_charges: list | numpy.ndarray)[source]#
Set the Born effective charge tensors in Cartesian coordinates.
- ..note:
- The indecis refers to:
Atomic index.
Polarization index.
Atomic displacement index.
- Parameters:
born_charges – (number of atoms in the primitive cell, 3, 3) shape array like
- Raises:
TypeError: if the format is not compatible or of the correct type
ValueError: if the format is not compatible or of the correct type
- class aiida_phonopy.data.PreProcessData(structure: aiida.orm.StructureData | None = None, phonopy_atoms: phonopy.structure.cells.PhonopyAtoms | None = None, supercell_matrix: list | None = None, primitive_matrix: list | None = None, symprec: float = 1e-05, is_symmetry: bool = True, distinguish_kinds: bool = True, **kwargs)[source]#
Bases:
aiida_phonopy.data.raw.RawData
Class for pre-processing of frozen-phonon calculations.
This class is designed for handling the pre-process information regarding a frozen phonon calculation using
Phonopy
. These regard the unitcell structure, the supercell and primitive matrix, as well as other symmetry information.- property displacement_dataset: dict | list | None#
Get the dispacement dataset in a readible format for phonopy.
If not set, None is returned.
- property displacements: list | dict#
Get the displacements to apply to the supercell.
- Returns:
array with displacements; can be type-I or type-II (see
phonopy.Phonopy.displacements()
)
- property calcfunctions#
Namespace to access the calcfunction utilities.
- set_displacements(distance: float = 0.01, is_plusminus: str = 'auto', is_diagonal: bool = True, is_trigonal: bool = False, number_of_snapshots: int | None = None, random_seed: int | None = None, temperature: float | None = None, cutoff_frequency: float | None = None)[source]#
Set displacements for frozen phonon calculation.
Refer to
phonopy.Phonopy.generate_displacements()
for a complete description of the inputs.Thus, in the PreProcessData value different from zero will raise an error.
- Raises:
ValueError – if the inputs are not compatible with phonopy standards
- _set_displacements(value: list | dict)[source]#
Put in the repository the displacement dataset in json format.
- set_displacements_from_dataset(dataset: dict | list)[source]#
Set displacements for frozen phonon calculation from a dataset.
Useful if you want to set displacements from a previously random generated displacement dataset, or for setting dataset for self-consistent harmonic approximation.
- Parameters:
dataset – dictionary or array like (numpy or list), compatible with phonopy
- Raises:
ValueError – if the inputs are not compatible with phonopy standards
- get_phonopy_instance(symmetrize_nac: bool = None, factor_nac: float | None = None, **kwargs)[source]#
Return a
Phonopy
object with the current values.
- get_supercells_with_displacements() dict[aiida.orm.StructureData] [source]#
Get the supercells with displacements for frozen phonon calculation.
- Returns:
dictionary with StructureData nodes, None if the displacement dataset has not been set
- generate_displacement_dataset(distance: float = 0.01, is_plusminus: str = 'auto', is_diagonal: bool = True, is_trigonal: bool = False, number_of_snapshots: int | None = None, random_seed: int | None = None, temperature: float | None = None, cutoff_frequency: float | None = None)[source]#
Return the displacement dataset for frozen phonon calculation.
Refer to
phonopy.Phonopy.generate_displacements()
for a complete description of the inputs.- Raises:
ValueError – if the inputs are not compatible with phonopy standards
- static generate_preprocess_data(structure: aiida.orm.StructureData, displacement_generator: dict | None = None, supercell_matrix: list | None = None, primitive_matrix: list | None = None, symprec: float | None = None, is_symmetry: bool | None = None, distinguish_kinds: bool | None = None)[source]#
Return a complete stored PreProcessData node.
- Parameters:
structure (
StructureData
) – structure data node representing the unitcelldisplacement_generator (orm.Dict) – dictionary containing the info for generating the displacements, defaults to phonopy default (see phonopy doc)
supercell_matrix (
List
, Optional) – supercell matrix, defaults to diag(1,1,1)primitive_matrix (
List
, Optional) – primitive matrix, defaults to “auto”symprec (
Float
, Optional) – symmetry precision on atoms, defaults to 1e-5is_symmetry (
Bool
, Optional) – if using space group symmetry, defaults to Truedistinguish_kinds (
Bool
, Optional) – if distinguish names of same specie by symmetry, defaults to True
- Returns:
PreProcessData node
- class aiida_phonopy.data.RawData(structure: aiida.orm.StructureData | None = None, phonopy_atoms: phonopy.structure.cells.PhonopyAtoms | None = None, supercell_matrix: list | None = None, primitive_matrix: list | str | None = None, symprec: float = 1e-05, is_symmetry: bool = True, distinguish_kinds: bool = True, **kwargs)[source]#
Bases:
aiida.orm.nodes.data.ArrayData
Base class containing the information for the other phonon related data types.
- property numbers: numpy.ndarray#
Get the array corresponding to the atomic number in periodic table of the sturcture.
- Returns:
(nat,) shaper array
- property masses: numpy.ndarray#
Get the array of the atomic masses in the cell.
- Returns:
(nat,) shape array
- property positions: numpy.ndarray#
Get the array of the atomic positions in the cell.
- Returns:
(nat, 3) shape array
- property cell: numpy.ndarray#
Get the lattice matrix of the structure.
- Returns:
(3,3) shape array
- property is_symmetry: bool#
Get is_symmetry value.
It refers to whether Phonopy will use symmetries to reduce the number of displacements for frozen phonons.
- property distinguish_kinds: bool#
Get whether or not kinds with same chemical symbol will be distinguished by symmetry.
- property dielectric: numpy.ndarray | None#
Get the high-frequency dielectric tensor in Cartesian coordinates.
- property born_charges: numpy.ndarray#
Get the effective Born charges tensors in Cartesian coordinates.
- ..note:
- The indecis refers to:
Atomic index.
Polarization index.
Atomic displacement index.
- Returns:
numpy.ndarray, shape (num primitive cell atoms, 3, 3)
- _set_unitcell_attributes(phonopy_atoms: phonopy.structure.cells.PhonopyAtoms, pbc: tuple[bool, bool, bool])[source]#
Set the attributes for full reproducibility of the PhonopyAtoms class.
- _set_supercell_matrix(value: list | numpy.ndarray)[source]#
Set the Phonopy supercell matrix.
- Parameters:
value (
list
,List
,numpy.ndarray
) – (3,3) or (3,1) shape array- Raises:
ModificationNotAllowed – if object is already stored
- _set_symprec(value: float)[source]#
Set the symmetry tolerance.
- Parameters:
value – tolerance for symmetry analysis. Check that you get
the right symmetry of your structure before starting any calculation. Default is 1e-05. :type value: float :raises:
ModificationNotAllowed: if object is already stored
TypeError: if the input is not of type float
- _set_is_symmetry(value: bool)[source]#
Set whether to use the symmetries.
Use with care and if you know what your are doing.
- Parameters:
value (bool) – whether to use or not the symmetries. Deafault is True.
- Raises:
ModificationNotAllowed: if object is already stored
TypeError: if the input is not of type bool
- _set_kinds_map(value: dict)[source]#
Set the kind names map between the PhonopyAtoms unitcell and a reference structure.
This is needed since PhonopyAtoms does not support kind names. This attribute allows to get proper StructureData supercells with displacements.
- Parameters:
value – tuple with two dictionaries (numbers_to_names, numbers_to_symbols)
- _get_phonopy_atoms_unitcell(distinguish_kinds: bool) phonopy.structure.cells.PhonopyAtoms [source]#
Get the PhonopyAtoms object using the internal attributes.
- get_phonopy_instance(symmetrize_nac: bool | None = None, factor_nac: float | None = None, **kwargs) phonopy.Phonopy [source]#
Return a
phonopy.Phonopy
object with the current values.
- get_primitive_cell() aiida.orm.StructureData [source]#
Get the primitive cell as StructureData (not stored).
- get_supercell() aiida.orm.StructureData [source]#
Get the pristine supercell as StructureData (not stored).
- get_cells_mappings() dict[dict[list]] [source]#
Return a dictionary containing the mappings among unit-, super- and primitive cell.
- Returns:
dictionary with the following key:pair structure: * primitive: {p2p_map: list, p2s_map: list, s2p_map: list} * supercell: {u2u_map: list, u2s_map: list, s2u_map: list}
- set_dielectric(dielectric: list | numpy.ndarray)[source]#
Set the high-frequency dielectric tensor in Cartesian coordinates.
- Parameters:
dielectric – (3, 3) array like
- Raises:
TypeError: if the format is not compatible or of the correct type
ValueError: if the format is not compatible or of the correct type
- set_born_charges(born_charges: list | numpy.ndarray)[source]#
Set the Born effective charge tensors in Cartesian coordinates.
- ..note:
- The indecis refers to:
Atomic index.
Polarization index.
Atomic displacement index.
- Parameters:
born_charges – (number of atoms in the primitive cell, 3, 3) shape array like
- Raises:
TypeError: if the format is not compatible or of the correct type
ValueError: if the format is not compatible or of the correct type