asimtools.asimmodules.phonopy package
asimtools.asimmodules.phonopy.forces module
- asimtools.asimmodules.phonopy.forces.forces(images: Dict, calculator: Dict, calc_env_id: str | None = None, **kwargs) Dict[source]
Calculate forces from displaced images for phonopy calculations
- Parameters:
images (Dict) – Images specification, see
asimtools.utils.get_images()calculator (Dict) – Calculator specification, see
asimtools.calculators.load_calc()calc_env_id (Optional[str], optional) – env_id to use for the calculator, defaults to None
kwargs (Dict) – Additional keyword arguments to pass to image_array
- Returns:
Results
- Return type:
Dict
asimtools.asimmodules.phonopy.full_qha module
- asimtools.asimmodules.phonopy.full_qha.full_qha(image: Dict, calculator: Dict, phonopy_save_path: str | None = None, calc_env_id: str | None = None, process_env_id: str | None = None, ase_cubic_eos_args: Dict | None = None, supercell: Sequence = [5, 5, 5], t_max: float = 1000, pressure: float | None = None, distance: float | None = 0.02) Dict[source]
Perform a full Quasiharmonic Approximation and predict thermal properties of a given structure. Calculated properties include vibrational free energy, heat capacity, thermal expansion etc.
- Parameters:
image (Dict) – Image specification, see
asimtools.utils.get_atoms()calculator (Dict) – Calculator specification, see
asimtools.calculators.load_calc()phonopy_save_path (str) – Path where phonopy save yaml is saved, this file is important to keep for easier postprocessing/analsyis, we recommend keeping the default, defaults to None
calc_env_id (Optional[str], optional) – env_id for running calculator, defaults to None
process_env_id (Optional[str], optional) – env_id for running light pre/post-processing, defaults to None
ase_cubic_eos_args (Optional[Dict], optional) – arguments to pass to
asimtools.asimmodules.geometry_optimization.ase_cubic_eos.ase_cubic_eos(), defaults to Nonesupercell (Sequence, optional) – supercell to use for finite difference method, defaults to [5,5,5]
t_max (float, optional) – Max. temperature for thermal properties, defaults to 1000
pressure (Optional[float], optional) – Pressure to optimize to, defaults to None
distance (Optional[float], optional) – Dispacement distance for phonons, defaults to 0.02
- Returns:
Nothing
- Return type:
Dict
asimtools.asimmodules.phonopy.generate_phonopy_displacements module
- asimtools.asimmodules.phonopy.generate_phonopy_displacements.generate_phonopy_displacements(image: Dict, supercell: Sequence[int], distance: float = 0.01, phonopy_save_path: str = 'phonopy_params.yaml', refine_cell: bool = False, symprec: float = 0.0001) Dict[source]
Generates displacements for phonopy calculations
- Parameters:
image (Dict) – Image specification, see
asimtools.utils.get_atoms()supercell (Sequence[int]) – Size of supercell relative to input image
distance (float, optional) – distance to displace atoms, defaults to 0.01
phonopy_save_path (str, optional) – Where the phonopy save file is saved, other asimmodule might use it, defaults to ‘phonopy_params.yaml’
- Returns:
Results
- Return type:
Dict
asimtools.asimmodules.phonopy.phonon_bands_and_dos module
- asimtools.asimmodules.phonopy.phonon_bands_and_dos.phonon_bands_and_dos(image: Dict, calculator: Dict, calc_env_id: str, process_env_id: str, supercell: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = [10, 10, 10], distance: float | None = 0.02, phonopy_save_path: str | None = 'phonopy_save.yaml', paths: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, labels: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = None, use_seekpath: bool | None = True, npoints: int | None = 51, mesh: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None = [20, 20, 20], refine_cell: bool = False, symprec: float = 0.0001) Dict[source]
Workflow to calculate phonon bands and density of states using phonopy.
- Parameters:
image (Dict) – Image specification. See asimtools.utils.get_image.
calculator (Dict) – Calculator specification, see
asimtools.calculators.load_calc()calc_env_id (str) – env_id of the calculator to use.
process_env_id (str) – env_id for pre- and post-processing.
supercell (ArrayLike, optional) – supercell of specified image, defaults to [10,10,10]
distance (float, optional) – Distance in phonopy, defaults to 0.02
phonopy_save_path (str, optional) – Where to put the phonopy yaml, defaults to ‘phonopy_save.yaml’
paths (Optional[Sequence[Sequence[Sequence]]], optional) – Path through BZ for bands plot. Has shape Np*Nik*3 where Np is the number of disconnected paths, Nik is the number of points in the i-th path and the last dimension is the coordinates in kspace, e.g. [[(0,0,0),(0,0,1)],[(0,0,0),(0.5,0.5,0.0),(0.25,0.25,0.25)]], has two disconnected paths with 2 and 3 points respectively, defaults to None
labels (Optional[ArrayLike], optional) – Labels for each point provided in paths, defaults to None
use_seekpath (Optional[bool], optional) – Automatically generate a suggested path, defaults to True
npoints (int, optional) – Number of points for band path, defaults to 51
mesh (Union[ArrayLike,float], optional) – Size of kpoint mesh for DOS either as integer or array of length 3, defaults to [20, 20, 20]
- Returns:
result
- Return type:
Dict
asimtools.asimmodules.phonopy.phonon_bands_and_dos_from_forces module
- asimtools.asimmodules.phonopy.phonon_bands_and_dos_from_forces.phonon_bands_and_dos_from_forces(supercell_image_file_pattern: str, phonopy_save_path: PathLike, paths: Sequence[Sequence[Sequence]] | None = None, labels: Sequence | None = None, use_seekpath: bool | None = False, npoints: int = 51, mesh: Sequence | float = [20, 20, 20]) Dict[source]
Calculate phonon bands and DOS from already calculated forces. The images with calculatd forces should correspond to the displacements in the phonopy save file
- Parameters:
supercell_image_file_pattern (str) – images where forces are calculated
phonopy_save_path (str) – phonopy save file path with corresponding displacements
paths (Optional[Sequence[Sequence[Sequence]]], optional) – Path through BZ for bands plot, given as a list of disconnected paths of arbitrary length where each path is specified by a series of coordinates e.g. [[(0,0,0),(0,0,1)],[(0,0,0),(0.5,0.5,0.0),(0.25,0.25,0.25)]], defaults to None
labels (Optional[Sequence], optional) – What to label the special points specified in the path, defaults to None
use_seekpath (Optional[bool], optional) – Auto-generate a bandpath using seekpath, defaults to False
npoints (int, optional) – How many points to sample for each segment, defaults to 51
mesh (Union[ArrayLike,float], optional) – Mesh to use for binning DOS, defaults to [20, 20, 20]
- Returns:
Results
- Return type:
Dict
asimtools.asimmodules.phonopy.qha_properties module
Example of QHA calculation by Al.
- asimtools.asimmodules.phonopy.qha_properties.qha_properties(ev_csv: str, thermal_properties_file_pattern: str, pressure: float | None = None, t_min: float = 0, t_step: float = 10, t_max: float = 1000) Dict[source]
Calculate thermal properties after QHA calculations
- Parameters:
ev_csv (str) – path to the energy-volume csv file
thermal_properties_file_pattern (str) – pattern to match the thermal properties files
pressure (Optional[float], optional) – pressure to fix, defaults to None
t_min (float, optional) – Min. temperature, defaults to 0
t_step (float, optional) – Temperature step, defaults to 10
t_max (float, optional) – Max. temperature, defaults to 1000
- Returns:
Results
- Return type:
Dict
asimtools.asimmodules.phonopy.read_force_constants module
Relaxes the given atomic structure using ASE’s built-in structure optimizers
asimtools.asimmodules.phonopy.thermal_properties module
- asimtools.asimmodules.phonopy.thermal_properties.thermal_properties(phonopy_save_path: str, mesh: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] = [20, 20, 20], t_step: float = 10.0, t_min: float = 0.0, t_max: float = 1000.0, run_mesh_kwargs: Dict | None = None, run_thermal_properties_kwargs: Dict | None = None, suffix: str = '') Dict[source]