Skip to content

Add TGMD runner for EQ21 outputs and support max_temp in TGMD.exec#2

Open
Azhi-ss wants to merge 1 commit intodevelopfrom
codex/explain-codebase-structure-to-newcomers-2eb8wx
Open

Add TGMD runner for EQ21 outputs and support max_temp in TGMD.exec#2
Azhi-ss wants to merge 1 commit intodevelopfrom
codex/explain-codebase-structure-to-newcomers-2eb8wx

Conversation

@Azhi-ss
Copy link
Copy Markdown
Owner

@Azhi-ss Azhi-ss commented Dec 30, 2025

Motivation

  • Allow running TGMD separately from an EQ21step output folder without re-running the full workflow.
  • Provide a configurable upper temperature cap for the TG density-search step so users can limit pre-density search heating.
  • Expose Tg cooling schedule parameters via example scripts to make Tg runs more flexible and reproducible.

Description

  • Add a new CLI script sample_script/tg_from_eq21.py that loads EQ21 outputs with helper.IO_Helper, loads the equilibrated structure, and runs tg.TGMD.exec with user-provided flags (--max-temp, --cooling-rate, --interval-temp, etc.).
  • Update radonpy/sim/preset/tg.py to add the max_temp argument to TGMD.exec, initialize t_start/t_stop from temp and max_temp, clamp t_stop to max_temp, and emit informative utils.radon_print messages when max_temp conflicts with temp or is reached during density-search.
  • Ensure the density-search loop sets result['tg_max_temp'] appropriately when the cap is reached or when the check passes, and continue to save pre-equilibration JSON/pickle/CSV state.
  • Add sample_script/full_workflow_with_tg.py as an example demonstrating how to supply tg_max_temp and tg_cooling_rate in a full workflow.

Testing

  • No automated CI or unit tests were executed for these changes.
  • The added sample scripts were not run as part of automated tests and therefore no runtime validation was performed.
  • Changes were limited to a new CLI script and internal TGMD.exec parameter handling to minimize impact on existing APIs.
  • Static/format checks were not executed as part of this update.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

import pandas as pd

pd.DataFrame([polar_data]).to_csv(os.path.join(work_dir, 'polarizability.csv'), index=False)
if tg_results:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Define tg_results before checking it

tg_results is referenced here before it is ever assigned; the first assignment happens later (tg_results = {} near the Tg calculation). In Python this raises a NameError, so the example script will crash before reaching the Tg computation or writing outputs whenever it hits this conditional. Initialize tg_results (e.g., {}) before this if or guard the block differently to avoid the runtime failure.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant