public IAtom getPlacedHeavyAtom ( IAtomContainer molecule , IAtom atomA , IAtom atomB ) { List < IBond > bonds = molecule . getConnectedBondsList ( atomA ) ; for ( IBond bond : bonds ) { IAtom connectedAtom = bond . getOther ( atomA ) ; if ( isPlacedHeavyAtom ( connectedAtom ) && ! connectedAtom . equals ( atomB ) ) { return connectedAtom ; } } return null ; }
Gets the first placed Heavy Atom around atomA which is not atomB .