nanover.imd.imd_state module

Module providing methods for storing ParticleInteractions in a StateDictionary.

class nanover.imd.imd_state.ImdStateWrapper(state_dictionary: StateDictionary, velocity_reset_available=False)

Bases: object

A wrapper around a StateDictionary that provides convenient methods for accessing and modifying ParticleInteractions.

Parameters:
  • state_dictionary – The state dictionary to wrap.

  • velocity_reset_available – Whether the dynamics this service is being used in allows velocity reset.

property active_interactions: Dict[str, ParticleInteraction]

The current dictionary of active interactions, keyed by interaction id.

Returns:

A copy of the dictionary of active interactions.

insert_interaction(interaction_id: str, interaction: ParticleInteraction)
remove_interaction(interaction_id: str)
property velocity_reset_available
nanover.imd.imd_state.dict_to_interaction(dictionary: Mapping[str, Any]) ParticleInteraction
nanover.imd.imd_state.interaction_to_dict(interaction: ParticleInteraction) Dict[str, None | str | int | float | bool | Iterable[Any] | Mapping[str, Any] | Iterable[None | str | int | float | bool | Iterable[Any] | Mapping[str, Any]] | Mapping[str, None | str | int | float | bool | Iterable[Any] | Mapping[str, Any]]]