rdkit_chem 2019.03.3.1 → 2025.09.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CMakeLists.txt +713 -0
- data/Code/CMakeLists.txt +44 -0
- data/Code/RubyWrappers/Abbreviations.i +19 -0
- data/Code/RubyWrappers/AddHs.i +34 -0
- data/Code/RubyWrappers/Atom.i +165 -0
- data/Code/RubyWrappers/AtomIterators.i +77 -0
- data/Code/RubyWrappers/AtomPairs.i +95 -0
- data/Code/RubyWrappers/AvalonLib.i +41 -0
- data/Code/RubyWrappers/BitOps.i +72 -0
- data/Code/RubyWrappers/Bond.i +87 -0
- data/Code/RubyWrappers/BondIterators.i +61 -0
- data/Code/RubyWrappers/CMakeLists.txt +67 -0
- data/Code/RubyWrappers/Canon.i +40 -0
- data/Code/RubyWrappers/ChemDraw.i +81 -0
- data/Code/RubyWrappers/ChemReactions.i +166 -0
- data/Code/RubyWrappers/ChemTransforms.i +126 -0
- data/Code/RubyWrappers/Conformer.i +69 -0
- data/Code/RubyWrappers/Descriptors.i +64 -0
- data/Code/RubyWrappers/Dict.i +45 -0
- data/Code/RubyWrappers/DistGeom.i +217 -0
- data/Code/RubyWrappers/DiversityPick.h +49 -0
- data/Code/RubyWrappers/DiversityPick.i +10 -0
- data/Code/RubyWrappers/ErrorGenerator.i +73 -0
- data/Code/RubyWrappers/ExplicitBitVect.i +76 -0
- data/Code/RubyWrappers/FMCS.i +63 -0
- data/Code/RubyWrappers/FilterCatalog.i +154 -0
- data/Code/RubyWrappers/Fingerprints.i +56 -0
- data/Code/RubyWrappers/ForceField.i +161 -0
- data/Code/RubyWrappers/GeneralizedSubstruct.i +38 -0
- data/Code/RubyWrappers/GenericRDKitException.h +27 -0
- data/Code/RubyWrappers/Inchi.i +38 -0
- data/Code/RubyWrappers/MolBundle.i +16 -0
- data/Code/RubyWrappers/MolDraw2D.i +117 -0
- data/Code/RubyWrappers/MolEnumerator.i +45 -0
- data/Code/RubyWrappers/MolHash.i +25 -0
- data/Code/RubyWrappers/MolOps.i +72 -0
- data/Code/RubyWrappers/MolStandardize.i +37 -0
- data/Code/RubyWrappers/MolSupplier.i +83 -0
- data/Code/RubyWrappers/MolTransforms.i +39 -0
- data/Code/RubyWrappers/MolWriters.i +41 -0
- data/Code/RubyWrappers/MonomerInfo.i +42 -0
- data/Code/RubyWrappers/MorganFingerprints.h +21 -0
- data/Code/RubyWrappers/MorganFingerprints.i +66 -0
- data/Code/RubyWrappers/PeriodicTable.i +44 -0
- data/Code/RubyWrappers/Queries.i +289 -0
- data/Code/RubyWrappers/QueryAtom.i +47 -0
- data/Code/RubyWrappers/QueryBond.i +47 -0
- data/Code/RubyWrappers/QueryOps.i +44 -0
- data/Code/RubyWrappers/RDKitExceptions.i +75 -0
- data/Code/RubyWrappers/RDLogger.i +74 -0
- data/Code/RubyWrappers/RDProps.i +44 -0
- data/Code/RubyWrappers/RGroupDecomposition.i +52 -0
- data/Code/RubyWrappers/ROMol.i +695 -0
- data/Code/RubyWrappers/RWMol.i +241 -0
- data/Code/RubyWrappers/RascalMCES.i +71 -0
- data/Code/RubyWrappers/ReactionFingerprints.i +37 -0
- data/Code/RubyWrappers/RingInfo.i +40 -0
- data/Code/RubyWrappers/Rings.i +40 -0
- data/Code/RubyWrappers/SanitException.i +100 -0
- data/Code/RubyWrappers/ScaffoldNetwork.i +28 -0
- data/Code/RubyWrappers/SmartsWrite.i +38 -0
- data/Code/RubyWrappers/SmilesParse.i +40 -0
- data/Code/RubyWrappers/SmilesWrite.i +42 -0
- data/Code/RubyWrappers/StereoGroup.i +16 -0
- data/Code/RubyWrappers/Streams.i +67 -0
- data/Code/RubyWrappers/Subgraphs.i +53 -0
- data/Code/RubyWrappers/Subset.i +75 -0
- data/Code/RubyWrappers/SubstanceGroup.i +91 -0
- data/Code/RubyWrappers/SubstructLibrary.i +80 -0
- data/Code/RubyWrappers/TautomerQuery.i +19 -0
- data/Code/RubyWrappers/Trajectory.i +34 -0
- data/Code/RubyWrappers/boost_tuple.i +64 -0
- data/Code/RubyWrappers/extend_std_vector.i +10 -0
- data/Code/RubyWrappers/gmwrapper/CMakeLists.txt +69 -0
- data/Code/RubyWrappers/gmwrapper/GraphMolRuby.i +431 -0
- data/Code/RubyWrappers/gmwrapper/std_list.i +65 -0
- data/Code/RubyWrappers/point.i +56 -0
- data/Code/RubyWrappers/transforms.i +60 -0
- data/Code/RubyWrappers/types.i +40 -0
- data/README.md +24 -0
- data/Rakefile +125 -4
- data/ext/rdkit_chem/CMakeLists.txt +69 -0
- data/ext/rdkit_chem/Makefile +5 -0
- data/ext/rdkit_chem/extconf.rb +47 -17
- data/lib/rdkit_chem/version.rb +1 -1
- data/lib/rdkit_chem.rb +31 -1
- data/test/test_rdkit_chem.rb +38 -10
- metadata +119 -13
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* $Id$
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2010, Novartis Institutes for BioMedical Research Inc.
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
|
8
|
+
* modification, are permitted provided that the following conditions are
|
|
9
|
+
* met:
|
|
10
|
+
*
|
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
|
13
|
+
* * Redistributions in binary form must reproduce the above
|
|
14
|
+
* copyright notice, this list of conditions and the following
|
|
15
|
+
* disclaimer in the documentation and/or other materials provided
|
|
16
|
+
* with the distribution.
|
|
17
|
+
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
|
18
|
+
* nor the names of its contributors may be used to endorse or promote
|
|
19
|
+
* products derived from this software without specific prior written permission.
|
|
20
|
+
*
|
|
21
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
22
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
23
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
24
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
25
|
+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
26
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
27
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
28
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
29
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
30
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
31
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
%{
|
|
35
|
+
#include <GraphMol/QueryBond.h>
|
|
36
|
+
%}
|
|
37
|
+
|
|
38
|
+
%ignore RDKit::QueryBond::expandQuery;
|
|
39
|
+
%ignore RDKit::QueryBond::setQuery;
|
|
40
|
+
|
|
41
|
+
%include <GraphMol/QueryBond.h>
|
|
42
|
+
|
|
43
|
+
%extend RDKit::QueryBond {
|
|
44
|
+
bool MatchBond(RDKit::Bond const *what) {
|
|
45
|
+
return ($self)->Match(what);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* $Id$
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2010, Novartis Institutes for BioMedical Research Inc.
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
|
8
|
+
* modification, are permitted provided that the following conditions are
|
|
9
|
+
* met:
|
|
10
|
+
*
|
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
|
13
|
+
* * Redistributions in binary form must reproduce the above
|
|
14
|
+
* copyright notice, this list of conditions and the following
|
|
15
|
+
* disclaimer in the documentation and/or other materials provided
|
|
16
|
+
* with the distribution.
|
|
17
|
+
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
|
18
|
+
* nor the names of its contributors may be used to endorse or promote
|
|
19
|
+
* products derived from this software without specific prior written permission.
|
|
20
|
+
*
|
|
21
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
22
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
23
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
24
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
25
|
+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
26
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
27
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
28
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
29
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
30
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
31
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
%{
|
|
35
|
+
#include <GraphMol/QueryOps.h>
|
|
36
|
+
%}
|
|
37
|
+
|
|
38
|
+
%ignore RDKit::RecursiveStructureQuery::d_mutex;
|
|
39
|
+
%ignore RDKit::HasPropWithValueQuery::getPair;
|
|
40
|
+
%ignore RDKit::HasPropWithValueQueryBase::getPair;
|
|
41
|
+
|
|
42
|
+
%include <Query/QueryObjects.h>
|
|
43
|
+
%include <Query/EqualityQuery.h>
|
|
44
|
+
%include <GraphMol/QueryOps.h>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* $Id$
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2010, Novartis Institutes for BioMedical Research Inc.
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
|
8
|
+
* modification, are permitted provided that the following conditions are
|
|
9
|
+
* met:
|
|
10
|
+
*
|
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
|
13
|
+
* * Redistributions in binary form must reproduce the above
|
|
14
|
+
* copyright notice, this list of conditions and the following
|
|
15
|
+
* disclaimer in the documentation and/or other materials provided
|
|
16
|
+
* with the distribution.
|
|
17
|
+
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
|
18
|
+
* nor the names of its contributors may be used to endorse or promote
|
|
19
|
+
* products derived from this software without specific prior written permission.
|
|
20
|
+
*
|
|
21
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
22
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
23
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
24
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
25
|
+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
26
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
27
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
28
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
29
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
30
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
31
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
// Defines all of the C++ -> Java exception handling
|
|
35
|
+
|
|
36
|
+
%{
|
|
37
|
+
#include <RDGeneral/Exceptions.h>
|
|
38
|
+
#include <RubyWrappers/GenericRDKitException.h>
|
|
39
|
+
%}
|
|
40
|
+
|
|
41
|
+
// Note that these files must follow the typemap declarations
|
|
42
|
+
%include <RDGeneral/Exceptions.h>
|
|
43
|
+
%include <RubyWrappers/GenericRDKitException.h>
|
|
44
|
+
|
|
45
|
+
%exception {
|
|
46
|
+
try {
|
|
47
|
+
$action
|
|
48
|
+
} catch (RDKit::ChemicalReactionException &e) {
|
|
49
|
+
static VALUE exceptionError = rb_define_class("ChemicalReactionException", rb_eRuntimeError);
|
|
50
|
+
rb_raise(exceptionError, "%s", e.what());
|
|
51
|
+
} catch (RDKit::ChemicalReactionParserException &e) {
|
|
52
|
+
static VALUE exceptionError = rb_define_class("ChemicalReactionParserException", rb_eRuntimeError);
|
|
53
|
+
rb_raise(exceptionError, "%s", e.what());
|
|
54
|
+
} catch (RDKit::ConformerException &e) {
|
|
55
|
+
static VALUE exceptionError = rb_define_class("ConformerException", rb_eRuntimeError);
|
|
56
|
+
rb_raise(exceptionError, "%s", e.what());
|
|
57
|
+
} catch (RDKit::MolPicklerException &e) {
|
|
58
|
+
static VALUE exceptionError = rb_define_class("MolPicklerException", rb_eRuntimeError);
|
|
59
|
+
rb_raise(exceptionError, "%s", e.what());
|
|
60
|
+
} catch (RDKit::MolSanitizeException &e) {
|
|
61
|
+
static VALUE exceptionError = rb_define_class("MolSanitizeException", rb_eRuntimeError);
|
|
62
|
+
rb_raise(exceptionError, "%s", e.what());
|
|
63
|
+
} catch (RDKit::SmilesParseException &e) {
|
|
64
|
+
static VALUE exceptionError = rb_define_class("SmilesParseException", rb_eRuntimeError);
|
|
65
|
+
rb_raise(exceptionError, "%s", e.what());
|
|
66
|
+
} catch (KeyErrorException &e) {
|
|
67
|
+
static VALUE exceptionError = rb_define_class("KeyErrorException", rb_eRuntimeError);
|
|
68
|
+
rb_raise(exceptionError, "%s", e.what());
|
|
69
|
+
|
|
70
|
+
// Generic exception -- anything else
|
|
71
|
+
} catch (std::exception &e) {
|
|
72
|
+
static VALUE exceptionError = rb_define_class("GenericRDKitException", rb_eRuntimeError);
|
|
73
|
+
rb_raise(exceptionError, "%s", e.what());
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) 2010-2023, Novartis Institutes for BioMedical Research Inc.
|
|
4
|
+
* and other RDKit contributors
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
|
8
|
+
* modification, are permitted provided that the following conditions are
|
|
9
|
+
* met:
|
|
10
|
+
*
|
|
11
|
+
* * Redistributions of source code must retain the above copyright
|
|
12
|
+
* notice, this list of conditions and the following disclaimer.
|
|
13
|
+
* * Redistributions in binary form must reproduce the above
|
|
14
|
+
* copyright notice, this list of conditions and the following
|
|
15
|
+
* disclaimer in the documentation and/or other materials provided
|
|
16
|
+
* with the distribution.
|
|
17
|
+
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
|
18
|
+
* nor the names of its contributors may be used to endorse or promote
|
|
19
|
+
* products derived from this software without specific prior written
|
|
20
|
+
permission.
|
|
21
|
+
*
|
|
22
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
23
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
24
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
25
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
26
|
+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
27
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
28
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
29
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
30
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
31
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
32
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
|
+
*/
|
|
34
|
+
%ignore boost::logging::rdLogger::SetTee(std::ostream &stream);
|
|
35
|
+
%ignore rdAppLog;
|
|
36
|
+
%ignore rdDebugLog;
|
|
37
|
+
%ignore rdInfoLog;
|
|
38
|
+
%ignore rdErrorLog;
|
|
39
|
+
%ignore rdWarningLog;
|
|
40
|
+
%ignore rdStatusLog;
|
|
41
|
+
%{
|
|
42
|
+
#include <RDGeneral/RDLog.h>
|
|
43
|
+
boost::logging::rdLogger& getRdAppLog() {
|
|
44
|
+
return *rdAppLog;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
boost::logging::rdLogger& getRdDebugLog() {
|
|
48
|
+
return *rdDebugLog;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
boost::logging::rdLogger& getRdErrorLog() {
|
|
52
|
+
return *rdErrorLog;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
boost::logging::rdLogger& getRdInfoLog() {
|
|
56
|
+
return *rdInfoLog;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
boost::logging::rdLogger& getRdWarningLog() {
|
|
60
|
+
return *rdWarningLog;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
boost::logging::rdLogger& getRdStatusLog() {
|
|
64
|
+
return *rdStatusLog;
|
|
65
|
+
}
|
|
66
|
+
%}
|
|
67
|
+
%include <RDGeneral/RDLog.h>
|
|
68
|
+
|
|
69
|
+
boost::logging::rdLogger& getRdAppLog();
|
|
70
|
+
boost::logging::rdLogger& getRdDebugLog();
|
|
71
|
+
boost::logging::rdLogger& getRdErrorLog();
|
|
72
|
+
boost::logging::rdLogger& getRdInfoLog();
|
|
73
|
+
boost::logging::rdLogger& getRdWarningLog();
|
|
74
|
+
boost::logging::rdLogger& getRdStatusLog();
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) 2015, Novartis Institutes for BioMedical Research Inc.
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
*
|
|
6
|
+
* Redistribution and use in source and binary forms, with or without
|
|
7
|
+
* modification, are permitted provided that the following conditions are
|
|
8
|
+
* met:
|
|
9
|
+
*
|
|
10
|
+
* * Redistributions of source code must retain the above copyright
|
|
11
|
+
* notice, this list of conditions and the following disclaimer.
|
|
12
|
+
* * Redistributions in binary form must reproduce the above
|
|
13
|
+
* copyright notice, this list of conditions and the following
|
|
14
|
+
* disclaimer in the documentation and/or other materials provided
|
|
15
|
+
* with the distribution.
|
|
16
|
+
* * Neither the name of Novartis Institutes for BioMedical Research Inc.
|
|
17
|
+
* nor the names of its contributors may be used to endorse or promote
|
|
18
|
+
* products derived from this software without specific prior written permission.
|
|
19
|
+
*
|
|
20
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
21
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
22
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
23
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
24
|
+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
25
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
26
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
27
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
28
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
%{
|
|
34
|
+
#include <RDGeneral/types.h>
|
|
35
|
+
#include <RDGeneral/RDProps.h>
|
|
36
|
+
%}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
%include <RDGeneral/RDProps.h>
|
|
40
|
+
|
|
41
|
+
%template(setProp) RDKit::RDProps::setProp<std::string>;
|
|
42
|
+
%template(setIntProp) RDKit::RDProps::setProp<int>;
|
|
43
|
+
%template(setBoolProp) RDKit::RDProps::setProp<bool>;
|
|
44
|
+
%template(setDoubleProp) RDKit::RDProps::setProp<double>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) 2019, Greg Landrum
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
*
|
|
6
|
+
* This file is part of the RDKit.
|
|
7
|
+
* The contents are covered by the terms of the BSD license
|
|
8
|
+
* which is included in the file license.txt, found at the root
|
|
9
|
+
* of the RDKit source tree.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
%{
|
|
13
|
+
#include <GraphMol/RGroupDecomposition/RGroupDecompParams.h>
|
|
14
|
+
#include <GraphMol/RGroupDecomposition/RGroupDecompJSONParsers.h>
|
|
15
|
+
#include <GraphMol/RGroupDecomposition/RGroupDecomp.h>
|
|
16
|
+
typedef std::vector<std::string> STR_VECT;
|
|
17
|
+
%}
|
|
18
|
+
|
|
19
|
+
%include "std_string.i"
|
|
20
|
+
|
|
21
|
+
// SparseIntVect64 removed - Ruby SWIG lacks swig::traits for long long int (already defined in AtomPairs.i for 32-bit versions)
|
|
22
|
+
|
|
23
|
+
%template(ROMol_Vect) std::vector<boost::shared_ptr<RDKit::ROMol>>;
|
|
24
|
+
%template(StringMolMap_Vect) std::vector<std::map<std::string, boost::shared_ptr<RDKit::ROMol>>>;
|
|
25
|
+
%template(StringROMol_VectMap) std::map<std::string,std::vector<boost::shared_ptr<RDKit::ROMol>>>;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
%extend std::map<std::string, boost::shared_ptr<RDKit::ROMol>> {
|
|
29
|
+
std::vector<std::string> keys() {
|
|
30
|
+
std::vector<std::string> _keys;
|
|
31
|
+
for(auto it : *self) {
|
|
32
|
+
std::cerr << "* '" << it.first << "'" << std::endl;
|
|
33
|
+
_keys.push_back(it.first);
|
|
34
|
+
}
|
|
35
|
+
return _keys;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
%extend std::map<std::string,std::vector<boost::shared_ptr<RDKit::ROMol>>> {
|
|
40
|
+
std::vector<std::string> keys() {
|
|
41
|
+
std::vector<std::string> _keys;
|
|
42
|
+
for(auto it : *self) {
|
|
43
|
+
_keys.push_back(it.first);
|
|
44
|
+
}
|
|
45
|
+
return _keys;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
%include <RDGeneral/BetterEnums.h>
|
|
50
|
+
%include <GraphMol/RGroupDecomposition/RGroupDecompParams.h>
|
|
51
|
+
%include <GraphMol/RGroupDecomposition/RGroupDecompJSONParsers.h>
|
|
52
|
+
%include <GraphMol/RGroupDecomposition/RGroupDecomp.h>
|