CommonQhaMaker

class atomate2.common.flows.qha.CommonQhaMaker(name='QHA Maker', initial_relax_maker=None, eos_relax_maker=None, phonon_maker=None, linear_strain=(-0.05, 0.05), number_of_frames=6, t_max=None, pressure=None, ignore_imaginary_modes=False, skip_analysis=False, eos_type='vinet', analyze_free_energy_kwargs=<factory>, min_length=20.0, max_length=None, prefer_90_degrees=True, allow_orthorhombic=False, get_supercell_size_kwargs=<factory>)[source]

Bases: Maker, ABC

Use the quasi-harmonic approximation.

First relax a structure. Then we scale the relaxed structure, and then compute harmonic phonons for each scaled structure with Phonopy. Finally, we compute the Gibbs free energy and other thermodynamic properties available from the quasi-harmonic approximation.

Note: We do not consider electronic free energies so far. This might be problematic for metals (see e.g., Wolverton and Zunger, Phys. Rev. B, 52, 8813 (1994).)

Note: Magnetic Materials have never been computed with this workflow.

Parameters:
  • name (str) – Name of the flows produced by this maker.

  • initial_relax_maker (.ForceFieldRelaxMaker | .BaseVaspMaker | None) – Maker to relax the input structure.

  • eos_relax_maker (.ForceFieldRelaxMaker | .BaseVaspMaker | None) – Maker to relax deformed structures for the EOS fit. The volume has to be fixed!

  • phonon_maker (.BasePhononMaker | None) – Maker to compute phonons. The volume has to be fixed! The beforehand relaxation could be switched off.

  • linear_strain (tuple[float, float]) – Percentage linear strain to apply as a deformation, default = -5% to 5%.

  • number_of_frames (int) – Number of strain calculations to do for EOS fit, default = 6.

  • t_max (float | None) – Maximum temperature until which the QHA will be performed

  • pressure (float | None) – Pressure at which the QHA will be performed (default None, no pressure)

  • skip_analysis (bool) – Skips the analysis step and only performs EOS and phonon computations.

  • ignore_imaginary_modes (bool) – By default, volumes where the harmonic phonon approximation shows imaginary will be ignored

  • eos_type (str) – Equation of State type used for the fitting. Defaults to vinet.

  • min_length (float) – min length of the supercell that will be built

  • max_length (float) – max length of the supercell that will be built

  • prefer_90_degrees (bool) – if set to True, supercell algorithm will first try to find a supercell with 3 90 degree angles

  • get_supercell_size_kwargs (dict) – kwargs that will be passed to get_supercell_size to determine supercell size

  • analyze_free_energy_kwargs (dict)

  • allow_orthorhombic (bool)

make(structure, supercell_matrix=None, prev_dir=None)[source]

Run an EOS flow.

Parameters:
  • structure (Structure) – A pymatgen structure object.

  • supercell_matrix (list) – Instead of min_length, also a supercell_matrix can be given, e.g. [[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0]

  • prev_dir (str or Path or None) – A previous calculation directory to copy output files from.

Return type:

.Flow, a QHA flow

abstract property prev_calc_dir_argname: str | None

Name of argument informing static maker of previous calculation directory.

As this differs between different DFT codes (e.g., VASP, CP2K), it has been left as a property to be implemented by the inheriting class.

Note: this is only applicable if a relax_maker is specified; i.e., two calculations are performed for each ordering (relax -> static)