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


Python Vibrations.get_energies方法代码示例

本文整理汇总了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
开发者ID:jboes,项目名称:ase,代码行数:19,代码来源:franck_condon.py

示例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))
开发者ID:chemeng444,项目名称:chemeng444.github.io,代码行数:32,代码来源:opt.py


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