code: public IAtomContainer getPlacedHeavyAtoms(IAtomContainer molecule, IAtom atom) {
  
          List<IBond> bonds = molecule.getConnectedBondsList(atom);
          IAtomContainer connectedAtoms = molecule.getBuilder().newInstance(IAtomContainer.class);
          IAtom connectedAtom = null;
          for (IBond bond : bonds) {
              connectedAtom = bond.getOther(atom);
              if (isPlacedHeavyAtom(connectedAtom)) {
                  connectedAtoms.addAtom(connectedAtom);
              }
          }
          return connectedAtoms;
      }
docs: Gets the placed Heavy Atoms connected to an atom.
  
  @param molecule
  @param  atom  The atom the atoms must be connected to.
  @return       The placed heavy atoms.