openforcefield / openff-toolkit

The Open Forcefield Toolkit provides implementations of the SMIRNOFF format, parameterization engine, and other tools. Documentation available at http://open-forcefield-toolkit.readthedocs.io
http://openforcefield.org
MIT License
301 stars 88 forks source link

Add example demonstrating use of `charge_from_molecules` #1850

Open mattwthompson opened 3 months ago

mattwthompson commented 3 months ago

Is your feature request related to a problem? Please describe.

Users, especially those adapting OpenFF tools and force fields outside of conventional drug discovery applications, commonly use large molecules for which AM1-BCC takes a long time to run. We have a shortcut charge_from_molecules that effectively allows the user to opt-in to caching these charges. What we don't have, however, is a self-contained example that demonstrates its use (and only its use). I can link to API docs, but it's slightly more involved than that because they need to store the charges alongside a Moleculeobject(s), not just have them in an array somewhere.

Describe the solution you'd like

A relatively short example I can link to instead of explaining it again each time this comes up.

Describe alternatives you've considered

Just repeating myself every time it comes up.

Additional context

Some of us want charge_from_molecules to go away (#806). I'm one of those people. Unfortunately, there's been no movement in years and I don't think we can assume it's going to be removed shortly. Arguably NAGL will makes this obsolete at which point it is released for general use, but I don't believe there's a push to remove charge_from_molecules from the API.