public IAtom getNextUnplacedHeavyAtomWithAliphaticPlacedNeighbour ( IAtomContainer molecule ) { Iterator < IBond > bonds = molecule . bonds ( ) . iterator ( ) ; while ( bonds . hasNext ( ) ) { IBond bond = bonds . next ( ) ; if ( bond . getBegin ( ) . getFlag ( CDKConstants . ISPLACED ) && ! ( bond . getEnd ( ) . getFlag ( CDKConstants . ISPLACED ) ) ) { if ( isAliphaticHeavyAtom ( bond . getEnd ( ) ) ) { return bond . getEnd ( ) ; } } if ( bond . getEnd ( ) . getFlag ( CDKConstants . ISPLACED ) && ! ( bond . getBegin ( ) . getFlag ( CDKConstants . ISPLACED ) ) ) { if ( isAliphaticHeavyAtom ( bond . getBegin ( ) ) ) { return bond . getBegin ( ) ; } } } return null ; }
Gets the nextUnplacedHeavyAtomWithAliphaticPlacedNeighbour from an atom container or molecule .