Skip to content

Commit 2f724d9

Browse files
committed
Handle -P(=O)[O-]-
1 parent 2d5996f commit 2f724d9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

base/standard/src/main/java/org/openscience/cdk/stereo/Stereocenters.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,9 @@ private boolean verifyTerminalHCount(int v) {
636636
Integer implHCount = atom.getImplicitHydrogenCount();
637637
if (implHCount != null)
638638
terminalHCount += implHCount;
639+
// O, S, Se, Te, or N with -1 charge is equiv to having a H
640+
if (atom.getFormalCharge() == -1)
641+
terminalHCount++;
639642
}
640643
}
641644

base/test-standard/src/test/java/org/openscience/cdk/stereo/StereocentersTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ public void phosphorus_v5_neutral_reject_h() throws Exception {
370370
public void phosphorus_v5_neutral_reject_h_on_terminal() throws Exception {
371371
none("P(=N)(N)(C)CC");
372372
none("P(=O)(O)(C)CC");
373+
none("P(=O)([O-])(C)CC");
373374
none("P(=S)(S)(C)CC");
374375
none("P(=[Se])([SeH])(C)C");
375376
none("P(=[Te])([TeH])(C)C");

0 commit comments

Comments
 (0)