Skip to content

Commit

Permalink
Ignore data sgroups from CXSMILES
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Apr 23, 2017
1 parent e7c69d9 commit bea78e7
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
Expand Up @@ -865,6 +865,9 @@ else if (val == CxSmilesState.Radical.Trivalent)
case CtabMultipleGroup:
// display shortcuts are not output
break;
case CtabData:
// can be generated but currently ignored
break;
default:
throw new UnsupportedOperationException("Unsupported Sgroup Polymer");

Expand Down
Expand Up @@ -24,6 +24,7 @@
package org.openscience.cdk.smiles;

import org.junit.Test;
import org.openscience.cdk.AtomContainer;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.io.MDLV2000Reader;
import org.openscience.cdk.silent.SilentChemObjectBuilder;
Expand Down Expand Up @@ -102,4 +103,12 @@ public void chebi53695() throws Exception {
}
}


@Test public void chembl367774() throws Exception {
try (MDLV2000Reader mdlr = new MDLV2000Reader(getClass().getResourceAsStream("CHEMBL367774.mol"))) {
IAtomContainer container = mdlr.read(new AtomContainer());
SmilesGenerator smigen = new SmilesGenerator(SmiFlavor.CxSmiles);
assertThat(smigen.create(container), is("OC(=O)C1=CC(F)=CC=2NC(=NC12)C3=CC=C(C=C3F)C4=CC=CC=C4"));
}
}
}
@@ -0,0 +1,70 @@

SciTegic05171617282D

26 29 0 0 0 0 999 V2000
0.0446 3.6095 0.0000 O 0 0
-0.9971 3.0138 0.0000 C 0 0
-2.0337 3.6184 0.0000 O 0 0
-1.0028 1.5132 0.0000 C 0 0
-2.3155 0.7475 0.0000 C 0 0
-2.3155 -0.7475 0.0000 C 0 0
-3.3560 -1.3452 0.0000 F 0 0
-1.0028 -1.5132 0.0000 C 0 0
0.2917 -0.7475 0.0000 C 0 0
1.7138 -1.2033 0.0000 N 0 0
2.5889 0.0182 0.0000 C 0 0
1.7138 1.2033 0.0000 N 0 0
0.2917 0.7475 0.0000 C 0 0
4.0896 0.0290 0.0000 C 0 0
4.7453 -1.3220 0.0000 C 0 0
6.2418 -1.4248 0.0000 C 0 0
7.0791 -0.1803 0.0000 C 0 0
6.4199 1.1671 0.0000 C 0 0
4.9234 1.2700 0.0000 C 0 0
4.3957 2.3477 0.0000 F 0 0
8.5763 -0.2831 0.0000 C 0 0
9.2377 -1.6295 0.0000 C 0 0
10.7344 -1.7299 0.0000 C 0 0
11.5697 -0.4840 0.0000 C 0 0
10.9083 0.8623 0.0000 C 0 0
9.4117 0.9628 0.0000 C 0 0
1 2 1 0
2 3 2 0
2 4 1 0
4 5 2 0
5 6 1 0
6 7 1 0
6 8 2 0
8 9 1 0
9 10 1 0
10 11 1 0
11 12 2 0
12 13 1 0
4 13 1 0
9 13 2 0
11 14 1 0
14 15 2 0
15 16 1 0
16 17 2 0
17 18 1 0
18 19 2 0
14 19 1 0
19 20 1 0
17 21 1 0
21 22 2 0
22 23 1 0
23 24 2 0
24 25 1 0
25 26 2 0
21 26 1 0
M STY 2 1 DAT 2 DAT
M SLB 2 1 1 2 2
M SAL 1 1 10
M SDT 1 MRV_IMPLICIT_H
M SDD 1 0.5304 -0.4125 DR ALL 0 0
M SED 1 IMPL_H1
M SAL 2 1 12
M SDT 2 MRV_IMPLICIT_H
M SDD 2 0.5304 -0.4125 DR ALL 0 0
M SED 2 IMPL_H1
M END

0 comments on commit bea78e7

Please sign in to comment.