Rust¶
Item docs from the dseams crate, taken from dseams/src/lib.rs. dseams is the safe API. dseams-sys is the raw FFI, re-exported as seams::ffi.
Native API¶
Generated from the sources named below. A name on this page is a public call in that language.
seams::Axis¶
pub enum Axis
seams::BondOptions¶
pub struct BondOptions
seams::Brine¶
pub struct Brine
Owned planar ice-front measurement. ``` let (xyz, edge) = seams::diamond8(); let mut system = seams::System::new()?; system.set_ortho(&xyz, edge, edge, edge)?; let ice = vec![1; 8]; let front = system.brine(&ice, &seams::BrineOptions::default())?; let pockets = front.pockets()?; assert!(pockets.pockets >= 0); # Ok::<(), seams::Error>(()) ```
seams::BrineFronts¶
pub struct BrineFronts
seams::BrineOptions¶
pub struct BrineOptions
seams::BrineProfile¶
pub struct BrineProfile
seams::CageCounts¶
pub struct CageCounts
seams::CageLabel¶
pub enum CageLabel
seams::CageOptions¶
pub struct CageOptions
seams::Cages¶
pub struct Cages
Owned hexagonal and double-diamond membership. ``` let (xyz, edge) = seams::diamond8(); let mut system = seams::System::new()?; system.set_ortho(&xyz, edge, edge, edge)?; let cages = system.cages(&seams::CageOptions::default())?; let counts = cages.counts()?; assert_eq!(counts.hexagonal + counts.cubic + counts.water + counts.both, 8); # Ok::<(), seams::Error>(()) ```
seams::ChillOptions¶
pub struct ChillOptions
seams::ChillRule¶
pub enum ChillRule
seams::Classification¶
pub struct Classification
seams::Contacts¶
pub struct Contacts
seams::DensityOptions¶
pub struct DensityOptions
seams::DensityProfile¶
pub struct DensityProfile
seams::Distribution¶
pub struct Distribution
seams::DistributionOptions¶
pub struct DistributionOptions
seams::DomainOptions¶
pub struct DomainOptions
seams::DomainReport¶
pub struct DomainReport
seams::DomainSubset¶
pub enum DomainSubset
seams::Error¶
pub enum Error
seams::Fingerprint¶
pub struct Fingerprint
Owned topological fingerprint. ``` let (xyz, edge) = seams::diamond8(); let mut system = seams::System::new()?; system.set_ortho(&xyz, edge, edge, edge)?; let fp = system.fingerprint(&seams::FingerprintOptions::default())?; assert!(!fp.key()?.is_empty()); assert_eq!(fp.rings()?.len(), 13); # Ok::<(), seams::Error>(()) ```
seams::FingerprintOptions¶
pub struct FingerprintOptions
seams::Graph¶
pub enum Graph
seams::KnnOptions¶
pub struct KnnOptions
seams::Label¶
pub enum Label
seams::NeighbourOptions¶
pub struct NeighbourOptions
seams::NeighbourPair¶
pub struct NeighbourPair
seams::NeighbourPairs¶
pub struct NeighbourPairs
Iterator of directed neighbour pairs. Yields [`NeighbourPair`]. Created by [`Neighbours::pairs`].
seams::Neighbours¶
pub struct Neighbours
Owned neighbour list. The handle is freed on drop. It is [`Send`] and not [`Sync`]. ``` let (xyz, edge) = seams::diamond8(); let mut system = seams::System::new()?; system.set_ortho(&xyz, edge, edge, edge)?; let list = system.neighbours(&seams::NeighbourOptions::default())?; assert!(list.pairs().all(|pair| pair.atom != pair.neighbour)); assert!(list.degrees()?.iter().all(|degree| *degree == 4)); # Ok::<(), seams::Error>(()) ```
seams::OrderOptions¶
pub struct OrderOptions
seams::Pockets¶
pub struct Pockets
seams::PrismCensus¶
pub struct PrismCensus
seams::PrismOptions¶
pub struct PrismOptions
seams::Q4Q6¶
pub struct Q4Q6
seams::Q6Bar¶
pub struct Q6Bar
seams::Q6BarOptions¶
pub struct Q6BarOptions
seams::Rejection¶
pub struct Rejection
seams::RingIter¶
pub struct RingIter
Iterator of primitive rings. Each item is a [`Result`] of vertex indices.
seams::RingOptions¶
pub struct RingOptions
seams::RingSymmetry¶
pub enum RingSymmetry
seams::Rings¶
pub struct Rings
Owned primitive-ring set. ``` let (xyz, edge) = seams::diamond8(); let mut system = seams::System::new()?; system.set_ortho(&xyz, edge, edge, edge)?; let rings = system.rings(&seams::RingOptions::default())?; assert!(rings.size() > 0); assert!(!rings.vertices(0)?.is_empty()); # Ok::<(), seams::Error>(()) ```
seams::RunningCoordination¶
pub struct RunningCoordination
seams::SheetOptions¶
pub struct SheetOptions
seams::SignatureMatch¶
pub struct SignatureMatch
seams::SignatureOptions¶
pub struct SignatureOptions
seams::SiteKind¶
pub enum SiteKind
seams::Status¶
pub enum Status
seams::Steinhardt¶
pub struct Steinhardt
seams::SteinhardtOptions¶
pub struct SteinhardtOptions
seams::System¶
pub struct System
One frame: coordinates, a cell, and the analyses that read them. The handle is freed on drop. It is [`Send`] and not [`Sync`]. ``` let mut system = seams::System::new()?; assert_eq!(system.count(), 0); let err = system.read(“missing-trajectory.lammpstrj”, 1, -1).expect_err(“no such file”); assert!(!err.message().is_empty()); # Ok::<(), seams::Error>(()) ```
seams::abi¶
pub fn abi () -> i32
seams::diamond8¶
pub fn diamond8 () -> (Vec<f64>, f64)
seams::label_name¶
pub fn label_name (label: Label) -> String
seams::nframes¶
pub fn nframes (path: &str) -> Result<usize, Error>
Count frames in a trajectory path. ``` let err = seams::nframes(”\0”).expect_err(“a nul cannot be a path”); assert_eq!(err.code(), seams_sys::SEAMS_ERR_ARG); ```
seams::num_threads¶
pub fn num_threads () -> i32
seams::ring_symmetry_name¶
pub fn ring_symmetry_name (symmetry: RingSymmetry) -> String
seams::set_num_threads¶
pub fn set_num_threads (n: i32) -> Result<(), Error>
Set the OpenMP width for the next call. Zero restores the library default. The width is process-global. Do not call this while another thread is inside the library. ``` seams::set_num_threads(1)?; assert_eq!(seams::num_threads(), 1); # Ok::<(), seams::Error>(()) ```
seams::version¶
pub fn version () -> String
C API¶
Each native call and the seams.h or seams_lang.h function it uses. The C column is the stable ABI.
Native |
C |
|---|---|
|
no direct C call |
|
no direct C call |
|
|
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
|
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
|
|
no direct C call |
|
|
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
|
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
|
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
no direct C call |
|
|
|
|
|
no direct C call |
|
|
|
|
|
|
|
|
|
|
|
|