Skip to content

Commit

Permalink
Special case should only kick in when the atom count is 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Oct 6, 2016
1 parent 02b1fa8 commit 953e611
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ private void generateCoordinates(Vector2d firstBondVector, boolean isConnected,
if (numAtoms == 1) {
molecule.getAtom(0).setPoint2d(new Point2d(0, 0));
return;
} else if (molecule.getBondCount() == 1) {
} else if (molecule.getBondCount() == 1 && molecule.getAtomCount() == 2) {
double xOffset = 0;
for (IAtom atom : molecule.atoms()) {
atom.setPoint2d(new Point2d(xOffset, 0));
Expand Down

0 comments on commit 953e611

Please sign in to comment.