Skip to content

feat(io): Implement Structure IO Pipeline and Session Management#4

Merged
TKanX merged 20 commits intomainfrom
feature/3-implement-io-layer-and-session
Mar 22, 2026
Merged

feat(io): Implement Structure IO Pipeline and Session Management#4
TKanX merged 20 commits intomainfrom
feature/3-implement-io-layer-and-session

Conversation

@TKanX
Copy link
Copy Markdown
Member

@TKanX TKanX commented Mar 22, 2026

Summary:

Established the io module for PDB/mmCIF structure processing and Session state management via dreid-forge integration. This includes comprehensive configuration pipelines (cleaning, protonation, parameterization) and a major refactor of VdW parameter matrices for strict type safety.

Changes:

  • IO Pipeline: Implemented read and write functions (convert.rs) to parse/serialize PDB and mmCIF formats, delegating topology and force-field parameterization to dreid-forge.
  • Configuration Models: Added robust configuration structs (ReadConfig, ProtonationConfig, ChargeConfig, QeqConfig) covering atom cleaning, His-tautomer selection, and hybrid QEq charge schemes.
  • Session State: Created Session and SystemMetadata models (session.rs) to partition atoms into FixedAtom and MobileSidechain components with precise AtomRef bookkeeping.
  • Atom Ordering: Added canonical sidechain atom ordering rules (order.rs) for 29 standard residue types to ensure consistent coordinate mapping.
  • VdW Matrix Refactor: Upgraded VdwMatrix from flat tuples to a strongly-typed enum (LennardJones(LjMatrix), Buckingham(BuckMatrix)) with strict matrix symmetry and dimension validation.
  • Error Handling: Centralized IO, parsing, and template error mapping in error.rs.

@TKanX TKanX self-assigned this Mar 22, 2026
@TKanX TKanX added the enhancement ✨ New feature or request label Mar 22, 2026
@TKanX TKanX linked an issue Mar 22, 2026 that may be closed by this pull request
4 tasks
Copilot AI review requested due to automatic review settings March 22, 2026 06:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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/io with configuration structs, error type, session/metadata model, canonical sidechain atom ordering, and a read/write conversion pipeline.
  • Refactored VdwMatrix into an enum with LjMatrix / BuckMatrix and typed pair parameter structs, with dimension/symmetry validation and updated tests.
  • Exported the new io module 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.

Comment thread src/io/convert.rs
Comment thread src/io/convert.rs
Comment thread src/io/session.rs
Comment thread src/io/order.rs
@TKanX TKanX merged commit ff32aa3 into main Mar 22, 2026
2 checks passed
@TKanX TKanX deleted the feature/3-implement-io-layer-and-session branch March 22, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement IO Layer and Session

2 participants