當前位置: 首頁>>代碼示例>>Python>>正文


Python Vibrations.clean方法代碼示例

本文整理匯總了Python中ase.vibrations.Vibrations.clean方法的典型用法代碼示例。如果您正苦於以下問題:Python Vibrations.clean方法的具體用法?Python Vibrations.clean怎麽用?Python Vibrations.clean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ase.vibrations.Vibrations的用法示例。


在下文中一共展示了Vibrations.clean方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: fcc111

# 需要導入模塊: from ase.vibrations import Vibrations [as 別名]
# 或者: from ase.vibrations.Vibrations import clean [as 別名]
slab = fcc111('Al', size=(2, 2, 2), vacuum=3.0)
CH3 = molecule('CH3')
add_adsorbate(slab, CH3, 2.5, 'ontop')

constraint = FixAtoms(mask=[a.symbol == 'Al' for a in slab])
slab.set_constraint(constraint)
slab.set_calculator(EMT())

dyn = QuasiNewton(slab, logfile='/dev/null')
dyn.run(fmax=0.05)

vib = Vibrations(slab, indices=[8, 9, 10, 11])
vib.run()
vib.summary(log='/dev/null')
vib.clean()

AM = AnharmonicModes(vibrations_object=vib)
rot_mode = AM.define_rotation(
    basepos=[0., 0., -1.],
    branch=[9, 10, 11],
    symnumber=3)

AM.run()
AM.summary(log='/dev/null')
AM.clean()

# print(AM.get_ZPE(), AM.get_entropic_energy())
assert abs(AM.get_ZPE() - 0.388) < 1e-3, AM.get_ZPE()
assert abs(AM.get_entropic_energy() - (0.091)) < 1e-3, (
    AM.get_entropic_energy())
開發者ID:keldLundgaard,項目名稱:ase-anharmonics,代碼行數:32,代碼來源:test_rotation.py

示例2: Atoms

# 需要導入模塊: from ase.vibrations import Vibrations [as 別名]
# 或者: from ase.vibrations.Vibrations import clean [as 別名]
from __future__ import print_function
from ase import Atoms
from ase.calculators.emt import EMT
from ase.optimize import QuasiNewton
from ase.vibrations import Vibrations
from ase.thermochemistry import IdealGasThermo

n2 = Atoms('N2',
           positions=[(0, 0, 0), (0, 0, 1.1)],
           calculator=EMT())
QuasiNewton(n2).run(fmax=0.01)
vib = Vibrations(n2)
vib.run()
print(vib.get_frequencies())
vib.summary()
print(vib.get_mode(-1))
vib.write_mode(n=None, nimages=20)
vib_energies = vib.get_energies()

thermo = IdealGasThermo(vib_energies=vib_energies, geometry='linear',
                        atoms=n2, symmetrynumber=2, spin=0)
thermo.get_gibbs_energy(temperature=298.15, pressure=2 * 101325.)

assert vib.clean(empty_files=True) == 0
assert vib.clean() == 13
開發者ID:rchiechi,項目名稱:QuantumParse,代碼行數:27,代碼來源:vib.py


注:本文中的ase.vibrations.Vibrations.clean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。