OpenFreeEnergy / OpenFreeEnergy/openfe

Generating charges in the tests

Open
#1,573 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.