Function pdbtbx::save_gz

source ·
pub fn save_gz(
    pdb: &PDB,
    filename: impl AsRef<str>,
    level: StrictnessLevel,
    compression_level: Option<Compression>
) -> Result<(), Vec<PDBError>>
Expand description

Save the given PDB struct to the given file and compressing to gz, validating it beforehand. If validation gives rise to problems, use the save_raw function. The correct file type (pdb or mmCIF/PDBx) will be determined based on the given file extension.

Errors

Fails if the validation fails with the given level.