rdkit_sys/bridge/
substruct_match.rs

1#[cxx::bridge(namespace = "RDKit")]
2pub mod ffi {
3    unsafe extern "C++" {
4        include!("wrapper/include/ro_mol.h");
5        include!("wrapper/include/substruct_match.h");
6
7        pub type ROMol = crate::ro_mol_ffi::ROMol;
8        pub type SubstructMatchParameters;
9        pub type SubstructMatchItem;
10        pub type MatchVectType;
11
12        pub fn substruct_match(
13            mol: &SharedPtr<ROMol>,
14            mol_query: &SharedPtr<ROMol>,
15            params: &SharedPtr<SubstructMatchParameters>,
16        ) -> UniquePtr<CxxVector<MatchVectType>>;
17
18        pub fn new_substruct_match_parameters() -> SharedPtr<SubstructMatchParameters>;
19        pub fn get_use_chirality(params: &SharedPtr<SubstructMatchParameters>) -> bool;
20        pub fn get_use_enhanced_stereo(params: &SharedPtr<SubstructMatchParameters>) -> bool;
21        pub fn get_aromatic_matches_conjugated(
22            params: &SharedPtr<SubstructMatchParameters>,
23        ) -> bool;
24        pub fn get_use_query_query_matches(params: &SharedPtr<SubstructMatchParameters>) -> bool;
25        pub fn get_use_generic_matchers(params: &SharedPtr<SubstructMatchParameters>) -> bool;
26        pub fn get_recursion_possible(params: &SharedPtr<SubstructMatchParameters>) -> bool;
27        pub fn get_uniquify(params: &SharedPtr<SubstructMatchParameters>) -> bool;
28
29        pub fn set_use_chirality(params: &mut SharedPtr<SubstructMatchParameters>, what: bool);
30        pub fn set_use_enhanced_stereo(
31            params: &mut SharedPtr<SubstructMatchParameters>,
32            what: bool,
33        );
34        pub fn set_aromatic_matches_conjugated(
35            params: &mut SharedPtr<SubstructMatchParameters>,
36            what: bool,
37        );
38        pub fn set_use_query_query_matches(
39            params: &mut SharedPtr<SubstructMatchParameters>,
40            what: bool,
41        );
42        pub fn set_use_generic_matchers(
43            params: &mut SharedPtr<SubstructMatchParameters>,
44            what: bool,
45        );
46        pub fn set_recursion_possible(params: &mut SharedPtr<SubstructMatchParameters>, what: bool);
47        pub fn set_uniquify(params: &mut SharedPtr<SubstructMatchParameters>, what: bool);
48
49        pub fn substruct_matchvect_type_to_vec_substruct_match_item(
50            matchvect: &MatchVectType,
51        ) -> UniquePtr<CxxVector<SubstructMatchItem>>;
52
53        pub fn substruct_match_item_query_atom_idx(
54            substruct_match_item: &SubstructMatchItem,
55        ) -> i32;
56        pub fn substruct_match_item_mol_atom_idx(substruct_match_item: &SubstructMatchItem) -> i32;
57    }
58}