本文整理汇总了Python中ase.vibrations.Vibrations.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Vibrations.__init__方法的具体用法?Python Vibrations.__init__怎么用?Python Vibrations.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ase.vibrations.Vibrations
的用法示例。
在下文中一共展示了Vibrations.__init__方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import __init__ [as 别名]
def __init__(self, atoms, Excitations,
indices=None,
gsname='rraman', # name for ground state calculations
exname=None, # name for excited state calculations
delta=0.01,
nfree=2,
directions=None,
exkwargs={}, # kwargs to be passed to Excitations
txt='-'):
assert(nfree == 2)
Vibrations.__init__(self, atoms, indices, gsname, delta, nfree)
self.name = gsname + '-d%.3f' % delta
if exname is None:
exname = gsname
self.exname = exname + '-d%.3f' % delta
if directions is None:
self.directions = np.array([0, 1, 2])
else:
self.directions = np.array(directions)
self.exobj = Excitations
self.exkwargs = exkwargs
self.timer = Timer()
self.txt = get_txt(txt, rank)
示例2: __init__
# 需要导入模块: from ase.vibrations import Vibrations [as 别名]
# 或者: from ase.vibrations.Vibrations import __init__ [as 别名]
def __init__(self, atoms, Excitations,
indices=None,
gsname='rraman', # name for ground state calculations
exname=None, # name for excited state calculations
delta=0.01,
nfree=2,
directions=None,
approximation='Profeta',
observation={'geometry': '-Z(XX)Z'},
exkwargs={}, # kwargs to be passed to Excitations
exext='.ex.gz', # extension for Excitation names
txt='-',
verbose=False,):
assert(nfree == 2)
Vibrations.__init__(self, atoms, indices, gsname, delta, nfree)
self.name = gsname + '-d%.3f' % delta
if exname is None:
exname = gsname
self.exname = exname + '-d%.3f' % delta
self.exext = exext
if directions is None:
self.directions = np.array([0, 1, 2])
else:
self.directions = np.array(directions)
self.approximation = approximation
self.observation = observation
self.exobj = Excitations
self.exkwargs = exkwargs
self.timer = Timer()
self.txt = convert_string_to_fd(txt)
self.verbose = verbose