Skip to content

Include tmax in the phonon temperature grid and default to 1000 K, matching phonopy - #1568

Merged
JaGeo merged 2 commits into
materialsproject:mainfrom
computron:phonon-tmax-1000
Oct 2, 2026
Merged

JaGeo merged 2 commits into
materialsproject:mainfrom
computron:phonon-tmax-1000

Conversation

@computron

Copy link
Copy Markdown
Member

Summary

Closes #1567. This implements option (ii) from the issue: the phonon temperature grid now includes tmax, and the default tmax is 1000 K, matching phonopy's Phonopy.run_thermal_properties.

Previously the thermodynamic properties in the atomate2 phonon document (temperatures, free_energies, entropies, internal_energies, heat_capacities) were computed on np.arange(tmin, tmax, tstep) with tmax=500, so the default grid stopped at 490 K. The grid is now np.arange(tmin, tmax + tstep / 2, tstep), so the default is 0, 10, ..., 1000 K (101 temperatures).

  • src/atomate2/common/schemas/phonons.py: default tmax of 1000 K, and the endpoint is included.
  • tests/vasp/flows/test_phonons.py: new test that checks the default grid (0-1000 K) and that an explicit tmax is included. It fails on the old code and passes on the new one.
  • tests/torchsim/flows/test_phonons.py: pins tmax=400 so the existing 0-400 K reference values stay as they are.

Behavior change: anyone who already passes tmax now also gets a value at tmax itself, as in phonopy.

Not changed: the thermal displacement grid (tmax_thermal_displacements, default 500 K) and t_max of calc_thermo_data in common/jobs/qha.py (default 500 K). Only the default atomate2 phonon document schema is affected; the emmet schema computes thermodynamic quantities at the temperatures you ask for.

Additional dependencies introduced (if any)

None.

Checklist

  • Code is in the standard Python style (ruff check and ruff format --check pass on the changed files).
  • Doc strings have been added in the Numpy docstring format (no new functions).
  • Tests have been added for any new functionality or bug fixes.
  • All linting and tests pass. Locally, the VASP, FHI-aims, forcefield, QHA, and tests/common tests pass (99 passed, 14 skipped). The torchsim and MACE tests were skipped in my environment, and tests/common/schemas/test_defect.py could not be imported because the defects extra was not installed.

🤖 Generated with Claude Code

The thermodynamic properties in the atomate2 phonon document were computed
on np.arange(tmin, tmax, tstep) with a default tmax of 500, so the default
grid stopped at 490 K. The default is now 1000 K and tmax is included in the
grid, matching phonopy's run_thermal_properties.

Closes materialsproject#1567

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JaGeo

JaGeo commented Oct 2, 2026

Copy link
Copy Markdown
Member

@computron I am fine with it. I don't have a large scale study with this workflow. Thus, I believe it is really up to you and @hrushikesh-s to decide. 😃

@esoteric-ephemera

Copy link
Copy Markdown
Collaborator

Also good with me - can I mark as ready for review instead of a draft?

@hrushikesh-s

Copy link
Copy Markdown
Collaborator

Looks good to me as well!

@computron
computron marked this pull request as ready for review October 2, 2026 18:44
@computron

Copy link
Copy Markdown
Member Author

ok great marked as ready

@JaGeo
JaGeo enabled auto-merge (squash) October 2, 2026 19:17
@JaGeo
JaGeo merged commit a1fff05 into materialsproject:main Oct 2, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default phonon thermodynamic properties should go to 1000 K, matching phonopy

4 participants