示例#1
0
    def default_options():
        """ Lot default options. """

        if hasattr(Lot, '_default_options'): return Lot._default_options.copy()
        opt = options.Options()

        opt.add_option(
            key='fnm',
            value=None,
            required=False,
            allowed_types=[str],
            doc=
            'File name to create the LOT object from. Only used if geom is none.'
        )

        opt.add_option(
            key='geom',
            value=None,
            required=False,
            doc=
            'geometry object required to get the atom names and initial coords'
        )

        opt.add_option(key='states',
                       value=[(1, 0)],
                       required=False,
                       doc='list of states 0-indexed')

        opt.add_option(
            key='gradient_states',
            value=None,
            required=False,
            doc=
            'list of states to calculate gradients for, will assume same as states if not given'
        )

        opt.add_option(
            key='coupling_states',
            value=None,
            required=False,
            doc=
            'states to calculate derivative coupling. Currently only one coupling can be calculated per level of theory object.'
        )

        opt.add_option(key='charge',
                       value=0,
                       required=False,
                       allowed_types=[int],
                       doc='charge of molecule')

        opt.add_option(
            key='nproc',
            required=False,
            value=1,
            allowed_types=[int],
            doc="number of processors",
        )

        opt.add_option(key='do_coupling',
                       required=False,
                       value=False,
                       doc='derivative coupling')

        opt.add_option(key="node_id",
                       required=False,
                       value=0,
                       allowed_types=[int],
                       doc='node id used for storing orbs,etc')

        opt.add_option(key="ID",
                       required=False,
                       value=0,
                       allowed_types=[int],
                       doc=' id used for storing orbs,etc for string')

        opt.add_option(key="calc_grad",
                       required=False,
                       value=True,
                       allowed_types=[bool],
                       doc=' calculate gradient or not')

        opt.add_option(
            key="lot_inp_file",
            required=False,
            value=None,
            doc=
            'file name storing LOT input section. Used for custom basis sets,\
                     custom convergence criteria, etc. Will override nproc, basis and\
                     functional. Do not specify charge or spin in this file. Charge \
                     and spin should be specified in charge and states options.\
                     for QChem, include $molecule line. For ORCA, do not include *xyz\
                     line.')

        opt.add_option(
            key='job_data',
            value={},
            allowed_types=[dict],
            doc='extra key-word arguments to define level of theory object. e.g.\
                     TeraChem Cloud requires a TeraChem client and options dictionary.'
        )

        opt.add_option(
            key='file_options',
            value=None,
            allowed_types=[File_Options],
            doc=
            'A specialized dictionary containing lot specific options from file\
                        including checks on dependencies and clashes. Not all packages\
                        require')

        Lot._default_options = opt
        return Lot._default_options.copy()
示例#2
0
    def default_options():
        if hasattr(GSM, '_default_options'):
            return GSM._default_options.copy()

        opt = options.Options()

        opt.add_option(
            key='reactant',
            required=True,
            # allowed_types=[Molecule,wrappers.Molecule],
            doc='Molecule object as the initial reactant structure')

        opt.add_option(
            key='product',
            required=False,
            # allowed_types=[Molecule,wrappers.Molecule],
            doc=
            'Molecule object for the product structure (not required for single-ended methods.'
        )

        opt.add_option(key='nnodes',
                       required=False,
                       value=1,
                       allowed_types=[int],
                       doc="number of string nodes")

        opt.add_option(
            key='optimizer',
            required=True,
            doc=
            'Optimzer object  to use e.g. eigenvector_follow, conjugate_gradient,etc. \
                        most of the default options are okay for here since GSM will change them anyway',
        )

        opt.add_option(
            key='driving_coords',
            required=False,
            value=[],
            allowed_types=[list],
            doc='Provide a list of tuples to select coordinates to modify atoms\
                 indexed at 1')

        opt.add_option(key='CONV_TOL',
                       value=0.0005,
                       required=False,
                       allowed_types=[float],
                       doc='Convergence threshold')

        opt.add_option(key='CONV_gmax',
                       value=0.001,
                       required=False,
                       allowed_types=[float],
                       doc='Convergence threshold')

        opt.add_option(key='CONV_Ediff',
                       value=0.1,
                       required=False,
                       allowed_types=[float],
                       doc='Convergence threshold')

        opt.add_option(key='CONV_dE',
                       value=0.5,
                       required=False,
                       allowed_types=[float],
                       doc='Convergence threshold')

        opt.add_option(key='ADD_NODE_TOL',
                       value=0.1,
                       required=False,
                       allowed_types=[float],
                       doc='Convergence threshold')

        opt.add_option(key="growth_direction",
                       value=0,
                       required=False,
                       doc="how to grow string,0=Normal,1=from reactant")

        opt.add_option(key="DQMAG_MAX",
                       value=0.8,
                       required=False,
                       doc="max step along tangent direction for SSM")
        opt.add_option(key="DQMAG_MIN", value=0.2, required=False, doc="")

        opt.add_option(key='print_level', value=1, required=False)

        opt.add_option(
            key='xyz_writer',
            value=write_molden_geoms,
            required=False,
            doc='Function to be used to format and write XYZ files',
        )

        opt.add_option(
            key='mp_cores',
            value=1,
            doc=
            'multiprocessing cores for parallel programming. Use this with caution.',
        )

        opt.add_option(
            key="BDIST_RATIO",
            value=0.5,
            required=False,
            doc="SE-Crossing uses this \
                        bdist must be less than 1-BDIST_RATIO of initial bdist in order to be \
                        to be considered grown.",
        )

        opt.add_option(key='ID',
                       value=0,
                       required=False,
                       doc='A number for identification of Strings')

        opt.add_option(
            key='interp_method',
            value='DLC',
            allowed_values=['Geodesic', 'DLC'],
            required=False,
            doc='Which reparameterization method to use',
        )

        opt.add_option(
            key='noise',
            value=100.0,
            allowed_types=[float],
            required=False,
            doc='Noise to check for intermediate',
        )

        GSM._default_options = opt
        return GSM._default_options.copy()
