simulariumio.mcell package

Submodules

simulariumio.mcell.mcell_converter module

class simulariumio.mcell.mcell_converter.McellConverter(input_data: McellData, progress_callback: Callable[[float], None] | None = None, callback_interval: float = 10)[source]

Bases: TrajectoryConverter

This object reads simulation trajectory outputs from MCell (https://mcell.org/) and plot data and writes them in the JSON format used by the Simularium viewer

Parameters:
input_dataMcellData

An object containing info for reading MCell simulation trajectory outputs and plot data

progress_callbackCallable[[float], None] (optional)

Callback function that accepts 1 float argument and returns None which will be called at a given progress interval, determined by callback_interval requested, providing the current percent progress Default: None

callback_intervalfloat (optional)

If a progress_callback was provided, the period between updates to be sent to the callback, in seconds Default: 10

simulariumio.mcell.mcell_data module

class simulariumio.mcell.mcell_data.McellData(path_to_data_model_json: str, path_to_binary_files: str, meta_data: MetaData | None = None, nth_timestep_to_read: int = 1, display_data: Dict[str, DisplayData] | None = None, surface_mol_rotation_angle: float | None = None, plots: List[Dict[str, Any]] | None = None)[source]

Bases: object

This object holds simulation trajectory outputs from MCell (https://mcell.org/) and plot data

Parameters:
path_to_data_model_jsonstr

A string path to the json file containing the data model

path_to_binary_filesstr

A string path to the directory containing visualization .dat binary files

meta_dataMetaData (optional)

An object containing metadata for the trajectory including box size, scale factor, and camera defaults

nth_timestep_to_read: int (optional)

Visualize every Nth timestep e.g. if 10, only every 10th timestep will be visualized Default: 1

display_data: Dict[str, DisplayData] (optional)

A mapping from molecule names in the MCell data to DisplayData, including names and display info to use for rendering this agent type in the Simularium Viewer Default: for names, use names from MCell,

for radius, use value from MCell, for rendering, use default representations and colors

surface_mol_rotation_angle: float (optional)

The angle to use to calculate rotations around surface molecules’ normals Default: use random angles

plotsList[Dict[str, Any]] (optional)

An object containing plot data already in Simularium format

display_data: Dict[str, DisplayData]
meta_data: MetaData
nth_timestep_to_read: int
path_to_binary_files: str
path_to_data_model_json: str
plots: List[Dict[str, Any]]
surface_mol_rotation_angle: float

Module contents