Introduce more extensible scheme for extra properties.#464
Introduce more extensible scheme for extra properties.#464
Conversation
…h spins and charges
| spin: torch.Tensor | None = field(default=None) | ||
| system_idx: torch.Tensor | None = field(default=None) | ||
| _constraints: list["Constraint"] = field(default_factory=lambda: []) # noqa: PIE807 | ||
| _system_extras: dict[str, torch.Tensor] = field(default_factory=dict) |
There was a problem hiding this comment.
could consider removing privileged positions of spin and charge
| static_state.store_model_extras(model_outputs) | ||
|
|
||
| props = trajectory_reporter.report(static_state, 0, model=model) | ||
|
|
There was a problem hiding this comment.
I would probably be more in favor of getting rid of trajectory_reporter here and just concatenate the results returned. We should just copy the logic of detecting whether the property is per atom or per system.
Trajectory_reporter have more functionalities than that but I'm not sure many people use it when running this static() function
|
Nice work! I think that most of the time extra predicted properties are not useful in MD, so that |
I think here the aim was to just get something that would be general enough to be both input and output similar to Is this sufficient for the matris use-case? do you want to try explore that on top of this and then we can revisit this design? @Asecretboy would you be interested in adding a torchsim interface to https://github.com/HPC-AI-Team/MatRIS as an alternative to https://github.com/HPC-AI-Team/MatRIS/blob/c16f569ca08e6905e91b64e2ee68614303e46f7f/matris/applications/base.py#L24. TorchSim is an engine for batched MLIP workflows that enables fast MD with replicas/repeats or batched geometry optimization with minimal conceptual overhead c.f. ASE. |
|
Just putting this here for documentation purposes - but this is similar to another PR that I wrote and closed earlier: #354 |
|
I added a torch-sim interface HPC-AI-Team/MatRIS#5 |
This is a rough draft to try unlock #463