simulariumio.medyan package¶
Submodules¶
simulariumio.medyan.medyan_converter module¶
- class simulariumio.medyan.medyan_converter.MedyanConverter(input_data: MedyanData, progress_callback: Callable[[float], None] | None = None, callback_interval: float = 10)[source]¶
Bases:
TrajectoryConverter
This object reads simulation trajectory outputs from MEDYAN (http://medyan.org/) and plot data and writes them in the JSON format used by the Simularium viewer
- Parameters:
- input_dataMedyanData
An object containing info for reading MEDYAN 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.medyan.medyan_data module¶
- class simulariumio.medyan.medyan_data.MedyanData(snapshot_file: InputFileData, meta_data: MetaData | None = None, filament_display_data: Dict[int, DisplayData] | None = None, linker_display_data: Dict[int, DisplayData] | None = None, motor_display_data: Dict[int, DisplayData] | None = None, agents_with_endpoints: List[str] | None = None, draw_fiber_points: bool = False, plots: List[Dict[str, Any]] | None = None, center: bool = True)[source]¶
Bases:
object
This object holds simulation trajectory outputs from MEDYAN (http://medyan.org/) and plot data
- Parameters:
- snapshot_fileInputFileData
A InputFileData object containing the string path or string contents of the MEDYAN snapshot.traj output file
- meta_dataMetaData (optional)
An object containing metadata for the trajectory including box size, scale factor, and camera defaults
- filament_display_dataDict[int, DisplayData] (optional)
A dict mapping MEDYAN type ID for filaments to DisplayData, including names and display info to use for rendering filament agent types in the Simularium Viewer Default: for names, use “filament[type ID]”
for radius, use 1.0, for rendering, use default representation and colors
- linker_display_dataDict[int, DisplayData] (optional)
A dict mapping MEDYAN type ID for linkers to DisplayData, including names and display info to use for rendering linker agent types in the Simularium Viewer Default: for names, use “linker[type ID]”
for rendering, use default representation and colors
- motor_display_dataDict[int, DisplayData] (optional)
A dict mapping MEDYAN type ID for motors to DisplayData, including names and display info to use for rendering motor agent types in the Simularium Viewer Default: for names, use “motor[type ID]”
for rendering, use default representation and colors
- agents_with_endpoints: List[str]
(only used for motors and linkers) A list of output agent names for which to draw spheres (with 2x radius of the fiber) at the end points that define the object in addition to a line connecting them Default: don’t draw any endpoints
- 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
- centerbool (optional)
If true, the spatial values of the data are centered around the origin (0, 0, 0) during conversion Default: True
- agents_with_endpoints: List[str]¶
- center: bool¶
- display_data: Dict[str, Dict[int, DisplayData]]¶
- draw_fiber_points: bool¶
- plots: List[Dict[str, Any]]¶
- snapshot_file: InputFileData¶