plinder.core.index.system#

class plinder.core.index.system.PlinderSystem(*, system_id: str, release: PlinderRelease | None = None, prune: bool = True, skip_3d_confgen: bool = False, complete_missing_atoms: bool = False, source_mmcif: Path | str | None = None, reconstruction_dir: Path | str | None = None, canonical_ligand_dir: Path | str | None = None, biounit_chains: DataFrame | None = None, reconstruction_options: SystemReconstructionOptions = SystemReconstructionOptions(system_waters='interacting', receptor_waters='interacting', system_include_ligands=True, system_include_other_protein_chains=False, system_include_other_ligand_chains=False, receptor_include_other_protein_chains=False, validate_biounit_chain_ids=True))[source]#

Bases: object

Core class for interacting with a single system and its assets. Annotation data is queried lazily for one entry or system. Release structure views are reconstructed from a deposited PDB mmCIF cached under the configured PLINDER directory; canonical ASU ligand SDFs are loaded from the ligand archive independently. An explicit source mmCIF can override the managed cache.

property entry: DataFrame#

Store the annotation rows for this PDB entry.

Returns:
pd.DataFrame

Ligand-level annotation rows for the entry.

property system: DataFrame#

Return ligand-level annotation rows for this system.

Returns:
pd.DataFrame

Annotation rows for the system.

property receptor_type: str#

Return the receptor polymer composition recorded during ingestion.

property receptor_chain_types: dict[str, str]#

Map each system receptor instance chain to its polymer type.

property biounit_chains: DataFrame#

Return ingested chain membership for this biological assembly.

property source_mmcif_path: Path#

Return the explicit or release-cached deposited PDB mmCIF.

property reconstructed: ReconstructedSystem#

In-memory biological-assembly views reconstructed from source mmCIF.

reconstruct(*, outputs: SystemReconstructionOutputs, options: SystemReconstructionOptions | None = None, overwrite: bool = False) → dict[str, Path]#

Write exactly the requested reconstructed assets.

property archive: Path#

Return the path to the directory containing the plinder system

Returns:
Path

directory containing the plinder system

property system_cif: str#

Path to the system.cif file

Returns:
str

path

property receptor_cif: str#

Path to the receptor.cif file

Returns:
str

path

property sequences_fasta: str#

Path to the sequences.fasta file

Returns:
str

path

property sequences: dict[str, str]#

Parsed FASTA contents from sequences.fasta.

Returns:
dict[str, str]

Mapping from chain ID to sequence.

property canonical_ligand_sdfs: dict[str, str]#

Map system ligand instances to the single canonical ASU SDF copy.

property ligand_sdfs: dict[str, str]#

Return a dictionary of ligand names to paths to ligand sdf files

Returns:
dict[str, str]

dictionary of ligand names to paths to ligand sdf files

property structures: list[str]#

Return a list of paths to all structures in the plinder system

Returns:
list[str]

list of paths to structures

property linked_apo_structures: DataFrame#

Return ranked deposited apo chains linked to this holo system.

reconstruct_linked_apo(linked_structure_id: str | None = None, *, output_cif: Path | str | None = None, source_mmcif: Path | str | None = None, overwrite: bool = False) → Path#

Reconstruct one linked apo chain from its deposited source mmCIF.

When linked_structure_id is omitted, the highest-ranked link is selected. The result contains the exact biological-assembly chain that was scored, with source sequence and chemical-component metadata.

superpose_linked_apo(linked_structure_id: str | None = None, *, reference_chain: str | None = None, output_cif: Path | str | None = None, source_mmcif: Path | str | None = None, overwrite: bool = False) → Path#

Reconstruct and fit one linked apo chain to a holo receptor chain.

The reference chain is inferred when the holo receptor contains one protein chain. Multichain receptors require reference_chain so the fit is never chosen arbitrarily.

property receptor_structure: struc.AtomArray#

Return the receptor structure as biotite AtomArray.

property ligand_structures: dict[str, 'struc.AtomArray']#

Return heavy-atom ligand structures as Biotite atom arrays.

property ligand_mols: dict[str, 'Chem.Mol']#

Return the ligand molecules as RDKit Mol objects.

property num_ligands: int#

Return the number of ligands in the system

Returns:
int
property num_proteins: int#

Return the number of proteins in the system

Returns:
int
property holo_structure: Structure#

Load holo structure

property smiles: dict[str, str] | None#