Repository navigation
make ambertools optional - #462
mikemhenry wants to merge 14 commits into
Conversation
* gracefully handle the case where ambertools isn't installed * put onto test pypi
for more information, see https://pre-commit.ci
…ing if `AmberToolsToolkitWrapper.is_available()`
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #462 +/- ##
==========================================
+ Coverage 84.48% 84.52% +0.04%
==========================================
Files 5 5
Lines 799 808 +9
==========================================
+ Hits 675 683 +8
- Misses 124 125 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| if exc.name != "parmed": | ||
| raise | ||
| raise RuntimeError( | ||
| "ParmEd is required for GAFF parameter assignment. Install it with: pip install parmed" |
There was a problem hiding this comment.
I'm not sure about the explicit recommendation to install with pip here, since users might still install OpenMMForceFields with conda (in which case it is probably better to avoid creating an environment in which packages have been installed with both conda and pip).
There was a problem hiding this comment.
My thinking here is that if the package is installed with conda, then they will have parmed and ambertools, if the install it via pip, then they could be missing parmed but have ambertools in their path, so it felt like the only edge case here is solved with a pip install.
|
|
||
| # Should not point to any valid force field | ||
| with pytest.raises(ValueError, match="Can't load or parse specified SMIRNOFF"): | ||
| SMIRNOFFTemplateGenerator(forcefield="openff_unconstrained-2.0.0") |
There was a problem hiding this comment.
Should this and two more below be changed to 2.3.0 (just for consistency's sake even though none of these are being used for parameterization)?
There was a problem hiding this comment.
Good idea! It just has be invalid so we can make it still be invalid but look more consistent
Co-authored-by: Evan Pretti <pretti@stanford.edu>
…s-optional' into feat/make-ambertools-optional
This PR makes ambertools optional for using openmmforcefields to apply a Open Force Field Initiative force field and is only needed when using a GAFF force field.
It also updates the Open Force Field Initiative force field tests to use nagl for charges instead of am1bcc.