Skip to content

Commit

Permalink
cli: gather, remove dg-raw option
Browse files Browse the repository at this point in the history
  • Loading branch information
richardjgowers committed Nov 15, 2023
1 parent dcf359a commit 2529f94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions openfecli/commands/gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def _write_raw(legs, writer, allow_partial=True):
writer.writerow([simtype, *ligpair, m, u])


def _write_dg_raw(legs, writer, allow_partial):
def _write_dg_raw(legs, writer, allow_partial): # pragma: no-cover
writer.writerow(["leg", "ligand_i", "ligand_j", "DG(i->j) (kcal/mol)",
"uncertainty (kcal/mol)"])
for ligpair, vals in sorted(legs.items()):
Expand Down Expand Up @@ -279,7 +279,7 @@ def _write_dg_mle(legs, writer, allow_partial):
required=True)
@click.option(
'--report',
type=HyphenAwareChoice(['dg', 'ddg', 'dg-raw', 'raw'],
type=HyphenAwareChoice(['dg', 'ddg', 'raw'],
case_sensitive=False),
default="dg", show_default=True,
help=(
Expand Down Expand Up @@ -314,8 +314,6 @@ def gather(rootdir, output, report, allow_partial):
from DDG replica averages and standard deviations.
* 'ddg' reports pairs of ligand_i and ligand_j, the calculated
relative free energy DDG(i->j) = DG(j) - DG(i) and its uncertainty.
* 'dg-raw' reports the raw results, giving the leg (vacuum, solvent, or
complex), ligand_i, ligand_j, the raw DG(i->j) associated with it.
* 'raw' reports the raw results, which each repeat simulation given
separately (i.e. no combining of redundant simulations is performed)
Expand Down Expand Up @@ -369,7 +367,7 @@ def gather(rootdir, output, report, allow_partial):
writing_func = {
'dg': _write_dg_mle,
'ddg': _write_ddg,
'dg-raw': _write_dg_raw,
# 'dg-raw': _write_dg_raw,
'raw': _write_raw,
}[report.lower()]
writing_func(legs, writer, allow_partial)
Expand Down
2 changes: 1 addition & 1 deletion openfecli/tests/commands/test_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def results_dir(tmpdir):
"""


@pytest.mark.parametrize('report', ["", "dg", "ddg", "dg-raw"])
@pytest.mark.parametrize('report', ["", "dg", "ddg"])
def test_gather(results_dir, report):
expected = {
"": _EXPECTED_DG,
Expand Down

0 comments on commit 2529f94

Please sign in to comment.