Skip to content

Commit 2d466b3

Browse files
committed
Only make metals co-linear when there are two bonds.
1 parent c44c595 commit 2d466b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tool/sdg/src/main/java/org/openscience/cdk/layout/AtomPlacer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,9 @@ public int compare(Integer a, Integer b) {
964964
*/
965965
static boolean isColinear(IAtom atom, Iterable<IBond> bonds) {
966966

967-
if (Elements.isMetal(atom))
968-
return true;
967+
if (Elements.isMetal(atom)) {
968+
return FluentIterable.from(bonds).size() == 2;
969+
}
969970

970971
int numSgl = atom.getImplicitHydrogenCount() == null ? 0 : atom.getImplicitHydrogenCount();
971972
int numDbl = 0;

0 commit comments

Comments
 (0)