pub struct Topology {
pub name: String,
pub nodes: Vec<[f64; 3]>,
pub edges: Vec<(usize, usize, [i32; 3])>,
}Expand description
Topology definition: positions and edges for a network.
Fields§
§name: StringName of the topology (e.g., “pcu”, “dia”, “sql”).
nodes: Vec<[f64; 3]>Node positions in fractional coordinates.
edges: Vec<(usize, usize, [i32; 3])>Edges as (node_i, node_j, cell_offset_j). cell_offset_j = [da, db, dc] for the periodic image of node_j.
Implementations§
Source§impl Topology
impl Topology
Sourcepub fn pcu() -> Self
pub fn pcu() -> Self
Primitive cubic (pcu) topology: single node at origin with 6 edges. Common for MOF-5 type structures.
Sourcepub fn bcu() -> Self
pub fn bcu() -> Self
Body-centered cubic (bcu) topology: 2 nodes at (0,0,0) and (0.5,0.5,0.5). 8-connected, found in UiO-66 and related Zr-MOFs.
Sourcepub fn fcu() -> Self
pub fn fcu() -> Self
Face-centered cubic (fcu) topology: 4 nodes with 12-connectivity. Common in UiO-66 type structures.
Sourcepub fn nbo() -> Self
pub fn nbo() -> Self
NbO (nbo) topology: 2 nodes with square-planar 4-connectivity. Found in MOF-101 and HKUST-1 (partially).
Sourcepub fn pts() -> Self
pub fn pts() -> Self
PtS (pts) topology: 2 nodes — one tetrahedral (4-conn) and one square-planar (4-conn). Found in MOF-11 and related pillared structures.
Sourcepub fn kgm() -> Self
pub fn kgm() -> Self
Kagomé (kgm) topology: 3 nodes in 2D hexagonal Kagomé lattice. 4-connected, found in many layered MOFs.
Sourcepub fn hxl() -> Self
pub fn hxl() -> Self
Hexagonal (hxl) topology: single node with 6-connected hexagonal lattice. 2D honeycomb-like, found in layered coordination polymers.
Sourcepub fn pillared_sql() -> Self
pub fn pillared_sql() -> Self
Simple cubic with pillars (pcu-pillar): pcu with additional vertical pillaring. Used for pillared-layer MOFs.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Topology
impl<'de> Deserialize<'de> for Topology
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Topology
impl RefUnwindSafe for Topology
impl Send for Topology
impl Sync for Topology
impl Unpin for Topology
impl UnsafeUnpin for Topology
impl UnwindSafe for Topology
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.