Conversation
…ion and Inversion in MolecularTopology
…s and inversions in molecular topology builder
…sion and Torsion in topology exports
…changes in dihedral terminology
…ude torsions and inversions
…hedral to Torsion and Inversion in topology builder documentation
…ns and inversions
12 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the topology terminology and fixes planar-center handling by generating all three DREIDING inversion terms per trigonal planar center, rather than collapsing them into a single term.
Changes:
- Renamed topology terms across the crate:
ProperDihedral→Torsion,ImproperDihedral→Inversion, including public exports and docs. - Updated inversion canonicalization to keep the axis neighbor distinct while only sorting the two plane atoms.
- Refactored the builder to emit three inversion terms per planar degree-three center and updated unit/docs expectations accordingly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/lib.rs |
Updates public re-exports and Quickstart example to use torsions. |
src/core/topology.rs |
Introduces Torsion/Inversion types + updated MolecularTopology fields and tests. |
src/builder/mod.rs |
Renames builder helpers and changes inversion generation to emit 3 terms per planar center. |
docs/ARCHITECTURE.md |
Updates pipeline diagram terminology to torsions/inversions. |
docs/04_topology_builder.md |
Updates builder phase documentation and explains 3-term inversion generation. |
docs/01_pipeline.md |
Updates topology structure terminology to torsions/inversions. |
README.md |
Updates feature/pipeline description to include inversions and new naming. |
💡 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:
Corrected the topology builder to generate three distinct inversion terms for each planar center, adhering to the DREIDING force field specification. Previously, the builder collapsed these terms into a single
ImproperDihedral, which under-constrained the planarity of sp2 centers. The new implementation explicitly generates an inversion for each neighbor acting as the unique axis, ensuring robust planarity enforcement. Additionally, the topology terminology has been updated toTorsionandInversionto better reflect standard force field nomenclature.Changes:
Renamed Topology Terms:
ProperDihedraltoTorsionandImproperDihedraltoInversionincore::topologyand throughout the codebase.Corrected Inversion Generation Logic:
build_inversions(formerlybuild_improper_dihedrals) to iterate through all three neighbors of a planar center.Iwith neighborsJ, K, L, the builder now emits three distinct terms:I-J-KL,I-K-JL, andI-L-JK.Inversionconstructor to sort only the two plane atoms, preserving the unique axis atom to distinguish the three terms.Updated Tests:
builder/mod.rsto verify that three inversion terms are generated for a planar center instead of one.torsionsinstead ofproper_dihedralsandinversionsinstead ofimproper_dihedrals.