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

Python common.check_vtens_part函数代码示例

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

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



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

示例1: test_gpos_vtens_oopdist_formaldehyde

def test_gpos_vtens_oopdist_formaldehyde():
    system = get_system_formaldehyde()
    system.pos[0,0] += 0.0*angstrom
    part = ForcePartValence(system)
    part.add_term(Harmonic(0.0,0.0*angstrom,OopDist(2,3,1,0)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:7,代码来源:test_vlist.py


示例2: test_bks_vtens_gpos_parts

def test_bks_vtens_gpos_parts():
    system = get_system_quartz()
    fn_pars = context.get_fn('test/parameters_bks.txt')
    ff = ForceField.generate(system, fn_pars, smooth_ei=True, reci_ei='ignore')
    for part in ff.parts:
        check_vtens_part(system, part, ff.nlist)
        check_gpos_part(system, part, ff.nlist)
开发者ID:tovrstra,项目名称:yaff,代码行数:7,代码来源:test_pair_pot.py


示例3: test_gpos_vtens_quartz

def test_gpos_vtens_quartz():
    system = get_system_quartz()
    rv_table = {
        ('Si', 'O'):       3.24970,
        ('O', 'Si', 'O'):  2.06457,
        ('Si', 'O', 'Si'): 1.80173,
    }
    fc_table = {
        ('Si', 'O'):       0.30978,
        ('O', 'Si', 'O'):  0.19282,
        ('Si', 'O', 'Si'): 0.00751,
    }

    part = ForcePartValence(system)
    for i, j in system.bonds:
        key = system.get_ffatype(i), system.get_ffatype(j)
        part.add_term(Harmonic(fc_table[key], rv_table[key], Bond(i, j)))
    for i1 in range(system.natom):
        for i0 in system.neighs1[i1]:
            for i2 in system.neighs1[i1]:
                key = system.get_ffatype(i0), system.get_ffatype(i1), system.get_ffatype(i2)
                if i0 > i2:
                    part.add_term(Harmonic(fc_table[key], rv_table[key], BendAngle(i0, i1, i2)))

    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:26,代码来源:test_vlist.py


示例4: test_gpos_vtens_bond_fues_water32

def test_gpos_vtens_bond_fues_water32():
    system = get_system_water32()
    part = ForcePartValence(system)
    for i, j in system.bonds:
        part.add_term(Fues(0.3, 1.7, Bond(i, j)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:7,代码来源:test_vlist.py


示例5: test_gpos_vtens_dihedral_cos_mil53

def test_gpos_vtens_dihedral_cos_mil53():
    system = get_system_mil53()
    forbidden_dihedrals = [
        ["O_HY","AL","O_HY","AL"],
        ["O_HY","AL","O_HY","H_HY"],
        ["O_CA","AL","O_CA","C_CA"],
        ["O_CA","AL","O_HY","H_HY"],
        ["H_PH","C_PH","C_PC","C_PH"],
        ["H_PH","C_PH","C_PC","C_CA"],
        ["C_PH","C_PH","C_PC","C_PH"],
        ["C_PH","C_PH","C_PC","C_CA"],
        ["C_PC","C_PH","C_PH","H_PH"],
        ["C_PC","C_PH","C_PH","C_PC"],
        ["H_PH","C_PH","C_PH","H_PH"],
        ["C_PH","C_PC","C_CA","O_CA"],
    ]
    idih = -1
    for i1, i2 in system.bonds:
        for i0 in system.neighs1[i1]:
            if i0==i2: continue
            for i3 in system.neighs1[i2]:
                if i3==i1: continue
                types = [system.get_ffatype(i0), system.get_ffatype(i1), system.get_ffatype(i2), system.get_ffatype(i3)]
                if types in forbidden_dihedrals or types[::-1] in forbidden_dihedrals: continue
                idih += 1
                fc = 2.1 + 0.01*(0.3*i1 + 0.7*i2)
                part = ForcePartValence(system)
                part.add_term(PolyFour([-2.0*fc,0.0001,0.0,0.0],DihedCos(i0,i1,i2,i3)))
                check_gpos_part(system, part)
                check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:30,代码来源:test_vlist.py


示例6: test_gpos_vtens_polyfour_water32

def test_gpos_vtens_polyfour_water32():
    system = get_system_water32()
    part = ForcePartValence(system)
    for i, j in system.bonds:
        part.add_term(PolyFour([-0.5, 0.3, -0.16, 0.09], Bond(i, j)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:7,代码来源:test_vlist.py


示例7: test_ewald_vtens_neut_water32

def test_ewald_vtens_neut_water32():
    # fake water model, negative oxygens and neutral hydrogens
    system = get_system_water32()
    system.charges -= 0.1
    for alpha in 0.05, 0.1, 0.2:
        part_ewald_neut = ForcePartEwaldNeutralizing(system, alpha)
        check_vtens_part(system, part_ewald_neut)
开发者ID:tovrstra,项目名称:yaff,代码行数:7,代码来源:test_ewald.py


示例8: test_ewald_gpos_vtens_corr_water32

def test_ewald_gpos_vtens_corr_water32():
    system = get_system_water32()
    scalings = Scalings(system, 0.0, 0.0, 0.5)
    for alpha in 0.05, 0.1, 0.2:
        part_ewald_corr = ForcePartEwaldCorrection(system, alpha, scalings, dielectric=0.8)
        check_gpos_part(system, part_ewald_corr)
        check_vtens_part(system, part_ewald_corr)
开发者ID:tovrstra,项目名称:yaff,代码行数:7,代码来源:test_ewald.py


示例9: test_ewald_gpos_vtens_corr_quartz

def test_ewald_gpos_vtens_corr_quartz():
    system = get_system_quartz().supercell(2, 2, 2)
    scalings = Scalings(system, np.random.uniform(0.1, 0.9), np.random.uniform(0.1, 0.9), np.random.uniform(0.1, 0.9))
    for alpha in 0.1, 0.2, 0.5:
        part_ewald_corr = ForcePartEwaldCorrection(system, alpha, scalings)
        check_gpos_part(system, part_ewald_corr)
        check_vtens_part(system, part_ewald_corr)
开发者ID:tovrstra,项目名称:yaff,代码行数:7,代码来源:test_ewald.py


示例10: test_gpos_vtens_morse_water32

def test_gpos_vtens_morse_water32():
    system = get_system_water32()
    part = ForcePartValence(system)
    for i, j in system.bonds:
        part.add_term(Morse(0.3, 1.7, 2.0, Bond(i, j)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:7,代码来源:test_vlist.py


示例11: test_ewald_gpos_vtens_reci_water32

def test_ewald_gpos_vtens_reci_water32():
    system = get_system_water32()
    dielectric = 1.4
    for alpha in 0.05, 0.1, 0.2:
        part_ewald_reci = ForcePartEwaldReciprocal(system, alpha, gcut=alpha / 0.75, dielectric=dielectric)
        check_gpos_part(system, part_ewald_reci)
        check_vtens_part(system, part_ewald_reci)
开发者ID:tovrstra,项目名称:yaff,代码行数:7,代码来源:test_ewald.py


示例12: test_gpos_vtens_mm3quartic_water32

def test_gpos_vtens_mm3quartic_water32():
    system = get_system_water32()
    part = ForcePartValence(system)
    for i, j in system.bonds:
        part.add_term(MM3Quartic(1.5, 2.0+0.01*i, Bond(i, j)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:7,代码来源:test_vlist.py


示例13: test_gpos_vtens_2T

def test_gpos_vtens_2T():
    system = get_system_2T()
    rv_table = {
        ('H', 'Si', 'H'):  1.80861,
        ('Si', 'O'):       3.24970,
        ('H', 'O'):        1.96022,
        ('O', 'Si', 'O'):  2.06457,
        ('O', 'Si'):       3.24970,
        ('O', 'Si', 'H'):  1.85401,
        ('Si', 'O', 'Si'): 1.80173,
        ('Si', 'O', 'H'):  1.55702,
        ('H', 'O', 'Si'):  1.55702,
        ('Si', 'H'):       2.87853,
        ('H', 'Si'):       2.87853,
        ('H', 'Si', 'O'):  1.85401,
        ('O', 'H'):        1.96022,
    }
    fc_table = {
        ('H', 'Si', 'H'):  0.09376,
        ('Si', 'O'):       0.30978,
        ('H', 'O'):        0.60322,
        ('O', 'Si', 'O'):  0.19282,
        ('O', 'Si'):       0.30978,
        ('O', 'Si', 'H'):  0.11852,
        ('Si', 'O', 'Si'): 0.00751,
        ('Si', 'O', 'H'):  0.04271,
        ('H', 'O', 'Si'):  0.04271,
        ('Si', 'H'):       0.18044,
        ('H', 'Si'):       0.18044,
        ('H', 'Si', 'O'):  0.11852,
        ('O', 'H'):        0.60322,
    }

    part = ForcePartValence(system)
    for i, j in system.bonds:
        key = system.get_ffatype(i), system.get_ffatype(j)
        part.add_term(Harmonic(fc_table[key], rv_table[key], Bond(i, j)))
    for i1 in range(system.natom):
        for i0 in system.neighs1[i1]:
            for i2 in system.neighs1[i1]:
                key = system.get_ffatype(i0), system.get_ffatype(i1), system.get_ffatype(i2)
                if i0 > i2:
                    part.add_term(Harmonic(fc_table[key], rv_table[key], BendAngle(i0, i1, i2)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
    # same test but with Fues bonds instead of Harmonic bonds
    part = ForcePartValence(system)
    for i, j in system.bonds:
        key = system.get_ffatype(i), system.get_ffatype(j)
        part.add_term(Fues(fc_table[key], rv_table[key], Bond(i, j)))
    for i1 in range(system.natom):
        for i0 in system.neighs1[i1]:
            for i2 in system.neighs1[i1]:
                key = system.get_ffatype(i0), system.get_ffatype(i1), system.get_ffatype(i2)
                if i0 > i2:
                    part.add_term(Harmonic(fc_table[key], rv_table[key], BendAngle(i0, i1, i2)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:58,代码来源:test_vlist.py


示例14: test_gpos_vtens_bend_cos_water32

def test_gpos_vtens_bend_cos_water32():
    system = get_system_water32()
    part = ForcePartValence(system)
    for i1 in range(system.natom):
        for i0 in system.neighs1[i1]:
            for i2 in system.neighs1[i1]:
                if i0 > i2:
                    part.add_term(Harmonic(1.1+0.01*i0, -0.2, BendCos(i0, i1, i2)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:10,代码来源:test_vlist.py


示例15: test_gpos_vtens_ub_water

def test_gpos_vtens_ub_water():
    system = get_system_water32()
    part = ForcePartValence(system)
    for i1 in range(system.natom):
        for i0 in system.neighs1[i1]:
            for i2 in system.neighs1[i1]:
                if i0 > i2:
                    part.add_term(Harmonic(2.1,2.0*angstrom,UreyBradley(i0, i1, i2)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:10,代码来源:test_vlist.py


示例16: test_gpos_vtens_mm3benda_water32

def test_gpos_vtens_mm3benda_water32():
    system = get_system_water32()
    part = ForcePartValence(system)
    for i1 in range(system.natom):
        for i0 in system.neighs1[i1]:
            for i2 in system.neighs1[i1]:
                if i0 > i2:
                    part.add_term(MM3Bend(1.5, 2.0+0.01*i2, BendAngle(i0, i1, i2)))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:10,代码来源:test_vlist.py


示例17: test_gpos_vtens_dihed_cos_chebychev6_peroxide

def test_gpos_vtens_dihed_cos_chebychev6_peroxide():
    #Test for positive sign in polynomial
    system = get_system_peroxide()
    part = ForcePartValence(system)
    part.add_term(Chebychev6(1.5, DihedCos(0,1,2,3), sign=1))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
    #Test for negative sign in polynomial
    system = get_system_peroxide()
    part = ForcePartValence(system)
    part.add_term(Chebychev6(1.5, DihedCos(0,1,2,3), sign=-1))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:13,代码来源:test_vlist.py


示例18: test_gpos_vtens_cross_water32

def test_gpos_vtens_cross_water32():
    system = get_system_water32()
    part = ForcePartValence(system)
    for j in range(system.natom):
        if len(system.neighs1[j])==2:
            i, k = system.neighs1[j]
            part.add_term(Cross(
                    1.2,
                    1.7,
                    1.9,
                    Bond(i, j),
                    Bond(j, k),
            ))
    check_gpos_part(system, part)
    check_vtens_part(system, part)
开发者ID:molmod,项目名称:yaff,代码行数:15,代码来源:test_vlist.py


示例19: test_pair_pot_eidip_water

def test_pair_pot_eidip_water():
    #Setup system and force part
    system, nlist, scalings, part_pair, pair_pot, pair_fn = get_part_water_eidip()
    #Check energy from Yaff with manually computed energy
    check_pair_pot_water(system, nlist, scalings, part_pair, pair_pot, pair_fn, 1.0e-12)
    check_gpos_part(system, part_pair, nlist)
    check_vtens_part(system, part_pair, nlist, symm_vtens=False)
    #Again, but with a truncation scheme (truncation scheme settings are ridiculous,
    #but this is needed to see an effect for water)

    #Setup system and force part
    system, nlist, scalings, part_pair, pair_pot, pair_fn = get_part_water_eidip(rcut=2.0*angstrom,switch_width=1.5*angstrom)
    #Check energy from Yaff with manually computed energy
    check_pair_pot_water(system, nlist, scalings, part_pair, pair_pot, pair_fn, 1.0e-12)
    check_gpos_part(system, part_pair, nlist)
    check_vtens_part(system, part_pair, nlist, symm_vtens=False)
开发者ID:tovrstra,项目名称:yaff,代码行数:16,代码来源:test_pair_pot.py


示例20: test_gpos_vtens_pair_pot_caffeine_ei2_10A

def test_gpos_vtens_pair_pot_caffeine_ei2_10A():
    system, nlist, scalings, part_pair, pair_fn = get_part_caffeine_ei3_10A()
    check_gpos_part(system, part_pair, nlist)
    check_vtens_part(system, part_pair, nlist)
开发者ID:tovrstra,项目名称:yaff,代码行数:4,代码来源:test_pair_pot.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python _dm_meta_info._MetaInfoEnum函数代码示例发布时间:2022-05-27
下一篇:
Python error_module.ErrorDescriptor类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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