當前位置: 首頁>>代碼示例>>Python>>正文


Python QCInput.from_multi_jobs_file方法代碼示例

本文整理匯總了Python中pymatgen.io.qchem.inputs.QCInput.from_multi_jobs_file方法的典型用法代碼示例。如果您正苦於以下問題:Python QCInput.from_multi_jobs_file方法的具體用法?Python QCInput.from_multi_jobs_file怎麽用?Python QCInput.from_multi_jobs_file使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pymatgen.io.qchem.inputs.QCInput的用法示例。


在下文中一共展示了QCInput.from_multi_jobs_file方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_from_multi_jobs_file

# 需要導入模塊: from pymatgen.io.qchem.inputs import QCInput [as 別名]
# 或者: from pymatgen.io.qchem.inputs.QCInput import from_multi_jobs_file [as 別名]
    def test_from_multi_jobs_file(self):
        job_list_test = QCInput.from_multi_jobs_file(
            os.path.join(test_dir, "pt_n2_wb97mv_0.0.in"))
        species = ["S", "C", "H", "C", "H", "C", "H",
                   "C", "C", "C", "H", "C", "H", "C", "H", "S"]
        coords = [[-0.00250959, -0.05817469, -0.02921636],
                  [1.70755408, -0.03033788, -0.01382912],
                  [2.24317221, -0.05215019, 0.92026728],
                  [2.21976393, 0.01718014, -1.27293235],
                  [3.27786220, 0.04082146, -1.48539646],
                  [1.20867399, 0.04478540, -2.27007793],
                  [1.40292257, 0.10591684, -3.33110912],
                  [-0.05341046, 0.01577217, -1.74839343],
                  [-1.32843436, 0.03545064, -2.45531187],
                  [-1.55195156, 0.08743920, -3.80184635],
                  [-0.75245172, 0.10267657, -4.52817967],
                  [-2.93293778, 0.08408786, -4.13352169],
                  [-3.31125108, 0.11340328, -5.14405819],
                  [-3.73173288, 0.02741365, -3.03412864],
                  [-4.80776535, 0.00535688, -2.99564645],
                  [-2.81590978, -0.00516172, -1.58990580]]
        molecule_1_actual = Molecule(species, coords)
        rem_1_actual = {
            "job_type": "opt",
            "method": "wb97m-v",
            "basis": "def2-tzvppd",
            "gen_scfman": "true",
            "geom_opt_max_cycles": "75",
            "max_scf_cycles": "300",
            "scf_algorithm": "diis",
            "scf_guess": "sad",
            "sym_ignore": "true",
            "symmetry": "false",
            "thresh": "14"
        }
        opt_1_actual = {"CONSTRAINT": ["tors 6 8 9 10 0.0"]}
        self.assertEqual(molecule_1_actual, job_list_test[0].molecule)
        self.assertEqual(rem_1_actual, job_list_test[0].rem)
        self.assertEqual(opt_1_actual, job_list_test[0].opt)

        molecule_2_actual = "read"
        rem_2_actual = {
            "job_type": "sp",
            "method": "wb97m-v",
            "basis": "def2-tzvppd",
            "gen_scfman": "true",
            "geom_opt_max_cycles": "75",
            "max_scf_cycles": "300",
            "scf_algorithm": "diis",
            "scf_guess": "read",
            "sym_ignore": "true",
            "symmetry": "false",
            "thresh": "14"
        }
        self.assertEqual(molecule_2_actual, job_list_test[1].molecule)
        self.assertEqual(rem_2_actual, job_list_test[1].rem)
開發者ID:albalu,項目名稱:pymatgen,代碼行數:58,代碼來源:test_inputs.py


注:本文中的pymatgen.io.qchem.inputs.QCInput.from_multi_jobs_file方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。