當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。