biomol.BioMol#

class BioMol(atom_container, residue_container, chain_container, index_table, metadata=None)[source]#

Bases: Generic[A_co, R_co, C_co]

A class representing a biomolecular structure.

Parameters:
  • atom_container (FeatureContainer) – The container holding atom-level features.

  • residue_container (FeatureContainer) – The container holding residue-level features.

  • chain_container (FeatureContainer) – The container holding chain-level features.

  • index_table (IndexTable) – The index table mapping atoms, residues, and chains.

  • metadata (dict[str, Any] | None, optional) – Additional metadata associated with the biomolecular structure.

Attributes

atoms

View of the atoms in the selection.

chains

View of the chains in the selection.

index_table

The index table mapping atoms, residues, and chains.

metadata

The metadata associated with the biomolecular structure.

residues

View of the residues in the selection.

Methods

concat

Concatenate multiple BioMol objects.

copy

Create a deep copy of the BioMol.

from_bytes

Deserialize the container from zstd-compressed bytes.

from_dict

Create a BioMol object from a dictionary.

get_container

Get the feature container for a specific structure level.

remove_features

Remove features at a specific structure level.

to_bytes

Serialize the container to zstd-compressed bytes.

to_dict

Convert the BioMol object to a dictionary.

update_features

Update features at a specific structure level.