Skip to content

Enable compute metatomic#46

Draft
GardevoirX wants to merge 2 commits intometatomicfrom
compute
Draft

Enable compute metatomic#46
GardevoirX wants to merge 2 commits intometatomicfrom
compute

Conversation

@GardevoirX
Copy link

Summary

WIP

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system
  • Suitable tests have been added to the unittest tree.
  • A package specific README file has been included or updated
  • One or more example input decks are included

auto requested_inputs = mta_data->model->run_method("requested_inputs");
for (const auto& ivalue: requested_inputs.toList()) {
auto options = ivalue.get().toCustomClass<metatomic_torch::ModelOutputHolder>();
const auto& quantity = options->quantity().c_str();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be the ivalue.key, not the physical quantity

std::vector<double> peratom_cache_;
std::vector<double> peratom_array_cache_;
int n_samples = 0;
int n_components = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n_properties as well or can this be resized during the simulation?

} else {
error->all(FLERR, "the model requested an unsupported dtype '{}'", mta_data->capabilities->dtype());
}
auto system = this->system_adaptor->system_from_lmp(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should deal with requested inputs directly

auto output_components = output_block->components();
ResultKind kind = RESULT_NONE;
n_samples = output.size(0);
n_components = output.size(1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the output might not have components, or more than one component dimension

@GardevoirX GardevoirX changed the title Compute Enable compute metatomic Mar 12, 2026
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.

2 participants