Skip to content

Commit c4af00b

Browse files
cbouycbouysset
andauthored
RDKit converter inferring (#4305)
* refactor: move inferring code to separate module * add docs stub * refactor as a class * add template based inferring * handle deprecate NoImplicit * fix tests and add missing TemplateInferer tests * formatting and typing * remaining formating issues and docs * add adjust_hydrogens to TemplateInferer * improve test coverage * more nitpicks * add rdDetermineBonds inferer * address comments and linting * revert auto-formatting * expose STANDARDIZATION_REACTIONS and MONATOMIC_CATION_CHARGES for backwards compatibility * make sanitization optional * fix rdkit support for numpy v2 * fix tests * document usage of rdkit inferers * fix remaining tests rdkit incompatible with numpy 2 * chore: formatting/linting * address comments: bump to 2.10.0, fix docs, formatting, missing tests * chore: rename to inferrer * formatting * fix failing tests --------- Co-authored-by: Cédric Bouysset <[email protected]>
1 parent d036d2a commit c4af00b

File tree

11 files changed

+1260
-632
lines changed

11 files changed

+1260
-632
lines changed

.github/actions/setup-deps/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ inputs:
7575
pytng:
7676
default: 'pytng>=0.2.3'
7777
rdkit:
78-
default: 'rdkit>=2020.03.1'
78+
default: 'rdkit>=2024.03.4' # supports both numpy v1 and v2
7979
scikit-learn:
8080
default: 'scikit-learn'
8181
seaborn:

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
networkx
112112
parmed
113113
pytng>=0.2.3
114-
rdkit>=2020.03.1
114+
rdkit>=2024.03.4
115115
tidynamics>=1.0.0
116116
# remove from azure to avoid test hanging #4707
117117
# "gsd>3.0.0"

package/CHANGELOG

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The rules for this file:
1616
-------------------------------------------------------------------------------
1717
??/??/?? IAlibay, orbeckst, BHM-Bob, TRY-ER, Abdulrahman-PROG, pbuslaev,
1818
yuxuanzhuang, yuyuan871111, tanishy7777, tulga-rdn, Gareth-elliott,
19-
hmacdope, tylerjereddy
19+
hmacdope, tylerjereddy, cbouy
2020

2121

2222
* 2.10.0
@@ -40,6 +40,8 @@ Fixes
4040
directly passing them. (Issue #3520, PR #5006)
4141

4242
Enhancements
43+
* Added `TemplateInferrer` and `RDKitInferrer` dataclasses to the
44+
`RDKitInferring` module to be used by the RDKit converter. (PR #4305)
4345
* Improve speed of GROMOS11 (TRC) reader (Issue #5079, PR #5080)
4446
* Improve parsing of topology information from LAMMPS dump files to allow
4547
reading of mass, charge and element attributes. (Issue #3449, PR #4995)
@@ -63,11 +65,17 @@ Enhancements
6365
MDAnalysisTest.util (PR #5038)
6466

6567
Changes
68+
* Refactored the RDKit converter code to move the inferring code in a separate
69+
`RDKitInferring` module. The bond order and charges inferrer has been move to
70+
an `MDAnalysisInferrer` dataclass in there. (PR #4305)
6671
* Removed undocumented and unused attribute
6772
`analysis.lineardensity.LinearDensity.totalmass` (PR #5007)
6873
* Remove `default` channel from RTD conda env. (Issue # 5036, PR # 5037)
6974

7075
Deprecations
76+
* The RDKit converter parameter `NoImplicit` has been deprecated in favour of
77+
`implicit_hydrogens` and `inferrer` parameters. `max_iter` has been moved
78+
under `MDAnalysisInferrer`. (PR #4305)
7179

7280

7381
03/11/25 IAlibay, ChiahsinChu, RMeli, tanishy7777, talagayev, tylerjereddy,

0 commit comments

Comments
 (0)