nanover.imd.imd_client module

class nanover.imd.imd_client.ImdClient(*, channel: Channel, make_channel_owner: bool = False)

Bases: NanoverClient

A simple IMD client, primarily for testing the IMD server.

close()

Closes the IMD client.

property interactions: Dict[str, ParticleInteraction]
start_interaction() str

Start an interaction

Returns:

A unique identifier for the interaction.

stop_all_interactions()

Stops all active interactions governed by this client.

stop_interaction(interaction_id: str) bool

Stops the interaction identified with the given interaction_id on the server.

Parameters:

interaction_id – The unique interaction ID, created with start_interaction(), that identifies the interaction to stop.

Raises:

KeyError, if the given interaction ID does not exist.

update_interaction(interaction_id: str, interaction: ParticleInteraction)

Updates the interaction identified with the given interaction_id on the server with parameters from the given interaction.

Parameters:
  • interaction_id – The unique interaction ID, created with start_interaction(), that identifies the interaction to update.

  • interaction – The :class: ParticleInteraction providing new parameters for the interaction.

Raises:

KeyError, if the given interaction ID does not exist.