예제 #1
0
    def test_dimensionality(self):
        cscl = PymatgenTest.get_structure("CsCl")
        graphite = PymatgenTest.get_structure("Graphite")

        df = Dimensionality()

        self.assertEqual(df.featurize(cscl)[0], 3)
        self.assertEqual(df.featurize(graphite)[0], 2)
예제 #2
0
    def test_dimensionality(self):
        cscl = PymatgenTest.get_structure("CsCl")

        df = Dimensionality(bonds={("Cs", "Cl"): 3.5})
        self.assertEqual(df.featurize(cscl)[0], 1)

        df = Dimensionality(bonds={("Cs", "Cl"): 3.7})
        self.assertEqual(df.featurize(cscl)[0], 3)
예제 #3
0
    def test_dimensionality(self):
        cscl = PymatgenTest.get_structure("CsCl")

        df = Dimensionality(bonds={("Cs", "Cl"): 3.5})
        self.assertEqual(df.featurize(cscl)[0], 1)

        df = Dimensionality(bonds={("Cs", "Cl"): 3.7})
        self.assertEqual(df.featurize(cscl)[0], 3)