neurosnap.structure.confidence module#

Granular pLDDT confidence metric exports and analysis.

class neurosnap.structure.confidence.PLDDTReport(atom, residue, chain, distribution, input_scale, metadata)[source]#

Bases: object

Report container for pLDDT confidence metrics.

Exposes DataFrames for atom, residue, chain, and distribution summaries.

atom: DataFrame#
chain: DataFrame#
distribution: DataFrame#
input_scale: float#
metadata: dict#
residue: DataFrame#
neurosnap.structure.confidence.summarize_plddt(structure, plddt=None, source='b_factor', scale='auto', boundaries=(50, 70, 90))[source]#

Summarize pLDDT metrics for a structure.

Experimental B-factors are not pLDDT, and callers are responsible for source correctness.

Parameters:
  • structure (Structure) – The input molecular structure.

  • plddt (Union[ndarray, Sequence[float], None]) – One finite pLDDT value per atom. If None, values are read from source.

  • source (str) – Source of pLDDT values when reading from the structure. Must be "b_factor".

  • scale (Union[str, float]) – Scale of the input values: "auto", 1.0 for [0, 1], or 100.0 for [0, 100].

  • boundaries (Sequence[float]) – Bin boundaries for distribution calculation.

Return type:

PLDDTReport

Returns:

The calculated pLDDT confidence report.