Function pdbtbx::open

source ·
pub fn open(
    filename: impl AsRef<str>,
    level: StrictnessLevel
) -> Result<(PDB, Vec<PDBError>), Vec<PDBError>>
Expand description

Open an atomic data file, either PDB or mmCIF/PDBx. The correct type will be determined based on the file extension.

Errors

Returns a PDBError if a BreakingError is found. Otherwise it returns the PDB with all errors/warnings found while parsing it.

If you want to open a file from memory see open_raw. There are also function to open a specified file type directly see crate::open_pdb and crate::open_mmcif respectively.