Skip to content

Commit

Permalink
Add "how are charges assigned?" section to FAQ (#1849)
Browse files Browse the repository at this point in the history
* Add charge method section to FAQ

* Update FAQ.md

* Update FAQ.md

* update releasehistory

---------

Co-authored-by: Jeff Wagner <[email protected]>
Co-authored-by: Jeff Wagner <[email protected]>
  • Loading branch information
3 people authored Apr 1, 2024
1 parent c23b4a6 commit c7a0ba1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Parameter files used by typical molecular dynamics simulation packages do not cu
For example, one could take a structure file and infer bond orders based on bond lengths, or attempt to infer bond orders from force constants in a parameter file.
Such inference work is outside the scope of SMIRNOFF.


## What about starting from a PDB file?

PDB files do not in general provide the chemical identity of small molecules contained therein, and thus do not provide suitable starting points for applying SMIRNOFF to small molecules.
Expand Down Expand Up @@ -95,6 +94,18 @@ source ~/miniconda3/etc/profile.d/conda.sh

and then try rerunning and/or reinstalling the Toolkit.

## How are partial charges assigned in a SMIRNOFF force field?

There are [many charge methods](https://openforcefield.github.io/standards/standards/smirnoff/#partial-charge-and-electrostatics-models) supported by the SMIRNOFF specification. With the exception of water, mainline OpenFF force fields only use AM1-BCC (through `ToolkitAM1BCC`) to assign partial charges. (A future biopolymer force field will likely use library charges for standard residues.)

If OpenEye Toolkits are installed and licensed, the ELF10 variant of AM1-BCC is used. OpenEye's Quacpac (`oequacpac.OEAM1BCCELF10Charges`) is used to generate partial charges.

Otherwise, RDKit is used to generate a conformer which is passed to AmberTool's `sqm` (with `-c bcc`).

Note that, because of differences with the ELF10 variant and other subtle differences between OpenEye Toolkits and RDKit/AmberTools, **assigned partial charges can be expected to differ** based on the available toolkit(s). These numerical differences are often minor but in some molecules or use cases can be significant.

A future charge method may use [NAGL](https://github.com/openforcefield/openff-nagl) to assign partial charges from a graph-convolutional neural network instead of an underlying semi-empirical method. This approach is anticipated to be faster, more scalable, and more consistent than current approaches. As of March 2024, this is under development and not released for general use.

## The partial charges generated by the toolkit don't seem to depend on the molecule's conformation! Is this a bug?

No! This is the intended behavior. The force field parameters of a molecule should be independent of both their chemical environment and conformation so that they can be used and compared across different contexts. When applying AM1BCC partial charges, the toolkit achieves a deterministic output by ignoring the input conformation and producing several new conformations for the same molecule. Partial charges are then computed based on these conformations. This behavior can be controlled with the `use_conformers` argument to [Molecule.assign_partial_charges()](openff.toolkit.topology.Molecule.assign_partial_charges).
Expand Down
1 change: 1 addition & 0 deletions docs/releasehistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Releases follow the `major.minor.micro` scheme recommended by [PEP440](https://w
- [PR #1796](https://github.com/openforcefield/openff-toolkit/pull/1796): Update docs tooling and fix warnings
- [PR #1786](https://github.com/openforcefield/openff-toolkit/pull/1786): Describe contributing to documentation notebooks in developers guide.
- [PR #1845](https://github.com/openforcefield/openff-toolkit/pull/1845): Update convert_all_strings_to_quantity docstring.
- [PR #1849](https://github.com/openforcefield/openff-toolkit/pull/1849): Add "how are charges assigned?" section to FAQ.

## 0.15.2

Expand Down

0 comments on commit c7a0ba1

Please sign in to comment.