Beispiel #1
0
 def from_dict(cls, d):
     h = QChemErrorHandler(input_file=d["input_file"],
                           output_file=d["output_file"],
                           ex_backup_list=d["ex_backup_list"],
                           rca_gdm_thresh=d["rca_gdm_thresh"],
                           scf_max_cycles=d["scf_max_cycles"],
                           geom_max_cycles=d["geom_max_cycles"])
     h.outdata = d["outdata"]
     h.qcinp = QcInput.from_dict(d["qcinp"]) if d["qcinp"] else None
     h.error_step_id = d["error_step_id"]
     h.errors = d["errors"]
     h.fix_step = QcTask.from_dict(d["fix_step"]) if d["fix_step"] else None
     return h
Beispiel #2
0
 def test_to_and_from_dict(self):
     qctask1 = QcTask(mol, title="Test Methane Opt", exchange="B3LYP",
                      jobtype="Opt", basis_set="6-31+G*")
     qctask2 = QcTask(molecule="read", title="Test Methane Frequency",
                      exchange="B3LYP", jobtype="Freq",
                      basis_set="6-31+G*")
     qctask3 = QcTask(title="Test Methane Single Point Energy",
                      exchange="B3LYP", jobtype="SP",
                      basis_set="6-311+G(3df,2p)")
     qcinp1 = QcInput(jobs=[qctask1, qctask2, qctask3])
     d1 = qcinp1.to_dict
     qcinp2 = QcInput.from_dict(d1)
     d2 = qcinp2.to_dict
     self.assertEqual(d1, d2)