code: public IAtomContainer getPlacedAtomsInAtomContainer(IAtom atom, IAtomContainer ac) {
  
          List bonds = ac.getConnectedBondsList(atom);
          IAtomContainer connectedAtoms = atom.getBuilder().newInstance(IAtomContainer.class);
          IAtom connectedAtom = null;
          for (int i = 0; i < bonds.size(); i++) {
              connectedAtom = ((IBond) bonds.get(i)).getOther(atom);
              if (connectedAtom.getFlag(CDKConstants.ISPLACED)) {
                  connectedAtoms.addAtom(connectedAtom);
              }
          }
          return connectedAtoms;
      }
docs: Gets all placed neighbouring atoms of a atom.
  
  @param  atom  central atom (Atom)
  @param  ac    the molecule
  @return       all connected and placed atoms to the central atom
  ((AtomContainer)