class_docstr: Creates a `Dataset` object from SDF input files.
  
  This class provides conveniences to load and featurize data from
  Structure Data Files (SDFs). SDF is a standard format for structural
  information (3D coordinates of atoms and bonds) of molecular compounds.
  
  Examples
  --------
  >>> import deepchem as dc
  >>> import os
  >>> current_dir = os.path.dirname(os.path.realpath(__file__))
  >>> featurizer = dc.feat.CircularFingerprint(size=16)
  >>> loader = dc.data.SDFLoader(["LogP(RRCK)"], featurizer=featurizer, sanitize=True)
  >>> dataset = loader.create_dataset(os.path.join(current_dir, "tests", "membrane_permeability.sdf")) # doctest:+ELLIPSIS
  >>> len(dataset)
  2
class_docstr_tok: ["Creates","a","`","Dataset","`","object","from","SDF","input","files",".","This","class","provides","conveniences","to","load","and","featurize","data","from","Structure","Data","Files","(","SDFs",")",".","SDF","is","a","standard","format","for","structural","information","(","3D","coordinates","of","atoms","and","bonds",")","of","molecular","compounds",".","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","import","os",">",">",">","current_dir","=","os.path.dirname","(","os.path.realpath","(","__file__",")",")",">",">",">","featurizer","=","dc.feat.CircularFingerprint","(","size=16",")",">",">",">","loader","=","dc.data.SDFLoader","(","[","``","LogP","(","RRCK",")","''","]",",","featurizer=featurizer",",","sanitize=True",")",">",">",">","dataset","=","loader.create_dataset","(","os.path.join","(","current_dir",",","``","tests","''",",","``","membrane_permeability.sdf","''",")",")","#","doctest",":","+ELLIPSIS",">",">",">","len","(","dataset",")","2"]
docstr: Initialize SDF Loader
  
  Parameters
  ----------
  tasks: list[str]
      List of tasknames. These will be loaded from the SDF file.
  featurizer: Featurizer
      Featurizer to use to process data
  sanitize: bool, optional (default False)
      Whether to sanitize molecules.
  log_every_n: int, optional (default 1000)
      Writes a logging statement this often.
docstr_tok: ["Initialize","SDF","Loader","Parameters","--","--","--","--","--","tasks",":","list","[","str","]","List","of","tasknames",".","These","will","be","loaded","from","the","SDF","file",".","featurizer",":","Featurizer","Featurizer","to","use","to","process","data","sanitize",":","bool",",","optional","(","default","False",")","Whether","to","sanitize","molecules",".","log_every_n",":","int",",","optional","(","default","1000",")","Writes","a","logging","statement","this","often","."]
code: def __init__(
      self,
      tasks: List[str],
      featurizer: Featurizer,
      sanitize: bool = False,
      log_every_n: int = 1000,
  ):
      """Initialize SDF Loader
  
      Parameters
      ----------
      tasks: list[str]
          List of tasknames. These will be loaded from the SDF file.
      featurizer: Featurizer
          Featurizer to use to process data
      sanitize: bool, optional (default False)
          Whether to sanitize molecules.
      log_every_n: int, optional (default 1000)
          Writes a logging statement this often.
      """
      self.featurizer = featurizer
      self.sanitize = sanitize
      self.tasks = tasks
      # The field in which dc.utils.save.load_sdf_files stores RDKit mol objects
      self.mol_field = "mol"
      # The field in which load_sdf_files return value stores smiles
      self.id_field = "smiles"
      self.log_every_n = log_every_n
  
imports: import os
  import tempfile
  import zipfile
  import time
  import logging
  import warnings
  from typing import List, Optional, Tuple, Any, Sequence, Union, Iterator
  import pandas
  import numpy
  from deepchem.utils.typing import OneOrMany
  from deepchem.utils.data_utils import load_image_files, load_csv_files, load_json_files, load_sdf_files, unzip_file
  from deepchem.feat import UserDefinedFeaturizer, Featurizer
  from deepchem.data import Dataset, DiskDataset, NumpyDataset, ImageDataset
  from deepchem.feat.molecule_featurizers import OneHotFeaturizer
  from deepchem.utils.genomics_utils import encode_bio_sequence
label_desc: Use image node_id 1 to create a new SDFLoader object from inherited base classes: DataLoader with example: obj = SDFLoader(tasks, featurizer, sanitize, log_every_n)