dfttk.magnetism

Module for magnetic analysis of VASP calculations.

dfttk.magnetism.determine_magnetic_ordering(df, magmom_tolerance=0.05, total_magnetic_moment_tolerance=0.1)[source]

Determines the magnetic ordering of a structure from the magnetization data in a pandas DataFrame. e.g. ‘FM’, ‘AFM’, ‘FiM’, ‘NM’, ‘SF’.

Parameters:
  • df (DataFrame) – a pandas DataFrame containing the magnetization data from extract_tot_mag_data.

  • magmom_tolerance (float) – the tolerance for the total magnetic moment on each atom to be considered zero. Defaults to 0.05 to handle floating point errors.

  • total_magnetic_moment_tolerance (float) – the tolerance for the sum of the total magnetic moments for each atom. Defaults to 0.1 to handle floating point errors.

Returns:

the magnetic ordering of the structure.

Return type:

str

dfttk.magnetism.get_magnetic_structure(poscar, outcar)[source]

Combines the magmom data from the OUTCAR file with the structure from the POSCAR file to return a pymatgen magnetic structures object (e.g. structures with associated magmom tags).

Parameters:
  • poscar (str) – path to the POSCAR file.

  • outcar (str) – path to the OUTCAR file.

Returns:

pymatgen Structure object with magmom tags.

Return type:

Structure