rdkit_sys/bridge/
rw_mol.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#[cxx::bridge(namespace = "RDKit")]
pub mod ffi {
    unsafe extern "C++" {
        include!("wrapper/include/ro_mol.h");
        include!("wrapper/include/rw_mol.h");

        pub type RWMol;
        pub type ROMol = crate::ro_mol_ffi::ROMol;

        pub fn rw_mol_from_mol_block(
            mol_block: &CxxString,
            sanitize: bool,
            remove_hs: bool,
            strict_parsing: bool,
        ) -> SharedPtr<RWMol>;

        pub fn rw_mol_from_ro_mol(
            mol: &SharedPtr<ROMol>,
            quick_copy: bool,
            conf_id: i32,
        ) -> SharedPtr<RWMol>;

        pub fn rw_mol_from_rw_mol(mol: &SharedPtr<RWMol>) -> SharedPtr<RWMol>;

        pub fn rw_mol_to_ro_mol(mol: SharedPtr<RWMol>) -> SharedPtr<ROMol>;

        pub fn smarts_to_mol(smarts: &CxxString) -> Result<SharedPtr<RWMol>>;
    }
}