chiral_db/
types.rs

1//! Shared Types Definition
2//! 
3
4use serde_derive::Deserialize;
5
6pub type ID = String;
7pub type SMILES = String;
8pub type SMARTS = String;
9
10#[derive(Debug, Deserialize, PartialEq)]
11pub enum Source {
12    Chembl,
13    Zinc
14}
15
16pub enum Toolkit {
17    OpenBabel
18}
19
20pub type DocumentOpenBabelMolecule = std::collections::HashMap<ID, openbabel::molecule::Molecule>;
21pub type DBOpenBabelMolecule = std::collections::HashMap<String, DocumentOpenBabelMolecule>;
22
23#[derive(Debug, Deserialize, PartialEq)]
24pub enum FingerprintKind {
25    OpenBabelECFP0,
26    OpenBabelECFP2,
27    OpenBabelECFP4,
28    OpenBabelECFP6,
29    OpenBabelECFP8,
30    OpenBabelECFP10,
31}
32
33pub type SimilarityScore = f32;
34pub type ResultSimilarity = std::collections::HashMap<ID, SimilarityScore>;
35
36pub type SubstructureMatch = Vec<Vec<i32>>;
37pub type ResultSubstructure = std::collections::HashMap<ID, SubstructureMatch>;