mdadash.backend.kernel.core
Kernel core where MDAnalysis code runs
Functions
|
Execute code in this kernel |
|
Initialize n universes in |
Classes
|
Buffered Trajectory |
Comm Handler |
|
|
Universe Manager |
|
Widgets Communication |
- class mdadash.backend.kernel.core.BufferedTrajectory(trajectory: <property object at 0x7d020c19e7f0>, batch_size: int)[source]
Bases:
objectBuffered Trajectory
This class is a wrapper for the trajectory reader and provides buffered access to the last n timesteps.
trajectory[index] can be used to access individual frames. Index values should be <= 0. trajectory[0] indicates the current frame, trajectory[-1] indicates the previous frame and so on till the configured batch size.
- class mdadash.backend.kernel.core.CommHandler[source]
Bases:
objectComm Handler
This class is responsible for handling all the communication to and from this kernel. This is the class that interfaces with the
KernelManageron the server side.
- class mdadash.backend.kernel.core.UniverseManager(_wm: WidgetManager, _comm_handler: CommHandler)[source]
Bases:
objectUniverse Manager
This class is responsible for managing all MDAnalysis universes. It has handlers to interact with the MD simulation. These handlers are invoked by comm messages sent from the server.
This also provides an iterable and indexable access to the individual universes.
- connect_to_simulations(universe_configs: list[dict]) None[source]
Connect to MD simulations
- Parameters:
universe_configs (list[dict]) – A list of configurations for universe(s) creation. Each dict has universe related config like topology, trajectory, imdclient params, user-defined kwargs etc
- class mdadash.backend.kernel.core.WidgetsComm(_um: UniverseManager, _wm: WidgetManager, _comm_handler: CommHandler)[source]
Bases:
objectWidgets Communication
This class is responsible for handling communications related to widgets. It uses
WidgetManagerinstance and communicates viaCommHandlerback to the server from this kernel.
- mdadash.backend.kernel.core.init_n_universes(data: dict) None[source]
Initialize n universes in
UniverseManager