Skip to content

Commit 2c76157

Browse files
committed
IS_INSATURATED is unambiguous so support this in loose mode.
1 parent a5ef532 commit 2c76157

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tool/smarts/src/main/java/org/openscience/cdk/smarts/Smarts.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ else if (num > 1)
11891189
expr = new Expr(Expr.Type.HYBRIDISATION_NUMBER, num);
11901190
break;
11911191
case 'i':
1192-
if (!isFlavor(FLAVOR_MOE | FLAVOR_CACTVS))
1192+
if (!isFlavor(FLAVOR_MOE | FLAVOR_CACTVS | FLAVOR_LOOSE))
11931193
return false;
11941194
num = nextUnsignedInt();
11951195
if (num <= 0 || num > 8)

tool/smarts/src/test/java/org/openscience/cdk/smarts/SmartsExprReadTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,14 @@ public void ringSmallestSizeCountRange() {
950950
expr(RING_SMALLEST, 7)))));
951951
}
952952

953+
@Test
954+
public void supportInsaturatedByDefault() {
955+
Expr expr = getAtomExpr("[Oi]");
956+
assertThat(expr, is(or(expr(RING_SMALLEST, 5),
957+
or(expr(RING_SMALLEST, 6),
958+
expr(RING_SMALLEST, 7)))));
959+
}
960+
953961
@Test
954962
public void supportHGt() {
955963
Expr expr = getAtomExpr("[H>1]");

0 commit comments

Comments
 (0)