forked from openbabel/openbabel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstereo.i
117 lines (90 loc) · 3.52 KB
/
stereo.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
%include <openbabel/stereo/tetranonplanar.h>
%include <openbabel/stereo/tetraplanar.h>
%include <openbabel/stereo/tetrahedral.h>
%include <openbabel/stereo/cistrans.h>
%include <openbabel/stereo/squareplanar.h>
%include <openbabel/stereo/bindings.h>
%extend OpenBabel::OBTetrahedralStereo {
void SetConfig(const OpenBabel::OBTetrahedralConfig &config)
{
self->SetConfig(OpenBabel::OBTetrahedralConfig::Convert(config));
}
OpenBabel::OBTetrahedralConfig GetConfig(OBStereo::Winding winding = OBStereo::Clockwise, OBStereo::View view = OBStereo::ViewFrom)
{
OpenBabel::OBTetrahedralStereo::Config cConfig = self->GetConfig(winding, view);
OpenBabel::OBTetrahedralConfig pyConfig;
pyConfig.center = cConfig.center;
pyConfig.from_or_towards = cConfig.from;
pyConfig.refs = cConfig.refs;
pyConfig.winding = cConfig.winding;
pyConfig.view = cConfig.view;
pyConfig.specified = cConfig.specified;
return pyConfig;
}
OpenBabel::OBTetrahedralConfig GetConfig(unsigned long from_or_towards, OBStereo::Winding winding = OBStereo::Clockwise, OBStereo::View view = OBStereo::ViewFrom)
{
OpenBabel::OBTetrahedralStereo::Config cConfig = self->GetConfig(from_or_towards, winding, view);
OpenBabel::OBTetrahedralConfig pyConfig;
pyConfig.center = cConfig.center;
pyConfig.from_or_towards = cConfig.from;
pyConfig.refs = cConfig.refs;
pyConfig.winding = cConfig.winding;
pyConfig.view = cConfig.view;
pyConfig.specified = cConfig.specified;
return pyConfig;
}
}
%extend OpenBabel::OBCisTransStereo {
void SetConfig(const OpenBabel::OBCisTransConfig &config)
{
self->SetConfig(OpenBabel::OBCisTransConfig::Convert(config));
}
OpenBabel::OBCisTransConfig GetConfig(OBStereo::Shape shape = OBStereo::ShapeU)
{
OpenBabel::OBCisTransStereo::Config cConfig = self->GetConfig(shape);
OpenBabel::OBCisTransConfig pyConfig;
pyConfig.begin = cConfig.begin;
pyConfig.end = cConfig.end;
pyConfig.refs = cConfig.refs;
pyConfig.shape = cConfig.shape;
pyConfig.specified = cConfig.specified;
return pyConfig;
}
OpenBabel::OBCisTransConfig GetConfig(unsigned long start, OBStereo::Shape shape = OBStereo::ShapeU)
{
OpenBabel::OBCisTransStereo::Config cConfig = self->GetConfig(start, shape);
OpenBabel::OBCisTransConfig pyConfig;
pyConfig.begin = cConfig.begin;
pyConfig.end = cConfig.end;
pyConfig.refs = cConfig.refs;
pyConfig.shape = cConfig.shape;
pyConfig.specified = cConfig.specified;
return pyConfig;
}
}
%extend OpenBabel::OBSquarePlanarStereo {
void SetConfig(const OpenBabel::OBSquarePlanarConfig &config)
{
self->SetConfig(OpenBabel::OBSquarePlanarConfig::Convert(config));
}
OpenBabel::OBSquarePlanarConfig GetConfig(OBStereo::Shape shape = OBStereo::ShapeU)
{
OpenBabel::OBSquarePlanarStereo::Config cConfig = self->GetConfig(shape);
OpenBabel::OBSquarePlanarConfig pyConfig;
pyConfig.center = cConfig.center;
pyConfig.refs = cConfig.refs;
pyConfig.shape = cConfig.shape;
pyConfig.specified = cConfig.specified;
return pyConfig;
}
OpenBabel::OBSquarePlanarConfig GetConfig(unsigned long start, OBStereo::Shape shape = OBStereo::ShapeU)
{
OpenBabel::OBSquarePlanarStereo::Config cConfig = self->GetConfig(start, shape);
OpenBabel::OBSquarePlanarConfig pyConfig;
pyConfig.center = cConfig.center;
pyConfig.refs = cConfig.refs;
pyConfig.shape = cConfig.shape;
pyConfig.specified = cConfig.specified;
return pyConfig;
}
}