Skip to main content

molframe_core/
lib.rs

1//! Core types, storage and analysis contracts for molframe.
2//!
3//! This crate holds the vocabulary every other molframe crate speaks: the typed
4//! positions into a structure's tables, the interned identifiers, the chunked
5//! columnar store the coordinates and annotations live in, the immutable
6//! [`Structure`] built over it, and the contract types
7//! that make an analysis state what it assumed.
8//!
9//! It has almost no dependencies and no input or output of its own, so a project
10//! that wants only the types pays for only the types. Memory mapping and
11//! decompression are behind features for the same reason.
12//!
13//! # Layout
14//!
15//! - [`index`] — typed positions; a residue position is not an atom position.
16//! - [`element`] — element identity, and recovering one from an atom name.
17//! - [`span`] — where in a source file something was.
18//! - [`diagnostic`] — findings about data, returned alongside success.
19//! - [`symbol`] — interned identifiers, so no kernel compares strings.
20
21#![forbid(unsafe_code)]
22
23pub mod anisotropy;
24pub mod annotation;
25pub mod bond;
26pub mod chunk;
27pub mod column;
28pub mod contract;
29pub mod coords;
30pub mod diagnostic;
31pub mod element;
32pub mod execution;
33pub mod hashing;
34pub mod index;
35pub mod io;
36pub mod limits;
37pub mod optional;
38pub mod parallel;
39pub mod provider;
40pub mod secondary;
41pub mod selection;
42pub mod span;
43pub mod structure;
44pub mod symbol;
45pub mod topology;
46
47pub use anisotropy::{AnisotropicDisplacement, AnisotropyTable, AnisotropyTableBuilder};
48pub use annotation::{
49    AROMATIC_ATOM_ANNOTATION, ATOM_RADIUS_ANNOTATION, AUTODOCK_TYPE_ANNOTATION, AnnotationColumn,
50    AtomAnnotation, AtomAnnotations, COMPONENT_KIND_ANNOTATION, FORMAL_CHARGE_ANNOTATION,
51    HBOND_ACCEPTOR_ANNOTATION, HBOND_DONOR_ANNOTATION, INSTANCE_ID_ANNOTATION, PAE_ANNOTATION,
52    PARTIAL_CHARGE_ANNOTATION, PLDDT_ANNOTATION, POLYMER_ATOM_ROLE_ANNOTATION,
53    SEGMENT_ID_ANNOTATION, STEREO_CONFIGURATION_ANNOTATION,
54};
55pub use bond::{BondAdjacency, BondOrder, BondProvenance, BondRecord, BondTable, BondTableBuilder};
56pub use chunk::{
57    AtomChunk, AtomChunkStats, ChunkBuilder, ElementMask, Extremes, ParentMapping,
58    TARGET_CHUNK_ATOMS,
59};
60pub use column::{BitVec, EncodedColumn, Presence, ValidityMask};
61pub use contract::{Analysis, AnalysisPolicy, Coverage, Provenance, Status};
62pub use coords::{Aabb, CoordinateBlock, CoordinateGeneration};
63pub use diagnostic::{
64    Class, Code, ContextItem, Diagnostic, Diagnostics, Findings, Kind, Rendered, Severity,
65    Strictness,
66};
67pub use element::Element;
68pub use execution::{
69    Backpressure, Batch, BatchDemand, BatchLease, BatchSource, CancellationToken, Cancelled,
70    ContextError, ExecutionContext, ExecutionContextBuilder, MemoryBudget, MemoryBudgetError,
71    MemoryReservation, ScratchPolicy, SpillArtifact, SpillError, SpillFile, SpillReader,
72    TempStoragePolicy,
73};
74pub use index::{
75    AnisotropyIndex, AtomIndex, BondIndex, ChainIndex, EntityIndex, InstanceId, ModelIndex,
76    ResidueIndex,
77};
78pub use io::{
79    AmbiguousResidueBoundaryPolicy, BatchContinuity, ByteWindow, CategoryFilter, ContinuityLevel,
80    Format, InputBuffer, InputKind, MissingElementPolicy, ParseMode, ReadOptions, ReadResult,
81    SourceBytes, SpillWindowedFile, StructureAtomRecord, StructureBatch, StructureBatchBuffer,
82    StructureBatchBuilder, StructureBatchError, StructureBatchPool, WindowedFile,
83    WindowedSourceFile, collect_structure, write_output,
84};
85pub use limits::{CapacityError, TableError};
86pub use optional::{OptionalI32, OptionalSymbol};
87pub use provider::{
88    AtomEndpoint, BondChunk, BondChunkProvider, BondChunkRecord, ChunkDescriptor, ChunkId,
89    ChunkLayout, DatasetCatalog, DatasetDescriptor, DatasetId, FrameChunk, FrameChunkProvider,
90    LocalRow, LogicalRow, PayloadKind, PropertyChunk, PropertyChunkProvider, PropertyKind,
91    PropertyValue, ProviderError, StructureChunk, StructureChunkProvider, TARGET_CHUNK_BONDS,
92};
93pub use secondary::{SecondaryAssignment, SecondarySource, SecondaryStructure};
94pub use selection::AtomSelection;
95pub use span::{ByteSpan, Position};
96pub use structure::{
97    CountDifference, DifferenceError, ExtensionStore, MetadataDifference, Structure, StructureData,
98    StructureDifference, StructureDifferenceOptions, StructureView, ValueDifference,
99    structure_difference,
100};
101pub use symbol::{AltId, DictionaryFull, Interner, SymbolId};
102pub use topology::{EntityKind, PolymerKind, Topology};