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

seams::Axis

no direct C call

seams::BondOptions

no direct C call

seams::Brine

seams_brine, seams_brine_destroy

seams::BrineFronts

no direct C call

seams::BrineOptions

no direct C call

seams::BrineProfile

no direct C call

seams::CageCounts

no direct C call

seams::CageLabel

no direct C call

seams::CageOptions

no direct C call

seams::Cages

seams_cage_set, seams_cages_destroy

seams::ChillOptions

no direct C call

seams::ChillRule

no direct C call

seams::Classification

no direct C call

seams::Contacts

no direct C call

seams::DensityOptions

no direct C call

seams::DensityProfile

no direct C call

seams::Distribution

no direct C call

seams::DistributionOptions

no direct C call

seams::DomainOptions

no direct C call

seams::DomainReport

no direct C call

seams::DomainSubset

seams_handle_error

seams::Error

no direct C call

seams::Fingerprint

seams_fingerprint_destroy, seams_topo

seams::FingerprintOptions

no direct C call

seams::Graph

no direct C call

seams::KnnOptions

no direct C call

seams::Label

no direct C call

seams::NeighbourOptions

no direct C call

seams::NeighbourPair

no direct C call

seams::NeighbourPairs

no direct C call

seams::Neighbours

seams_neighbours

seams::OrderOptions

no direct C call

seams::Pockets

no direct C call

seams::PrismCensus

no direct C call

seams::PrismOptions

no direct C call

seams::Q4Q6

no direct C call

seams::Q6Bar

no direct C call

seams::Q6BarOptions

no direct C call

seams::Rejection

no direct C call

seams::RingIter

no direct C call

seams::RingOptions

no direct C call

seams::RingSymmetry

no direct C call

seams::Rings

seams_rings, seams_rings_destroy

seams::RunningCoordination

no direct C call

seams::SheetOptions

no direct C call

seams::SignatureMatch

no direct C call

seams::SignatureOptions

no direct C call

seams::SiteKind

no direct C call

seams::Status

no direct C call

seams::Steinhardt

no direct C call

seams::SteinhardtOptions

no direct C call

seams::System

seams_system, seams_system_destroy

seams::abi

seams_abi

seams::diamond8

no direct C call

seams::label_name

seams_label_name

seams::nframes

seams_path_nframes

seams::num_threads

seams_get_num_threads

seams::ring_symmetry_name

seams_ring_symmetry_name

seams::set_num_threads

seams_set_num_threads

seams::version

seams_version_string