forked from openbabel/openbabel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenbabel-perl.i
141 lines (114 loc) · 3.79 KB
/
openbabel-perl.i
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// needed to work around bug in SWIG -- can't completely override module from command-line
%module "Chemistry::OpenBabel"
%{
// used to set import/export for Cygwin DLLs
#ifdef WIN32
#define USING_OBDLL
#endif
#include <openbabel/obutil.h>
#include <openbabel/rand.h>
#include <openbabel/math/vector3.h>
#include <openbabel/math/matrix3x3.h>
#include <openbabel/generic.h>
#include <openbabel/griddata.h>
#include <openbabel/base.h>
#include <openbabel/mol.h>
#include <openbabel/atom.h>
#include <openbabel/bond.h>
#include <openbabel/residue.h>
#include <openbabel/internalcoord.h>
#include <openbabel/ring.h>
#include <openbabel/obconversion.h>
#include <openbabel/oberror.h>
#include <openbabel/plugin.h>
#include <openbabel/fingerprint.h>
#include <openbabel/descriptor.h>
#include <openbabel/format.h>
#include <openbabel/forcefield.h>
#include <openbabel/op.h>
#include <openbabel/bitvec.h>
#include <openbabel/data.h>
#include <openbabel/parsmart.h>
#include <openbabel/alias.h>
#include <openbabel/atomclass.h>
%}
%include "std_list.i"
%include "std_map.i"
%include "std_vector.i"
%include "std_string.i"
namespace std {
%template (vectorInt) vector<int>;
%template (vectorUnsignedInt) vector<unsigned int>;
%template (vvInt) vector< vector<int> >;
%template (vectorDouble) vector<double>;
%template (vectorString) vector<std::string>;
%template (vVector3) vector<OpenBabel::vector3>;
%template (vectorMol) vector<OpenBabel::OBMol>;
%template (vectorBond) vector<OpenBabel::OBBond>;
%template (vectorResidue) vector<OpenBabel::OBResidue>;
%template (vectorRing) vector<OpenBabel::OBRing>;
%template (vectorpRing) vector<OpenBabel::OBRing*>;
%template (vectorData) vector<OpenBabel::OBGenericData*>;
}
%inline %{
OpenBabel::OBPairData *toPairData(OpenBabel::OBGenericData *data) {
return (OpenBabel::OBPairData *) data;
}
OpenBabel::OBUnitCell *toUnitCell(OpenBabel::OBGenericData *data) {
return (OpenBabel::OBUnitCell *) data;
}
%}
%rename(inc) *::operator++;
%rename(good) *::operator bool;
%rename(deref) *::operator->;
%import <openbabel/babelconfig.h>
%include <openbabel/data.h>
%include <openbabel/rand.h>
%include <openbabel/obutil.h>
%include <openbabel/math/vector3.h>
%import <openbabel/math/matrix3x3.h>
%import <openbabel/math/spacegroup.h>
%include <openbabel/base.h>
%include <openbabel/generic.h>
%include <openbabel/griddata.h>
%import <openbabel/chains.h>
%import <openbabel/bitvec.h>
%import <openbabel/typer.h>
%import <openbabel/plugin.h>
%include <openbabel/oberror.h>
%include <openbabel/format.h>
%include <openbabel/obconversion.h>
%include <openbabel/residue.h>
%include <openbabel/internalcoord.h>
%include <openbabel/atom.h>
%include <openbabel/bond.h>
%include <openbabel/mol.h>
%include <openbabel/ring.h>
%include <openbabel/parsmart.h>
%include <openbabel/alias.h>
%include <openbabel/atomclass.h>
%include <openbabel/fingerprint.h>
%include <openbabel/descriptor.h>
%include <openbabel/forcefield.h>
%include <openbabel/op.h>
# The following %ignores avoid warning messages due to shadowed classes.
# This does not imply a loss of functionality as (in this case)
# the shadowed class is identical (from the point of view of SWIG) to
# the shadowing class.
# This is because C++ references (&) are transformed by SWIG back into
# pointers, so that OBAtomIter(OBMol &) would be treated the same as
# OBAtomIter(OBMol *).
%ignore OBAtomAtomIter(OBAtom &);
%ignore OBAtomBondIter(OBAtom &);
%ignore OBMolAngleIter(OBMol &);
%ignore OBMolAtomIter(OBMol &);
%ignore OBMolAtomBFSIter(OBMol &);
%ignore OBMolAtomDFSIter(OBMol &);
%ignore OBMolBondIter(OBMol &);
%ignore OBMolPairIter(OBMol &);
%ignore OBMolRingIter(OBMol &);
%ignore OBMolTorsionIter(OBMol &);
%ignore OBResidueIter(OBMol &);
%ignore OBResidueAtomIter(OBResidue &);
%ignore *::operator=;
%include <openbabel/obiter.h>