• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python nwchem.NwTask类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pymatgen.io.nwchem.NwTask的典型用法代码示例。如果您正苦于以下问题:Python NwTask类的具体用法?Python NwTask怎么用?Python NwTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了NwTask类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: setUp

    def setUp(self):
        tasks = [
            NwTask.dft_task(mol, operation="optimize", xc="b3lyp", basis_set="6-31++G*"),
            NwTask.dft_task(mol, operation="freq", xc="b3lyp", basis_set="6-31++G*"),
            NwTask.dft_task(mol, operation="energy", xc="b3lyp", basis_set="6-311++G**"),
            NwTask.dft_task(mol, charge=mol.charge + 1, operation="energy", xc="b3lyp", basis_set="6-311++G**"),
            NwTask.dft_task(mol, charge=mol.charge - 1, operation="energy", xc="b3lyp", basis_set="6-311++G**"),
        ]

        self.nwi = NwInput(
            mol, tasks, geometry_options=["units", "angstroms", "noautoz"], memory_options="total 1000 mb"
        )
        self.nwi_symm = NwInput(mol, tasks, geometry_options=["units", "angstroms", "noautoz"], symmetry_options=["c1"])
开发者ID:dcossey014,项目名称:pymatgen,代码行数:13,代码来源:test_nwchem.py


示例2: setUp

 def setUp(self):
     self.task = NwTask(0, 1, basis_set={"H": "6-31g"}, theory="dft",
                        theory_directives={"xc": "b3lyp"})
     self.task_cosmo = NwTask(0, 1, basis_set={"H": "6-31g"}, theory="dft",
                              theory_directives={"xc": "b3lyp"},
                              alternate_directives={'cosmo': "cosmo"})
     self.task_esp = NwTask(0, 1, basis_set={"H": "6-31g"}, theory="esp")
开发者ID:sonium0,项目名称:pymatgen,代码行数:7,代码来源:test_nwchem.py


示例3: test_esp_task

    def test_esp_task(self):
        task = NwTask.esp_task(mol, charge=mol.charge, operation="", basis_set="6-311++G**")
        ans = """title "H4C1 esp "
charge 0
basis cartesian
 C library "6-311++G**"
 H library "6-311++G**"
end

task esp """
        self.assertEqual(str(task), ans)
开发者ID:dcossey014,项目名称:pymatgen,代码行数:11,代码来源:test_nwchem.py


示例4: test_dft_task

    def test_dft_task(self):
        task = NwTask.dft_task(mol, charge=1, operation="energy")
        ans = """title "H4C1 dft energy"
charge 1
basis
 C library "6-31g"
 H library "6-31g"
end
dft
 mult 2
 xc b3lyp
end
task dft energy"""
        self.assertEqual(str(task), ans)
开发者ID:sonium0,项目名称:pymatgen,代码行数:14,代码来源:test_nwchem.py


示例5: test_multi_bset

    def test_multi_bset(self):
        t = NwTask.from_molecule(
            mol, theory="dft", basis_set={"C": "6-311++G**", "H": "6-31++G**"}, theory_directives={"xc": "b3lyp"}
        )
        ans = """title "H4C1 dft optimize"
charge 0
basis cartesian
 C library "6-311++G**"
 H library "6-31++G**"
end
dft
 xc b3lyp
end
task dft optimize"""
        self.assertEqual(str(t), ans)
开发者ID:dcossey014,项目名称:pymatgen,代码行数:15,代码来源:test_nwchem.py


示例6: test_dft_cosmo_task

    def test_dft_cosmo_task(self):
        task = NwTask.dft_task(
            mol, charge=mol.charge, operation="energy",
            xc="b3lyp", basis_set="6-311++G**",
            alternate_directives={'cosmo': {"dielec": 78.0}})
        ans = """title "H4C1 dft energy"
charge 0
basis
 C library "6-311++G**"
 H library "6-311++G**"
end
dft
 mult 1
 xc b3lyp
end
cosmo
 dielec 78.0
end
task dft energy"""
        self.assertEqual(str(task), ans)
开发者ID:sonium0,项目名称:pymatgen,代码行数:20,代码来源:test_nwchem.py


示例7: test_to_from_dict

 def test_to_from_dict(self):
     d = self.task.as_dict()
     t = NwTask.from_dict(d)
     self.assertIsInstance(t, NwTask)
开发者ID:sonium0,项目名称:pymatgen,代码行数:4,代码来源:test_nwchem.py


示例8: NwTaskTest

class NwTaskTest(unittest.TestCase):

    def setUp(self):
        self.task = NwTask(0, 1, basis_set={"H": "6-31g"}, theory="dft",
                           theory_directives={"xc": "b3lyp"})
        self.task_cosmo = NwTask(0, 1, basis_set={"H": "6-31g"}, theory="dft",
                                 theory_directives={"xc": "b3lyp"},
                                 alternate_directives={'cosmo': "cosmo"})
        self.task_esp = NwTask(0, 1, basis_set={"H": "6-31g"}, theory="esp")

    def test_multi_bset(self):
        t = NwTask.from_molecule(
            mol, theory="dft", basis_set={"C": "6-311++G**",
                                          "H": "6-31++G**"},
            theory_directives={"xc": "b3lyp"})
        ans = """title "H4C1 dft optimize"
charge 0
basis
 C library "6-311++G**"
 H library "6-31++G**"
end
dft
 xc b3lyp
end
task dft optimize"""
        self.assertEqual(str(t), ans)

    def test_str_and_from_string(self):

        ans = """title "dft optimize"
charge 0
basis
 H library "6-31g"
end
dft
 xc b3lyp
end
task dft optimize"""
        self.assertEqual(str(self.task), ans)

    def test_to_from_dict(self):
        d = self.task.as_dict()
        t = NwTask.from_dict(d)
        self.assertIsInstance(t, NwTask)

    def test_init(self):
        self.assertRaises(NwInputError, NwTask, 0, 1, {"H": "6-31g"},
                          theory="bad")
        self.assertRaises(NwInputError, NwTask, 0, 1, {"H": "6-31g"},
                          operation="bad")

    def test_dft_task(self):
        task = NwTask.dft_task(mol, charge=1, operation="energy")
        ans = """title "H4C1 dft energy"
charge 1
basis
 C library "6-31g"
 H library "6-31g"
end
dft
 mult 2
 xc b3lyp
end
task dft energy"""
        self.assertEqual(str(task), ans)

    def test_dft_cosmo_task(self):
        task = NwTask.dft_task(
            mol, charge=mol.charge, operation="energy",
            xc="b3lyp", basis_set="6-311++G**",
            alternate_directives={'cosmo': {"dielec": 78.0}})
        ans = """title "H4C1 dft energy"
charge 0
basis
 C library "6-311++G**"
 H library "6-311++G**"
end
dft
 mult 1
 xc b3lyp
end
cosmo
 dielec 78.0
end
task dft energy"""
        self.assertEqual(str(task), ans)

    def test_esp_task(self):
        task = NwTask.esp_task(mol, charge=mol.charge, operation="",
                               basis_set="6-311++G**")
        ans = """title "H4C1 esp "
charge 0
basis
 C library "6-311++G**"
 H library "6-311++G**"
end

task esp """
        self.assertEqual(str(task), ans)
开发者ID:sonium0,项目名称:pymatgen,代码行数:99,代码来源:test_nwchem.py



注:本文中的pymatgen.io.nwchem.NwTask类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python inputs.QCInput类代码示例发布时间:2022-05-25
下一篇:
Python data.LammpsData类代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap