nanover.app.runner module
- class nanover.app.runner.NanoverRunner
Bases:
object
- property address
Gets the URL or IP address the server is running at.
- abstract property app_server
Get the underlying app of the runner.
- abstract close()
Closes the connection and stops the dynamics.
- abstract property is_running
Whether or not the molecular dynamics is currently running on a background thread or not.
- Returns:
True, if molecular dynamics is running, False otherwise.
- property name
Get the name of the server.
- abstract pause()
Pause the simulation, by cancelling any current run.
This method is called whenever a client runs the pause command, described in :mod:nanover.trajectory.frame_server.
- abstract play()
Run the simulation indefinitely
Cancels any current run and then begins running the simulation on a background thread.
This method is called whenever a client runs the play command, described in :mod:nanover.trajectory.frame_server.
- property port
Gets the port the server is running on.
- abstract reset()
- abstract run(steps: int | None = None, block: bool | None = None) None
Runs the molecular dynamics.
- Parameters:
steps – If passed, will run the given number of steps, otherwise will run forever on a background thread and immediately return.
block – If
False
, run in a separate thread. By default, “block” isNone
, which means it is automatically set toTrue
if a number of steps is provided and toFalse
otherwise.
- abstract step()
Take a single step of the simulation and stop.
This method is called whenever a client runs the step command, described in :mod:nanover.trajectory.frame_server.