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


Python Vasp.get_vibrational_frequencies方法代码示例

本文整理汇总了Python中vasp.Vasp.get_vibrational_frequencies方法的典型用法代码示例。如果您正苦于以下问题:Python Vasp.get_vibrational_frequencies方法的具体用法?Python Vasp.get_vibrational_frequencies怎么用?Python Vasp.get_vibrational_frequencies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vasp.Vasp的用法示例。


在下文中一共展示了Vasp.get_vibrational_frequencies方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Vasp

# 需要导入模块: from vasp import Vasp [as 别名]
# 或者: from vasp.Vasp import get_vibrational_frequencies [as 别名]
            encut=300,
            ibrion=2,
            nsw=5,
            atoms=atoms)
electronicenergy = atoms.get_potential_energy()
# next, we get vibrational modes
calc2 = Vasp('molecules/n2-vib',
             xc='PBE',
             encut=300,
             ibrion=6,
             nfree=2,
             potim=0.15,
             nsw=1,
             atoms=atoms)
calc2.wait()
vib_freq = calc2.get_vibrational_frequencies() # in cm^1
#convert wavenumbers to energy
h = 4.1356675e-15 # eV*s
c = 3.0e10 #cm/s
vib_energies = [h*c*nu for nu in vib_freq]
print('vibrational energies\n====================')
for i,e in enumerate(vib_energies):
    print('{0:02d}: {1} eV'.format(i,e))
# # now we can get some properties. Note we only need one vibrational
# energy since there is only one mode. This example does not work if
# you give all the energies because one energy is zero.
thermo = IdealGasThermo(vib_energies=vib_energies[0:0],
                        potentialenergy=electronicenergy, atoms=atoms,
                        geometry='linear', symmetrynumber=2, spin=0)
# temperature in K, pressure in Pa, G in eV
G = thermo.get_gibbs_energy(temperature=298.15, pressure=101325.)
开发者ID:beeruyue,项目名称:dft-book,代码行数:33,代码来源:script-59.py

示例2: Vasp

# 需要导入模块: from vasp import Vasp [as 别名]
# 或者: from vasp.Vasp import get_vibrational_frequencies [as 别名]
E_CO = c1.potential_energy
CO = c1.get_atoms()
c2 = Vasp('molecules/wgs/CO2')
E_CO2 = c2.potential_energy
CO2 = c2.get_atoms()
c3 = Vasp('molecules/wgs/H2')
E_H2 = c3.potential_energy
H2 = c3.get_atoms()
c4 = Vasp('molecules/wgs/H2O')
E_H2O = c4.potential_energy
H2O = c4.get_atoms()
# now we get the vibrational energies
h = 4.1356675e-15  # eV * s
c = 3.0e10  # cm / s
calc = Vasp('molecules/wgs/CO-vib')
vib_freq = calc.get_vibrational_frequencies()
CO_vib_energies = [h * c * nu for nu in vib_freq]
calc = Vasp('molecules/wgs/CO2-vib')
vib_freq = calc.get_vibrational_frequencies()
CO2_vib_energies = [h * c * nu for nu in vib_freq]
calc = Vasp('molecules/wgs/H2-vib')
vib_freq = calc.get_vibrational_frequencies()
H2_vib_energies = [h * c * nu for nu in vib_freq]
calc = Vasp('molecules/wgs/H2O-vib')
vib_freq = calc.get_vibrational_frequencies()
H2O_vib_energies = [h * c * nu for nu in vib_freq]
# now we make a thermo object for each molecule
CO_t = IdealGasThermo(vib_energies=CO_vib_energies[0:0],
                      potentialenergy=E_CO, atoms=CO,
                      geometry='linear', symmetrynumber=1,
                      spin=0)
开发者ID:beeruyue,项目名称:dft-book,代码行数:33,代码来源:script-82.py


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