code: @Override
      public <T extends IChemObject> T read(T object) throws CDKException {
          sp = new SmilesParser(object.getBuilder());
  
          if (object instanceof IAtomContainerSet) {
              return (T) readAtomContainerSet((IAtomContainerSet) object);
          } else if (object instanceof IChemFile) {
              IChemFile file = (IChemFile) object;
              IChemSequence sequence = file.getBuilder().newInstance(IChemSequence.class);
              IChemModel chemModel = file.getBuilder().newInstance(IChemModel.class);
              chemModel.setMoleculeSet(readAtomContainerSet(file.getBuilder().newInstance(IAtomContainerSet.class)));
              sequence.addChemModel(chemModel);
              file.addChemSequence(sequence);
              return (T) file;
          } else {
              throw new CDKException("Only supported is reading of MoleculeSet objects.");
          }
      }
docs: Reads the content from a XYZ input. It can only return a
  {@link IChemObject} of type {@link IChemFile}.
  
  @param object class must be of type ChemFile
  
  @see IChemFile