示例#3
0
    def default_options():
        """ default options. """

        if hasattr(base_optimizer, '_default_options'):
            return base_optimizer._default_options.copy()
        opt = options.Options()

        opt.add_option(key='OPTTHRESH',
                       value=0.0005,
                       required=False,
                       allowed_types=[float],
                       doc='Gradrms convergence threshold')

        opt.add_option(key='conv_Ediff',
                       value=100.,
                       required=False,
                       allowed_types=[float],
                       doc='Energy difference convergence')

        opt.add_option(key='conv_dE',
                       value=1.,
                       required=False,
                       allowed_types=[float],
                       doc='State difference Energy convergence')
        opt.add_option(
            key='conv_gmax',
            value=100.,
            required=False,
            allowed_types=[float],
            doc='max gradient convergence threshold',
        )

        opt.add_option(
            key='conv_disp',
            value=100.,
            required=False,
            allowed_types=[float],
            doc='max atomic displacement threshold',
        )

        opt.add_option(
            key='opt_cross',
            value=False,
            allowed_types=[bool],
            doc='used for state crossing calculations',
        )

        opt.add_option(
            key='opt_climb',
            value=False,
            allowed_types=[bool],
            doc='Optimize TS with climbing criterion',
        )

        opt.add_option(
            key='DMAX',
            value=0.1,
            doc=
            'step size controller, this changes depending on the performance of the optimization',
        )
        opt.add_option(
            key='DMIN',
            value=0.0001,
            doc=
            'step size controller, this changes depending on the performance of the optimization',
        )
        opt.add_option(
            key='abs_max_step',
            value=0.4,
            doc=
            'the absolute max step allowed in optimization, a hard cutoff is required because converting internal coordinates becomes pathological'
        )

        opt.add_option(
            key='ftol',
            value=1e-4,
            doc=
            'used for the strong armijo condition to determine if energy decreased enough',
        )

        opt.add_option(
            key='SCALEQN',
            value=1,
        )

        opt.add_option(key='SCALE_CLIMB',
                       value=1.,
                       doc='Used to scale the climbing image search')

        opt.add_option(
            key='update_hess_in_bg',
            value=True,
            doc='For optimizers not bfgs keep track of Hessian in back ground',
        )

        opt.add_option(
            key='SCALEW',
            value=1.,
        )

        opt.add_option(
            key='Linesearch',
            value="NoLineSearch",
            allowed_values=["NoLineSearch", "backtrack"],
            required=False,
            doc='A function to do a linesearch e.g. bactrack,NoLineSearch, etc.'
        )

        opt.add_option(
            key='MAXAD',
            value=0.075,
        )

        opt.add_option(key='print_level',
                       value=1,
                       doc="control the printout, 0 less, 1 more, 2 too much")

        opt.add_option(
            key='HESS_TANG_TOL_TS',
            value=0.35,
            doc='Hessian  overlap with tangent tolerance for TS node')

        base_optimizer._default_options = opt
        return base_optimizer._default_options.copy()
    def default_options():
        ''' InternalCoordinates default options.'''

        if hasattr(InternalCoordinates, '_default_options'):
            return InternalCoordinates._default_options.copy()
        opt = options.Options()

        opt.add_option(key="xyz",
                       required=True,
                       doc='cartesian coordinates in angstrom')

        opt.add_option(
            key='atoms',
            required=True,
            #allowed_types=[],
            doc=
            'atom element named tuples/dictionary must be of type list[elements].'
        )

        opt.add_option(
            key='connect',
            value=False,
            allowed_types=[bool],
            doc=
            "Connect the fragments/residues together with a minimum spanning bond,\
                    use for DLC, Don't use for TRIC, or HDLC.",
        )

        opt.add_option(
            key='addcart',
            value=False,
            allowed_types=[bool],
            doc="Add cartesian coordinates\
                    use to form HDLC ,Don't use for TRIC, DLC.",
        )

        opt.add_option(
            key='addtr',
            value=False,
            allowed_types=[bool],
            doc="Add translation and rotation coordinates\
                    use for TRIC.",
        )

        opt.add_option(
            key='constraints',
            value=None,
            allowed_types=[list],
            doc='A list of Distance,Angle,Torsion constraints (see slots.py),\
                    This is only useful if doing a constrained geometry optimization\
                    since GSM will handle the constraint automatically.')
        opt.add_option(key='cVals',
                       value=None,
                       allowed_types=[list],
                       doc='List of Distance,Angle,Torsion constraints values')

        opt.add_option(
            key='form_topology',
            value=True,
            doc=
            'A lazy argument for forming the topology on the fly, dont use this',
        )

        opt.add_option(
            key='primitives',
            value=None,
            doc=
            'This is a Primitive internal coordinates object -- can be used instead \
                        of creating new primitive object')

        opt.add_option(
            key='topology',
            value=None,
            doc='This is the molecule topology, used for building primitives')

        opt.add_option(key='print_level',
                       value=1,
                       required=False,
                       allowed_types=[int],
                       doc='0-- no printing, 1-- printing')

        InternalCoordinates._default_options = opt
        return InternalCoordinates._default_options.copy()
