pub struct MoleculeIn {Show 15 fields
pub id: Option<String>,
pub atoms: Vec<AtomIn>,
pub bonds: Vec<BondIn>,
pub color: Option<String>,
pub atom_shade: Option<Vec<f64>>,
pub bond_shade: Option<Vec<f64>>,
pub shade_vmin: Option<f64>,
pub shade_vmax: Option<f64>,
pub scale: f64,
pub weight: f64,
pub aromatic: AromaticStyle,
pub debug_box: bool,
pub debug_align: bool,
pub align_debug: Option<AlignDebug>,
pub spokes: Vec<SpokeIn>,
}Expand description
One molecule ready to paint (coords already in SVG / SCALE space).
Publication circles live on the document MolNode.circle overlay, not here.
Fields§
§id: Option<String>§atoms: Vec<AtomIn>§bonds: Vec<BondIn>§color: Option<String>Ink color for backbone bonds and atom labels (CSS). Default #111.
atom_shade: Option<Vec<f64>>Per-atom shade scores (same order as Self::atoms); omit if unshaded.
bond_shade: Option<Vec<f64>>Per-bond shade scores (same order as Self::bonds).
shade_vmin: Option<f64>Shade colormap window low (default 0). Not inferred from data.
shade_vmax: Option<f64>Shade colormap window high (default 1). Not inferred from data.
scale: f64Uniform diagram scale (font, stroke, pad, geometry). 1.0 = house size.
weight: f64Ink weight for backbone stroke and label glyph thicken. 1.0 = house;
may go down to ~2/3 (Regular stem); typical thicken up to ~2.
aromatic: AromaticStyleAromatic ring paint: circle (default) or Kekulé doubles.
debug_box: boolWhen true, paint dashed debug rectangles for label / mol / scene boxes.
debug_align: boolWhen true, paint alignment correspondence overlays (needs Self::align_debug).
align_debug: Option<AlignDebug>Stamped match tags from the host/core align step (not cascading).
spokes: Vec<SpokeIn>Ring-center stems (CX m:). Empty when the mol has none.
Implementations§
Source§impl MoleculeIn
impl MoleculeIn
Sourcepub fn diagram_scale(&self) -> f64
pub fn diagram_scale(&self) -> f64
Effective diagram scale; non-positive values fall back to 1.0.
Sourcepub fn diagram_weight(&self) -> f64
pub fn diagram_weight(&self) -> f64
Absolute ink multiplier for this mol (user weight × house base).
§Panics
Panics if Self::weight is invalid (see crate::metrics::diagram_weight).
Trait Implementations§
Source§impl Clone for MoleculeIn
impl Clone for MoleculeIn
Source§fn clone(&self) -> MoleculeIn
fn clone(&self) -> MoleculeIn
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MoleculeIn
impl Debug for MoleculeIn
Source§impl Default for MoleculeIn
impl Default for MoleculeIn
Source§impl<'de> Deserialize<'de> for MoleculeIn
impl<'de> Deserialize<'de> for MoleculeIn
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>,
Source§impl PartialEq for MoleculeIn
impl PartialEq for MoleculeIn
Source§impl Serialize for MoleculeIn
impl Serialize for MoleculeIn
impl StructuralPartialEq for MoleculeIn
Auto Trait Implementations§
impl Freeze for MoleculeIn
impl RefUnwindSafe for MoleculeIn
impl Send for MoleculeIn
impl Sync for MoleculeIn
impl Unpin for MoleculeIn
impl UnsafeUnpin for MoleculeIn
impl UnwindSafe for MoleculeIn
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more