Beispiel #1
0
    def setUp(self) -> None:

        self.data = pd.read_pickle("data_structure.pkl_pd")
        self.data0 = self.data[0]
        self.data0_3 = self.data[:3]
        self.data0_3 = self.data[:3]
        ce = CheckElements.from_pymatgen_structures()

        self.data0_checked = ce.check(self.data)[:10]
Beispiel #2
0
    def setUp(self) -> None:
        ce = CheckElements.from_pymatgen_structures()
        self.data = pd.read_pickle("data_structure.pkl_pd")
        self.data0 = self.data[0]
        self.data0_3 = self.data[:3]
        self.data0_checked = ce.check(self.data)[:10]

        gt = CrystalGraph(n_jobs=1, batch_calculate=True, batch_size=10)
        data = gt.transform(self.data0_checked)

        gen = GraphGenerator(*data, targets=None)
        self.gen = gen
Beispiel #3
0
    def test_ion(self):
        os.chdir('./test_gl')
        PATH = os.getcwd()
        print(PATH)
        from mgetool.imports import BatchFile

        bf = BatchFile(os.path.join(PATH, "data"), suffix='cif')
        f = bf.merge()
        os.chdir(PATH)
        data = [Structure.from_file(i) for i in f[:10]]
        ce = CheckElements.from_pymatgen_structures()
        checked_data = ce.check(data)

        tmps = AtomTableMap(search_tp="name")
        gt = CrystalGraph(n_jobs=2, atom_converter=tmps)
        in_data = gt.transform(checked_data, state_attributes=None)