本文整理汇总了Python中ase.vibrations.Vibrations.summary方法的典型用法代码示例。如果您正苦于以下问题:Python Vibrations.summary方法的具体用法?Python Vibrations.summary怎么用?Python Vibrations.summary使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ase.vibrations.Vibrations
的用法示例。
在下文中一共展示了Vibrations.summary方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import summary [as 别名]
def run(job, atoms):
kwargs = {'mode': 0,
'label': 'vib-{0}'.format(job, job),
'xc': 'PBE',
'scf_guess': 'atomic',
'max_scf': 500,
'EPS_SCF': 5.0E-7,
'added_mos': 500,
'sme/method': 'fermi_dirac',
'ELECTRONIC_TEMPERATURE': 300,
'DIA/ALGORITHM': 'STANDARD',
'mix/METHOD': 'BROYDEN_MIXING',
'ALPHA': 0.1,
'BETA': 1.5,
'NBUFFER': 8,
'cpu': 36,
'cutoff': 300,
'run_type': 'ENERGY_FORCE', # ENERGY_FORCE, GEO_OPT, CELL_OPT, MD
'atoms': atoms,
}
calc = CP2K(**kwargs)
atoms.set_calculator(calc)
vib = Vibrations(atoms, indices = [65, 69])
vib.run()
vib.summary()
示例2: run
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import summary [as 别名]
def run(label, atoms):
#calc.mode = 1
calc.directory = 'vib/pt/{0}'.format(label)
calc.prefix = 'al2o3-pt-{0}'.format(label)
calc.results = {}
calc.CP2K_INPUT.FORCE_EVAL_list[0].DFT.Wfn_restart_file_name = 'al2o3-pt-{0}-RESTART.wfn'.format(label)
calc.CP2K_INPUT.MOTION.CONSTRAINT.FIXED_ATOMS_list = []
#===============================================================================
atoms.set_calculator(calc)
###calc.write_input_file()
#e = atoms.get_potential_energy()
#t = calc.get_time()
print(' {0} '.format(label))
vib = Vibrations(atoms, indices = [120])
vib.run()
vib.summary()
import os, shutil
for file in os.listdir('.'):
if "pckl" in file:
shutil.move(file,calc.directory)
示例3: fcc111
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import summary [as 别名]
from __init__ import AnharmonicModes
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, (
示例4: connect
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import summary [as 别名]
#!/usr/bin/env python
from ase.db import connect
from ase.calculators.aims import Aims
from ase.lattice.surface import fcc111, add_adsorbate
from ase.constraints import FixAtoms
from ase import Atoms, Atom
from ase.io.aims import read_aims
from ase.optimize import BFGS
from ase.vibrations import Vibrations
mydb = connect("mydb.db")
atoms = mydb.get_atoms(name='pt-co-relax')
calc = Aims(label='cluster/pt-co-vib-cons',
xc='pbe',
spin='none',
relativistic = 'atomic_zora scalar',
sc_accuracy_etot=1e-7,
sc_accuracy_eev=1e-3,
sc_accuracy_rho=1e-4,
sc_accuracy_forces=1e-3)
atoms.set_calculator(calc)
vib = Vibrations(atoms, indices=[1, 2], name='cluster/pt-co-vib-cons/vib')
vib.run()
vib.summary()
示例5: Vibrations
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import summary [as 别名]
# name of output file for free energies
output_name = 'out.energy'
### At 300K and 101325 Pa
### change for your operating conditions
T = 300 # K
P = 101325 # Pa
#########################################################################################################
##### END #####
#########################################################################################################
energy = atoms.get_potential_energy() # caclulate the energy, to be used to determine G
vibrateatoms = [atom.index for atom in atoms if atom.symbol in ['H','N']] # calculate the vibrational modes for all N and H atoms
# Calculate vibrations
vib = Vibrations(atoms,indices=vibrateatoms,delta=0.03) # define a vibration calculation
vib.run() # run the vibration calculation
vib.summary(method='standard') # summarize the calculated results
for mode in range(len(vibrateatoms)*3): # Make trajectory files to visualize the modes.
vib.write_mode(mode)
vibenergies=vib.get_energies()
vibenergies=[vib for vib in vibenergies if not isinstance(vib,complex)] # only take the real modes
gibbs = HarmonicThermo(vib_energies = vibenergies, electronicenergy = energy)
freeenergy = gibbs.get_gibbs_energy(T,P)
f=open(output_name,'w')
f.write('Potential energy: '+str(energy)+'\n'+'Free energy: '+str(freeenergy)+'\n')
f.close
示例6: GPAW
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import summary [as 别名]
"""Calculate the vibrational modes of a H2O molecule."""
from ase.vibrations import Vibrations
from gpaw import GPAW
h2o = GPAW('h2o.gpw', txt=None).get_atoms()
# Create vibration calculator
vib = Vibrations(h2o)
vib.run()
vib.summary(method='frederiksen')
# Make trajectory files to visualize normal modes:
for mode in range(9):
vib.write_mode(mode)
示例7: Atoms
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import summary [as 别名]
from ase.optimize import QuasiNewton
from ase.vibrations import Vibrations
from gpaw import GPAW
# Water molecule:
d = 0.9575
t = pi / 180 * 104.51
H2O = Atoms("H2O", positions=[(0, 0, 0), (d, 0, 0), (d * cos(t), d * sin(t), 0)])
H2O.center(vacuum=3.5)
calc = GPAW(h=0.2, txt="h2o.txt", mode="lcao", basis="dzp")
H2O.set_calculator(calc)
QuasiNewton(H2O).run(fmax=0.05)
"""Calculate the vibrational modes of a H2O molecule."""
# Create vibration calculator
vib = Vibrations(H2O)
vib.run()
vib.summary(method="frederiksen")
# Make trajectory files to visualize normal modes:
for mode in range(9):
vib.write_mode(mode)
示例8: Vibrations
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import summary [as 别名]
psppath='/home/vossj/suncat/psp/gbrv1.5pbe', # pseudopotential
convergence={'energy': 1e-5,
'mixing': 0.1,
'nmix': 10,
'mix': 4,
'maxsteps': 500,
'diag': 'david'
}, # convergence parameters
outdirprefix='calcdirv') # output directory for Quantum Espresso files
atoms.set_calculator(calcvib)
vib = Vibrations(atoms, indices=vibrateatoms, delta=0.03)
vib.run()
vib.summary(method='standard')
# Make trajectory files to visualize the modes.
for mode in range(len(vibrateatoms) * 3):
vib.write_mode(mode)
# Calculate free energy
vib_energies = vib.get_energies()
thermo = IdealGasThermo(vib_energies=vib_energies,
electronicenergy=energy,
atoms=atoms,
geometry='linear',
symmetrynumber=2, spin=0)
# At 300K and 101325 Pa
# change for your operating conditions