prolint.analysis.density

Density map analysis for spatial distribution of database molecules.

Attributes

Classes

RadialDensityAnalysis

Radial density profile analysis.

DensityMapAnalysis

Compute 2D spatial density maps of database molecules around query.

Module Contents

prolint.analysis.density.logger[source]
class prolint.analysis.density.RadialDensityAnalysis(universe, contacts: prolint.core.contact_provider.ComputedContacts)[source]

Bases: prolint.analysis.base.BaseAnalysis

Radial density profile analysis.

Computes radially-averaged density from a 2D density map, useful for analyzing the radial distribution of database molecules around the query.

See also

DensityMapAnalysis

Generates the 2D density map input

name = 'radial_density'[source]

Analysis name for registry.

description = 'Radial density profile from 2D density map'[source]

Human-readable description.

run(density: List[List[float]], x_edges: List[float], y_edges: List[float], n_bins: int = 50) prolint.analysis.base.AnalysisResult[source]

Compute radial density profile from 2D density map.

Parameters:
  • density (list of list of float) – 2D density array from DensityMapAnalysis.

  • x_edges (list of float) – X bin edges from DensityMapAnalysis.

  • y_edges (list of float) – Y bin edges from DensityMapAnalysis.

  • n_bins (int, default=50) – Number of radial bins.

Returns:

Result with data containing:

  • r_centers : list of float radial bin centers

  • radial_density : list of float density values

  • r_max : float maximum radius

Return type:

AnalysisResult

class prolint.analysis.density.DensityMapAnalysis(universe, contacts: prolint.core.contact_provider.ComputedContacts)[source]

Bases: prolint.analysis.base.BaseAnalysis

Compute 2D spatial density maps of database molecules around query.

Computes the 2D spatial distribution of database molecule positions relative to the query center of mass over trajectory frames.

See also

RadialDensityAnalysis

Radially-averaged density from this output

name = 'density_map'[source]

Analysis name for registry.

description = '2D spatial density of database molecules around query'[source]

Human-readable description.

run(frame_start: int = 0, frame_end: int | None = None, frame_step: int = 1, bins: int = 50, database_types: List[str] | None = None) prolint.analysis.base.AnalysisResult[source]

Compute 2D density map of database molecules.

Parameters:
  • frame_start (int, default=0) – First frame to process.

  • frame_end (int, optional) – Last frame (exclusive). Defaults to total frames.

  • frame_step (int, default=1) – Step between frames.

  • bins (int, default=50) – Number of bins in each dimension.

  • database_types (list of str, optional) – Database residue names to include (e.g., [“CHOL”, “POPC”]). If None, includes all database atoms.

Returns:

Result with data containing:

  • density : 2D list of float density values

  • x_edges, y_edges : list of float bin edges

  • x_centers, y_centers : list of float bin centers

  • query_density : 2D list of float query atom density

Return type:

AnalysisResult