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

Python structure_analyzer.RelaxationAnalyzer类代码示例

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

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



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

示例1: RelaxationAnalyzerTest

class RelaxationAnalyzerTest(unittest.TestCase):
    def setUp(self):
        p = Poscar.from_file(os.path.join(test_dir, 'POSCAR.Li2O'),
                             check_for_POTCAR=False)
        s1 = p.structure
        p = Poscar.from_file(os.path.join(test_dir, 'CONTCAR.Li2O'),
                             check_for_POTCAR=False)
        s2 = p.structure
        self.analyzer = RelaxationAnalyzer(s1, s2)

    def test_vol_and_para_changes(self):
        for k, v in self.analyzer.get_percentage_lattice_parameter_changes().items():
            self.assertAlmostEqual(-0.0092040921155279731, v)
            latt_change = v
        vol_change = self.analyzer.get_percentage_volume_change()
        self.assertAlmostEqual(-0.0273589101391,
                               vol_change)
        # This is a simple cubic cell, so the latt and vol change are simply
        # Related. So let's test that.
        self.assertAlmostEqual((1 + latt_change) ** 3 - 1, vol_change)

    def test_get_percentage_bond_dist_changes(self):
        for k, v in self.analyzer.get_percentage_bond_dist_changes().items():
            for k2, v2 in v.items():
                self.assertAlmostEqual(-0.009204092115527862, v2)
开发者ID:setten,项目名称:pymatgen,代码行数:25,代码来源:test_structure_analyzer.py


示例2: get_percentage_bond_distance_change

    def get_percentage_bond_distance_change(self, n):
        """
        Bond distance change after the introduction of interstitial.

        Args:
            n: index of interstitials
        """
        def_struct = self._structs[n:n + 1][0]  # copy
        def_struct.remove(-1)
        rv = RelaxationAnalyzer(self._blk_struct, def_struct)
        return rv.get_percentage_bond_dist_changes()
开发者ID:zeroelement,项目名称:pymatgen,代码行数:11,代码来源:point_defects.py


示例3: get_percentage_lattice_parameter_change

    def get_percentage_lattice_parameter_change(self, n):
        """
        Lattice parameter change after the introduction of interstitial

        Args:
            n: index of interstitials
        """
        def_struct = self._structs[n:n + 1][0]  # copy
        def_struct.remove(-1)
        rv = RelaxationAnalyzer(self._blk_struct, def_struct)
        return rv.get_percentage_lattice_parameter_changes()
开发者ID:zeroelement,项目名称:pymatgen,代码行数:11,代码来源:point_defects.py


示例4: get_percentage_volume_change

    def get_percentage_volume_change(self, n):
        """
        Volume change after the introduction of interstitial

        Args:
            n: index of interstitials
        """
        def_struct = self._structs[n:n + 1][0]
        def_struct.remove(-1)
        rv = RelaxationAnalyzer(self._blk_struct, def_struct)
        return rv.get_percentage_volume_change()
开发者ID:zeroelement,项目名称:pymatgen,代码行数:11,代码来源:point_defects.py


示例5: setUp

 def setUp(self):
     p = Poscar.from_file(os.path.join(test_dir, 'POSCAR.Li2O'),
                          check_for_POTCAR=False)
     s1 = p.structure
     p = Poscar.from_file(os.path.join(test_dir, 'CONTCAR.Li2O'),
                          check_for_POTCAR=False)
     s2 = p.structure
     self.analyzer = RelaxationAnalyzer(s1, s2)
开发者ID:setten,项目名称:pymatgen,代码行数:8,代码来源:test_structure_analyzer.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python structure_analyzer.VoronoiCoordFinder类代码示例发布时间:2022-05-25
下一篇:
Python reaction_calculator.Reaction类代码示例发布时间: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