Skip to content

Commit

Permalink
Prioritise non-pseudo atoms for wedge labelled bonds.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Feb 1, 2016
1 parent 66f406e commit 38abffc
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -437,6 +437,12 @@ boolean hasPriority(int focus, int i, int j) {
if (!iCyclic && jCyclic) return true;
if (iCyclic && !jCyclic) return false;

// avoid placing on pseudo atoms
if (container.getAtom(i).getAtomicNumber() > 0 && container.getAtom(j).getAtomicNumber() == 0)
return true;
if (container.getAtom(i).getAtomicNumber() == 0 && container.getAtom(j).getAtomicNumber() > 0)
return false;

// prioritise atoms with fewer neighbors
if (graph[i].length < graph[j].length) return true;
if (graph[i].length > graph[j].length) return false;
Expand Down

0 comments on commit 38abffc

Please sign in to comment.