You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ALOGPDescriptor.java
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1033,6 +1033,8 @@ private int getHAtomType(IAtom ai, List connectedAtoms) {
1033
1033
// first check for alpha carbon:
1034
1034
// -C=X, -C#X and -C:X
1035
1035
if (ai.getSymbol().equals("C") && !ai.getFlag(CDKConstants.ISAROMATIC)) {
1036
+
booleannoXfirstShell = true;
1037
+
booleanxInSecondShell = false;
1036
1038
for (intj = 0; j <= ca.size() - 1; j++) {
1037
1039
if (atomContainer.getBond(ai, ((IAtom) ca.get(j))).getOrder() == IBond.Order.SINGLE
1038
1040
&& ((IAtom) ca.get(j)).getSymbol().equals("C")) { // single bonded
@@ -1042,8 +1044,13 @@ private int getHAtomType(IAtom ai, List connectedAtoms) {
1042
1044
if (isHetero(nbor) && (bond.isAromatic() || bond.getOrder() != IBond.Order.SINGLE))
1043
1045
xInSecondShell = true;
1044
1046
}
1045
-
} // end if (atomContainer.getBond(ai, ((IAtom)ca.get(j))).getOrder() == IBond.Order.SINGLE) {
1046
-
}// end j loop
1047
+
} else {
1048
+
if (isHetero(ca.get(j)))
1049
+
noXfirstShell = false;
1050
+
}
1051
+
}
1052
+
if (noXfirstShell && xInSecondShell)
1053
+
return51;
1047
1054
} // end if(ai.getSymbol().equals("C") && !ai.getFlag(CDKConstants.ISAROMATIC))
0 commit comments