Skip to content

density

DensityFilterQuery dataclass

Query for filtering AlphaFoldDB structures based on density confidence.

Parameters:

Name Type Description Default
confidence float

The confidence threshold for filtering residues. Residues with a pLDDT (b-factor) above this value are considered high confidence.

required
min_threshold int

The minimum number of high-confidence residues required to keep the structure.

required
max_threshold int

The maximum number of high-confidence residues allowed to keep the structure.

required

DensityFilterResult dataclass

Result of filtering AlphaFoldDB structures based on density confidence.

Parameters:

Name Type Description Default
pdb_file str

The name of the PDB file that was processed.

required
count int

The number of residues with a pLDDT above the confidence threshold.

required
density_filtered_file Path | None

The path to the density filtered PDB file, if passed filter.

None

filter_on_density(alphafold_pdb_files, query, density_filtered_dir)

Filter AlphaFoldDB structures based on density confidence.

Parameters:

Name Type Description Default
alphafold_pdb_files list[Path]

List of PDB files from AlphaFoldDB to filter.

required
query DensityFilterQuery

The density filter query containing the confidence thresholds.

required
density_filtered_dir Path

Directory where the filtered PDB files will be saved.

required

Yields:

Type Description
Generator[DensityFilterResult]

For each PDB files yields whether it was filtered or not, and number of residues with pLDDT above the confidence threshold.