Conversation
…sts with construction and equality checks
…ith implementation
…aming for consistency
… use 'atoms' tuple
…propers' with 'torsions' and 'inversions'
…opers' with 'torsions' and 'inversions'
…s' with 'torsions' and 'inversions'
…es and refined assertions
…tial with TorsionPotential and ImproperPotential with InversionPotential
…tial type standardization
… align with standardization
…el and rename terms
…e default function
21 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the model::topology module to standardize potential energy structures with the dreid-kernel library's API. All potential types now store precomputed, kernel-ready parameters instead of raw physical constants, eliminating redundant computations during energy evaluation and providing a clean interface for future simulation kernels.
Changes:
- Integrated
dreid-kernelv0.4.1 for precomputing optimized potential parameters from physical constants - Renamed and restructured all potential types:
DihedralPotential→TorsionPotential,ImproperPotential→InversionPotential,Exponential6→Buckingham - Updated all potential structs to store precomputed values (e.g.,
k_half,cos_n_phi0,r_hb_sq) and consolidated atom indices into tuples - Added
CosineLinearangle potential variant for 180° equilibrium angles - Updated default parameters TOML to explicitly include
vdw_zetafor all atom types (removing the default value function) - Comprehensive test coverage for all new structures and precomputation logic
Reviewed changes
Copilot reviewed 15 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/model/topology.rs |
Refactored potential enums/structs with precomputed parameters; renamed DihedralPotential→TorsionPotential, ImproperPotential→InversionPotential; added comprehensive unit tests |
src/forge/paramgen.rs |
Integrated dreid-kernel precompute functions; updated all parameter generation to use kernel API; added extensive test coverage |
src/forge/intermediate.rs |
Renamed IntermediateDihedral→IntermediateTorsion, IntermediateImproper→IntermediateInversion; updated field names to match dreid-typer v0.5.0 |
src/forge/typer.rs |
Updated topology application to use renamed torsion/inversion structures and new field names from dreid-typer |
src/forge/params.rs |
Changed TorsionParams.periodicity from i32 to u8; removed default_vdw_zeta() function; clarified documentation |
src/forge/config/potential.rs |
Renamed AnglePotentialType: CosineHarmonic→Cosine, ThetaHarmonic→Theta; VdwPotentialType: Exponential6→Buckingham; updated default to Cosine |
src/forge/config/mod.rs |
Updated default config to use AnglePotentialType::Cosine instead of ThetaHarmonic |
src/forge/mod.rs |
Updated integration tests to use renamed potential collections (torsions, inversions) |
src/lib.rs |
Updated public API exports and documentation to reflect renamed types and new nomenclature |
src/bin/dforge/cli.rs |
Updated CLI enums and defaults; changed default angle potential argument to "cosine" |
src/bin/dforge/util/convert.rs |
Updated CLI→config type conversions for renamed angle and VdW potential types |
src/bin/dforge/commands/chem.rs |
Updated display strings for new angle potential type names |
src/bin/dforge/commands/bio.rs |
Updated display strings for new angle potential type names |
src/bin/dforge/display/tables.rs |
Updated parameter table labels: "Dihedrals"→"Torsions", "Impropers"→"Inversions" |
resources/default.params.toml |
Version bump to 1.1.0; added explicit vdw_zeta values for all atom types; minor parameter value updates |
Cargo.toml |
Added dreid-kernel = "0.4.1"; updated dreid-typer to "0.5.0"; fixed typo "chemoinformatics"→"cheminformatics" |
README.md |
Updated documentation to reflect new terminology and added dreid-kernel to dependency table |
MANUAL.md |
Updated CLI documentation with new angle potential default and simplified option descriptions |
ARCHITECTURE.md |
Comprehensive documentation updates throughout; added dreid-kernel integration details; updated all diagrams and tables |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary:
Refactored the
model::topologymodule to align potential energy structures with thedreid-kernellibrary's API. All potential types (BondPotential,AnglePotential, etc.) now store precomputed, kernel-ready parameters (e.g.,k_half,cos_n_phi0) instead of raw physical constants. This eliminates redundant computations during energy evaluation and standardizes the interface between the parameter generation layer and future simulation kernels.Changes:
Integrated
dreid-kernel:dreid-kernelv0.4.1 dependency.paramgen.rsto usedreid-kernel'sprecompute()functions for converting physical constants (from TOML) into optimized kernel parameters.Standardized Potential Structs:
Harmonicto storek_halfandr0. UpdatedMorseto storede,alpha,r0.CosineLinearfor 180° angles. UpdatedCosineHarmonicto storec_halfandcos0. UpdatedThetaHarmonicto storek_halfandtheta0.DihedralPotentialtoTorsionPotential. Now storesv_half,n,cos_n_phi0, andsin_n_phi0.ImproperPotentialtoInversionPotential. Now storesc_half(andcos_psi0for Umbrella).Exponential6toBuckingham. Now storesr_max_sqandtwo_e_maxfor proper energy reflection handling.HBondPotentialto stored_hbandr_hb_sq.Refactored Topology Model:
Potentialsstruct fields:dihedrals→torsions,impropers→inversions.IntermediateSystemto match the new nomenclature (IntermediateTorsion,IntermediateInversion).Updated Parameter Generation:
generate_parametersinparamgen.rsto utilize the new precomputation logic.Testing:
paramgentests to verify correct precomputed values against physical expectations.