Skip to content

Commit

Permalink
Simplified oxNum, central atom is always a carbon so any of the heter…
Browse files Browse the repository at this point in the history
…o atoms is okay. Wow forgot about "destroyBondOrder", definitely not clear it simply "unboxed" the enum to a number!
  • Loading branch information
johnmay committed Jan 30, 2019
1 parent 6abe4be commit 3e7dbb9
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1455,16 +1455,8 @@ else if (bj.getOrder() == IBond.Order.TRIPLE) {

for (int j = 0; j <= ca2.size() - 1; j++) {
IAtom ca2j = (IAtom) ca2.get(j);

// // F,O,Cl,Br,N

// if (s.equals("F") || s.equals("O") || s.equals("Cl")
// || s.equals("Br") || s.equals("N") || s.equals("S"))

if (ap.getNormalizedElectronegativity(ca2j.getSymbol()) > 1) {
oxNum += BondManipulator.destroyBondOrder(atomContainer.getBond(ca0, ca2j).getOrder());
}

if (isHetero(ca2j))
oxNum += atomContainer.getBond(ca0, ca2j).getOrder().numeric();
}

if (hybrid.equals("sp3") && oxNum == 1) {
Expand Down

0 comments on commit 3e7dbb9

Please sign in to comment.