Repository navigation
Export a refined band as VASP frame folders for ElecTrace - #87
Merged
Merged
Conversation
reactionflow export-electrace <pathway> --out <folder> writes one numbered folder per image of a band, each with only a POSCAR, plus an electrace.toml and a reactionflow.json. The configuration reads the folders as one NEB path with index atom identity, sets pressure_gpa for an NPT band so that ElecTrace compares the same enthalpy as barrier_eV, and lists the atoms of the bonds that differ between the band's ends as focus atoms. ReactionFlow keeps bonds by stable atom ID, so those are mapped through the written atom order; reactionflow.json records that order with the pathway's result.json. Every image is sorted by element in the same stable order, so each species is one POSCAR block and an atom keeps its index. A band whose images do not share their atoms and order, or that has no cell, is refused, as is an output folder that is not empty. Constraints and the model's energies are not written, so ElecTrace reads only the energies of the calculations run on the frames. A band that did not converge or failed its saddle check is exported with its status printed. An event refined in steps points to its step-N folders, which export with their own bonds.
Austin243
added a commit
that referenced
this pull request
Nov 7, 2026
The README's paragraph on commands for finished output keeps both additions: check reports a band's residual forces, and export-electrace lays a band out as VASP frame folders.
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.
Adds
reactionflow export-electrace <pathway> --out <folder>, which lays out one refined band for ElecTrace. Until now each band was laid out by a project script, asprepare_electrace.pydid for the ACN density runs.band-dftgets:00,01, ...), each holding only aPOSCAR;electrace.toml, which reads the folders as one NEB path withatom_identity = "index". It setspressure_gpafor an NPT band, so that ElecTrace compares H = E + PV at the band's pressure, the same enthalpy asbarrier_eV(since Use the enthalpy for barriers at a stated pressure ElecTrace#23).focus_atomslists the atoms of the bonds that differ between the band's two ends;reactionflow.json, with the pathway'sresult.json, the changed bonds as atom IDs and as POSCAR indices, andatom_ids, the stable ID of the atom at each POSCAR index.Next, run the calculations and descriptor analyses in the frame folders (by hand or with ElecTrace's workflow), then
electrace analyze band-dft/electrace.toml.Design choices
reactionflow.json, so ElecTrace never mixes MLIP energies with those of the calculations run on the frames.statusand saddle-check status are printed and recorded.step-Nfolders, and each step exports with its own bonds.Checks
Tested on a fresh run of
examples/xtb(GFN2-xTB, 20 ps), which gave sevensaddle_validatedO–H–O proton-transfer bands:C H O), and no selective dynamics are written.electrace analyzeruns on the exported folder. With no descriptors or energies yet, it warns about exactly that.OUTCARorOSZICARis written, and the NVT band has nopressure_gpa.pressure_gpa = 35.0;ci_neb_failedcopy exports with its status reported;step-1, andstep-1exports with the same focus atoms;--outare refused.ruff check,ruff format --check,pytest(356 passed, 25 skipped) andpython -m buildpass.