htesp.magnetic¶
Creates different magnetic ordering according to MagneticStructureEnumerator functions.
Functions
|
Function to change magnetic axis to compute magnetic anisotropy. |
|
Functions to generate possible magnetic structures. |
|
Main function to control the workflow. |
|
Drop |
|
Run |
- htesp.magnetic.run_vasp_process(what, cwd=None)[source]¶
Run
vasp_process.py <what>without a shell, optionally incwd.
- htesp.magnetic.rewrite_incar(path, drop=(), add=())[source]¶
Drop
dropkeys from an INCAR and append the(key, value)add.The key is matched at the start of the line, so dropping
NSWdoes not also dropNSWRITEthe waysed -i '/NSW/d'did.
- htesp.magnetic.magnetic_structure(obj, mpid, compound, magconfig, dft)[source]¶
Functions to generate possible magnetic structures.
Parameters: obj (MpConnect): An object representing an instance of the MpConnect class. mpid (str): Materials ID. compound (str): Compound name. magconfig (list): List of possible collinear magnetic configurations, e.g., [‘ferromagnetic’, ‘antiferromagnetic’]. dft (str): Type of DFT calculation, e.g., ‘VASP’ or ‘QE’.
Look for pymatgen.analysis.magnetism.MagneticStructureEnumerator class for more details. Install Enumlib library: https://github.com/msg-byu/enumlib to run this module.
Example: >>> obj = MpConnect() >>> magnetic_structure(obj, ‘mp-123’, ‘MnO’, [‘ferromagnetic’, ‘antiferromagnetic’], ‘VASP’)
- htesp.magnetic.changeaxis(mpid, comp, dft)[source]¶
Function to change magnetic axis to compute magnetic anisotropy.
Parameters: mpid (str): Material ID. comp (str): Compound name. dft (str): DFT method. Available options: QE/VASP
The function iterates over magnetic axis configurations specified in the saxis variable, updates the necessary input files for VASP calculations, and performs the VASP process.