def enumerate_structures(self, spacegroups=None): if 'icsd' in self.source: # First take experimental structures OI = OqmdInterface() print('Enumerating experimental prototypes') chemical_formulas = get_formulas(self.elements, self.stoichiometries) for chemical_formula in chemical_formulas: OI.store_enumeration(filename=self.db_filename, chemical_formula=chemical_formula, max_atoms=self.max_atoms) # Enumerate prototypes as a next step # experimental structures will not be overwritten. if 'prototypes' in self.source: print('Enumerating Prototypes') for stoichiometry in self.stoichiometries: self.enumerate_prototypes(stoichiometry, spacegroups) AE = AtomsEnumeration(self.elements, self.max_atoms, spacegroups) print('Enumerating atoms') AE.store_atom_enumeration(filename=self.db_filename, multithread=False, max_candidates=1)
def test_store_enumeration(self): O = OqmdInterface() O.store_enumeration(filename='test.db', chemical_formula='FeO6', max_atoms=7)