当前位置: 首页>>代码示例>>Python>>正文


Python NEB.idpp_interpolate方法代码示例

本文整理汇总了Python中ase.neb.NEB.idpp_interpolate方法的典型用法代码示例。如果您正苦于以下问题:Python NEB.idpp_interpolate方法的具体用法?Python NEB.idpp_interpolate怎么用?Python NEB.idpp_interpolate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ase.neb.NEB的用法示例。


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

示例1: molecule

# 需要导入模块: from ase.neb import NEB [as 别名]
# 或者: from ase.neb.NEB import idpp_interpolate [as 别名]
from ase.build import molecule
from ase.neb import NEB

initial = molecule('C2H6')
final = initial.copy()
final.positions[2:5] = initial.positions[[3, 4, 2]]

images = [initial]
for i in range(5):
    images.append(initial.copy())
images.append(final)

neb = NEB(images)
d0 = images[3].get_distance(2, 3)
neb.interpolate()
d1 = images[3].get_distance(2, 3)
neb.idpp_interpolate(fmax=0.005)
d2 = images[3].get_distance(2, 3)
print(d0, d1, d2)
assert abs(d2 - 1.74) < 0.01
开发者ID:rchiechi,项目名称:QuantumParse,代码行数:22,代码来源:idpp.py

示例2: range

# 需要导入模块: from ase.neb import NEB [as 别名]
# 或者: from ase.neb.NEB import idpp_interpolate [as 别名]
    for i in range(nimages):
        image = initial.copy()
        image.set_calculator(LennardJones())
        images.append(image)

    images.append(final)

    # Define the NEB and make a linear interpolation
    # with removing translational
    # and rotational degrees of freedom
    neb = NEB(images,
              remove_rotation_and_translation=remove_rotation_and_translation)
    neb.interpolate()
    # Test used these old defaults which are not optimial, but work
    # in this particular system
    neb.idpp_interpolate(fmax=0.1, optimizer=BFGS)

    qn = FIRE(neb, dt=0.005, maxmove=0.05, dtmax=0.1)
    qn.run(steps=20)

    # Switch to CI-NEB, still removing the external degrees of freedom
    # Also spesify the linearly varying spring constants
    neb = NEB(images, climb=True,
              remove_rotation_and_translation=remove_rotation_and_translation)
    qn = FIRE(neb, dt=0.005, maxmove=0.05, dtmax=0.1)
    qn.run(fmax=fmax)

    images = neb.images

    nebtools = NEBTools(images)
    Ef_neb, dE_neb = nebtools.get_barrier(fit=False)
开发者ID:rchiechi,项目名称:QuantumParse,代码行数:33,代码来源:neb_tr.py

示例3: molecule

# 需要导入模块: from ase.neb import NEB [as 别名]
# 或者: from ase.neb.NEB import idpp_interpolate [as 别名]
from ase.structure import molecule
from ase.neb import NEB

initial = molecule('C2H6')
final = initial.copy()
final.positions[2:5] = initial.positions[[3, 4, 2]]

images = [initial]
for i in range(5):
    images.append(initial.copy())
images.append(final)

neb = NEB(images)
d0 = images[3].get_distance(2, 3)
neb.interpolate()
d1 = images[3].get_distance(2, 3)
neb.idpp_interpolate()
d2 = images[3].get_distance(2, 3)
print(d0, d1, d2)
assert abs(d2 - 1.74) < 0.01
开发者ID:jboes,项目名称:ase,代码行数:22,代码来源:idpp.py


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