chemcore 0.4.1

A cheminformatics toolkit.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use gamma::graph::{ Graph, Error };
use super::{ Atom };

pub trait Molecule: Graph {
    /// Returns the atomic attributes associated with id,
    /// or Error if id not found.
    fn atom(&self, id: usize) -> Result<&Atom, Error>;

    /// Returns the charge computation associated with id,
    /// or Error if id not found.
    fn charge(&self, id: usize) -> Result<f32, Error>;

    /// Returns the bond order computation associated with the source
    /// and target ids, or Error if either sid or tid not found.
    fn bond_order(&self, sid: usize, tid: usize) -> Result<f32, Error>;
}