Skip to content

Commit 81f3c9e

Browse files
authored
Updates for dependencies (especially RDKit and NumPy) (#33)
* Add adjustDegree = False to adjust query params This fixes an issue that changed between RDKit 2024.9.6 and 2025.3.1. Details in rdkit/rdkit#8592 * Update tests for NumPy 2.0+ compatibility * Update pyproject.toml and poetry.lock for 2025-07
1 parent 618f680 commit 81f3c9e

4 files changed

Lines changed: 652 additions & 488 deletions

File tree

pdbeccdutils/core/depictions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def _load_template(self, path):
174174
p = Chem.AdjustQueryParameters()
175175
p.makeAtomsGeneric = True
176176
p.makeBondsGeneric = True
177+
p.adjustDegree = False
177178

178179
mol = Chem.AdjustQueryProperties(mol, p)
179180

pdbeccdutils/tests/test_rdkit_fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_conformer_is_broken_ion():
1212
mol.AddAtom(atom)
1313

1414
conformer = rdkit.Chem.Conformer(1)
15-
atom_position = rdkit.Chem.rdGeometry.Point3D(np.NaN, np.NaN, np.NaN)
15+
atom_position = rdkit.Chem.rdGeometry.Point3D(np.nan, np.nan, np.nan)
1616
conformer.SetAtomPosition(0, atom_position)
1717
mol.AddConformer(conformer, assignId=True)
1818

@@ -37,7 +37,7 @@ def test_conformer_has_broken_atom():
3737

3838
conformer = rdkit.Chem.Conformer(1)
3939
o_position = rdkit.Chem.rdGeometry.Point3D(1, 2, 3)
40-
h_position = rdkit.Chem.rdGeometry.Point3D(np.NaN, np.NaN, np.NaN)
40+
h_position = rdkit.Chem.rdGeometry.Point3D(np.nan, np.nan, np.nan)
4141

4242
conformer.SetAtomPosition(0, o_position)
4343
conformer.SetAtomPosition(1, h_position)

0 commit comments

Comments
 (0)