Skip to content

chain

Filter structure files by chain.

filter_files_on_chain(file2chains, output_dir, out_chain='A', scheduler_address=None, copy_method='copy')

Filter mmcif/PDB files by chain.

Parameters:

Name Type Description Default
file2chains Collection[tuple[Path, str]]

Which chain to keep for each PDB file. First item is the PDB file path, second item is the chain ID.

required
output_dir Path

The directory where the filtered files will be written.

required
out_chain str

Under what name to write the kept chain.

'A'
scheduler_address str | Cluster | Literal['sequential'] | None

The address of the Dask scheduler. If not provided, will create a local cluster. If set to sequential will run tasks sequentially.

None
copy_method CopyMethod

How to copy when a direct copy is possible.

'copy'

Returns:

Type Description
list[ChainFilterStatistics]

Result of the filtering process.