Skip to content

Commit

Permalink
Fixed generation of SMILES with non-charged nitrogen rings with an im…
Browse files Browse the repository at this point in the history
…plicit hydrogen (bug #1300)

Change-Id: I92720e88b167116c01b2d049ff8af55c833f1d21
Signed-off-by: John May <john.wilkinsonmay@gmail.com>
  • Loading branch information
egonw authored and johnmay committed Jun 3, 2013
1 parent 77bff39 commit 4e6a80a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/org/openscience/cdk/smiles/SmilesGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,8 @@ private void parseAtom(IAtom a, StringBuffer buffer, IAtomContainer container, b
boolean isSpecialNitrogen =
a.getSymbol().equals("N") &&
a.getHybridization() == IAtomType.Hybridization.PLANAR3 &&
container.getConnectedAtomsList(a).size() != 3;
container.getConnectedAtomsList(a).size() != 3 &&
(a.getFormalCharge() == null || a.getFormalCharge() == 0);
brackets = brackets | isSpecialNitrogen;

if (chiral && stereo && (BondTools.isTrigonalBipyramidalOrOctahedral(container, a)!=0 || BondTools.isSquarePlanar(container, a) || BondTools.isTetrahedral(container, a,false) != 0 || BondTools.isSquarePlanar(container, a)))
Expand Down

0 comments on commit 4e6a80a

Please sign in to comment.