Feature: PLUMED interface for the MD driver - #382
Closed
MarkYoungIV wants to merge 2 commits into
Closed
MarkYoungIV wants to merge 2 commits into
MarkYoungIV wants to merge 2 commits into
Conversation
Port of the PLUMED interface to the MDCell-based MD driver of the develop branch: - new INPUT items 'plumed' and 'plumed_file' - new module source/source_plumed wrapping the PLUMED C API (plumed_create / plumed_cmd / plumed_finalize); the interface is driven from the shared MD loop in source_md/run_md.cpp, so all the integrators are supported - ABACUS atomic units are declared to PLUMED through setMD*Units; the positions/cell (Bohr), forces (Hartree/Bohr), potential energy (Hartree) and masses are handed over in native units, and PLUMED converts them internally - the call sequence follows the reference implementations distributed with PLUMED (values, prepareCalc, setForces/setVirial, performCalc); every step is flagged as a checkpointing step so that PLUMED flushes its output files (COLVAR, ...) while the run is in progress - build with -DPLUMED_ROOT=<prefix of an installed PLUMED> - current limitation: a single MPI rank is required (the atoms owned by the master rank are handed over), which covers the standard serial/OpenMP MD runs
Author
|
Thanks for the guidance — closing this PR as advised. Two compliance issues:
I will rebase onto the latest |
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 PLUMED support to ABACUS molecular dynamics: collective variables, biasing potentials (metadynamics, walls, umbrella sampling, ...) and the PLUMED post-processing workflow can now be used together with
calculation md. Feedback on design and scope is very welcome.Usage
with a standard PLUMED input file, e.g. well-tempered metadynamics along a distance:
What is included
source/source_plumed/wrapping the PLUMED C API (plumed_create/plumed_cmd/plumed_finalize), driven from the shared MD loop insource_md/run_md.cpp, so all integrators (md_type) are covered;plumed(Boolean) andplumed_file(String);cmake -DPLUMED_ROOT=<plumed-install>; when unset, nothing changes and PLUMED is not required at all;docs/parameters.yamlanddocs/advanced/input_files/input-main.mdregenerated with the branch binary (--generate-parameters-yaml), plus a new pagedocs/advanced/interface/plumed.md.Design notes
setMD*Units; positions, cell, forces, potential energy and masses are exchanged in native units and PLUMED converts them internally, so no manual conversion is needed.setPositions/setBox/setEnergy->prepareCalc->setForces/setVirial->performCalc); the virial is handed over whenever the MD provides it.COLVAR/HILLScontinuously and the run can be followed live.Testing
ks_solver genelpa), both against PLUMED 2.10.1.parameters.yamlandinput-main.mdwere regenerated with the branch binary and are consistent with the source.Notes for reviewers
-DPLUMED_ROOT), so all existing CI configurations are unaffected.