htesp.magnetic

Creates different magnetic ordering according to MagneticStructureEnumerator functions.

Functions

changeaxis(mpid, comp, dft)

Function to change magnetic axis to compute magnetic anisotropy.

magnetic_structure(obj, mpid, compound, ...)

Functions to generate possible magnetic structures.

main()

Main function to control the workflow.

rewrite_incar(path[, drop, add])

Drop drop keys from an INCAR and append the (key, value) add.

run_vasp_process(what[, cwd])

Run vasp_process.py <what> without a shell, optionally in cwd.

htesp.magnetic.run_vasp_process(what, cwd=None)[source]

Run vasp_process.py <what> without a shell, optionally in cwd.

htesp.magnetic.rewrite_incar(path, drop=(), add=())[source]

Drop drop keys from an INCAR and append the (key, value) add.

The key is matched at the start of the line, so dropping NSW does not also drop NSWRITE the way sed -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.

htesp.magnetic.main()[source]

Main function to control the workflow.

Reads input data, determines the type of calculation and magnetic configuration, and performs the corresponding operations.

Parameters: None

Returns: None