本文整理汇总了Python中ase.tasks.task.OptimizeTask.parse方法的典型用法代码示例。如果您正苦于以下问题:Python OptimizeTask.parse方法的具体用法?Python OptimizeTask.parse怎么用?Python OptimizeTask.parse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ase.tasks.task.OptimizeTask
的用法示例。
在下文中一共展示了OptimizeTask.parse方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: parse
# 需要导入模块: from ase.tasks.task import OptimizeTask [as 别名]
# 或者: from ase.tasks.task.OptimizeTask import parse [as 别名]
def parse(self, opts, args):
OptimizeTask.parse(self, opts, args)
if opts.srelax:
if len(opts.srelax.split(',')) > 1:
self.sfmax, self.soptimizer = opts.srelax.split(',')
else:
self.sfmax = opts.srelax
self.soptimizer = 'BFGS'
self.sfmax = float(self.sfmax)
if opts.srelaxsteps is not None:
self.ssteps = int(opts.srelaxsteps)
else:
# yes, the default number of ASE optimizer steps
# ase/optimize/optimize.py
self.ssteps = 100000000
if opts.fit:
points, strain = opts.fit.split(',')
if float(strain) > 0:
self.fit = (int(points), float(strain) * 0.01)
else:
self.fit = (int(points), float(strain))
self.eos = opts.eos
self.crystal_structure = opts.crystal_structure
self.lattice_constant = opts.lattice_constant
self.c_over_a = opts.c_over_a
self.orthorhombic = opts.orthorhombic
self.cubic = opts.cubic
self.repeat = opts.repeat
示例2: parse
# 需要导入模块: from ase.tasks.task import OptimizeTask [as 别名]
# 或者: from ase.tasks.task.OptimizeTask import parse [as 别名]
def parse(self, opts, args):
OptimizeTask.parse(self, opts, args)
if opts.fit:
points, strain = opts.fit.split(',')
self.fit = (int(points), float(strain) * 0.01)
self.crystal_structure = opts.crystal_structure
self.lattice_constant = opts.lattice_constant
self.c_over_a = opts.c_over_a
self.orthorhombic = opts.orthorhombic
self.cubic = opts.cubic
self.repeat = opts.repeat
示例3: parse
# 需要导入模块: from ase.tasks.task import OptimizeTask [as 别名]
# 或者: from ase.tasks.task.OptimizeTask import parse [as 别名]
def parse(self, opts, args):
OptimizeTask.parse(self, opts, args)
self.vacuum = opts.vacuum
self.bond_length = opts.bond_length
self.atomize = opts.atomize
if opts.fit:
points, strain = opts.fit.split(',')
self.fit = (int(points), float(strain) * 0.01)
if opts.unit_cell:
if ',' in opts.unit_cell:
self.unit_cell = [float(x) for x in opts.unit_cell.split(',')]
else:
self.unit_cell = [float(opts.unit_cell)] * 3