Skip to content

Commit af559fa

Browse files
committed
insert debug tags
1 parent ebfd917 commit af559fa

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/pymatgen/analysis/eos.py

+7
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ def b0(self) -> float:
143143
@property
144144
def b0_GPa(self) -> FloatWithUnit:
145145
"""The bulk modulus in GPa. This assumes the energy and volumes are in eV and Ang^3."""
146+
print(f"{self.b0=}")
147+
print("unit conversion:", FloatWithUnit(1, "eV ang^-3").to("GPa")) # DEBUG: scipy const
148+
import scipy
149+
150+
print(f"scipy version: {scipy.__version__}")
151+
152+
print(f"BLAS implementation: {np.show_config()}")
146153
return FloatWithUnit(self.b0, "eV ang^-3").to("GPa")
147154

148155
@property

tests/analysis/test_eos.py

+3
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@ def test_numerical_eoswrapper(self):
425425
def test_numerical_eos_values(self):
426426
assert_allclose(self.num_eos_fit.e0, -10.84749, atol=1e-3)
427427
assert_allclose(self.num_eos_fit.v0, 40.857201, atol=1e-1)
428+
print(f"{self.num_eos_fit.b0=}")
429+
print(f"{self.num_eos_fit.b0_GPa=}")
430+
428431
assert_allclose(self.num_eos_fit.b0, 0.55, atol=1e-2)
429432
assert_allclose(self.num_eos_fit.b0_GPa, 89.0370727, atol=1e-1)
430433
assert_allclose(self.num_eos_fit.b1, 4.344039, atol=1e-2)

0 commit comments

Comments
 (0)