Skip to content

Commit 5c5a645

Browse files
committed
Updated IAtom.X to IElement.X. Added IElement import.
1 parent e31939b commit 5c5a645

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/HBondDonorCountDescriptor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import org.openscience.cdk.CDKConstants;
2222
import org.openscience.cdk.exception.CDKException;
23+
import org.openscience.cdk.interfaces.IElement;
2324
import org.openscience.cdk.interfaces.IAtom;
2425
import org.openscience.cdk.interfaces.IAtomContainer;
2526
import org.openscience.cdk.qsar.AbstractMolecularDescriptor;
@@ -140,7 +141,7 @@ public DescriptorValue calculate(IAtomContainer atomContainer) {
140141
atomloop: for (int atomIndex = 0; atomIndex < ac.getAtomCount(); atomIndex++) {
141142
IAtom atom = (IAtom) ac.getAtom(atomIndex);
142143
// checking for O and N atoms where the formal charge is >= 0
143-
if ((atom.getAtomicNumber() == IAtom.O || atom.getAtomicNumber() == IAtom.N) && atom.getFormalCharge() >= 0) {
144+
if ((atom.getAtomicNumber() == IElement.O || atom.getAtomicNumber() == IElement.N) && atom.getFormalCharge() >= 0) {
144145
// implicit hydrogens
145146
Integer implicitH = atom.getImplicitHydrogenCount();
146147
if (implicitH == CDKConstants.UNSET) implicitH = 0;
@@ -151,7 +152,7 @@ public DescriptorValue calculate(IAtomContainer atomContainer) {
151152
// explicit hydrogens
152153
java.util.List neighbours = ac.getConnectedAtomsList(atom);
153154
for (Object neighbour : neighbours) {
154-
if (((IAtom) neighbour).getAtomicNumber() == IAtom.H) {
155+
if (((IAtom) neighbour).getAtomicNumber() == IElement.H) {
155156
hBondDonors++;
156157
continue atomloop;
157158
}

0 commit comments

Comments
 (0)