コード例 #1
0
    def test_read_elastic_tensor(self):
        filepath = os.path.join(test_dir, "OUTCAR.total_tensor.Li2O.gz")
        outcar = Outcar(filepath)

        outcar.read_elastic_tensor()

        self.assertAlmostEqual(outcar.data["elastic_tensor"][0][0], 1986.3391)
        self.assertAlmostEqual(outcar.data["elastic_tensor"][0][1], 187.8324)
        self.assertAlmostEqual(outcar.data["elastic_tensor"][3][3], 586.3034)
コード例 #2
0
ファイル: test_outputs.py プロジェクト: adozier/pymatgen
    def test_read_elastic_tensor(self):
        filepath = os.path.join(test_dir, "OUTCAR.total_tensor.Li2O.gz")
        outcar = Outcar(filepath)

        outcar.read_elastic_tensor()

        self.assertAlmostEqual(outcar.data["elastic_tensor"][0][0], 1986.3391)
        self.assertAlmostEqual(outcar.data["elastic_tensor"][0][1], 187.8324)
        self.assertAlmostEqual(outcar.data["elastic_tensor"][3][3], 586.3034)