feat(io): Implement Structure IO Pipeline and Session Management#4
Merged
feat(io): Implement Structure IO Pipeline and Session Management#4
Conversation
…ve error handling
4 tasks
There was a problem hiding this comment.
Pull request overview
Introduces a new io module that reads/writes PDB/mmCIF structures into a packing-oriented Session (backed by dreid-forge), adds configuration models for structure preparation/charge assignment, and refactors VdW parameters into strongly-typed matrices.
Changes:
- Added
src/iowith configuration structs, error type, session/metadata model, canonical sidechain atom ordering, and a read/write conversion pipeline. - Refactored
VdwMatrixinto an enum withLjMatrix/BuckMatrixand typed pair parameter structs, with dimension/symmetry validation and updated tests. - Exported the new
iomodule from the crate root and made minor documentation/spelling adjustments.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/model/types.rs | Minor doc spelling update. |
| src/model/system.rs | Refactors VdW matrix into typed LJ/Buckingham variants + updates tests. |
| src/lib.rs | Exposes the new io module publicly. |
| src/io/mod.rs | Adds public io module surface (configs, read/write, Session, Error). |
| src/io/config.rs | Defines read/clean/protonation/topology/force-field/charge configuration models. |
| src/io/error.rs | Centralizes IO/parse/template/forge error mapping. |
| src/io/order.rs | Adds canonical per-residue sidechain atom ordering tables + tests. |
| src/io/session.rs | Introduces Session, SystemMetadata, and atom/bond reference bookkeeping + tests. |
| src/io/convert.rs | Implements the dreid-forge integration and Session↔structure conversion logic. |
💡 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:
Established the
iomodule for PDB/mmCIF structure processing andSessionstate management viadreid-forgeintegration. This includes comprehensive configuration pipelines (cleaning, protonation, parameterization) and a major refactor of VdW parameter matrices for strict type safety.Changes:
readandwritefunctions (convert.rs) to parse/serialize PDB and mmCIF formats, delegating topology and force-field parameterization todreid-forge.ReadConfig,ProtonationConfig,ChargeConfig,QeqConfig) covering atom cleaning, His-tautomer selection, and hybrid QEq charge schemes.SessionandSystemMetadatamodels (session.rs) to partition atoms intoFixedAtomandMobileSidechaincomponents with preciseAtomRefbookkeeping.order.rs) for 29 standard residue types to ensure consistent coordinate mapping.VdwMatrixfrom flat tuples to a strongly-typed enum (LennardJones(LjMatrix),Buckingham(BuckMatrix)) with strict matrix symmetry and dimension validation.error.rs.