Skip to content

feat(steering): add FKC steered denoiser with RMSD/FNC CVs and examples#214

Merged
nw13slx merged 5 commits into
mainfrom
yuxie1/fkc-steering-v2
May 28, 2026
Merged

feat(steering): add FKC steered denoiser with RMSD/FNC CVs and examples#214
nw13slx merged 5 commits into
mainfrom
yuxie1/fkc-steering-v2

Conversation

@YuuuXie
Copy link
Copy Markdown
Collaborator

@YuuuXie YuuuXie commented May 12, 2026

Add Feynman-Kac Control (FKC) steering denoiser and supporting components:

Source code:

  • steering/dpm_fkc.py: FKC steered denoiser with analytical Girsanov weights
  • steering/collective_variables.py: Add RMSD, FractionNativeContacts CVs
  • steering/potentials.py: Add LinearPotential
  • steering/utils.py: Add compute_sequence_alignment, kabsch_align
  • denoiser.py: Add GuidedScore dataclass for FKC pre-scaled scores
  • config/steering/cv_steer.yaml: FKC steering config example
  • toy_gmm.py: 1D Gaussian mixture model for toy examples

Examples:

  • notebooks/fkc_steering.py: FKC steering toy demonstration
  • notebooks/gmm_umbrella_mbar.py: GMM umbrella sampling with MBAR analysis

Tests:

  • test_integration.py: FKC integration, ODE consistency, cv_steer config tests
  • test_potentials.py: LinearPotential unit tests
  • test_utils.py: Sequence alignment tests
  • test_steering_numerically.py: Numerical validation on GMM

YuuuXie and others added 3 commits May 12, 2026 14:05
Add Feynman-Kac Control (FKC) steering denoiser and supporting components:

Source code:
- steering/dpm_fkc.py: FKC steered denoiser with analytical Girsanov weights
- steering/collective_variables.py: Add RMSD, FractionNativeContacts CVs
- steering/potentials.py: Add LinearPotential
- steering/utils.py: Add compute_sequence_alignment, kabsch_align
- denoiser.py: Add GuidedScore dataclass for FKC pre-scaled scores
- config/steering/cv_steer.yaml: FKC steering config example
- toy_gmm.py: 1D Gaussian mixture model for toy examples

Examples:
- notebooks/fkc_steering.py: FKC steering toy demonstration
- notebooks/gmm_umbrella_mbar.py: GMM umbrella sampling with MBAR analysis

Tests:
- test_integration.py: FKC integration, ODE consistency, cv_steer config tests
- test_potentials.py: LinearPotential unit tests
- test_utils.py: Sequence alignment tests
- test_steering_numerically.py: Numerical validation on GMM

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ove toy_gmm, clean tests

- Rename 'Feynman-Kac Control' to 'Feynman-Kac Corrector' everywhere
- Clarify SMC (unbiased denoising) vs FKC (biased by reward) in README
- Remove '(SMC only)' from ess_threshold docs (FKC uses it too)
- Replace manual residue loop with topology.to_fasta() in RMSD CV
- Remove decorative # === separator comment blocks
- Move toy_gmm.py from src/bioemu/ to notebooks/ (not core library)
- Remove trivial/redundant tests, tighten loose threshold (10.0 -> 1.0)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@YuuuXie YuuuXie marked this pull request as ready for review May 26, 2026 08:41
YuuuXie and others added 2 commits May 26, 2026 01:50
…ack formatting

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

Summary

Summary
Generated on: 05/26/2026 - 10:20:28
Parser: Cobertura
Assemblies: 5
Classes: 32
Files: 32
Line coverage: 86.4% (2182 of 2524)
Covered lines: 2182
Uncovered lines: 342
Coverable lines: 2524
Total lines: 8079
Covered branches: 0
Total branches: 0
Method coverage: Feature is only available for sponsors

Coverage

src.bioemu - 89%
Name Line Branch
src.bioemu 89% ****
init.py 100%
chemgraph.py 100%
convert_chemgraph.py 97%
denoiser.py 98.3%
get_embeds.py 92.1%
md_utils.py 85.8%
model_utils.py 78%
models.py 94.1%
run_hpacker.py 0%
sample.py 92.2%
sde_lib.py 88.3%
seq_io.py 100%
shortcuts.py 100%
sidechain_relax.py 75%
so3_sde.py 90.3%
structure_module.py 84.3%
utils.py 65.6%
src.bioemu.colabfold_inline - 79.1%
Name Line Branch
src.bioemu.colabfold_inline 79.1% ****
init.py
features.py 100%
input_parsing.py 100%
model_runner.py 99%
msa_client.py 60.8%
src.bioemu.hpacker_setup - 69.2%
Name Line Branch
src.bioemu.hpacker_setup 69.2% ****
init.py
setup_hpacker.py 69.2%
src.bioemu.steering - 79.5%
Name Line Branch
src.bioemu.steering 79.5% ****
init.py 100%
collective_variables.py 34.8%
dpm_fkc.py 100%
dpm_smc.py 100%
potentials.py 95.3%
utils.py 83.5%
src.bioemu.training - 100%
Name Line Branch
src.bioemu.training 100% ****
foldedness.py 100%
loss.py 100%

Copy link
Copy Markdown

@nw13slx nw13slx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rubber stamp

@nw13slx nw13slx merged commit 53e73d7 into main May 28, 2026
7 checks passed
@nw13slx nw13slx deleted the yuxie1/fkc-steering-v2 branch May 28, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants