[Debichem-devel] Bug#1118027: pymatgen: test_packmol test_atoms_constraints fails on various architectures
Drew Parsons
dparsons at debian.org
Mon Oct 13 23:41:41 BST 2025
Source: pymatgen
Version: 2025.10.7+dfsg1-1
Severity: serious
Justification: FTBFS
X-Debbugs-Cc: debian-arm at lists.debian.org, debian-loongarch at lists.debian.org, debian-powerpc at lists.debian.org
User: debian-arm at lists.debian.org
Usertags: arm64
User: debian-powerpc at lists.debian.org
Usertags: ppc64 ppc64el
User: debian-qa at lists.debian.org
Usertags: i386
User: debian-loongarch at lists.debian.org
Usertags: loong64
Control: forwarded -1 https://github.com/materialsproject/pymatgen/issues/4519
pymatgen 2025.10.7 FTBFS on arm64, ppc64el, i386, loong64, ppc64
in packmol tests
=================================== FAILURES ===================================
____________________ TestPackmolSet.test_atoms_constraints _____________________
self = <test_packmol.TestPackmolSet object at 0xffff7443e350>
def test_atoms_constraints(self):
"""
Test individual constraints.
"""
pw = PackmolBoxGen(
inputfile="input.in",
outputfile=Path("output.xyz"),
stdoutfile=Path("stdout.txt"),
control_params={"precision": 0.001},
).get_input_set(
molecules=[
{
"name": "water",
"number": 5,
"coords": water,
"constraints": ["inside sphere 0 0 0 10"],
"atoms_constraints": [
{"indices": [2], "constraints": ["inside sphere 0 0 0 5"]},
{"indices": [0, 1], "constraints": ["outside sphere 0 0 0 5.5"]},
],
},
],
)
pw.write_input(f"{self.tmp_path}/with_atoms_constraints")
assert os.path.isfile(f"{self.tmp_path}/with_atoms_constraints/input.in")
with open(f"{self.tmp_path}/with_atoms_constraints/input.in") as f:
inp = f.read()
assert ("\n atoms 3\n inside sphere 0 0 0 5\n end atoms\n") in inp
assert ("\n atoms 1 2\n outside sphere 0 0 0 5.5\n end atoms\n") in inp
pw.run(f"{self.tmp_path}/with_atoms_constraints")
assert os.path.isfile(f"{self.tmp_path}/with_atoms_constraints/output.xyz")
assert os.path.isfile(f"{self.tmp_path}/with_atoms_constraints/stdout.txt")
out = Molecule.from_file(f"{self.tmp_path}/with_atoms_constraints/output.xyz")
assert out.composition.num_atoms == 15
for site in out:
if site.specie.symbol == "H":
> assert np.linalg.norm(site.coords) >= 5.49
E AssertionError: assert np.float64(5.483361163873123) >= 5.49
E + where np.float64(5.483361163873123) = <function norm at 0xffff905acff0>(array([ 3.1658, 0.0496, -4.4769]))
E + where <function norm at 0xffff905acff0> = <module 'numpy.linalg' from '/usr/lib/python3/dist-packages/numpy/linalg/__init__.py'>.norm
E + where <module 'numpy.linalg' from '/usr/lib/python3/dist-packages/numpy/linalg/__init__.py'> = np.linalg
E + and array([ 3.1658, 0.0496, -4.4769]) = Site: H (3.1658, 0.0496, -4.4769).coords
/build/reproducible-path/pymatgen-2025.10.7+dfsg1/.pybuild/test_python3.13/tests/io/test_packmol.py:427: AssertionError
...
= 1 failed, 2689 passed, 159 skipped, 294 deselected, 10 xfailed, 2 xpassed, 77 warnings in 1227.19s (0:20:27) =
More information about the Debichem-devel
mailing list