OpenFreeEnergy / OpenFreeEnergy/openfe
Generating charges in the tests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 331
- Forks
- 56
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 13
Description
I noticed that we generate partial charges in some protocol tests, such as test_dry_run_default_vacuum. In this case, we repeatedly generate the same charges for each sampler type, which is an expensive operation when the charge generation itself is not what is being tested. I think it would be best to have a single explicit test which checks that a protocol is correctly generating charges, and then for all other dry runs to use pre-calculated charges to keep the tests quick, maybe this is something we should come up with a best practice for and add it to the dev guide we plan on making?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with openfe/tests/protocols/openmm_rfe/test_hybrid_top_protocol.py and test_dry_run_default_vacuum, then inspect the other protocol tests that generate partial charges. Identify one explicit charge-generation test and update unrelated dry runs to use pre-calculated charges; done means the charge behavior remains covered while the tests avoid repeated charge generation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100