shnitsel.vis.datasheet¶
Submodules¶
Classes¶
Class to generate overview plots for a collection of trajectories. |
Package Contents¶
- class Datasheet(data, *, name=None, spectra_times=None, col_state=None, col_inter=None)¶
Class to generate overview plots for a collection of trajectories.
Multiple individual plots are possible. Available plots include: - per_state_histograms: Histograms of energy, forces and transition dipoles per state - separated_spectra_and_hists: Histograms of transition dipoles and time plots - noodle: Noodle plots of structure over time for each states - structure: Plot of the moleculare structure given either all positions or a smiles map - nacs_histograms: A histogram of the nacs between states as well as energy and force histograms - timeplots: Plot of the active states over time.
- Parameters:
data (shnitsel.data.trajectory_format.Trajectory | shnitsel.data.shnitsel_db_format.ShnitselDB | str | os.PathLike | Self)
name (str | None)
spectra_times (list[int | float] | numpy.ndarray | None)
col_state (list | None)
col_inter (list | None)
- datasheet_pages: dict[str, shnitsel.vis.datasheet.datasheet_page.DatasheetPage]¶
- data_source: shnitsel.data.shnitsel_db_format.ShnitselDB | shnitsel.data.trajectory_format.Trajectory¶
- _copy_data(old)¶
Create a copy of an existing Datasheet instance.
- Parameters:
old (Self) – The old instance to copy
- calc_all()¶
Method to precalculate all relevant properties on all (sub-)DatasheetPages
- plot(include_per_state_hist=False, borders=False, consistent_lettering=True, single_key=None, path=None, **kwargs)¶
Function to plot datasheets for all trajectory groups/datasets in this Datasheet instance.
Will output the multi-page figure to a file at path if provided. Always returns an array of all generated figures to process further.
- Parameters:
include_per_state_hist (bool, optional) – Flag to include per-state histograms in the plot. Defaults to False.
borders (bool, optional) – A flag whether to draw borders around plots. Defaults to False.
consistent_lettering (bool, optional) – Flag to decide, whether same plots should always have the same letters. Defaults to True.
single_key (str, optional) – Key to a single entry in this set to plot. Keys are specified as paths in the ShnitselDB structure.
path (str | PathLike | None, optional) – Optional path to write a (multi-page) pdf of the resulting datasheets to. Defaults to None.
**kwargs – Can provide keyword arguments to be used in the pdf metadata dictionary. Among others: ‘title’, ‘author’, ‘subject’, ‘keywords’.
- Returns:
Map of the keys of the individual datasets to the resulting figure containing all of the Datasheet plots. If no key is available e.g. because a single trajectory was provided, the default key will be “root”. Figure: If a single_key is specified, will only return that single figure.
- Return type:
- _test_subfigures(include_per_state_hist=False, borders=False)¶
Internal function to test whether subfigure plotting works as intended