simulariumio.cytosim package

Submodules

simulariumio.cytosim.cytosim_converter module

class simulariumio.cytosim.cytosim_converter.CytosimConverter(input_data: CytosimData, progress_callback: Callable[[float], None] | None = None, callback_interval: float = 10)[source]

Bases: TrajectoryConverter

This object reads simulation trajectory outputs from CytoSim (https://gitlab.com/f.nedelec/cytosim) and plot data and writes them in the JSON format used by the Simularium viewer

Parameters:
input_dataCytosimData

An object containing info for reading Cytosim 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.cytosim.cytosim_data module

class simulariumio.cytosim.cytosim_data.CytosimData(object_info: Dict[str, CytosimObjectInfo], meta_data: MetaData | None = None, draw_fiber_points: bool = False, plots: List[Dict[str, Any]] | None = None)[source]

Bases: object

This object holds simulation trajectory outputs from CytoSim (https://gitlab.com/f.nedelec/cytosim) and plot data

Parameters:
object_infoDict[str, CytosimObjectInfo]

A dict mapping Cytosim object type (either “fibers”, “solids”, “singles”, or “couples”) to info for reading and rendering the Cytosim data for agents of that object type

meta_dataMetaData

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

draw_fiber_pointsbool (optional)

(only used for fibers) in addition to drawing a line for each fiber, also draw spheres at every other point along it? Default: False

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

An object containing plot data already in Simularium format

draw_fiber_points: bool
meta_data: MetaData
object_info: Dict[str, CytosimObjectInfo]
plots: List[Dict[str, Any]]

simulariumio.cytosim.cytosim_object_info module

class simulariumio.cytosim.cytosim_object_info.CytosimObjectInfo(cytosim_file: InputFileData, display_data: Dict[int, DisplayData] | None = None, position_indices: List[int] = [2, 3, 4])[source]

Bases: object

This object contains info for reading Cytosim data for one type of Cytosim object (e.g. fibers, couples, singles, or solids)

Parameters:
cytosim_fileInputFileData

A InputFileData object containing a string path or string contents of Cytosim output text file, e.g. fiber_points.txt

display_dataDict[int, DisplayData] (optional)

A dict mapping the type index from Cytosim data to DisplayData, including names and display info to use for rendering this agent type in the Simularium Viewer Default: for names, use “[object type][type ID]”. e.g. “filament1”,

for radius, use 1.0, for rendering, use default representations and colors

position_indicesList[int] (optional)

the columns in Cytosim’s reports are not always consistent, use this to override them if your output file has different column indices for position XYZ Default: [2, 3, 4]

cytosim_file: InputFileData
display_data: Dict[int, DisplayData]
position_indices: List[int]

Module contents