Skip to content

Prepare release 1.4.0

Choose a tag to compare

@TieuLongPhan TieuLongPhan released this 26 May 09:00
· 4 commits to main since this release
8369e62

Changelog

[1.4.0] - 2026-05-26

🚀 Highlights

  • Lewis State Graph (LSG) Framework: Introduced the LSG framework for SynReactor. LSG templates now natively carry lone_pairs, radical, valence_electrons, sigma_order, pi_order, and kekule_order. This allows the NetworkX reactor to rewrite graphs directly from explicit valence-state information while fully maintaining the legacy typesGH path.
  • Graph-Native Functional-Group Detection: Added a native detector under synkit.Graph.FG that operates directly on SynKit molecular networkx graphs. Includes a convenient SMILES API that returns both the graph and its detected (name, atom_indices) labels.
  • Modern Visualization Suite: Added compact Molecular Transition Graph (MTG) and visualization helpers for LSG/ITS and MTG timeline inspection. The new Vis API covers molecule graphs, reaction panels, ITS-only drawings, Lewis-state labels, and MTG step/timeline panels.

⚛️ Lewis State Graph Reactor

  • Explicit Valence Matching: LSG matching now uses explicit valence-state fields for new-mode templates: element, charge, lone-pair count, radical count, and bond changes represented by sigma_order / pi_order / kekule_order.
  • Charge Recomputation: Product charge recomputation is now driven by Lewis-state accounting in new-mode rewrites. kekule_order = sigma_order + pi_order is utilized instead of legacy aromatic order values.
  • Hydrogen Handling: Tightened constraints and accuracy for explicit-H reaction centers, implicit-H templates, and simple H-H transfer cases.
  • Atom-Map Preservation: Fixed SMARTS output atom-map preservation issues in the LSG-reactor by falling back to graph node identity when a template lacks the original AAM.
  • Regression Tooling: Added real-case regression testing around the first smart-database fixture, batch round trips, and previously failing LSG rewrite examples.

🧪 Functional Groups

  • New APIs: Added FunctionalGroupDetector, FunctionalGroupRegistry, FunctionalGroupAudit, and smiles_to_graph_and_functional_groups.
  • Hierarchical Family Handling: Implemented smart suppression so specific labels (e.g., carboxylic_acid) correctly suppress generic nested labels (e.g., carbonyl) when appropriate.
  • Expanded Chemical Substructures: Added aromatic ring-system detection, public names for selected fused heteroaromatics, and transform-relevant families across:
    • Carbonyl / Acyl
    • Oxygen & Nitrogen / C=N
    • Sulfur, Boron, Silicon, and Phosphorus chemistry
  • Tautomerization Integration: Replaced the legacy fgutils implementation in tautomerization support with the new, native SynKit functional-group API.

⏱️ Mechanistic Transition Graph (MTG)

  • LSG/ITS Default: MTG construction from RSMI strings now defaults to Lewis State Graph ITS, generating compact atom and bond timelines without typesGH. Use its_format="typesGH" to explicitly request legacy string conversion.
  • Streamlined Data Architecture: Reworked the MTG plan around LSG/ITS representations. Invariant atom fields are now stored once, while temporal fields store compact histories across mechanism snapshots.
  • Round-Trip Coverage: Added complete round-trip coverage for converting reaction sequences to MTG and back to ordered ITS steps / composed ITS views.
  • Active Design Areas: Marked aromatic relabeling and partial-order mechanism DAGs as active design areas rather than finalized MTG semantics.

📊 Visualization

  • Modern Rendering Helpers: Added preferred modern drawing functions:
    • draw_molecule_graph & draw_reaction_graph
    • draw_its_from_rsmi & draw_its_only
    • draw_mtg_graph & draw_mtg_steps
  • Closer Inspections: Added compact LSG/ITS labels for kekule_order transitions and optional sigma/pi labels that suppress unchanged components.
  • Lewis-State Labels: Added selectable visual labels for tracking charge, lone-pair, and radical changes.
  • CI Testing: Added Matplotlib Agg backend smoke tests to cover molecule, reaction, ITS, visual adapter, and MTG drawing paths.

⚠️ Compatibility & Known Limits

  • Legacy Preservation: Legacy ITS / typesGH behavior remains fully available for existing production workflows.
  • MØD Workflows: MØD-backed workflows remain strictly separate from the new SynKit LSG reactor path.
  • Aromatic Matching Limits: Aromatic LSG matching remains conservative. Certain aromatic false-positive/negative cases currently require a future global aromatic-system relabeling policy rather than a local matcher patch.
  • Isomer Limitations: Functional-group fused positional isomers (e.g., quinoline vs isoquinoline) are not yet fully distinguished.

🛠️ Infrastructure

  • Dependency Updates: Added networkx>=3.3 explicitly to requirements.txt. This ensures non-Linux CI jobs do not rely on the Linux-only mod installation to pull in NetworkX indirectly.