示例#5
0
    def default_options():
        if hasattr(Molecule, '_default_options'):
            return Molecule._default_options.copy()
        opt = options.Options()

        opt.add_option(
            key='fnm',
            value=None,
            required=False,
            allowed_types=[str],
            doc=
            'File name to create the Molecule object from. Only used if geom is none.'
        )
        opt.add_option(
            key='ftype',
            value=None,
            required=False,
            allowed_types=[str],
            doc='filetype (optional) will attempt to read filetype if not given'
        )

        opt.add_option(key='coordinate_type',
                       required=False,
                       value='Cartesian',
                       allowed_values=['Cartesian', 'DLC', 'HDLC', 'TRIC'],
                       doc='The type of coordinate system to build')

        opt.add_option(
            key='coord_obj',
            required=False,
            value=None,
            #allowed_types=[DelocalizedInternalCoordinates,CartesianCoordinates],
            doc='A coordinate object.')

        opt.add_option(key='geom',
                       required=False,
                       allowed_types=[list],
                       doc='geometry including atomic symbols')

        opt.add_option(key='xyz',
                       required=False,
                       allowed_types=[np.ndarray],
                       doc='The Cartesian coordinates in Angstrom')

        opt.add_option(
            key='PES',
            required=True,
            #allowed_types=[PES,Avg_PES,Penalty_PES,potential_energy_surfaces.pes.PES,potential_energy_surfaces.Penalty_PES,potential_energy_surfaces.Avg_PES],
            doc=
            'potential energy surface object to evaulate energies, gradients, etc. Pes is defined by charge, state, multiplicity,etc. '
        )
        opt.add_option(
            key='copy_wavefunction',
            value=True,
            doc=
            'When copying the level of theory object, sometimes it is not helpful to copy the lot data as this will over write data \
                        (e.g. at the beginning of DE-GSM)')

        opt.add_option(
            key='Primitive_Hessian',
            value=None,
            required=False,
            doc='Primitive hessian save file for doing optimization.')

        opt.add_option(
            key='Hessian',
            value=None,
            required=False,
            doc='Hessian save file in the basis of coordinate_type.')

        opt.add_option(
            key='Form_Hessian',
            value=True,
            doc=
            'Form the Hessian in the current basis -- takes time for large molecules.'
        )

        opt.add_option(key="top_settings",
                       value={},
                       doc='some extra kwargs for forming coordinate object.')

        opt.add_option(
            key='comment',
            required=False,
            value='',
            doc=
            'A string that is saved on the molecule, used for descriptive purposes'
        )

        opt.add_option(
            key='node_id',
            required=False,
            value=0,
            doc='used to specify level of theory node identification',
        )

        opt.add_option(
            key='frozen_atoms',
            required=False,
            value=None,
            doc='frozen atoms',
        )

        Molecule._default_options = opt
        return Molecule._default_options.copy()