rino 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +44 -0
- data/Rakefile +123 -0
- data/ext/extconf.rb +26 -0
- data/ext/ruby_inchi_main.so +0 -0
- data/ext/src/aux2atom.h +2786 -0
- data/ext/src/comdef.h +148 -0
- data/ext/src/e_0dstereo.c +3014 -0
- data/ext/src/e_0dstereo.h +31 -0
- data/ext/src/e_comdef.h +57 -0
- data/ext/src/e_ctl_data.h +147 -0
- data/ext/src/e_ichi_io.c +498 -0
- data/ext/src/e_ichi_io.h +40 -0
- data/ext/src/e_ichi_parms.c +37 -0
- data/ext/src/e_ichi_parms.h +41 -0
- data/ext/src/e_ichicomp.h +50 -0
- data/ext/src/e_ichierr.h +40 -0
- data/ext/src/e_ichimain.c +593 -0
- data/ext/src/e_ichisize.h +43 -0
- data/ext/src/e_inchi_atom.c +75 -0
- data/ext/src/e_inchi_atom.h +33 -0
- data/ext/src/e_inpdef.h +41 -0
- data/ext/src/e_mode.h +706 -0
- data/ext/src/e_mol2atom.c +649 -0
- data/ext/src/e_readinch.c +58 -0
- data/ext/src/e_readmol.c +54 -0
- data/ext/src/e_readmol.h +180 -0
- data/ext/src/e_readstru.c +251 -0
- data/ext/src/e_readstru.h +33 -0
- data/ext/src/e_util.c +284 -0
- data/ext/src/e_util.h +61 -0
- data/ext/src/extr_ct.h +251 -0
- data/ext/src/ichi.h +206 -0
- data/ext/src/ichi_bns.c +7999 -0
- data/ext/src/ichi_bns.h +231 -0
- data/ext/src/ichican2.c +5000 -0
- data/ext/src/ichicano.c +2195 -0
- data/ext/src/ichicano.h +49 -0
- data/ext/src/ichicans.c +1625 -0
- data/ext/src/ichicant.h +379 -0
- data/ext/src/ichicomn.h +260 -0
- data/ext/src/ichicomp.h +50 -0
- data/ext/src/ichidrp.h +119 -0
- data/ext/src/ichierr.h +124 -0
- data/ext/src/ichiisot.c +101 -0
- data/ext/src/ichilnct.c +286 -0
- data/ext/src/ichimain.h +132 -0
- data/ext/src/ichimak2.c +1189 -0
- data/ext/src/ichimake.c +3812 -0
- data/ext/src/ichimake.h +205 -0
- data/ext/src/ichimap1.c +851 -0
- data/ext/src/ichimap2.c +2856 -0
- data/ext/src/ichimap4.c +1609 -0
- data/ext/src/ichinorm.c +741 -0
- data/ext/src/ichinorm.h +67 -0
- data/ext/src/ichiparm.c +45 -0
- data/ext/src/ichiparm.h +1441 -0
- data/ext/src/ichiprt1.c +3612 -0
- data/ext/src/ichiprt2.c +1511 -0
- data/ext/src/ichiprt3.c +3011 -0
- data/ext/src/ichiqueu.c +1003 -0
- data/ext/src/ichiring.c +326 -0
- data/ext/src/ichiring.h +49 -0
- data/ext/src/ichisize.h +35 -0
- data/ext/src/ichisort.c +539 -0
- data/ext/src/ichister.c +3538 -0
- data/ext/src/ichister.h +35 -0
- data/ext/src/ichitaut.c +3843 -0
- data/ext/src/ichitaut.h +387 -0
- data/ext/src/ichitime.h +74 -0
- data/ext/src/inchi_api.h +670 -0
- data/ext/src/inchi_dll.c +1480 -0
- data/ext/src/inchi_dll.h +34 -0
- data/ext/src/inchi_dll_main.c +23 -0
- data/ext/src/inchi_dll_main.h +31 -0
- data/ext/src/inpdef.h +328 -0
- data/ext/src/lreadmol.h +1246 -0
- data/ext/src/mode.h +706 -0
- data/ext/src/ruby_inchi_main.c +558 -0
- data/ext/src/runichi.c +4179 -0
- data/ext/src/strutil.c +3861 -0
- data/ext/src/strutil.h +182 -0
- data/ext/src/util.c +1130 -0
- data/ext/src/util.h +85 -0
- data/lib/clean_tempfile.rb +220 -0
- data/lib/rino.rb +111 -0
- data/test/test.rb +386 -0
- metadata +130 -0
data/test/test.rb
ADDED
@@ -0,0 +1,386 @@
|
|
1
|
+
# =================================
|
2
|
+
# Rino - The InChI Toolkit for Ruby
|
3
|
+
# =================================
|
4
|
+
#
|
5
|
+
# Project Info: http://rino.rubyforge.org
|
6
|
+
#
|
7
|
+
# Copyright (C) 2006 Richard L. Apodaca
|
8
|
+
#
|
9
|
+
# This library is free software; you can redistribute it and/or
|
10
|
+
# modify it under the terms of the GNU Lesser General Public
|
11
|
+
# License version 2.1 as published by the Free Software
|
12
|
+
# Foundation.
|
13
|
+
#
|
14
|
+
# This library is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
17
|
+
# Lesser General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU Lesser General Public
|
20
|
+
# License along with this library; if not, write to the Free
|
21
|
+
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
|
22
|
+
# Boston, MA 02111-1301, USA.
|
23
|
+
|
24
|
+
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
25
|
+
|
26
|
+
require 'rino'
|
27
|
+
require 'test/unit'
|
28
|
+
|
29
|
+
class TestBenzene < Test::Unit::TestCase
|
30
|
+
|
31
|
+
def setup
|
32
|
+
@benzene =
|
33
|
+
"c1ccccc1
|
34
|
+
JME 2004.10 Thu Jun 01 18:20:16 EDT 2006
|
35
|
+
|
36
|
+
6 6 0 0 0 0 0 0 0 0999 V2000
|
37
|
+
0.0000 2.1000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
38
|
+
0.0000 0.7000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
39
|
+
1.2124 2.8000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
40
|
+
1.2124 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
41
|
+
2.4249 2.1000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
42
|
+
2.4249 0.7000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
43
|
+
1 2 2 0 0 0 0
|
44
|
+
1 3 1 0 0 0 0
|
45
|
+
2 4 1 0 0 0 0
|
46
|
+
3 5 2 0 0 0 0
|
47
|
+
4 6 2 0 0 0 0
|
48
|
+
5 6 1 0 0 0 0
|
49
|
+
M END"
|
50
|
+
|
51
|
+
@ferrocene =
|
52
|
+
"
|
53
|
+
ACD/Labs0709041143
|
54
|
+
|
55
|
+
22 40 0 0 0 0 0 0 0 0 22 V2000
|
56
|
+
8.4529 -17.2639 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
57
|
+
9.5359 -11.9699 0.0000 Fe 0 2 0 0 0 0 0 0 0 0 0 0
|
58
|
+
7.8254 -15.2493 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
59
|
+
10.4796 -17.2560 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
60
|
+
11.2545 -15.2364 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
61
|
+
9.5392 -13.9965 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
62
|
+
11.3819 -8.5463 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
63
|
+
10.7543 -6.5318 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
64
|
+
8.5739 -6.5392 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
65
|
+
7.9574 -8.5592 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
66
|
+
9.6776 -9.7992 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
67
|
+
16.6151 -17.0901 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
68
|
+
17.6981 -11.7960 0.0000 Fe 0 0 0 0 0 0 0 0 0 0 0 0
|
69
|
+
15.9876 -15.0756 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
70
|
+
18.6419 -17.0822 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
71
|
+
19.4168 -15.0627 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
72
|
+
17.7014 -13.8227 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
73
|
+
19.5441 -8.3725 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
74
|
+
18.9165 -6.3580 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
75
|
+
16.7361 -6.3655 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
76
|
+
16.1196 -8.3855 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
77
|
+
17.8398 -9.6254 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
78
|
+
1 2 1 0 0 0 0
|
79
|
+
1 3 2 0 0 0 0
|
80
|
+
1 4 1 0 0 0 0
|
81
|
+
2 7 1 0 0 0 0
|
82
|
+
2 8 1 0 0 0 0
|
83
|
+
2 9 1 0 0 0 0
|
84
|
+
2 10 1 0 0 0 0
|
85
|
+
2 11 1 0 0 0 0
|
86
|
+
2 4 1 0 0 0 0
|
87
|
+
2 5 1 0 0 0 0
|
88
|
+
2 6 1 0 0 0 0
|
89
|
+
2 3 1 0 0 0 0
|
90
|
+
3 6 1 0 0 0 0
|
91
|
+
4 5 1 0 0 0 0
|
92
|
+
5 6 2 0 0 0 0
|
93
|
+
7 11 2 0 0 0 0
|
94
|
+
7 8 1 0 0 0 0
|
95
|
+
8 9 1 0 0 0 0
|
96
|
+
9 10 2 0 0 0 0
|
97
|
+
10 11 1 0 0 0 0
|
98
|
+
12 13 1 0 0 0 0
|
99
|
+
12 14 1 0 0 0 0
|
100
|
+
12 15 1 0 0 0 0
|
101
|
+
13 18 1 0 0 0 0
|
102
|
+
13 19 1 0 0 0 0
|
103
|
+
13 20 1 0 0 0 0
|
104
|
+
13 21 1 0 0 0 0
|
105
|
+
13 22 1 0 0 0 0
|
106
|
+
13 15 1 0 0 0 0
|
107
|
+
13 16 1 0 0 0 0
|
108
|
+
13 17 1 0 0 0 0
|
109
|
+
13 14 1 0 0 0 0
|
110
|
+
14 17 1 0 0 0 0
|
111
|
+
15 16 1 0 0 0 0
|
112
|
+
16 17 1 0 0 0 0
|
113
|
+
18 22 1 0 0 0 0
|
114
|
+
18 19 1 0 0 0 0
|
115
|
+
19 20 1 0 0 0 0
|
116
|
+
20 21 1 0 0 0 0
|
117
|
+
21 22 1 0 0 0 0
|
118
|
+
A 1
|
119
|
+
CH
|
120
|
+
M CHG 1 2 2
|
121
|
+
A 3
|
122
|
+
CH
|
123
|
+
A 4
|
124
|
+
CH-
|
125
|
+
A 5
|
126
|
+
CH
|
127
|
+
A 6
|
128
|
+
CH
|
129
|
+
A 7
|
130
|
+
CH
|
131
|
+
A 8
|
132
|
+
CH-
|
133
|
+
A 9
|
134
|
+
CH
|
135
|
+
A 10
|
136
|
+
CH
|
137
|
+
A 11
|
138
|
+
CH
|
139
|
+
M END
|
140
|
+
"
|
141
|
+
|
142
|
+
@c60 =
|
143
|
+
"BUCKMINSTERFULLERENE
|
144
|
+
USERSTR 07209813162D 1 1.0 0.0 115862
|
145
|
+
|
146
|
+
60 90 0 0 0 0 0 0 0 0999 V2000
|
147
|
+
7.0000 16.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
148
|
+
-3.0000 16.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
149
|
+
10.0000 27.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
150
|
+
14.0000 8.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
151
|
+
-6.0000 27.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
152
|
+
-10.0000 8.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
153
|
+
2.0000 32.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
154
|
+
-17.0000 30.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
155
|
+
2.0000 44.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
156
|
+
22.0000 30.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
157
|
+
-17.0000 42.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
158
|
+
-25.0000 22.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
159
|
+
-8.0000 49.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
160
|
+
-28.0000 46.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
161
|
+
-10.0000 61.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
162
|
+
13.0000 49.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
163
|
+
22.0000 42.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
164
|
+
14.0000 61.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
165
|
+
32.0000 47.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
166
|
+
29.0000 22.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
167
|
+
25.0000 11.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
168
|
+
40.0000 24.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
169
|
+
34.0000 3.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
170
|
+
8.0000 -3.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
171
|
+
-3.0000 -3.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
172
|
+
14.0000 -13.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
173
|
+
-9.0000 -13.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
174
|
+
-21.0000 11.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
175
|
+
-29.0000 3.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
176
|
+
-36.0000 24.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
177
|
+
48.0000 16.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
178
|
+
45.0000 5.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
179
|
+
61.0000 16.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
180
|
+
56.0000 -2.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
181
|
+
8.0000 -23.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
182
|
+
-3.0000 -23.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
183
|
+
13.0000 -35.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
184
|
+
-7.0000 -35.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
185
|
+
-41.0000 5.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
186
|
+
-44.0000 16.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
187
|
+
-51.0000 -2.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
188
|
+
-57.0000 16.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
189
|
+
-31.0000 57.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
190
|
+
-21.0000 65.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
191
|
+
-42.0000 65.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
192
|
+
-24.0000 77.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
193
|
+
25.0000 65.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
194
|
+
34.0000 58.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
195
|
+
27.0000 77.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
196
|
+
44.0000 65.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
197
|
+
-38.0000 77.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
198
|
+
-48.0000 90.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
199
|
+
40.0000 77.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
200
|
+
50.0000 90.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
201
|
+
65.0000 5.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
202
|
+
80.0000 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
203
|
+
3.0000 -42.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
204
|
+
3.0000 -60.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
205
|
+
-61.0000 5.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
206
|
+
-79.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
|
207
|
+
1 2 2 0 0 0 0
|
208
|
+
1 3 1 0 0 0 0
|
209
|
+
1 4 1 0 0 0 0
|
210
|
+
2 5 1 0 0 0 0
|
211
|
+
2 6 1 0 0 0 0
|
212
|
+
3 10 2 0 0 0 0
|
213
|
+
3 7 1 0 0 0 0
|
214
|
+
4 24 2 0 0 0 0
|
215
|
+
4 21 1 0 0 0 0
|
216
|
+
5 7 2 0 0 0 0
|
217
|
+
5 8 1 0 0 0 0
|
218
|
+
6 28 1 0 0 0 0
|
219
|
+
6 25 2 0 0 0 0
|
220
|
+
7 9 1 0 0 0 0
|
221
|
+
8 11 2 0 0 0 0
|
222
|
+
8 12 1 0 0 0 0
|
223
|
+
9 16 2 0 0 0 0
|
224
|
+
9 13 1 0 0 0 0
|
225
|
+
10 20 1 0 0 0 0
|
226
|
+
10 17 1 0 0 0 0
|
227
|
+
11 13 1 0 0 0 0
|
228
|
+
11 14 1 0 0 0 0
|
229
|
+
12 30 2 0 0 0 0
|
230
|
+
12 28 1 0 0 0 0
|
231
|
+
13 15 2 0 0 0 0
|
232
|
+
14 43 2 0 0 0 0
|
233
|
+
14 30 1 0 0 0 0
|
234
|
+
15 44 1 0 0 0 0
|
235
|
+
15 18 1 0 0 0 0
|
236
|
+
16 17 1 0 0 0 0
|
237
|
+
16 18 1 0 0 0 0
|
238
|
+
17 19 2 0 0 0 0
|
239
|
+
18 47 2 0 0 0 0
|
240
|
+
19 22 1 0 0 0 0
|
241
|
+
19 48 1 0 0 0 0
|
242
|
+
20 21 1 0 0 0 0
|
243
|
+
20 22 2 0 0 0 0
|
244
|
+
21 23 2 0 0 0 0
|
245
|
+
22 31 1 0 0 0 0
|
246
|
+
23 32 1 0 0 0 0
|
247
|
+
23 26 1 0 0 0 0
|
248
|
+
24 25 1 0 0 0 0
|
249
|
+
24 26 1 0 0 0 0
|
250
|
+
25 27 1 0 0 0 0
|
251
|
+
26 35 2 0 0 0 0
|
252
|
+
27 36 2 0 0 0 0
|
253
|
+
27 29 1 0 0 0 0
|
254
|
+
28 29 2 0 0 0 0
|
255
|
+
29 39 1 0 0 0 0
|
256
|
+
30 40 1 0 0 0 0
|
257
|
+
31 32 2 0 0 0 0
|
258
|
+
31 33 1 0 0 0 0
|
259
|
+
32 34 1 0 0 0 0
|
260
|
+
33 55 2 0 0 0 0
|
261
|
+
33 50 1 0 0 0 0
|
262
|
+
34 55 1 0 0 0 0
|
263
|
+
34 37 2 0 0 0 0
|
264
|
+
35 36 1 0 0 0 0
|
265
|
+
35 37 1 0 0 0 0
|
266
|
+
36 38 1 0 0 0 0
|
267
|
+
37 57 1 0 0 0 0
|
268
|
+
38 57 2 0 0 0 0
|
269
|
+
38 41 1 0 0 0 0
|
270
|
+
39 40 2 0 0 0 0
|
271
|
+
39 41 1 0 0 0 0
|
272
|
+
40 42 1 0 0 0 0
|
273
|
+
41 59 2 0 0 0 0
|
274
|
+
42 45 2 0 0 0 0
|
275
|
+
42 59 1 0 0 0 0
|
276
|
+
43 44 1 0 0 0 0
|
277
|
+
43 45 1 0 0 0 0
|
278
|
+
44 46 2 0 0 0 0
|
279
|
+
45 51 1 0 0 0 0
|
280
|
+
46 51 1 0 0 0 0
|
281
|
+
46 49 1 0 0 0 0
|
282
|
+
47 48 1 0 0 0 0
|
283
|
+
47 49 1 0 0 0 0
|
284
|
+
48 50 2 0 0 0 0
|
285
|
+
49 53 2 0 0 0 0
|
286
|
+
50 53 1 0 0 0 0
|
287
|
+
51 52 2 0 0 0 0
|
288
|
+
52 54 1 0 0 0 0
|
289
|
+
52 60 1 0 0 0 0
|
290
|
+
53 54 1 0 0 0 0
|
291
|
+
54 56 2 0 0 0 0
|
292
|
+
55 56 1 0 0 0 0
|
293
|
+
56 58 1 0 0 0 0
|
294
|
+
57 58 1 0 0 0 0
|
295
|
+
58 60 2 0 0 0 0
|
296
|
+
59 60 1 0 0 0 0
|
297
|
+
M END
|
298
|
+
"
|
299
|
+
|
300
|
+
@s_phenylethanol =
|
301
|
+
"C[C@H](O)c1ccccc1
|
302
|
+
JME 2004.10 Sun Jun 04 14:52:53 EDT 2006
|
303
|
+
|
304
|
+
9 9 0 0 0 0 0 0 0 0999 V2000
|
305
|
+
4.8497 2.1000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
306
|
+
3.6373 4.2000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
|
307
|
+
0.0000 0.7000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
308
|
+
0.0000 2.1000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
309
|
+
1.2124 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
310
|
+
1.2124 2.8000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
311
|
+
2.4249 0.7000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
312
|
+
2.4249 2.1000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
313
|
+
3.6373 2.8000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
|
314
|
+
1 9 1 0 0 0 0
|
315
|
+
9 2 1 1 0 0 0
|
316
|
+
3 4 2 0 0 0 0
|
317
|
+
3 5 1 0 0 0 0
|
318
|
+
4 6 1 0 0 0 0
|
319
|
+
5 7 2 0 0 0 0
|
320
|
+
6 8 2 0 0 0 0
|
321
|
+
7 8 1 0 0 0 0
|
322
|
+
8 9 1 0 0 0 0
|
323
|
+
M END
|
324
|
+
"
|
325
|
+
@reader = Rino::MolfileReader.new
|
326
|
+
end
|
327
|
+
|
328
|
+
def test_benzene_inchi
|
329
|
+
inchi = @reader.read(@benzene)
|
330
|
+
|
331
|
+
assert_equal("InChI=1/C6H6/c1-2-4-6-5-3-1/h1-6H", inchi)
|
332
|
+
end
|
333
|
+
|
334
|
+
def test_s_phenylethanol_inchi
|
335
|
+
inchi = @reader.read(@s_phenylethanol)
|
336
|
+
|
337
|
+
assert_equal("InChI=1/C8H10O/c1-7(9)8-5-3-2-4-6-8/h2-7,9H,1H3/t7-/m0/s1", inchi)
|
338
|
+
end
|
339
|
+
|
340
|
+
def test_ferrocene_inchi
|
341
|
+
inchi = @reader.read(@ferrocene)
|
342
|
+
|
343
|
+
assert_equal("InChI=1/2C5H5.2C5.2Fe/c4*1-2-4-5-3-1;;/h2*1-5H;;;;/q;;2*-1;;+2", inchi)
|
344
|
+
end
|
345
|
+
|
346
|
+
def test_c60_inchi
|
347
|
+
inchi = @reader.read(@c60)
|
348
|
+
|
349
|
+
assert_equal("InChI=1/C60/c1-2-5-6-3(1)8-12-10-4(1)9-11-7(2)17-21-13(5)23-24-14(6)22-18(8)28-20(12)30-26-16(10)15(9)25-29-19(11)27(17)37-41-31(21)33(23)43-44-34(24)32(22)42-38(28)48-40(30)46-36(26)35(25)45-39(29)47(37)55-49(41)51(43)57-52(44)50(42)56(48)59-54(46)53(45)58(55)60(57)59", inchi)
|
350
|
+
end
|
351
|
+
|
352
|
+
def test_bad_molfile
|
353
|
+
fail = true
|
354
|
+
|
355
|
+
begin
|
356
|
+
inchi = @reader.read("Bad molfile")
|
357
|
+
rescue
|
358
|
+
fail = false
|
359
|
+
end
|
360
|
+
|
361
|
+
if fail
|
362
|
+
flunk
|
363
|
+
end
|
364
|
+
end
|
365
|
+
|
366
|
+
def test_benzene_compress
|
367
|
+
@reader.options.clear
|
368
|
+
|
369
|
+
inchi = @reader.read(@benzene)
|
370
|
+
assert_equal("InChI=1/C6H6/c1-2-4-6-5-3-1/h1-6H", inchi)
|
371
|
+
|
372
|
+
@reader.options << "-Compress"
|
373
|
+
|
374
|
+
inchi = @reader.read(@benzene)
|
375
|
+
|
376
|
+
assert_equal("InChI=1/C6H6/cAE1ABFD/hAF1", inchi)
|
377
|
+
|
378
|
+
@reader.options.clear
|
379
|
+
|
380
|
+
inchi = @reader.read(@benzene)
|
381
|
+
assert_equal("InChI=1/C6H6/c1-2-4-6-5-3-1/h1-6H", inchi)
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
|
386
|
+
|
metadata
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.9.0
|
3
|
+
specification_version: 1
|
4
|
+
name: rino
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.1.0
|
7
|
+
date: 2006-08-16 00:00:00 -07:00
|
8
|
+
summary: A Ruby wrapper for the C InChI toolkit
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email:
|
12
|
+
homepage: http://rino.rubyforge.org
|
13
|
+
rubyforge_project:
|
14
|
+
description:
|
15
|
+
autorequire: rino
|
16
|
+
default_executable:
|
17
|
+
bindir: bin
|
18
|
+
has_rdoc: true
|
19
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
24
|
+
version:
|
25
|
+
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
29
|
+
authors:
|
30
|
+
- Richard Apodaca
|
31
|
+
files:
|
32
|
+
- Rakefile
|
33
|
+
- README
|
34
|
+
- lib/rino.rb
|
35
|
+
- lib/clean_tempfile.rb
|
36
|
+
- test/test.rb
|
37
|
+
- ext/src/aux2atom.h
|
38
|
+
- ext/src/comdef.h
|
39
|
+
- ext/src/e_0dstereo.h
|
40
|
+
- ext/src/e_comdef.h
|
41
|
+
- ext/src/e_ctl_data.h
|
42
|
+
- ext/src/e_ichicomp.h
|
43
|
+
- ext/src/e_ichierr.h
|
44
|
+
- ext/src/e_ichi_io.h
|
45
|
+
- ext/src/e_ichi_parms.h
|
46
|
+
- ext/src/e_ichisize.h
|
47
|
+
- ext/src/e_inchi_atom.h
|
48
|
+
- ext/src/e_inpdef.h
|
49
|
+
- ext/src/e_mode.h
|
50
|
+
- ext/src/e_readmol.h
|
51
|
+
- ext/src/e_readstru.h
|
52
|
+
- ext/src/e_util.h
|
53
|
+
- ext/src/extr_ct.h
|
54
|
+
- ext/src/ichi_bns.h
|
55
|
+
- ext/src/ichicano.h
|
56
|
+
- ext/src/ichicant.h
|
57
|
+
- ext/src/ichicomn.h
|
58
|
+
- ext/src/ichicomp.h
|
59
|
+
- ext/src/ichidrp.h
|
60
|
+
- ext/src/ichierr.h
|
61
|
+
- ext/src/ichi.h
|
62
|
+
- ext/src/ichimain.h
|
63
|
+
- ext/src/ichimake.h
|
64
|
+
- ext/src/ichinorm.h
|
65
|
+
- ext/src/ichiparm.h
|
66
|
+
- ext/src/ichiring.h
|
67
|
+
- ext/src/ichisize.h
|
68
|
+
- ext/src/ichister.h
|
69
|
+
- ext/src/ichitaut.h
|
70
|
+
- ext/src/ichitime.h
|
71
|
+
- ext/src/inchi_api.h
|
72
|
+
- ext/src/inchi_dll.h
|
73
|
+
- ext/src/inchi_dll_main.h
|
74
|
+
- ext/src/inpdef.h
|
75
|
+
- ext/src/lreadmol.h
|
76
|
+
- ext/src/mode.h
|
77
|
+
- ext/src/strutil.h
|
78
|
+
- ext/src/util.h
|
79
|
+
- ext/src/e_0dstereo.c
|
80
|
+
- ext/src/e_ichi_io.c
|
81
|
+
- ext/src/e_ichimain.c
|
82
|
+
- ext/src/e_ichi_parms.c
|
83
|
+
- ext/src/e_inchi_atom.c
|
84
|
+
- ext/src/e_mol2atom.c
|
85
|
+
- ext/src/e_readinch.c
|
86
|
+
- ext/src/e_readmol.c
|
87
|
+
- ext/src/e_readstru.c
|
88
|
+
- ext/src/e_util.c
|
89
|
+
- ext/src/ichi_bns.c
|
90
|
+
- ext/src/ichican2.c
|
91
|
+
- ext/src/ichicano.c
|
92
|
+
- ext/src/ichicans.c
|
93
|
+
- ext/src/ichiisot.c
|
94
|
+
- ext/src/ichilnct.c
|
95
|
+
- ext/src/ichimak2.c
|
96
|
+
- ext/src/ichimake.c
|
97
|
+
- ext/src/ichimap1.c
|
98
|
+
- ext/src/ichimap2.c
|
99
|
+
- ext/src/ichimap4.c
|
100
|
+
- ext/src/ichinorm.c
|
101
|
+
- ext/src/ichiparm.c
|
102
|
+
- ext/src/ichiprt1.c
|
103
|
+
- ext/src/ichiprt2.c
|
104
|
+
- ext/src/ichiprt3.c
|
105
|
+
- ext/src/ichiqueu.c
|
106
|
+
- ext/src/ichiring.c
|
107
|
+
- ext/src/ichisort.c
|
108
|
+
- ext/src/ichister.c
|
109
|
+
- ext/src/ichitaut.c
|
110
|
+
- ext/src/inchi_dll.c
|
111
|
+
- ext/src/inchi_dll_main.c
|
112
|
+
- ext/src/ruby_inchi_main.c
|
113
|
+
- ext/src/runichi.c
|
114
|
+
- ext/src/strutil.c
|
115
|
+
- ext/src/util.c
|
116
|
+
- ext/ruby_inchi_main.so
|
117
|
+
test_files: []
|
118
|
+
|
119
|
+
rdoc_options: []
|
120
|
+
|
121
|
+
extra_rdoc_files: []
|
122
|
+
|
123
|
+
executables: []
|
124
|
+
|
125
|
+
extensions:
|
126
|
+
- ext/extconf.rb
|
127
|
+
requirements: []
|
128
|
+
|
129
|
+
dependencies: []
|
130
|
+
|