htesp.elastic¶
Module to perform elastic calculations
Functions
|
Function to create deformed structures utilizing pymatgen.analysis.elastic class. |
|
Rewrite |
|
Entry point: |
|
Handle deformation and elastic computations for one material. |
|
Return the last stress tensor of a QE run, in GPa. |
|
Run |
- htesp.elastic.run_vasp_process(what, cwd=None)[source]¶
Run
vasp_process.py <what>without a shell, optionally incwd.
- htesp.elastic.force_isif(incar_path, value=2)[source]¶
Rewrite
incar_pathso that it carries exactly oneISIFentry.Replaces
sed -i '/ISIF/d' INCARfollowed byecho >>, which matched ISIF anywhere on a line instead of as the key.
- htesp.elastic.qe_stress(scf_out)[source]¶
Return the last stress tensor of a QE run, in GPa.
pw.x prints
total stressfollowed by three rows of six numbers: the first three columns are the tensor in Ry/bohr^3 and the last three the same tensor in kbar.Parameters:¶
- scf_outstr
Path of the pw.x output file.
Returns:¶
- numpy.ndarray
3x3 stress tensor in GPa, in the sign convention pymatgen’s
ElasticTensorexpects.
- htesp.elastic.deformation(mpid, obj, dft, orig_prefix, deformed_struc)[source]¶
Function to create deformed structures utilizing pymatgen.analysis.elastic class.
Parameters:¶
- mpidstr
Materials id.
- objobject
Object of MpConnect class.
- dftstr
Density Functional Theory (DFT) method used, e.g., ‘vasp’, ‘qe’.
- orig_prefixstr
Prefix for the original undeformed structure.
- deformed_strucobject
Object containing deformed structures.
Returns:¶
None
Example:¶
>>> from mpconnect import MpConnect >>> from pymatgen import Structure >>> from pymatgen.io.vasp import Poscar >>> obj = MpConnect() >>> mpid = "mp-1234" >>> orig_prefix = "Si2" >>> deformed_struc = ... # Object containing deformed structures >>> # obtained with pymatgen.analysis.elasticity.DeformedStructureSet >>> deformation(mpid, obj, "vasp", orig_prefix, deformed_struc)
- htesp.elastic.process_material(mpid, orig_prefix, mode)[source]¶
Handle deformation and elastic computations for one material.
Parameters:¶
- mpidstr
Materials id.
- orig_prefixstr
Prefix for the undeformed structure.
- modestr
Either
input(write the deformed inputs) orcompute_elastic(read the finished runs back and fit the elastic tensor).
Returns:¶
None