Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
|
I'd like to briefly table this while we sort out openforcefield/openff-interchange#1431, but probably keep these tests in either way |
mattwthompson
left a comment
There was a problem hiding this comment.
Approved pending two blocking comments; I'm not asking to re-review but can if you think that would be valuable.
Please also
- update docstring/comments to the new implementation; IIUC since vdW handlers no longer need to be added when vdW parameters aren't being fit, they shouldn't be added or present in system subsets.
- add a one-liner in the release notes, doesn't need to be well-formatted
| topology=topology, | ||
| ) | ||
|
|
||
| # Should have both bond force and nonbonded force (for vdW) |
There was a problem hiding this comment.
| # Should have both bond force and nonbonded force (for vdW) | |
| # Should have bond force and no nonbonded force (for vdW) |
I assume this is just an out-of-date comment
| # Create a dummy topology | ||
| topology: Topology = Molecule.from_mapped_smiles("[Cl:1][H:2]").to_topology() |
There was a problem hiding this comment.
(non-blocking) This could be a fixture
| """Test that vdW handler is automatically included when dealing with Constraints. | ||
|
|
||
| This tests the new code addition that includes vdW for valence terms. | ||
| """ |
There was a problem hiding this comment.
| """Test that vdW handler is automatically included when dealing with Constraints. | |
| This tests the new code addition that includes vdW for valence terms. | |
| """ | |
| """ | |
| Test that no forces exist in a system subset designed for use with (only) constraints. | |
| """ |
From the code I assume this is the intended behavior.
(blocking) This seems weird - can you actually fit constraints, or anything, when no forces are added?
| topology=topology, | ||
| ) | ||
|
|
||
| # Should have nonbonded force (for vdW) even though we're dealing with constraints |
There was a problem hiding this comment.
| # Should have nonbonded force (for vdW) even though we're dealing with constraints | |
| # Should have no forces since no force-bearing handlers are in this gradient |
| """Test that vdW handler is automatically included when dealing with Angles. | ||
|
|
||
| This tests the new code addition that includes vdW for valence terms. | ||
| """ |
There was a problem hiding this comment.
| """Test that vdW handler is automatically included when dealing with Angles. | |
| This tests the new code addition that includes vdW for valence terms. | |
| """ | |
| """ | |
| Test basic behavior of creating system subsets for angle parameters | |
| """ |
| """Test that vdW handler is automatically included when dealing with ProperTorsions. | ||
|
|
||
| This tests the new code addition that includes vdW for valence terms. | ||
| """ |
There was a problem hiding this comment.
| """Test that vdW handler is automatically included when dealing with ProperTorsions. | |
| This tests the new code addition that includes vdW for valence terms. | |
| """ | |
| """ | |
| Test basic behavior of creating system subsets for torsion parameters from a minimal force field | |
| """ |
| """Test that vdW handler is automatically included when dealing with ImproperTorsions. | ||
|
|
||
| This tests the new code addition that includes vdW for valence terms. | ||
| """ |
There was a problem hiding this comment.
| """Test that vdW handler is automatically included when dealing with ImproperTorsions. | |
| This tests the new code addition that includes vdW for valence terms. | |
| """ | |
| """ | |
| Test basic behavior of creating system subsets for torsion parameters from a "full" force field | |
| """ |
| ) | ||
|
|
||
| # The system should be created successfully with NAGL handler registered | ||
| assert system.getNumForces() >= 1 |
There was a problem hiding this comment.
(blocking) would like this constraint to be =, I think it should still be 1?
| assert system.getNumForces() >= 1 | |
| assert system.getNumForces() == 1 |
Description
Fixes #727 by adding vdW forces to the system_subset and a bunch of tests.