From 90906173a2e7a44a28cba3846dc9e618266d7ffa Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Tue, 19 May 2026 11:15:19 -0500 Subject: [PATCH 1/2] Add AshGC to `Molecule.assign_partial_charges` docstring --- openff/toolkit/topology/molecule.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/openff/toolkit/topology/molecule.py b/openff/toolkit/topology/molecule.py index 24097677c..6710dd7ba 100644 --- a/openff/toolkit/topology/molecule.py +++ b/openff/toolkit/topology/molecule.py @@ -2573,6 +2573,7 @@ def assign_partial_charges( Supported charge methods vary from toolkit to toolkit, but some supported methods are: + - ``"openff-gnn-am1bcc-1.0.0.pt"``, codename "AshGC" - ``"am1bcc"`` - ``"am1bccelf10"`` (requires OpenEye Toolkits) - ``"am1-mulliken"`` @@ -2583,7 +2584,9 @@ def assign_partial_charges( in the charge calculation. Instead, any conformers needed for the charge calculation are generated by this method. If this behavior is undesired, specific conformers can be provided via the - ``use_conformers`` argument. + ``use_conformers`` argument. These options do not apply to charges + generated from graph-convolutional neural networks (GCNNs) like + AshGC, which do not use conformers at all. ELF10 methods will neither fail nor warn when fewer than the expected number of conformers could be generated, as many small @@ -2597,6 +2600,8 @@ def assign_partial_charges( For more supported charge methods and their details, see the corresponding methods in each toolkit wrapper: + - :meth:`NAGLToolkitWrapper.assign_partial_charges \ + ` - :meth:`OpenEyeToolkitWrapper.assign_partial_charges \ ` - :meth:`RDKitToolkitWrapper.assign_partial_charges \ @@ -2606,6 +2611,11 @@ def assign_partial_charges( - :meth:`BuiltInToolkitWrapper.assign_partial_charges \ ` + For more on some charge methods supported by SMIRNOFF force fields such as Sage, + see the following sections of the SMIRNOFF specification: + + .. _NAGLCharges: https://openforcefield.github.io/standards/standards/smirnoff/\ + #naglcharges-use-a-specified-nagl-model-file-for-charge-assignment .. _ToolkitAM1BCC: https://openforcefield.github.io/standards/standards/smirnoff/\ #toolkitam1bcc-temporary-support-for-toolkit-based-am1-bcc-partial-charges @@ -2633,6 +2643,11 @@ def assign_partial_charges( Examples -------- + Assign AshGC charges to a long alkane: + + >>> c200 = Molecule.from_smiles(200 * "C") + >>> c200.assign_partial_charges("openff-gnn-am1bcc-1.0.0.pt") + Generate AM1 Mulliken partial charges. Conformers for the AM1 calculation are generated automatically: From 63bfdf19cd84b69f7d65e5a6ec43fdc3ceac567d Mon Sep 17 00:00:00 2001 From: Jeff Wagner Date: Wed, 12 Aug 2026 11:29:13 -0700 Subject: [PATCH 2/2] update releasenotes --- docs/releasehistory.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/releasehistory.md b/docs/releasehistory.md index ec3d40f93..fe47a5a13 100644 --- a/docs/releasehistory.md +++ b/docs/releasehistory.md @@ -18,7 +18,8 @@ Releases follow the `major.minor.micro` scheme recommended by [PEP440](https://w ### Improved documentation and warnings -- [PR #2156](https://github.com/openforcefield/openff-toolkit/pull/2156): Update `ForceField.label_molecules` docstring +- [PR #2156](https://github.com/openforcefield/openff-toolkit/pull/2156): Update `ForceField.label_molecules` docstring. +- [PR #2185](https://github.com/openforcefield/openff-toolkit/pull/2185): Update `Molecule.assign_partial_charges` docstring to have examples of using AshGC. ### Miscellaneous improvements