Bug#1118027: pymatgen: test_packmol test_atoms_constraints fails on various architectures

Drew Parsons <[email protected]>
Newsgroups gmane.linux.debian.ports.powerpc
Message-ID <176039530109.2669507.3541152463605023484.reportbug__37269.2299586319$1760395415$gmane$org@sandy>
Source: pymatgen
Version: 2025.10.7+dfsg1-1
Severity: serious
Justification: FTBFS
X-Debbugs-Cc: [email protected], [email protected], [email protected]
User: [email protected]
Usertags: arm64
User: [email protected]
Usertags: ppc64 ppc64el
User: [email protected]
Usertags: i386
User: [email protected]
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) =
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.