Skip to content

Add structure_property attribute to Structure #2884

Closed
@utf

Description

@utf

I'd like to add a structure_property attribute to the Structure class. Sometimes it is useful to have structure-wide properties that can be stored alongside the structure. One example is the Poscar.predictor_corrector_preamble which is necessary to write structures to continue MD simulations. Currently, only site-specific properties can be stored (e.g., the velocities and predictor-corrector coordinates).

With the present Structure class, it is not possible to store structures that can be used to continue MD simulations without storing this data separately which is quite unwieldy. I'm sure there are other instances where I've wanted to do this.

@shyuep would you support me adding this feature? The API would be the same as for adding site properties. E.g.,

structure.add_structure_property("property_name", property_value)

This is related to materialsproject/atomate2#185

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions