Skip to main content

Crate molframe_core

Crate molframe_core 

Source
Expand description

Core types, storage and analysis contracts for molframe.

This crate holds the vocabulary every other molframe crate speaks: the typed positions into a structure’s tables, the interned identifiers, the chunked columnar store the coordinates and annotations live in, the immutable Structure built over it, and the contract types that make an analysis state what it assumed.

It has almost no dependencies and no input or output of its own, so a project that wants only the types pays for only the types. Memory mapping and decompression are behind features for the same reason.

§Layout

  • index — typed positions; a residue position is not an atom position.
  • element — element identity, and recovering one from an atom name.
  • span — where in a source file something was.
  • diagnostic — findings about data, returned alongside success.
  • symbol — interned identifiers, so no kernel compares strings.
  • numeric — the one home of every lossy numeric conversion.

Re-exports§

pub use anisotropy::AnisotropicDisplacement;
pub use anisotropy::AnisotropyTable;
pub use anisotropy::AnisotropyTableBuilder;
pub use annotation::AROMATIC_ATOM_ANNOTATION;
pub use annotation::ATOM_RADIUS_ANNOTATION;
pub use annotation::AUTODOCK_TYPE_ANNOTATION;
pub use annotation::AnnotationColumn;
pub use annotation::AtomAnnotation;
pub use annotation::AtomAnnotations;
pub use annotation::COMPONENT_KIND_ANNOTATION;
pub use annotation::FORMAL_CHARGE_ANNOTATION;
pub use annotation::HBOND_ACCEPTOR_ANNOTATION;
pub use annotation::HBOND_DONOR_ANNOTATION;
pub use annotation::INSTANCE_ID_ANNOTATION;
pub use annotation::MISSING_BAND_CODE;
pub use annotation::PAE_ANNOTATION;
pub use annotation::PARTIAL_CHARGE_ANNOTATION;
pub use annotation::PLDDT_ANNOTATION;
pub use annotation::POLYMER_ATOM_ROLE_ANNOTATION;
pub use annotation::PlddtBand;
pub use annotation::SEGMENT_ID_ANNOTATION;
pub use annotation::STEREO_CONFIGURATION_ANNOTATION;
pub use bond::BondAdjacency;
pub use bond::BondOrder;
pub use bond::BondProvenance;
pub use bond::BondRecord;
pub use bond::BondTable;
pub use bond::BondTableBuilder;
pub use chunk::AtomChunk;
pub use chunk::AtomChunkStats;
pub use chunk::ChunkBuilder;
pub use chunk::ElementMask;
pub use chunk::Extremes;
pub use chunk::ParentMapping;
pub use chunk::TARGET_CHUNK_ATOMS;
pub use column::BitVec;
pub use column::EncodedColumn;
pub use column::Presence;
pub use column::ValidityMask;
pub use contract::Analysis;
pub use contract::AnalysisPolicy;
pub use contract::Coverage;
pub use contract::Provenance;
pub use contract::Status;
pub use coords::Aabb;
pub use coords::CoordinateBlock;
pub use coords::CoordinateGeneration;
pub use coords::CoordinateSample;
pub use coords::CoordinateSampleError;
pub use diagnostic::Class;
pub use diagnostic::Code;
pub use diagnostic::ContextItem;
pub use diagnostic::Diagnostic;
pub use diagnostic::Diagnostics;
pub use diagnostic::Findings;
pub use diagnostic::Kind;
pub use diagnostic::Rendered;
pub use diagnostic::Severity;
pub use diagnostic::Strictness;
pub use element::Element;
pub use execution::Backpressure;
pub use execution::Batch;
pub use execution::BatchDemand;
pub use execution::BatchLease;
pub use execution::BatchSource;
pub use execution::CancellationToken;
pub use execution::Cancelled;
pub use execution::ContextError;
pub use execution::ExecutionContext;
pub use execution::ExecutionContextBuilder;
pub use execution::MemoryBudget;
pub use execution::MemoryBudgetError;
pub use execution::MemoryReservation;
pub use execution::ScratchPolicy;
pub use execution::SpillArtifact;
pub use execution::SpillError;
pub use execution::SpillFile;
pub use execution::SpillReader;
pub use execution::TempStoragePolicy;
pub use index::AnisotropyIndex;
pub use index::AtomIndex;
pub use index::BondIndex;
pub use index::ChainIndex;
pub use index::EntityIndex;
pub use index::InstanceId;
pub use index::ModelIndex;
pub use index::ResidueIndex;
pub use io::AmbiguousResidueBoundaryPolicy;
pub use io::BatchContinuity;
pub use io::ByteWindow;
pub use io::CategoryFilter;
pub use io::ContinuityLevel;
pub use io::Format;
pub use io::InputBuffer;
pub use io::InputKind;
pub use io::MissingElementPolicy;
pub use io::OccupancyPolicy;
pub use io::ParseMode;
pub use io::ReadOptions;
pub use io::ReadResult;
pub use io::SourceBytes;
pub use io::SpillWindowedFile;
pub use io::StructureAtomRecord;
pub use io::StructureBatch;
pub use io::StructureBatchBuffer;
pub use io::StructureBatchBuilder;
pub use io::StructureBatchError;
pub use io::StructureBatchPool;
pub use io::WindowedFile;
pub use io::WindowedSourceFile;
pub use io::collect_structure;
pub use io::write_output;
pub use limits::CapacityError;
pub use limits::TableError;
pub use optional::OptionalI32;
pub use optional::OptionalSymbol;
pub use provider::AtomEndpoint;
pub use provider::BondChunk;
pub use provider::BondChunkProvider;
pub use provider::BondChunkRecord;
pub use provider::ChunkDescriptor;
pub use provider::ChunkId;
pub use provider::ChunkLayout;
pub use provider::DatasetCatalog;
pub use provider::DatasetDescriptor;
pub use provider::DatasetId;
pub use provider::FrameChunk;
pub use provider::FrameChunkProvider;
pub use provider::LocalRow;
pub use provider::LogicalRow;
pub use provider::PayloadKind;
pub use provider::PropertyChunk;
pub use provider::PropertyChunkProvider;
pub use provider::PropertyKind;
pub use provider::PropertyValue;
pub use provider::ProviderError;
pub use provider::StructureChunk;
pub use provider::StructureChunkProvider;
pub use provider::TARGET_CHUNK_BONDS;
pub use secondary::SecondaryAssignment;
pub use secondary::SecondarySource;
pub use secondary::SecondaryStructure;
pub use selection::AtomSelection;
pub use span::ByteSpan;
pub use span::Position;
pub use structure::CountDifference;
pub use structure::DifferenceError;
pub use structure::ExtensionStore;
pub use structure::MetadataDifference;
pub use structure::Structure;
pub use structure::StructureData;
pub use structure::StructureDifference;
pub use structure::StructureDifferenceOptions;
pub use structure::StructureView;
pub use structure::ValueDifference;
pub use structure::structure_difference;
pub use symbol::AltId;
pub use symbol::DictionaryFull;
pub use symbol::Interner;
pub use symbol::SymbolId;
pub use topology::EntityKind;
pub use topology::PolymerKind;
pub use topology::Topology;

