Skip to content

feat(core): Architect Core Data Structures and Project Foundation#2

Merged
TKanX merged 19 commits intomainfrom
feature/1-architect-core-data-structures-for-topology-representation
Sep 28, 2025
Merged

feat(core): Architect Core Data Structures and Project Foundation#2
TKanX merged 19 commits intomainfrom
feature/1-architect-core-data-structures-for-topology-representation

Conversation

@TKanX
Copy link
Copy Markdown
Member

@TKanX TKanX commented Sep 28, 2025

Summary:

Establishes the foundational architecture for the project's core logic. It introduces a comprehensive set of data structures for representing molecular graphs and their detailed topologies (atoms, bonds, angles, dihedrals). A robust, specific error-handling system and a basic CI workflow are also implemented to ensure code quality and stability from the outset.

Changes:

  • Implemented Core Molecular Data Structures:

    • Created MolecularGraph with AtomNode and BondEdge to represent the initial molecular connectivity.
    • Defined MolecularTopology and its components (Atom, Bond, Angle, ProperDihedral, ImproperDihedral) to hold the fully typed and analyzed molecular structure.
    • Implemented canonical ordering for topological components (bonds, angles, dihedrals) to ensure consistent representation.
  • Defined Fundamental Chemical Enumerations:

    • Added a comprehensive Element enum covering the periodic table.
    • Introduced BondOrder (Single, Double, etc.) and Hybridization (SP, SP2, etc.) enums.
    • Implemented FromStr and Display traits for all enums to facilitate easy parsing and string representation.
  • Established a Custom Error Handling System:

    • Created a top-level TyperError enum to categorize different failure modes (RuleParse, InvalidInputGraph, AssignmentFailed).
    • Defined specific error types like GraphValidationError and AssignmentError to provide detailed diagnostic information.
  • Added Project Infrastructure and CI:

    • Configured a new GitHub Actions workflow (ci.yml) to automatically build and run tests on every push and pull request.
    • Updated the .gitignore file to properly exclude RustRover IDE-specific files (.idea/).

…r, and AssignmentError for better error handling
@TKanX TKanX self-assigned this Sep 28, 2025
Copilot AI review requested due to automatic review settings September 28, 2025 23:41
@TKanX TKanX added the enhancement ✨ New feature or request label Sep 28, 2025
@TKanX TKanX linked an issue Sep 28, 2025 that may be closed by this pull request
24 tasks
Copy link
Copy Markdown
Contributor

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

This PR establishes the foundational architecture for a molecular typing engine, introducing core data structures, error handling, and CI infrastructure for a Rust-based chemistry library.

  • Implements molecular graph and topology data structures with chemical enums (Element, BondOrder, Hybridization)
  • Creates a hierarchical error handling system for different failure modes
  • Adds CI workflow for automated testing and building

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib.rs Module declaration to expose the core module
src/core/mod.rs Core chemical enumerations with FromStr/Display traits
src/core/graph.rs Molecular graph and topology data structures with canonical ordering
src/core/error.rs Comprehensive error handling system for validation and assignment failures
.github/workflows/ci.yml GitHub Actions CI workflow for build and test automation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/core/mod.rs
@TKanX TKanX merged commit 6383a78 into main Sep 28, 2025
2 checks passed
@TKanX TKanX deleted the feature/1-architect-core-data-structures-for-topology-representation branch September 28, 2025 23:42
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.

Architect Core Data Structures for Topology Representation

2 participants