def test__write(): _yaml_filename_in = 'pypospack.qoi.yaml' _yaml_filename_out = 'pypospack.qoi.yaml.out' from pypospack.qoi import QoiDatabase qoidb = QoiDatabase() qoidb.read(filename=_yaml_filename_in) qoidb.write(filename=_yaml_filename_out) qoidb.read(filename=_yaml_filename_out)
['defect','MgO_NaCl_fr_a'], ['reservoir','MgO_NaCl'] )), target = 10.978) qoi_db.add_qoi(\ name = 'MgO_NaCl.fr_c', qoi_type = 'defect_energy', structures = OrderedDict(( ['defect','MgO_NaCl_fr_c'], ['reservoir','MgO_NaCl'] )), target = 8.986) qoi_db.add_qoi(\ name = 'MgO_NaCl.sch', qoi_type = 'defect_energy', structures = OrderedDict(( ['defect','MgO_NaCl_sch'], ['reservoir','MgO_NaCl'] )), target = 5.067) qoi_db.add_qoi(\ name = 'MgO_NaCl.001s', qoi_type = 'surface_energy', structures = ['MgO_NaCl_001_s','MgO_NaCl'], target = 0.05595) qoi_db.write(filename='pypospack.qoi.yaml') for k, v in qoi_db.qois.items(): print(k, v)