You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The MPNMRSet (with mode="efg") writes units to file for the QUAD_EFG setting. This occurs because it is using FloatWithUnit class under the hood.
To Reproduce
frompymatgen.coreimportStructurefrompymatgen.io.vasp.setsimportMPNMRSet# Random structure to test withs=Structure(
lattice=[
[3.485437, 0.0, 2.012318],
[1.161812, 3.286101, 2.012318],
[0.0, 0.0, 4.024635],
],
species=["Na", "Cl"],
coords=[[0.0, 0.0, 0.0], [0.5, 0.5, 0.5]],
)
MPNMRSet(s, mode="efg").incar.write_file("INCAR")
Describe the bug
The MPNMRSet (with mode="efg") writes units to file for the QUAD_EFG setting. This occurs because it is using FloatWithUnit class under the hood.
To Reproduce
This produces the following INCAR:
Expected behavior
The INCAR should instead have the following result for QUAD_EFG:
Desktop:
Additional context
This is a quick, one-line fix. We need to just convert from FloatWithUnit to Float here:
pymatgen/pymatgen/io/vasp/sets.py
Line 1942 in 1b6d1d2
The text was updated successfully, but these errors were encountered: