| |
Frowns » frowns » test » test_wierd_molecule.py | text = """
-- StrEd --
26 28 0 0 0 0 0 0 0 0999 V2000
-3.7710 3.0165 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
6.0165 0.1960 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.5750 -4.1335 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.4665 -12.6040 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
6.0165 3.0165 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
13.4540 -1.3165 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.1290 0.1960 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.4665 -1.3165 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.1290 3.0165 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.9165 0.1960 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
6.0165 -5.5500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.1290 -8.3750 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.4665 4.4165 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
10.9165 3.0165 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-3.7710 0.1960 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
8.4665 -9.7875 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
3.5750 -9.7875 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.3210 4.4165 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.3210 -1.3165 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
6.0165 -8.3750 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
12.0415 -3.8540 0.0000 F 0 0 0 0 0 0 0 0 0 0 0 0
16.0000 -2.8165 0.0000 F 0 0 0 0 0 0 0 0 0 0 0 0
14.9625 1.2250 0.0000 F 0 0 0 0 0 0 0 0 0 0 0 0
1.1290 -5.5500 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
3.5750 4.4165 0.0000 S 0 0 0 0 0 0 0 0 0 0 0 0
3.5750 -1.3165 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0
2 26 1 0 0 0 0
3 26 1 0 0 0 0
25 9 1 0 0 0 0
5 2 2 0 0 0 0
6 10 1 0 0 0 0
7 26 1 0 0 0 0
8 2 1 0 0 0 0
9 7 2 0 0 0 0
10 8 2 0 0 0 0
11 3 1 0 0 0 0
24 3 2 0 0 0 0
13 5 1 0 0 0 0
14 10 1 0 0 0 0
23 6 1 0 0 0 0
22 6 1 0 0 0 0
21 6 1 0 0 0 0
20 11 1 0 0 0 0
19 7 1 0 0 0 0
18 9 1 0 0 0 0
17 20 1 0 0 0 0
16 20 1 0 0 0 0
15 19 2 0 0 0 0
12 17 1 0 0 0 0
4 16 1 0 0 0 0
1 15 1 0 0 0 0
25 5 1 0 0 0 0
1 18 2 0 0 0 0
13 14 2 0 0 0 0
M END
> <IDNUMBER> (ST000063)
ST000063
> <SALTDATA> (ST000063)
HCL
> <LogP> (ST000063)
4.2819
> <Solubility> (ST000063)
0.87574
> <SUPPLIER> (ST000063)
TimTec
> <NATURAL> (ST000063)
SEMI-NATURAL
$$$$
"""
import StringIO
from frowns.MDL import mdlin
from frowns.Utils import SaturatedRings,StereoFinder
last = None
for i in range(1000):
file = StringIO.StringIO(text)
reader = mdlin(file)
m = reader.next()
saturation = SaturatedRings.getSaturationScore(m)
if last is not None:
assert last == saturation
last = saturation
|
|