Modules§

anisotropy
Anisotropic displacement parameters as a sparse per-atom table.
annotation
Typed per-atom annotations.
bond
Bond graph storage and adjacency.
chunk
Atoms in chunks: columnar within a chunk, chunked across the structure.
column
Column storage: encodings, bit-level primitives, and why a value is absent.
contract
What an analysis assumed, and what it is therefore worth.
coords
Coordinate storage and bounds.
diagnostic
Findings about data, accumulated and returned alongside success.
element
Chemical element identity.
execution
Bounded execution contracts for streaming and out-of-core work.
hashing
Hashing for keys the engine assigned itself.
index
Typed table positions.
io
Getting bytes in, recognising what they are, and the contract readers meet.
limits
Explicit representation limits for public storage types.
numeric
The one place a numeric conversion that can lose information is written.
optional
Compact optional scalar representations.
parallel
Dividing work so that the answer does not depend on how many threads ran it.
provider
Out-of-core provider contracts for renderer and analysis consumers.
secondary
Per-residue secondary-structure vocabulary shared by readers and analyses.
selection
Atom selection representations.
span
Source byte and line locations.
structure
The normalised structure, the views over it, and the invariants it holds.
symbol
Interned identifiers.
topology
The hierarchy, stored as offset tables rather than nested collections.

Macros§

diagnostic_from
Implements From<&E> and From<E> for Diagnostic.