Add a finite-temperature phonon workflow - #1560
Open
hrushikesh-s wants to merge 22 commits into
Open
hrushikesh-s wants to merge 22 commits into
hrushikesh-s wants to merge 22 commits into
Conversation
Collaborator
Author
|
@JaGeo , I will send in the benchmarking tests on this workflow in the next few days. |
hrushikesh-s
force-pushed
the
finite-temp-phonons
branch
from
September 30, 2026 16:32
9a124fa to
33ec90f
Compare
hrushikesh-s
force-pushed
the
finite-temp-phonons
branch
from
September 30, 2026 23:17
214173c to
50d1eec
Compare
…easy supercell job
# Conflicts: # src/atomate2/common/jobs/pheasy.py # tests/common/jobs/test_pheasy.py
Collaborator
Author
# Conflicts: # tests/common/jobs/test_pheasy.py
pheasy's default --tol of 1e-4 leaves the fit unconverged. Refits of the same data then give different force constants on different machines.
…temperature phonons
Member
|
This will now take a bit of time @hrushikesh-s . Maybe end of this week. |
Collaborator
Author
|
@JaGeo , sounds good. Thanks! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a workflow for effective harmonic phonons at a finite temperature. pheasy fits second-order force constants with LASSO to snapshots of an MD run at the temperature, as in the temperature-dependent effective potential (TDEP) method. The force constants include the anharmonic effects at that temperature.
What the workflow does
The MD trajectory is checked for melting, for a move away from the starting structure and for a drift of the potential energy. The result is stored in the output. A warning is raised if the check fails, but the fit is still done. A run is reported as melted when its Lindemann ratio is above 0.15. This is the ratio at melting of fcc solids (Saija et al., J. Chem. Phys. 124, 244504 (2006)).
Makers
FiniteTemperaturePhononMakerinatomate2.vasp.flows: VASP MD and VASP statics.atomate2.forcefields.flows.finite_temperature_phonons:ForceFieldFiniteTemperaturePhononMaker: force field MD and force field statics.VaspMDMLFFStaticFiniteTemperaturePhononMaker: VASP MD and force field statics.MLFFMDVaspStaticFiniteTemperaturePhononMaker: force field MD and VASP statics.Optional NPT MD
Without it, the MD runs at the volume of the starting structure, so thermal expansion is missing. With
npt_makerset, an NPT MD runs first, by default for 8 ps at 0 kbar. Its cell is averaged after the first 2 ps and symmetrized to the point group of the structure. The atoms keep their fractional coordinates and can be relaxed in the new cell withfixed_cell_relax_maker. The NVT MD and the fit then use this cell. For force fields,from_force_field_name(..., run_npt=True)sets both makers. For VASP,get_npt_makergives an NPT MD maker (MDALGO = 3,ISIF = 3,PSTRESSfrompressure). No VASP NPT maker is set by default.Changes to existing code
common/jobs/pheasy.py: the harmonic fit of the pheasy phonon workflow and of this workflow now share one function. Two things change for the existing pheasy phonon workflow:subprocess.run(check=True). Before,subprocess.callignored a failed pheasy run, and the workflow went on with missing or old force constants.--tol 1e-8. With pheasy's default of 1e-4 the fit stops before it converges, and the force constants change between machines and package versions.ase/md.py: adds thenvt_nose_hoover_chainpreset (ASE'sNoseHooverChainNVT). This thermostat cannot follow a temperature schedule, so asking it to follow one now raises an error.vasp/sets/core.py: addsLangevinMDSetGeneratorfor NVT MD with a Langevin thermostat.Tutorial
tutorials/finite_temperature_phonons.ipynbruns the workflow with three MACE potentials.The loops are off by default and our results are hardcoded, as in the CTE tutorial. The notebook is left out of the nbmake job, since it needs a GPU and the MACE models.
Limitations
born_maker).Checklist