本文整理匯總了Python中ase.neb.NEB.writer方法的典型用法代碼示例。如果您正苦於以下問題:Python NEB.writer方法的具體用法?Python NEB.writer怎麽用?Python NEB.writer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ase.neb.NEB
的用法示例。
在下文中一共展示了NEB.writer方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: xrange
# 需要導入模塊: from ase.neb import NEB [as 別名]
# 或者: from ase.neb.NEB import writer [as 別名]
image.constraints.append(constraint)
# Displace last image:
for i in xrange(1,8,1):
images[-1].positions[-i] += (d/2, -h1/3, 0)
write('initial.traj', images[0])
# Relax height of Ag atom for initial and final states:
for image in [images[0], images[-1]]:
QuasiNewton(image).run(fmax=0.01)
if 0:
write('initial.pckl', image[0])
write('finial.pckl', image[-1])
# Interpolate positions between initial and final states:
neb.interpolate()
for image in images:
print image.positions[-1], image.get_potential_energy()
traj = PickleTrajectory('mep.traj', 'w')
dyn = FIRE(neb, dt=0.1)
#dyn = MDMin(neb, dt=0.1)
#dyn = QuasiNewton(neb)
dyn.attach(neb.writer(traj))
dyn.run(fmax=0.01,steps=150)
for image in images:
print image.positions[-1], image.get_potential_energy()