Skip to content

[WIP] Split the MD of the finite-temperature phonon workflow into several jobs - #1607

Draft
hrushikesh-s wants to merge 28 commits into
materialsproject:mainfrom
hrushikesh-s:ft-md-jobs
Draft

hrushikesh-s wants to merge 28 commits into
materialsproject:mainfrom
hrushikesh-s:ft-md-jobs

Conversation

@hrushikesh-s

Copy link
Copy Markdown
Collaborator

Summary

Include a summary of major changes in bullet points:

  • New option n_md_jobs of the finite-temperature phonon makers, 1 by default. The NVT MD
    and the NPT MD then each run as n_md_jobs consecutive MD jobs of MultiMDMaker ([WIP] Breaking: Read ASE MD velocities in Angstrom/fs and let MultiMDMaker chain VASP and ASE MD jobs #1606),
    so that a long MD fits in the walltime of a job. The steps are split as evenly as
    possible. The trajectories of all jobs are joined in order for the snapshots and for the
    NPT cell.
  • Each MD job starts from the final positions and velocities of the previous one. The
    force field MD jobs set store_velocities=True for this. MD job i uses the seed
    random_seed + 2i (NVT) or random_seed + 2i + 1 (NPT), so the jobs get different
    Langevin random forces. With n_md_jobs=1 the flow and the seeds are the same as before.
  • get_md_maker and get_npt_maker take the index of the MD job.
  • Each MD job needs at least 2 steps. A 1-step ASE MD job returns its input structure.
  • Docs and tutorial: the known limitation that the MD has to fit in one job is replaced.
  • Tests: the split, the seeds and the lists passed to the snapshot, NPT cell and fit jobs,
    for force fields and VASP. A full EMT run with two NPT and two NVT MD jobs checks that
    the second NVT job starts from the last frame of the first.

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.

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:

  • Code is in the standard Python style.
    The easiest way to handle this is to run the following in the correct sequence on
    your local machine. Start with running ruff and ruff format on your new code. This will
    automatically reformat your code to PEP8 conventions and fix many linting issues.
  • Doc strings have been added in the Numpy docstring format.
    Run ruff on your code.
  • Type annotations are highly encouraged. Run mypy to
    type check your code.
  • Tests have been added for any new functionality or bug fixes.
  • All linting and tests pass.

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 install and a check will be run prior to allowing commits.

This branch has not been deployed

No deployments
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.

1 participant