Expand description
Reading and writing PDBx/mmCIF.
The format the archive actually distributes, and the one every other structural format is now defined against. Reading it happens in two steps that are deliberately separate: a document that preserves what the file said, and a structure that says what it means. Keeping them apart is what lets a file survive a round trip through categories this library has no interpretation for.
Re-exports§
pub use document::Category;pub use document::CifValue;pub use document::Column;pub use document::DataBlock;pub use document::Document;pub use write::CanonicalAtomRow;pub use write::CanonicalProjection;pub use write::CanonicalValue;pub use write::canonical_projection;
Modules§
Structs§
- Canonical
Atom Row - One allocation-free atom-site row over a borrowed model snapshot.
- Canonical
Projection - A validated semantic projection that can be consumed without text or a DOM.
- CifReader
- The reader for PDBx/mmCIF.
- CifWrite
Options - Decisions that cannot be recovered from a lowered structure.
- Mmcif
Batch Source - Incremental mmCIF coordinate rows.
- Rows
- The rows of one category, as a cursor a caller can walk.
- Small
CifAtom - One crystallographic atom site from core CIF.
- Small
CifBond - One geometric bond record with resolved atom indices.
- Small
CifOptions - Explicit decisions for lowering a small-molecule CIF.
- Small
CifStructure - One core-CIF crystal model.
Enums§
- Canonical
Value - A typed canonical value with CIF’s two distinct missing-value states.
- CifWrite
Error - A missing or invalid value that prevents canonical output.
- CifWrite
ToError - A canonical projection or output-stream failure.
- Pdbml
Error - Malformed or unsupported PDBML framing.
- Pdbml
Read Error - Failure either in XML conversion or existing mmCIF semantic lowering.
- Small
CifDialect - Dictionary dialect used to resolve core-CIF item names.
- Small
CifError - Invalid core-CIF small-molecule model.
Functions§
- canonical_
projection - Validates and borrows the canonical structure projection.
- lower
- Builds a structure from the first block of a document.
- lower_
small_ cif - Lowers the first core-CIF data block to a small-molecule crystal model.
Current DDL2 category/item names are used. Legacy DDL1 tags require
lower_small_cif_with_optionsandSmallCifOptions::ddl1. - lower_
small_ cif_ with_ options - Lowers the first core-CIF block under an explicit dictionary dialect.
- parse
- Reads a document.
- parse_
pdbml_ document - Parses PDBML/XML into the same lossless document used by mmCIF. Unknown categories and items are retained in source order.
- quote_
text - Quotes arbitrary text without changing its value when reparsed.
- read
- Reads a structure.
- read_
pdbml - Parses and semantically lowers PDBML through the existing mmCIF lowering.
- read_
with_ document - Reads both the lossless document and its normalised structure in one parse.
- render_
value - Renders a typed value as one CIF token or text field.
- split_
tag - Splits an item name into its category and its item.
- write_
canonical - Writes a structure using only identifiers retained in the structure.
- write_
canonical_ to - Streams canonical mmCIF directly to a byte destination.
- write_
canonical_ with_ options - Writes a structure with explicit choices for identities not retained by the graph.
- write_
pdbml - Writes one lossless document as PDBML/XML.
- write_
preserving - Writes a document back out, preserving what it held.
- write_
preserving_ to - Streams a document while preserving its retained category/value order.
- write_
quoted - Appends arbitrary text as one CIF token or text field without a temporary allocation.
Type Aliases§
- Parse
Result - A document and everything that was wrong with the file it came from.