Commit 8751d999 authored by arunppsg's avatar arunppsg
Browse files

fixed yapf conventions

parent bdebd383
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -253,12 +253,14 @@ class CGCNNModel(TorchModel):
  Here is a simple example of code that uses the CGCNNModel with
  materials dataset.

  >> import deepchem as dc
  >> dataset_config = {"reload": False, "featurizer": dc.feat.CGCNNFeaturizer, "transformers": []}
  >> tasks, datasets, transformers = dc.molnet.load_perovskite(**dataset_config)
  >> train, valid, test = datasets
  >> model = dc.models.CGCNNModel(mode='regression', batch_size=32, learning_rate=0.001)
  >> model.fit(train, nb_epoch=50)
  Examples
  --------
  >>> import deepchem as dc
  >>> dataset_config = {"reload": False, "featurizer": dc.feat.CGCNNFeaturizer(), "transformers": []}
  >>> tasks, datasets, transformers = dc.molnet.load_perovskite(**dataset_config)
  >>> train, valid, test = datasets
  >>> model = dc.models.CGCNNModel(mode='regression', batch_size=32, learning_rate=0.001)
  >>> avg_loss = model.fit(train, nb_epoch=50)

  This model takes arbitary crystal structures as an input, and predict material properties
  using the element information and connection of atoms in the crystal. If you want to get
+7 −6
Original line number Diff line number Diff line
@@ -18,10 +18,11 @@ class _PerovskiteLoader(_MolnetLoader):
    targz_file = os.path.join(self.data_dir, 'perovskite.tar.gz')
    if not os.path.exists(dataset_file):
      if not os.path.exists(targz_file):
        dc.utils.data_utils.download_url(url=PEROVSKITE_URL,
                                         dest_dir=self.data_dir)
        dc.utils.data_utils.download_url(
            url=PEROVSKITE_URL, dest_dir=self.data_dir)
      dc.utils.data_utils.untargz_file(targz_file, self.data_dir)
    loader = dc.data.JsonLoader(tasks=self.tasks,
    loader = dc.data.JsonLoader(
        tasks=self.tasks,
        feature_field="structure",
        label_field="formation_energy",
        featurizer=self.featurizer)