File tree Expand file tree Collapse file tree
cdkdepict-lib/src/main/java/org/openscience/cdk/app Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,6 +136,9 @@ public static void perceiveDativeBonds(IAtomContainer mol, DativeBond opt) {
136136 for (IBond bond : mol .bonds ()) {
137137 IAtom beg = bond .getBegin ();
138138 IAtom end = bond .getEnd ();
139+ if (bond .getDisplay ().equals (IBond .Display .ArrowBeg ) ||
140+ bond .getDisplay ().equals (IBond .Display .ArrowEnd ))
141+ continue ;
139142 if (isPosDativeDonor (end , opt ) && isNegDativeAcceptor (beg , opt )) {
140143 bond .setDisplay (IBond .Display .ArrowBeg );
141144 beg .setFormalCharge (beg .getFormalCharge () + 1 );
@@ -149,6 +152,9 @@ public static void perceiveDativeBonds(IAtomContainer mol, DativeBond opt) {
149152 for (IBond bond : mol .bonds ()) {
150153 IAtom beg = bond .getBegin ();
151154 IAtom end = bond .getEnd ();
155+ if (bond .getDisplay ().equals (IBond .Display .ArrowBeg ) ||
156+ bond .getDisplay ().equals (IBond .Display .ArrowEnd ))
157+ continue ;
152158 if (isDativeDonor (end , opt ) && isDativeAcceptor (beg , opt )) {
153159 bond .setDisplay (IBond .Display .ArrowBeg );
154160 } else if (isDativeDonor (beg , opt ) && isDativeAcceptor (end , opt )) {
You can’t perform that action at this time.
0 commit comments