Skip to content
Browse files

Fixed detection of P.ate atom types with one implicit hydrogen

  • Loading branch information...
1 parent 359b0b0 commit 4ded3e47a201643a1b5de60a5d5293307808699b @egonw egonw committed with rajarshi
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/main/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java
View
4 src/main/org/openscience/cdk/atomtype/CDKAtomTypeMatcher.java
@@ -913,10 +913,14 @@ private IAtomType perceivePhosphors(IAtomContainer atomContainer, IAtom atom)
// no idea how to deal with this yet
return null;
} else if (neighborcount == 3) {
+ int doubleBonds = countAttachedDoubleBonds(atomContainer, atom);
if (atom.getFormalCharge() != null &
atom.getFormalCharge().intValue() == 1) {
IAtomType type = getAtomType("P.anium");
if (isAcceptable(atom, atomContainer, type)) return type;
+ } else if (doubleBonds == 1) {
+ IAtomType type = getAtomType("P.ate");
+ if (isAcceptable(atom, atomContainer, type)) return type;
} else {
IAtomType type = getAtomType("P.ine");
if (isAcceptable(atom, atomContainer, type)) return type;

0 comments on commit 4ded3e4

Please sign in to comment.
Something went wrong with that request. Please try again.