Skip to content

Add NEB schemas#1123

Merged
esoteric-ephemera merged 43 commits intomaterialsproject:mainfrom
esoteric-ephemera:neb
Jun 27, 2025
Merged

Add NEB schemas#1123
esoteric-ephemera merged 43 commits intomaterialsproject:mainfrom
esoteric-ephemera:neb

Conversation

@esoteric-ephemera
Copy link
Copy Markdown
Collaborator

@esoteric-ephemera esoteric-ephemera commented Oct 4, 2024

Adding support for parsing NEB calculations and eventually ApproxNEB calculations. These are still VASP calculations, but have a directory structure which is not parseable by TaskDoc (at least meaningfully). The structure is:
./{INCAR, KPOINTS, POTCAR}
./00/POSCAR
./01/{vasprun.xml, OSZICAR, OUTCAR, CHGCAR, ... }
./02/{vasprun.xml, OSZICAR, OUTCAR, CHGCAR, ... }
...
./0N/POSCAR

Approx / NEB calculations are needed for battery cathode and alloy diffusivity calculations. These schemas will be needed for atomate2 workflows. Once Approx / NEB flows are added to atomate2, we should have full parity with atomate. This will also make it easier to host data from these calculations

Supports parsing NEB calculations (only relaxes images) and NEB + endpoints (three total calculations, two relaxes + one NEB)

Possibly worth adding run / task / calc types? Since this requires a separate doc model, maybe we should avoid this?

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 82.84884% with 59 lines in your changes missing coverage. Please review.

Project coverage is 89.42%. Comparing base (ed3222e) to head (15cc513).

Files with missing lines Patch % Lines
emmet-core/emmet/core/mobility/migrationgraph.py 65.27% 50 Missing ⚠️
emmet-core/emmet/core/neb.py 95.38% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1123      +/-   ##
==========================================
- Coverage   89.52%   89.42%   -0.10%     
==========================================
  Files         150      151       +1     
  Lines       15311    15632     +321     
==========================================
+ Hits        13707    13979     +272     
- Misses       1604     1653      +49     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

esoteric-ephemera and others added 19 commits April 9, 2025 15:34
* draft neb task doc and enums

* precommit

* fix dir_name path/str

* precommit

* more path / str conversion

* add datetime info

* minor fixes for optional types and potcar spec handling in neb docs

* lint

* fix mypy

* more mypy

* lint

* add test for NebTaskDoc

* lint

* expand NebTaskDoc tests to from_directory

* lint

* add further directory parsing features to NebTaskDoc + tests

* lint

* mypy fixes

* slight fmt logical

* add paths_summary function

function that matches unique_hops in migrationgraph to NEB results docs

* add classmethod augment_from_mgd_and_npr

classmethod to instantiate MigrationGraphDoc using an existing one and augment its fields using calculations data from NebPathwayResult

* draft neb task doc and enums

* precommit

* fix dir_name path/str

* precommit

* more path / str conversion

* add datetime info

* minor fixes for optional types and potcar spec handling in neb docs

* lint

* fix mypy

* more mypy

* lint

* add test for NebTaskDoc

* lint

* expand NebTaskDoc tests to from_directory

* lint

* add further directory parsing features to NebTaskDoc + tests

* lint

* mypy fixes

* slight fmt logical

* move neb base schemas from atomate2 to emmet-core, change class inheritence

* precommit

* fix NPR import and temporary fix to ignore metadata

* add cathing valueerror in matching

* draft neb task doc and enums

* precommit

* fix dir_name path/str

* precommit

* more path / str conversion

* add datetime info

* minor fixes for optional types and potcar spec handling in neb docs

* lint

* fix mypy

* more mypy

* lint

* add test for NebTaskDoc

* lint

* expand NebTaskDoc tests to from_directory

* lint

* add further directory parsing features to NebTaskDoc + tests

* lint

* mypy fixes

* slight fmt logical

* move neb base schemas from atomate2 to emmet-core, change class inheritence

* precommit

* add top-level failure_reasons field and tags for workflow meta

* add energy ranges to pathway result

* add barrier_type flag

add flag in get_paths_summary to specify what kind of barrier is used for cost

* avoid original mg contamination

* Add identifiers to NEB docs

* fix neb doc tests after rewrite

* precommit

* add gen_sc_scheme method and flag

provide option to either generate sc fields with "hops_only" or "complete" (default). old version is what's not considered "complete"

* typo

* resolve mypy issues in doc schema

* add host structure / active site meta to NebPathwayDoc

* ensure those new top-levels are uh optional

* change gen_sc_schema default

* add zero_short_hop_cost option and function

* formatting

* add successful image index to improve barrier estimates

* precommit

* max_barrier method update

use NPR's native max_barriers field

* update test

* add tests match mgdoc and npr

add tests and test files for get_paths_summary_with_neb_res() and augment_from_mgd_and_npr()

---------

Co-authored-by: esoteric-ephemera <aaron.kaplan.physics@gmail.com>
@esoteric-ephemera
Copy link
Copy Markdown
Collaborator Author

@tschaume / @tsmathis : the document models / updates for NEB should be more or less final.

Since these changes are isolated to emmet-core's NEB functionality (completely new) + MigrationGraphDoc (revised by @hmlli to fix bugs), can I merge this in?

@tschaume
Copy link
Copy Markdown
Member

Thanks @esoteric-ephemera! I think it's ok to merge and put out a release candidate if needed.

@esoteric-ephemera esoteric-ephemera merged commit 2542a26 into materialsproject:main Jun 27, 2025
8 checks passed
@esoteric-ephemera esoteric-ephemera deleted the neb branch June 27, 2025 21:36
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.

4 participants