simulariumio.cellpack package¶
Submodules¶
simulariumio.cellpack.cellpack_converter module¶
- class simulariumio.cellpack.cellpack_converter.CellpackConverter(input_data: CellpackData, progress_callback: Callable[[float], None] | None = None, callback_interval: float = 10)[source]¶
Bases:
TrajectoryConverter
This object reads packing results outputs from Cellpack (http://www.cellpack.org) and plot data and writes them in the JSON format used by the Simularium viewer
- Parameters:
- input_dataCellpackData
An object containing info for reading Cellpack 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.cellpack.cellpack_data module¶
- class simulariumio.cellpack.cellpack_data.CellpackData(results_file: InputFileData, recipe_file_path: str, meta_data: MetaData | None = None, display_data: Dict[str, DisplayData] | None = None, geometry_type: DISPLAY_TYPE = DISPLAY_TYPE.PDB, time_units: UnitData | None = None, spatial_units: UnitData | None = None, plots: List[Dict[str, Any]] | None = None, handedness: HAND_TYPE = HAND_TYPE.RIGHT, geometry_url: str | None = None)[source]¶
Bases:
object
This object holds simulation trajectory outputs from Cellpack (http://www.cellpack.org) and plot data
- Parameters:
- results_file: InputFileData
A InputFileData object containing the string path or string contents of the Cellpack results output txt file.
- recipe_file_path: str
A InputFileData object containing the string path or string contents of a Cellpack recipe that was used to produce the results_file. The recipe name must match in both files for the converter to run.
- meta_data: MetaData (optional)
An object containing metadata for the trajectory including box size, scale factor, and camera defaults NOTE: When passing in a scale_factor use the number relative to a normal cellPACK recipe, it will be scaled an additional 10% because of the conversion from cellPACK to Simularium.
- display_data: Dict[str, DisplayData] (optional)
A dictionary containing any per agent/ingredient display overrides, Ie, if the ingredients are all going to be displayed as PDBs, except for some.
- geometry_type: DISPLAY_TYPE
The display type to use for the ingredients
- time_units: UnitData (optional)
multiplier and unit name for time values Default: 1.0 second
- spatial_units: UnitData (optional)
multiplier and unit name for spatial values (including positions, radii, and box size) Default: 1.0 meter
- plots: List[Dict[str, Any]] (optional)
An object containing plot data already in Simularium format
- handedness: HAND_TYPE (optional)
The handedness of the data’s coordinate system Default: HAND_TYPE.RIGHT
- geometry_url: str (optional)
The base URL for all geometry files Default: https://raw.githubusercontent.com/mesoscope/cellPACK_data/master/cellPACK_database_1.1.0/geometries/ # noqa: E501
- display_data: Dict[str, DisplayData]¶
- geometry_type: DISPLAY_TYPE¶
- geometry_url: str¶
- plots: List[Dict[str, Any]]¶
- recipe_file_path: str¶
- results_file: InputFileData¶