Feature/qresfep integration - #120
Open
David-Araripe wants to merge 8 commits into
Open
Conversation
Replace the legacy residue-FEP module with the current QresFEP and setup_resFEP command-line workflows, OPLS-AA/M data, capped reference-peptide construction, analysis, tests, and the T4 lysozyme tutorial. Preserve crystallographic waters and force-field-specific neutralization, use the manuscript-compatible boundary salt-bridge policy, and add reproducible seed vectors, eq5/thermostat controls, optional trajectory output, and safe two-stage cleanup.
Reuse the production mutagenesis helpers in the T4L tutorial, consolidate repeated protocol constants, avoid intermediate allocations, and keep CLI seed generation local without changing seeded vectors. Document installing Open-Source PyMOL in the QligFEP micromamba environment and normalize accidental executable bits on data and module files.
Shorten oversized inline comments, module headers while preserving docstrings and the rationale that help with understanding
Give ASH, GLH, ARN, and LYN the same chi1 atom definitions as their charged parent residues so cross-topology torsions are zeroed correctly. Add regression coverage for all variants and PHE in both mutation directions. This issue was reported in qusers/qligfep#24.
- expose production steps and separate scaling controls - add the manuscript settings preset and fixed seeds - remove the unsupported shell-restraint option - clarify published and charge-changing protocols in the T4L tutorial
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate the dual-topology QresFEP workflow
Summary
This PR replaces the stale
QresFEP.pyimplementation on this repository with the residue-mutation FEP workflow built around the published QresFEP-2 hybrid-topology method implemented on the qusers/qligfep repository. It connects spherical protein preparation, mutation setup, two-stage production, SLURM validation, and analysis through three command-line tools:The workflow now supports both charge-maintaining and charge-changing mutations (manuscript in preparation), records preparation metadata to map user PDB residue numbering to Q topology numbering, and includes the end-to-end T4 lysozyme tutorial included in the qusers/qligfep repo.
Most of the PR's line count comes from the bundled OPLS-AA/M force-field files, T4L structures, and integration tests.
Residue-FEP setup
ASH,GLH,HIP,ARN, andLYN), including cross-topology chi1 torsions. This includes regression coverage for the protonation-variant issue reported in Update/tutorials #24.Preparation and residue mapping
qprep_protnow writesprep.json, which records the sphere centre and radius, force field, total charge, disulfides, and the mapping between the input PDB and Q residue numbering. QresFEP uses this manifest instead of attempting to reconstruct information that is lost after preparation.Related preparation changes:
--strip-crystal-watersrestores the previous removal behavior;Batch setup and reproducibility
setup_resFEPvalidates an entire mutation list before writing calculations, prepares one sphere per mutated residue by default, generates both thermodynamic-cycle legs, and arranges the result as:Mutant coordinates can be generated through the PyMOL executable or supplied as ready-made
<MUTANT><POSITION>.pdbfiles for cluster workflows.The CLI exposes the protocol settings needed for reproducible campaigns, including:
separate_scalingsetting;--manuscript-settingspreset with the fixed settings and seed vector used by the in-preparation charge-changing campaign.Each setup writes
resfep_config.jsonso the effective protocol can be inspected after generation.Run safety
The generated SLURM script keeps both FEP stages in one job because stage 2 starts from stage 1's endpoint. It additionally:
EXITtrap, including runtime, seed, replicate, working directory, and exit status.Analysis
qresfep_analyzediscovers mutations fromFEP_<WT><POSITION><MUT>directory names, sums both FEP stages for each leg, and reports:The resulting CSV contains each leg's estimate and SEM, completed-replicate counts, propagated folding-ddG uncertainty, and failed-replicate counts. Zwanzig, forward, reverse, and BAR estimates are available. Optional experimental data can be used to report RMSE, MUE, and correlation. Missing or unfinished legs remain visible as
NaNresults rather than being silently omitted.Tutorial and documentation
A new
tutorials/T4L/walkthrough covers:It includes the prepared 2LZM structures, neutral and charge-changing mutation lists, PyMOL helper, shell-loop example, protocol rationale, and a distinction between the published 2025 protocol H and the separate in-preparation manuscript preset.
Verification
Focused QresFEP, qprep, template, CLI, and batch-setup tests:
The T4L tutorial was also exercised locally through all pre-submission stages:
qprep_protcompleted normally for the LEU39ALA example;bash -n;Full qdyn production was not run locally because it requires the documented SLURM workload (200 jobs for the ten-mutation, two-leg, ten-replicate example).
Reviewer notes
src/QligFEP/QresFEP.pyis intentionally removed; the replacement is split into focused preparation, chemistry, setup, run, and analysis modules.qprep_protdefault change;--strip-crystal-watersis available for the old behavior.--manuscript-settingsrefers to the separate in-preparation charge-changing campaign, not protocol H from the 2025 QresFEP-2 paper. The tutorial calls out this distinction explicitly.