MLPhononMaker#
- class autoplex.data.phonons.flows.MLPhononMaker(name='ml phonon', sym_reduce=True, symprec=0.001, displacement=0.01, min_length=20.0, max_length=None, prefer_90_degrees=True, allow_orthorhombic=False, get_supercell_size_kwargs=<factory>, use_symmetrized_structure=None, bulk_relax_maker=<factory>, static_energy_maker=<factory>, born_maker=None, phonon_displacement_maker=<factory>, create_thermal_displacements=False, generate_frequencies_eigenvectors_kwargs=<factory>, kpath_scheme='seekpath', code='forcefields', store_force_constants=False, socket=False, relax_maker_kwargs=<factory>, static_maker_kwargs=<factory>)[source]#
Bases:
PhononMaker
Maker to calculate harmonic phonons with a force field.
Calculate the harmonic phonons of a material. Initially, a tight structural relaxation is performed to obtain a structure without forces on the atoms. Subsequently, supercells with one displaced atom are generated and accurate forces are computed for these structures. With the help of phonopy, these forces are then converted into a dynamical matrix. To correct for polarization effects, a correction of the dynamical matrix based on BORN charges can be performed. The BORN charges can be supplied manually. Finally, phonon densities of states, phonon band structures and thermodynamic properties are computed.
Notes
It is heavily recommended to symmetrize the structure before passing it to this flow. Otherwise, a different space group might be detected and too many displacement calculations will be generated. It is recommended to check the convergence parameters here and adjust them if necessary. The default might not be strict enough for your specific case.
- Parameters:
name (str) – Name of the flows produced by this maker.
sym_reduce (bool) – Whether to reduce the number of deformations using symmetry.
symprec (float) – Symmetry precision to use in the reduction of symmetry to find the primitive/conventional cell (use_primitive_standard_structure, use_conventional_standard_structure) and to handle all symmetry-related tasks in phonopy
displacement (float) – Displacement distance for phonons
min_length (float) – Minimum 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) – Keyword arguments that will be passed to get_supercell_size to determine supercell size
use_symmetrized_structure (str) –
Allowed strings: “primitive”, “conventional”, None
”primitive” will enforce to start the phonon computation from the primitive standard structure according to Setyawan, W., & Curtarolo, S. (2010). High-throughput electronic band structure calculations: Challenges and tools. Computational Materials Science, 49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010. This makes it possible to use certain k-path definitions with this workflow. Otherwise, we must rely on seekpath
”conventional” will enforce to start the phonon computation from the conventional standard structure according to Setyawan, W., & Curtarolo, S. (2010). High-throughput electronic band structure calculations: Challenges and tools. Computational Materials Science, 49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010. We will, however, use seekpath and primitive structures as determined by from phonopy to compute the phonon band structure
bulk_relax_maker (.ForceFieldRelaxMaker or None) – Maker to perform a tight relaxation on the bulk. Set to
None
to skip the bulk relaxationstatic_energy_maker (.ForceFieldStaticMaker or None) – Maker to perform the computation of the DFT energy on the bulk. Set to
None
to skip the static energy computationphonon_displacement_maker (.ForceFieldStaticMaker or None) – Maker used to compute the forces for a supercell.
generate_frequencies_eigenvectors_kwargs (dict) – Keyword arguments passed to
generate_frequencies_eigenvectors
.create_thermal_displacements (bool) – Arg that determines if thermal_displacement_matrices are computed
kpath_scheme (str) – Scheme to generate kpoints. Please be aware that you can only use seekpath with any kind of cell Otherwise, please use the standard primitive structure Available schemes are: “seekpath”, “hinuma”, “setyawan_curtarolo”, “latimer_munro”. “seekpath” and “hinuma” are the same definition but seekpath can be used with any kind of unit cell as it relies on phonopy to handle the relationship to the primitive cell and not pymatgen
code (str) – Determines the DFT code. currently only vasp is implemented. This keyword might enable the implementation of other codes in the future
store_force_constants (bool) – If True, force constants will be stored
relax_maker_kwargs (dict) – Keyword arguments that can be passed to the RelaxMaker.
static_maker_kwargs (dict) – Keyword arguments that can be passed to the StaticMaker.
max_length (float | None)
allow_orthorhombic (bool)
born_maker (ForceFieldStaticMaker | None)
socket (bool)
- make_from_ml_model(structure, potential_file, ml_model='GAP', calculator_kwargs=None, supercell_settings=None, **make_kwargs)[source]#
Maker for GAP phonon jobs.
- Parameters:
structure (.Structure) – The pymatgen structure. Please start with a structure that is nearly fully optimized as the internal optimizers have very strict settings!
ml_model (str) – ML model to be used. Default is GAP.
potential_file – Complete path to MLIP file(s) (train, test and MLIP files)
calculator_kwargs (dict | None) – Keyword arguments for the ASE Calculator.
supercell_settings (dict | None) – Dict with supercell settings.
make_kwargs – Keyword arguments for the PhononMaker.
- Return type:
PhononMaker jobs.