BaseElasticMaker

class atomate2.common.flows.elastic.BaseElasticMaker(name='elastic', order=2, sym_reduce=True, symprec=0.1, bulk_relax_maker=None, elastic_relax_maker=None, generate_elastic_deformations_kwargs=<factory>, fit_elastic_tensor_kwargs=<factory>, task_document_kwargs=<factory>)[source]

Bases: Maker, ABC

Maker to calculate elastic constants.

Calculate the elastic constant of a material. Initially, a tight structural relaxation is performed to obtain the structure in a state of approximately zero stress. Subsequently, perturbations are applied to the lattice vectors and the resulting stress tensor is calculated from DFT, while allowing for relaxation of the ionic degrees of freedom. Finally, constitutive relations from linear elasticity, relating stress and strain, are employed to fit the full 6x6 elastic tensor. From this, aggregate properties such as Voigt and Reuss bounds on the bulk and shear moduli are derived.

Note

It is heavily recommended to symmetrize the structure before passing it to this flow. Otherwise, the symmetry reduction routines will not be as effective at reducing the total number of deformations needed.

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

  • order (int) – Order of the tensor expansion to be determined. Can be either 2 or 3.

  • sym_reduce (bool) – Whether to reduce the number of deformations using symmetry.

  • symprec (float) – Symmetry precision to use in the reduction of symmetry.

  • bulk_relax_maker (.BaseVaspMaker or .ForceFieldRelaxMaker or None) – A maker to perform a tight relaxation on the bulk. Set to None to skip the bulk relaxation.

  • elastic_relax_maker (.BaseVaspMaker or .ForceFieldRelaxMaker) – Maker used to generate elastic relaxations.

  • generate_elastic_deformations_kwargs (dict) – Keyword arguments passed to generate_elastic_deformations.

  • fit_elastic_tensor_kwargs (dict) – Keyword arguments passed to fit_elastic_tensor.

  • task_document_kwargs (dict) – Additional keyword args passed to ElasticDocument.from_stresses().

make(structure, prev_dir=None, equilibrium_stress=None, conventional=False)[source]

Make flow to calculate the elastic constant.

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

  • prev_dir (str or Path or None) – A previous vasp calculation directory to use for copying outputs.

  • equilibrium_stress (tuple of tuple of float) – The equilibrium stress of the (relaxed) structure, if known.

  • conventional (bool) – Whether to transform the structure into the conventional cell.

Return type:

Flow

abstract property prev_calc_dir_argname: str

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)