コード例 #1
0
ファイル: _ts.py プロジェクト: sjklipp/mechdriver
def run_sadpt(spc_dct, tsname, method_dct, es_keyword_dct, thy_inf_dct,
              runfs_dct, savefs_dct):
    """ find a transition state
    """

    # Get objects for the calculations
    ts_dct = spc_dct[tsname]

    # Find the TS
    cnf_info = savefs_dct['runlvl_cnf_fs']
    cnf_save_fs, cnf_save_locs = cnf_info
    overwrite = es_keyword_dct['overwrite']
    if not cnf_save_locs[0]:
        print('No transition state found in filesys',
              'at {} level...'.format(es_keyword_dct['runlvl']),
              'Proceeding to find it...')
        _run = True
    elif overwrite:
        print('User specified to overwrite energy with new run...')
        _run = True
    else:
        print('TS found and saved previously in ',
              cnf_save_fs[-1].path(cnf_save_locs))
        _run = False

    if _run:
        # split below in guess, scan
        guess_zmas = sadpt.generate_guess_structure(ts_dct, method_dct,
                                                    es_keyword_dct, runfs_dct,
                                                    savefs_dct)
        sadpt.obtain_saddle_point(guess_zmas, ts_dct, method_dct, runfs_dct,
                                  savefs_dct, es_keyword_dct)
コード例 #2
0
ファイル: _vtst.py プロジェクト: sjklipp/mechdriver
def run_sadpt(spc_dct,
              tsname,
              method_dct,
              es_keyword_dct,
              thy_inf_dct,
              runfs_dct,
              savefs_dct,
              zma_locs=(0, )):
    """ find a transition state
    """
    # if not _scan_finished(coord_names, coord_grids,
    #                       scn_save_fs, constraint_dct=None):

    # Get objects for the calculations
    ts_dct = spc_dct[tsname]

    # Assess if saddle pt exists in the filesystem at runlvl
    _run = _check_filesys_for_sadpt(savefs_dct, es_keyword_dct)

    if _run:

        # Assess if saddle pt exists in the filesystem at inplvl for guess
        guess_zmas = _check_filesys_for_guess(savefs_dct,
                                              es_keyword_dct,
                                              zma_locs=zma_locs)
        if guess_zmas:
            # Run a scan along coordinate and attempt to find max for opt
            guess_zmas = sadpt.generate_guess_structure(
                ts_dct, method_dct, es_keyword_dct, runfs_dct, savefs_dct)
            if guess_zmas:
                # Optimize the saddle point, run a hessian and save
                sadpt.obtain_saddle_point(guess_zmas, ts_dct, method_dct,
                                          runfs_dct, savefs_dct,
                                          es_keyword_dct)
            else:
                # Calculate add'l data along rxn path and save
                _inf_ene()
                _save_traj(ts_zma, ts_dct, savefs_dct, zma_locs=zma_locs)