Skip to content

Commit

Permalink
Add logic for atom type 40.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Jan 30, 2019
1 parent a96f8a0 commit f0d4e7e
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -705,15 +705,21 @@ else if (atomContainer.getBond(ai, ((IAtom) ca.get(j))).getOrder() == IBond.Orde

if (haveCdX) {
if (aromaticCount >= 1) { // Ar-C(=X)-R
// TODO: add code to check if have R or X for nonaromatic
// attachment to C?
// if we do this check we would have missing fragment for
// Ar-C(=X)-X
// TODO: which fragment to use if we have Ar-C(=X)-Ar? Currently
// this frag is used

frags[39]++;
alogpfrag[i] = 39;
for (IBond bond : ai.bonds()) {
if (bond.getOrder() != IBond.Order.SINGLE)
continue;
IAtom nbor = bond.getOther(ai);
if (!nbor.isAromatic()) {
if (isHetero(nbor)) {
frags[40]++;
alogpfrag[i] = 40;
} else {
frags[39]++;
alogpfrag[i] = 39;
}
}
}

}
else if (aromaticCount == 0) {
if (rCount == 1 && xCount == 1) {
Expand Down

0 comments on commit f0d4e7e

Please sign in to comment.