Skip to content

Allow models to request additional input data from the engine #13

Open
@bananenpampe

Description

@bananenpampe

Many ase claculators use additional information of the ase.Atoms object, such as total charge, magnetic moment and other arbitrary properties from the .info and .arrays dict. There should be a standardized way to define, what additional properties get read from the ase.Atoms object in the atomistic.ase_calculator.MetatensorCalculator, and then converted into a TensorBlock which gets passed wih the systems object.

For simplicity, I would propose that there should be two generic options that either access the properties from the .info and .arrays dict, plus predefined options for: get_initial_magnetic_moments() and get_initial_charges().

In principle this could be optional (so if the field/info does not exist, nothing will get parsed instead of rasining an Exception), should this be handeled on the ase.calculator side, or on the specific model side?

Maybe we could provide an additional parse_properties kwargs in the ase_calculator.MetatensorCalculator
and then handle the extraction logic here:
https://github.com/lab-cosmo/metatensor/blob/b34c0f3757b95cd85e04ce8cf468499e06a5a326/python/metatensor-torch/metatensor/torch/atomistic/ase_calculator.py#L211

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions