Add TGMD runner for EQ21 outputs and support max_temp in TGMD.exec#2
Add TGMD runner for EQ21 outputs and support max_temp in TGMD.exec#2
max_temp in TGMD.exec#2Conversation
There was a problem hiding this comment.
💡 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: |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
Description
sample_script/tg_from_eq21.pythat loads EQ21 outputs withhelper.IO_Helper, loads the equilibrated structure, and runstg.TGMD.execwith user-provided flags (--max-temp,--cooling-rate,--interval-temp, etc.).radonpy/sim/preset/tg.pyto add themax_tempargument toTGMD.exec, initializet_start/t_stopfromtempandmax_temp, clampt_stoptomax_temp, and emit informativeutils.radon_printmessages whenmax_tempconflicts withtempor is reached during density-search.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.sample_script/full_workflow_with_tg.pyas an example demonstrating how to supplytg_max_tempandtg_cooling_ratein a full workflow.Testing
TGMD.execparameter handling to minimize impact on existing APIs.Codex Task