コード例 #1
0
 def test_write_input_from_io_set_diff_mol(self):
     ft = WriteInputFromIOSet(molecule=self.opt_mol,
                              qchem_input_set="OptSet")
     ft.run_task({})
     test_dict = QCInput.from_file("mol.qin").as_dict()
     for k, v in self.opt_mol_ref_in.as_dict().items():
         self.assertEqual(v, test_dict[k])
コード例 #2
0
 def test_write_input_from_io_set_write_dir(self):
     ft = WriteInputFromIOSet(molecule=self.co_mol,
                              qchem_input_set="OptSet",
                              write_to_dir=module_dir)
     ft.run_task({})
     test_dict = QCInput.from_file(os.path.join(module_dir,
                                                "mol.qin")).as_dict()
     for k, v in self.co_opt_ref_in.as_dict().items():
         self.assertEqual(v, test_dict[k])
コード例 #3
0
 def test_write_input_from_io_custom_smd(self):
     ft = WriteInputFromIOSet(molecule=self.opt_mol,
                              qchem_input_set="OptSet",
                              qchem_input_params={
                                  "smd_solvent":
                                  "custom",
                                  "custom_smd":
                                  "90.00,1.415,0.00,0.735,20.2,0.00,0.00"
                              })
     ft.run_task({})
     test_dict = QCInput.from_file("mol.qin").as_dict()
     for k, v in self.opt_mol_smd_ref_in.as_dict().items():
         self.assertEqual(v, test_dict[k])
     with open("solvent_data") as sd:
         lines = sd.readlines()
         self.assertEqual(lines[0], "90.00,1.415,0.00,0.735,20.2,0.00,0.00")
     os.remove("solvent_data")
コード例 #4
0
 def test_write_input_from_io_set(self):
     ft = WriteInputFromIOSet({"molecule": self.co_mol, "qchem_input_set": "OptSet"})
     ft.run_task({})
     test_dict = QCInput.from_file("mol.qin").as_dict()
     for k, v in self.co_opt_ref_in.as_dict().items():
         self.assertEqual(v, test_dict[k])