prolint.plotting.density¶
Density map plotters for spatial distribution visualization.
This module provides 2D density and radial density visualizations for database molecule distributions around query atoms.
Classes¶
Plotter for 2D spatial density maps. |
|
Plotter for radial density profiles. |
Module Contents¶
- class prolint.plotting.density.DensityMapPlotter[source]¶
Bases:
prolint.plotting.base.BasePlotterPlotter for 2D spatial density maps.
Visualizes the spatial distribution of database molecules around the query center of mass.
See also
DensityMapAnalysisGenerates density map data
RadialDensityPlotterRadial density profiles
- classmethod validate_result(result: prolint.analysis.base.AnalysisResult) None[source]¶
Validate that result contains required density map data.
- classmethod plot(result: prolint.analysis.base.AnalysisResult, colorscheme: str = 'viridis', xlabel: str = 'X (Å)', ylabel: str = 'Y (Å)', title: str = 'Density Map', figsize: Tuple[float, float] = (8, 8), ax: matplotlib.axes.Axes | None = None, show_colorbar: bool = True, cbar_label: str = 'Density', log_scale: bool = False, aspect: str = 'equal', vmin: float | None = None, vmax: float | None = None, show_query_contours: bool = True, highlight_query_residues: List[int] | None = None, highlight_database_ids: List[int] | None = None, universe=None, frame: int = 0) Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes][source]¶
Create 2D density map visualization.
- Parameters:
result (AnalysisResult) – Result from density_map analysis.
colorscheme (str, default="viridis") – Color scale name.
log_scale (bool, default=False) – Whether to use logarithmic color scale.
show_query_contours (bool, default=True) – Whether to overlay query density as contours.
highlight_query_residues (list of int, optional) – Query residues to highlight on the map.
highlight_database_ids (list of int, optional) – Database molecules to highlight.
universe (Universe, optional) – Required for highlighting residues.
ax (Axes, optional) – Existing axes to plot on.
- Returns:
Matplotlib figure and axes objects.
- Return type:
tuple of (Figure, Axes)
- class prolint.plotting.density.RadialDensityPlotter[source]¶
Bases:
prolint.plotting.base.BasePlotterPlotter for radial density profiles.
Visualizes radially-averaged density as a function of distance from the query center.
See also
RadialDensityAnalysisGenerates radial density data
DensityMapPlotter2D density maps
- classmethod validate_result(result: prolint.analysis.base.AnalysisResult) None[source]¶
Validate that result contains required radial density data.
- classmethod plot(result: prolint.analysis.base.AnalysisResult, xlabel: str = 'Distance from Center (Å)', ylabel: str = 'Radial Density', title: str = 'Radial Density Profile', figsize: Tuple[float, float] = (8, 4), ax: matplotlib.axes.Axes | None = None) Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes][source]¶
Create radial density profile plot.
- Parameters:
result (AnalysisResult) – Result from radial_density analysis.
ax (Axes, optional) – Existing axes to plot on.
- Returns:
Matplotlib figure and axes objects.
- Return type:
tuple of (Figure, Axes)