code: @Override
      public void write(IChemObject object) throws CDKException {
          if (object instanceof ICrystal) {
              writeCrystal((ICrystal) object);
          } else {
              throw new CDKException("Only Crystal objects can be read.");
          }
      }
docs: Serializes the IChemObject to ShelX and redirects it to the output Writer.
  
  @param object A Molecule of MoleculeSet object