Repository navigation
[WIP] Breaking: Read ASE MD velocities in Angstrom/fs and let MultiMDMaker chain VASP and ASE MD jobs - #1606
hrushikesh-s wants to merge 5 commits into
Conversation
|
Hi, after reviewing this PR, I noticed a structural inconsistency between the Suppose a user wants a short but accurate VASP NPT equilibration chained into So the question is which contract you intend:
|
Mixed chains are not meant to be supported, since a VASP maker copies the VASP output files of the previous job from prev_dir, which an ASE job does not write, and an ASE maker ignores prev_dir. MultiMDMaker now raises a ValueError when it is created with a mix of VASP and ASE makers, with a test. Does that look fine? |
|
@ZKC19940412, I have dropped the ValueError from my earlier reply and now allow mixed chains, since the finite-temperature phonon workflow needs VASP and force-field MD in either order. Each job starts from the final positions and velocities of the previous one (ASE makers need store_velocities=True), and a VASP maker in the chain gets prev_dir only after a VASP job, with a test for each direction. Nothing corrects the energy jump where the potential changes, so the first steps after a switch should be discarded. Does that look fine? |
|
I also lean towards allowing mix MD chains between MLIP and ASE as well. So this change looks good to me. |
Summary
Include a summary of major changes in bullet points:
AseMDMakernow reads thevelocitiessite property in Angstrom/fs. This isthe unit of a VASP POSCAR and of the structures that pymatgen and emmet read from a
CONTCAR. Before, it was read in ASE units, so a structure from a VASP MD started about
10 times too slow.
store_velocitiesofAseMDMaker, False by default. If True, the finalvelocities, in Angstrom/fs, are added to the
velocitiessite property of the outputstructure.
AseMDMakerno longer keeps themomentasiteproperty, the input velocities or the VASP MD state of a CONTCAR. Before, the
momentasilently started a following NVE job from the previous velocities.
MultiMDMakernow chains VASP and ASE MD makers, such asForceFieldMDMaker, in anyorder. With
store_velocities=Truefor the ASE makers, each job continues from thefinal positions and velocities of the previous one. A VASP maker gets
prev_dironlyafter a VASP job.
runs of 5 steps end in the same positions and velocities as one run of 10 steps. The
test also covers
restart_from_uuidwith ASE makers. Two more tests chain VASP toASE and ASE to VASP.
Additional dependencies introduced (if any)
List all new dependencies needed and justify why. While adding dependencies that bring
significantly useful functionality is perfectly fine, adding ones that add trivial
functionality, e.g., to use one single easily implementable function, is frowned upon.
Justify why that dependency is needed. Especially frowned upon are circular dependencies.
None
TODO (if any)
If this is a work-in-progress, write something about what else needs to be done.
a long MD as several jobs (Plan: split the finite-temperature phonon workflow (#1560) into PRs #1585).
Checklist
Work-in-progress pull requests are encouraged, but please put [WIP] in the pull request
title.
Before a pull request can be merged, the following items must be checked:
The easiest way to handle this is to run the following in the correct sequence on
your local machine. Start with running
ruffandruff formaton your new code. This willautomatically reformat your code to PEP8 conventions and fix many linting issues.
Run ruff on your code.
type check your code.
Note that the CI system will run all the above checks. But it will be much more
efficient if you already fix most errors prior to submitting the PR. It is highly
recommended that you use the pre-commit hook provided in the repository. Simply run
pre-commit installand a check will be run prior to allowing commits.