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


Python OptimizeTask.add_options方法代码示例

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


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

示例1: add_options

# 需要导入模块: from ase.tasks.task import OptimizeTask [as 别名]
# 或者: from ase.tasks.task.OptimizeTask import add_options [as 别名]
    def add_options(self, parser):
        OptimizeTask.add_options(self, parser)

        mol = optparse.OptionGroup(parser, 'Molecule')
        mol.add_option('-v', '--vacuum', type='float', default=3.0,
                       help='Amount of vacuum to add around isolated systems '
                       '(in Angstrom).')
        mol.add_option('--unit-cell',
                       help='Unit cell.  Examples: "10.0" or "9,10,11" ' +
                       '(in Angstrom).')
        mol.add_option('--bond-length', type='float',
                       help='Bond length of dimer in Angstrom.')
        mol.add_option('-F', '--fit', metavar='N,x',
                       help='Find optimal bondlength and vibration ' +
                       'frequency using N points and displacements from ' +
                       '-x % to +x %.')
        mol.add_option('--atomize', action='store_true',
                       help='Calculate Atomization energies.')
        parser.add_option_group(mol)
开发者ID:JConwayAWT,项目名称:PGSS14CC,代码行数:21,代码来源:molecule.py

示例2: add_options

# 需要导入模块: from ase.tasks.task import OptimizeTask [as 别名]
# 或者: from ase.tasks.task.OptimizeTask import add_options [as 别名]
    def add_options(self, parser):
        OptimizeTask.add_options(self, parser)

        bulk = optparse.OptionGroup(parser, 'Bulk')
        bulk.add_option('-F', '--fit', metavar='N,x',
                        help='Find optimal volume and bulk modulus ' +
                        'using odd N points and variations of the lattice ' +
                        'constant a from -x % to +x %, i.e. in the interval '
                        '<a - a * x * 100, ..., a, ..., a + a * x * 100>. ' +
                        'This method gives non-equidistant sampling of volume. ' +
                        'With x negative (in Angstrom**3) the sampling of ' +
                        'the cell volume (v) in the interval ' +
                        '<(1 + x /v), ..., 1, ..., (1 - x /v)> is used. ' +
                        'This method gives equidistant sampling of volume.')
        bulk.add_option('--eos', type='str',
                        metavar='eos',
                        help='Selects the type of eos.')
        bulk.add_option('--srelax', metavar='SFMAX[,SOPTIMIZER]',
                        help='Relax cell by minimizing stress using StranFilter '
                        'with SOPTIMIZER algorithm. The SOPTIMIZER keyword is '
                        'optional, and if omitted BFGS is used by default.')
        bulk.add_option('--srelaxsteps', type='int',
                        metavar='ssteps',
                        help='Limit the number of SF optimizer steps.')
        bulk.add_option('-x', '--crystal-structure',
                        help='Crystal structure.',
                        choices=['sc', 'fcc', 'bcc', 'hcp', 'diamond',
                                 'zincblende', 'rocksalt', 'cesiumchloride',
                                 'fluorite'])
        bulk.add_option('-a', '--lattice-constant', type='float',
                        help='Lattice constant in Angstrom.')
        bulk.add_option('--c-over-a', type='float',
                        help='c/a ratio.')
        bulk.add_option('-O', '--orthorhombic', action='store_true',
                        help='Use orthorhombic unit cell.')
        bulk.add_option('-C', '--cubic', action='store_true',
                        help='Use cubic unit cell.')
        bulk.add_option('-r', '--repeat',
                        help='Repeat unit cell.  Use "-r 2" or "-r 2,3,1".')
        parser.add_option_group(bulk)
开发者ID:jboes,项目名称:ase,代码行数:42,代码来源:bulk.py

示例3: add_options

# 需要导入模块: from ase.tasks.task import OptimizeTask [as 别名]
# 或者: from ase.tasks.task.OptimizeTask import add_options [as 别名]
    def add_options(self, parser):
        OptimizeTask.add_options(self, parser)

        bulk = optparse.OptionGroup(parser, 'Bulk')
        bulk.add_option('-F', '--fit', metavar='N,x',
                        help='Find optimal volume and bulk modulus ' +
                        'using N points and variations of the lattice ' +
                        'constants from -x % to +x %.')
        bulk.add_option('-x', '--crystal-structure',
                        help='Crystal structure.',
                        choices=['sc', 'fcc', 'bcc', 'diamond', 'hcp',
                                 'rocksalt', 'zincblende'])
        bulk.add_option('-a', '--lattice-constant', type='float',
                        help='Lattice constant in Angstrom.')
        bulk.add_option('--c-over-a', type='float',
                        help='c/a ratio.')
        bulk.add_option('-O', '--orthorhombic', action='store_true',
                        help='Use orthorhombic unit cell.')
        bulk.add_option('-C', '--cubic', action='store_true',
                        help='Use cubic unit cell.')
        bulk.add_option('-r', '--repeat',
                        help='Repeat unit cell.  Use "-r 2" or "-r 2,3,1".')
        parser.add_option_group(bulk)
开发者ID:JConwayAWT,项目名称:PGSS14CC,代码行数:25,代码来源:bulk.py


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