C api tutorials - #311
Merged
EricBoittier merged 5 commits intoSep 2, 2026
Merged
Conversation
Expand the C gallery with richer system queries, a harmonic Einstein-solid model, plugin registration, and strings/errors/units helpers. Mark the section as WIP and cite the published metatomic paper in the metadata demo. Co-authored-by: Cursor <[email protected]>
EricBoittier
marked this pull request as ready for review
September 2, 2026 09:41
Leave execute_inner unimplemented so CI is not blocked by the hand-rolled DenseArray backend. Energy and forces can follow in a later PR. Co-authored-by: Cursor <[email protected]>
Member
|
This should have been reviewed before merging, I undid the merge and we can re-open! |
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.
Expand the C API tutorial gallery with practical examples built on top of the
existing
1-create-systemtutorial:1-create-system.c: query length unit plus types, positions, cell, andPBC via
mta_system_get_data, and document the expected stdout.2-add-model.c(WIP stub): fill anmta_model_tvtable, register itthrough a plugin, and print formatted metadata.
execute_inner(energyTensorMaps and forces) is deferred to a follow-up PR.
3-add-plugin.c: demonstrate in-processmta_register_plugin/mta_load_model, unknown-model error handling, and theMTA_REGISTER_PLUGINshared-library pattern.4-strings-errors-units.c: covermta_string_t, unit conversion,last-error handling, and
mta_format_metadata, citing the publishedmetatensor/metatomic paper (
https://doi.org/10.1063/5.0304911).examples/c/README.rst.Contributor (creator of pull-request) checklist
Reviewer checklist