narupa.app.runner module¶
-
class
narupa.app.runner.
NarupaRunner
¶ Bases:
object
-
address
¶ Gets the URL or IP address the server is running at.
-
app_server
¶ Get the underlying app of the runner.
-
close
()¶ Closes the connection and stops the dynamics.
-
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.
-
name
¶ Get the name of the server.
-
pause
()¶ Pause the simulation, by cancelling any current run.
This method is called whenever a client runs the pause command, described in :mod:narupa.trajectory.frame_server.
-
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:narupa.trajectory.frame_server.
-
port
¶ Gets the port the server is running on.
-
reset
()¶
-
run
(steps: Optional[int] = None, block: Optional[bool] = 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.
-
step
()¶ Take a single step of the simulation and stop.
This method is called whenever a client runs the step command, described in :mod:narupa.trajectory.frame_server.
-