Commit ac26b304 authored by Nathan Frey's avatar Nathan Frey
Browse files

Formatting changes

parent 58dadbfc
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -135,7 +135,8 @@ class SineCoulombMatrix(Featurizer):
    Returns
    -------
    features: np.ndarray
      2D sine Coulomb matrix, or 1D matrix eigenvalues. 
      2D sine Coulomb matrix with shape (max_atoms, max_atoms),
      or 1D matrix eigenvalues with shape (max_atoms,). 

    """

@@ -244,8 +245,6 @@ class StructureGraphFeaturizer(Featurizer):
    
    """

    from pymatgen.analysis.graphs import StructureGraph

    atom_features = np.array([site.specie.Z for site in struct], dtype='int32')

    neighbors = struct.get_all_neighbors(self.radius, include_index=True)
+5 −5
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ class TestMaterialFeaturizers(unittest.TestCase):
        }]
    }

  def testEPF(self):
  def test_element_property_fingerprint(self):
    """
    Test Element Property featurizer.
    """
@@ -58,18 +58,18 @@ class TestMaterialFeaturizers(unittest.TestCase):
    assert np.allclose(
        features[0][:5], [2.16, 2.58, 0.42, 2.44, 0.29698485], atol=0.1)

  def testSCM(self):
  def test_sine_coulomb_matrix(self):
    """
    Test SCM featurizer.
    """

    featurizer = SineCoulombMatrix(1)
    featurizer = SineCoulombMatrix(max_atoms=1)
    features = featurizer.featurize([self.struct_dict])

    assert len(features) == 1
    assert np.isclose(features[0], 1244, atol=.5)

  def testSGF(self):
  def test_structure_graph_featurizer(self):
    """
    Test StructureGraphFeaturizer.
    """