pub struct MolHandle { /* private fields */ }Expand description
A handle to a parsed molecule. Owns the molecule behind an Rc so that
it can be cheaply cloned on the JS side without copying atom/bond data.
Implementations§
Source§impl MolHandle
impl MolHandle
Sourcepub fn atom_count(&self) -> usize
pub fn atom_count(&self) -> usize
Number of heavy atoms (explicit atoms in the graph; does not count implicit H).
Sourcepub fn bond_count(&self) -> usize
pub fn bond_count(&self) -> usize
Number of bonds.
Sourcepub fn formula(&self) -> String
pub fn formula(&self) -> String
Molecular formula string (Hill notation: C first, H second, then alphabetical).
Sourcepub fn canonical_smiles(&self) -> String
pub fn canonical_smiles(&self) -> String
Canonical SMILES string.
Sourcepub fn molecular_weight(&self) -> f64
pub fn molecular_weight(&self) -> f64
Average molecular weight (Da).
Sourcepub fn lipinski_passes(&self) -> bool
pub fn lipinski_passes(&self) -> bool
Returns true if the molecule satisfies Lipinski’s Rule of Five.
Sourcepub fn heavy_atom_count(&self) -> usize
pub fn heavy_atom_count(&self) -> usize
Number of non-hydrogen heavy atoms.
Trait Implementations§
Source§impl FromWasmAbi for MolHandle
impl FromWasmAbi for MolHandle
Source§impl IntoWasmAbi for MolHandle
impl IntoWasmAbi for MolHandle
Source§impl LongRefFromWasmAbi for MolHandle
impl LongRefFromWasmAbi for MolHandle
Source§impl OptionFromWasmAbi for MolHandle
impl OptionFromWasmAbi for MolHandle
Source§impl OptionIntoWasmAbi for MolHandle
impl OptionIntoWasmAbi for MolHandle
Source§impl RefFromWasmAbi for MolHandle
impl RefFromWasmAbi for MolHandle
Source§type Abi = WasmPtr<WasmRefCell<MolHandle>>
type Abi = WasmPtr<WasmRefCell<MolHandle>>
The Wasm ABI type references to
Self are recovered from.Source§impl RefMutFromWasmAbi for MolHandle
impl RefMutFromWasmAbi for MolHandle
Source§impl TryFromJsValue for MolHandle
impl TryFromJsValue for MolHandle
Source§impl VectorFromWasmAbi for MolHandle
impl VectorFromWasmAbi for MolHandle
Source§impl VectorIntoWasmAbi for MolHandle
impl VectorIntoWasmAbi for MolHandle
impl SupportsConstructor for MolHandle
impl SupportsInstanceProperty for MolHandle
impl SupportsStaticProperty for MolHandle
Auto Trait Implementations§
impl Freeze for MolHandle
impl RefUnwindSafe for MolHandle
impl !Send for MolHandle
impl !Sync for MolHandle
impl Unpin for MolHandle
impl UnsafeUnpin for MolHandle
impl UnwindSafe for MolHandle
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
Mutably borrows from an owned value. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.