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

Before Change


    for conf in mol.GetConformers():
      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: 8

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: 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: geomstats/geomstats
Commit Name: acedbe6cc807610d5495615dea662aac427a7ff5
Time: 2018-07-29
Author: ninamio78@gmail.com
File Name: tests/test_special_orthogonal_group.py
Class Name: TestSpecialOrthogonalGroupMethods
Method Name: test_matrix_and_tait_bryan_angles_zyx


Project Name: geomstats/geomstats
Commit Name: acedbe6cc807610d5495615dea662aac427a7ff5
Time: 2018-07-29
Author: ninamio78@gmail.com
File Name: tests/test_special_orthogonal_group.py
Class Name: TestSpecialOrthogonalGroupMethods
Method Name: test_matrix_and_tait_bryan_angles_xyz