624dfb1a1263e5539d30112e2ba7344957b9b20f,deepchem/feat/coulomb_matrices.py,CoulombMatrix,coulomb_matrix,#CoulombMatrix#Any#,154

Before Change


      d = self.get_interatomic_distances(conf)
      m = np.zeros((n_atoms, n_atoms))
      for i in range(mol.GetNumAtoms()):
        for j in range(mol.GetNumAtoms()):
          if i == j:
            m[i, j] = 0.5 * z[i]**2.4
          elif i < j:
            m[i, j] = (z[i] * z[j]) / d[i, j]
            m[j, i] = m[i, j]
          else:
            continue
      if self.randomize:
        for random_m in self.randomize_coulomb_matrix(m):
          random_m = pad_array(random_m, self.max_atoms)
          rval.append(random_m)

After Change


    for conf in mol.GetConformers():
      d = self.get_interatomic_distances(conf)
      m = np.outer(z, z) / d
      m[range(n_atoms), range(n_atoms)] = 0.5 * np.array(z)**2.4
      if self.randomize:
        for random_m in self.randomize_coulomb_matrix(m):
          random_m = pad_array(random_m, self.max_atoms)
          rval.append(random_m)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: deepchem/deepchem
Commit Name: 624dfb1a1263e5539d30112e2ba7344957b9b20f
Time: 2020-07-20
Author: peastman@stanford.edu
File Name: deepchem/feat/coulomb_matrices.py
Class Name: CoulombMatrix
Method Name: coulomb_matrix


Project Name: uber/ludwig
Commit Name: 7d9db23a389499c2764fb850cd19f853cc3e8565
Time: 2019-08-08
Author: smiryala@uber.com
File Name: ludwig/features/image_feature.py
Class Name: ImageBaseFeature
Method Name: add_feature_data


Project Name: deepchem/deepchem
Commit Name: 624dfb1a1263e5539d30112e2ba7344957b9b20f
Time: 2020-07-20
Author: peastman@stanford.edu
File Name: deepchem/feat/coulomb_matrices.py
Class Name: CoulombMatrix
Method Name: coulomb_matrix


Project Name: uber/ludwig
Commit Name: 5667af96dade79ef77194d519182d4989494b3a4
Time: 2019-08-25
Author: smiryala@uber.com
File Name: ludwig/features/image_feature.py
Class Name: ImageBaseFeature
Method Name: add_feature_data