Skip to content

Enhance system properties and refactor example notebooks#57

Merged
janitha-mahanthe merged 10 commits intorefactor-into-class-based-structurefrom
25-v02-refactor-into-class-based
Apr 8, 2026
Merged

Enhance system properties and refactor example notebooks#57
janitha-mahanthe merged 10 commits intorefactor-into-class-based-structurefrom
25-v02-refactor-into-class-based

Conversation

@janitha-mahanthe
Copy link
Copy Markdown
Member

PR Summary

This PR is to close the issues #55, #56 and #41 along with the main issue of v0.2 #25 releasing, which was addressed over past PRs.

Related PRs

PRs: #54, #48, #47, #45, #44, #43, #42, #39, #37

Changes

AutoREACTER.py

In this PR we have added the AutoREACTER.py which can run by cmd CLI with 3 different flags:

  • -c → remove current/past files
  • -help → show help
  • -in → input JSON

This will be very useful to users who want to use the package in larger scale and it will also be helpful for developers for debugging.

Input Format

We have modified the input format which has to define each simulation instead of one simulation, because in previous setup it was generating unnecessary simulations (which will reduce the number of unnecessary outputs with 0.2.1 release).

Cache Handling

Also we have added cache handling. In this we move all the generated final files for REACTER to dated designated folders, which will make the output organized.

Validation Updates

Temperature and Density

  • Must be defined per system
  • Removed global:
    • replicas.temperatures
    • replicas.density
  • Must be single positive number (not list)

Monomer Validation

  • Added _validate_system_monomer_keys
  • Ensures system monomer keys match defined monomers
  • Raises error for missing or extra keys

General Validation

  • Updated validation for temperature and density
  • Added stricter type checks and better error messages

Workflow

Added AutoREACTER.py as main entry point which handles:

  • input validation
  • functional group and reaction detection
  • 3D preparation
  • Lunar API
  • REACTER file generation

Also includes CLI messages and cleanup.

@janitha-mahanthe janitha-mahanthe added this to the v0.2-beta milestone Apr 8, 2026
@janitha-mahanthe janitha-mahanthe self-assigned this Apr 8, 2026
@janitha-mahanthe janitha-mahanthe added bug Something isn't working enhancement New feature or request labels Apr 8, 2026
@janitha-mahanthe janitha-mahanthe requested a review from Copilot April 8, 2026 22:10
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

This PR advances the v0.2 workflow refactor by updating the input schema to require per-system temperature/density, adding a new top-level CLI entrypoint, and refactoring cache/run-directory handling so REACTER outputs are organized into dated run folders.

Changes:

  • Refactored input validation to require temperature and density per replicas.systems and disallow legacy replicas.temperatures / replicas.density.
  • Added a new AutoREACTER.py CLI orchestrator to run the end-to-end pipeline and move generated artifacts into dated run directories.
  • Reworked cache management to create/cleanup dated run folders and to move REACTER output files out of the staging cache.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
AutoREACTER.py New CLI entrypoint orchestrating validation → detection → 3D prep → Lunar → REACTER build, plus moving outputs into dated run dirs.
AutoREACTER/cache.py Refactors cache root discovery, dated run dir creation, moving REACTER files, and cleanup behavior.
AutoREACTER/input_parser.py Enforces per-system temperature/density; adds monomer key validation across systems; updates numeric validation behavior.
AutoREACTER/sim_setup/system_property_calculations.py Introduces a new (currently stubbed) system properties helper under sim_setup/.
AutoREACTER/system_property_calculations.py Removes the previous placeholder module at the old location.
AutoREACTER/main.py Removes the previous script-style entrypoint.
examples/example_1_inputs_ratio_mode.json Updates example to per-system temperature/density in ratio mode.
examples/example_1_inputs_count_mode.json Updates example to per-system temperature/density in counts mode and adds an extra system.
examples/example_1_inputs_count_mode_FF.json Updates force-field example to the new per-system temperature/density schema.
examples/example_1_inputs_count_mode_with_non_monomers.json Removes an obsolete example file under the old schema.
reaction.png Adds/updates a reaction image asset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants