This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Conversation
…dechain atoms in Residue
…default ResidueId
…eries and disulfide bond handling
…ucts and builders
…h in test configurations
…AnalysisContext structs
…due selection logic
…te and energy term
…ty and efficiency
…final refinement with improved iteration handling
…g for optimization solutions
… logic for cleaner code
…State for clarity and performance
…e solution handling
…esult struct definition
29 tasks
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements an absolute energy model that calculates physically meaningful total system energy values by introducing a fixed energy offset from static system components. The refactor streamlines parameterization through a new TopologyRegistry and separates rotamer placement logic from the rotamer library.
Key changes include:
- Implementation of absolute energy calculation via
fixed_energytask and updated scoring workflow - Introduction of TopologyRegistry for centralized topology management
- Streamlined forcefield parameterization and rotamer library structure
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| data/topology/registry.toml | Simplified topology registry by removing unused fields (exact_match_atoms, connection_points) |
| crates/scream-core/src/workflows/place.rs | Major refactor implementing absolute energy workflow and streamlined optimization phases |
| crates/scream-core/src/engine/tasks/total_energy.rs | Removed entire file as functionality moved to main workflow |
| crates/scream-core/src/engine/tasks/mod.rs | Updated module exports to reflect new task structure |
| crates/scream-core/src/engine/tasks/interaction_energy.rs | New task for calculating pairwise interactions between active residue sidechains |
| crates/scream-core/src/engine/tasks/fixed_energy.rs | New task for calculating constant energy offset from fixed system components |
| crates/scream-core/src/engine/tasks/el_energy.rs | Enhanced EL energy calculation with current energy computation capability |
| crates/scream-core/src/engine/tasks/doublet_optimization.rs | Updated to use TopologyRegistry instead of placement info |
| crates/scream-core/src/engine/state.rs | Enhanced Solution struct to track both total energy and optimization score |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary:
Refactors the core energy model to calculate absolute total system energy, moving away from a relative optimization score. This is achieved by introducing a new
fixed_energytask that computes a constant energy offset from all non-optimizable parts of the system (e.g., static backbone, environment, fixed sidechains). The final energy of any solution is now the sum of this fixed offset, the pre-computed EL energy, and the pairwise interaction energy. This change provides more physically meaningful energy values.This refactoring also significantly streamlines the parameterization and data loading pipeline. Topology information is now managed by a dedicated
TopologyRegistry, loaded from a single file, which decouples rotamer placement logic from the rotamer library itself. Consequently, the forcefield and rotamer libraries are now simpler and more focused.Changes:
Implemented Absolute Energy Model:
fixed_energy.rs: A new task that calculates the interaction energy of all static parts of the system (backbone, fixed sidechains, water, ligands) to establish a constant energy offset.total_energy.rs: Removed this task and integrated its logic into the main workflow, which now combines the fixed energy offset, EL energy, and interaction energy to report an absolute total energy for each solution.Solution: TheSolutionstruct in theengine::statemodule was updated to store bothtotal_energyandoptimization_score.Introduced Topology Registry:
topology/registry.rs: Created aTopologyRegistryto load and manage residue topology definitions (anchor and sidechain atoms) from a single TOML file (registry.toml).RotamerLibraryno longer loads placement info; instead, it and the placement functions consume theTopologyRegistry.--topology-registrypath.Streamlined
forcefieldandrotamerModules:forcefield/parameterization.rs: TheParameterizeris now responsible for assigning atom roles (Backbone,Sidechain, etc.) based on theTopologyRegistry. It was simplified by removing the logic for building bonds and assigning charges, which are now defined in the rotamer library.rotamer/library.rs: The rotamer library loader now also loads intra-rotamer bond information from the TOML file, making rotamers self-contained topological units.Atomstruct now includes anAtomRoleenum to clearly define its function.Enhanced I/O and CLI:
io/sorting.rs: Introduced a canonical atom sorter for generating deterministic and clean BGF output. The oldutils::identifiersmodule was removed in favor of this more comprehensive system.io/bgf.rs: The BGF writer was completely refactored to use the new canonical sorter, renumbering all atoms sequentially and producing clean, standard-compliant files.cli.rs: The CLI help text for output files was improved to detail the available placeholders ({energy},{score}, etc.).Performance and Reliability Improvements:
Scorernow correctly excludes 1-2 and 1-3 bonded interactions from non-bonded calculations.Atomstruct asCachedVdwParam, improving performance by avoiding repeated string-based lookups.