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
302 stars 88 forks source link

Speed up parameter assignment by reversing order? #51

Open davidlmobley opened 6 years ago

davidlmobley commented 6 years ago

Chris Bayly relays a point from Stan Wlodek at OpenEye -- we could make parameter assignment run substantially faster by simply reversing the order of our files and assigning parameters in "first one wins" order. That is, by processing the most specialized SMIRKS patterns first, we can assign most of the parameters and only have to assign generic parameters to relatively few or no cases, potentially giving substantial speedups.

I'll have to think about whether this could be implemented without major architectural changes. However, it IS worth noting that assignment of a full SMIRNOFF99Frosst force field to a nontrivial system can take a noticeable amount of time, and this seems like it could make it substantially faster. Compared to the cost of doing something like a free energy calculation, this cost is still trivial, but it might be worth investigating this at some point.

jchodera commented 6 years ago

it IS worth noting that assignment of a full SMIRNOFF99Frosst force field to a nontrivial system can take a noticeable amount of time

We're going to have to do a ton of optimization to scale to assignment of biomolecules. This is a good idea that should be something we can implement internally with zero external changes---we can just reverse the order in which we enumerate a branch of the XML tree.