本文整理匯總了Python中ase.vibrations.Vibrations.get_energies方法的典型用法代碼示例。如果您正苦於以下問題:Python Vibrations.get_energies方法的具體用法?Python Vibrations.get_energies怎麽用?Python Vibrations.get_energies使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ase.vibrations.Vibrations
的用法示例。
在下文中一共展示了Vibrations.get_energies方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from ase.vibrations import Vibrations [as 別名]
# 或者: from ase.vibrations.Vibrations import get_energies [as 別名]
def __init__(self, atoms, vibname, minfreq=None, maxfreq=None):
"""Input is a atoms object and the corresponding vibrations.
With minfreq and maxfreq frequencies can
be excluded from the calculation"""
self.atoms = atoms
# V = a * v is the combined atom and xyz-index
self.mm05_V = np.repeat(1.0 / np.sqrt(atoms.get_masses()), 3)
self.minfreq = minfreq
self.maxfreq = maxfreq
self.shape = (len(self.atoms), 3)
vib = Vibrations(atoms, name=vibname)
self.energies = np.real(vib.get_energies(method="frederiksen")) # [eV]
self.frequencies = np.real(vib.get_frequencies(method="frederiksen")) # [cm^-1]
self.modes = vib.modes
self.H = vib.H
示例2: QuasiNewton
# 需要導入模塊: from ase.vibrations import Vibrations [as 別名]
# 或者: from ase.vibrations.Vibrations import get_energies [as 別名]
dw = 5000.,
nbands = -10,
kpts=(1, 1, 1),
xc = 'BEEF',
outdir='outdir',
psppath = "/scratch/users/colinfd/psp/gbrv",
sigma = 10e-4)
atoms.set_calculator(calc)
dyn = QuasiNewton(atoms,logfile='out.log',trajectory='out.traj')
dyn.run(fmax=0.01)
electronicenergy = atoms.get_potential_energy()
vib = Vibrations(atoms) # run vibrations on all atoms
vib.run()
vib_energies = vib.get_energies()
thermo = IdealGasThermo(vib_energies=vib_energies,
electronicenergy=electronicenergy,
atoms=atoms,
geometry='linear', # linear/nonlinear
symmetrynumber=2, spin=0) # symmetry numbers from point group
G = thermo.get_free_energy(temperature=300, pressure=101325.) # vapor pressure of water at room temperature
e = open('e_energy.out','w')
g = open('g_energy.out','w')
e.write(str(electronicenergy))
g.write(str(G))