コード例 #1
0
ファイル: projrot.py プロジェクト: lpratalimaffei/autoio
def direct(script_str,
           run_dir,
           geoms,
           grads,
           hessians,
           rotors_str='',
           aux_dct=None,
           input_name=INPUT_NAME,
           output_names=OUTPUT_NAMES):
    """ Generates an input file for a ProjRot job, runs it directly, and
        obtains all of the possible output file strings
    """

    input_str = projrot_io.writer.rpht_input(geoms,
                                             grads,
                                             hessians,
                                             rotors_str=rotors_str)

    output_strs = from_input_string(script_str,
                                    run_dir,
                                    input_str,
                                    aux_dct=aux_dct,
                                    input_name=input_name,
                                    output_names=output_names)

    return output_strs
コード例 #2
0
def direct(script_str, run_dir, input_str, aux_dct=None,
           input_name=INPUT_NAME,
           output_names=OUTPUT_NAMES):
    """
        :param aux_dct: auxiliary input strings dict[name: string]
        :type aux_dct: dict[str: str]
        :param script_str: string of bash script that contains
            execution instructions electronic structure job
        :type script_str: str
        :param run_dir: name of directory to run electronic structure job
        :type run_dir: str
    """

    output_strs = from_input_string(
        script_str, run_dir, input_str,
        aux_dct=aux_dct,
        input_name=input_name,
        output_names=output_names)

    return output_strs
コード例 #3
0
def direct(script_str,
           run_dir,
           zma,
           geo,
           hess,
           script_name=SCRIPT_NAME,
           input_name=INPUT_NAME,
           output_names=OUTPUT_NAMES):
    """ Generates an input file for a ProjRot job, runs it directly, and
        obtains all of the possible output file strings
    """

    input_str = intder_io.writer.input_file(geo, zma)
    aux_dct = {'file15': intder_io.writer.cartesian_hessian_file(hess)}

    return from_input_string(script_str,
                             run_dir,
                             input_str,
                             aux_dct=aux_dct,
                             script_name=script_name,
                             input_name=input_name,
                             output_names=output_names)
コード例 #4
0
ファイル: intder.py プロジェクト: lpratalimaffei/autoio
def direct(script_str,
           run_dir,
           geo,
           hess,
           zma=None,
           input_name=INPUT_NAME,
           output_names=OUTPUT_NAMES):
    """ Run INTDER
    """

    input_str = intder_io.writer.input_file(geo, zma=zma)
    hess_str = intder_io.writer.cart_hess_file(hess)
    aux_dct = {'file15': hess_str}

    output_strs = from_input_string(script_str,
                                    run_dir,
                                    input_str,
                                    aux_dct=aux_dct,
                                    input_name=input_name,
                                    output_names=output_names)

    return output_strs
コード例 #5
0
def frame_oriented_structure(script_str, run_dir,
                             divsur_inp_str,
                             struct_inp_str,
                             divsur_name='divsur.inp',
                             tst_name='tst.inp',
                             struct_name='structure.inp',
                             output_names=('divsur.out',)):
    """ get the divsur.out string containing divsur-frame geoms
    """

    # Fill in the submission script
    script_str.format(divsur_name, tst_name)

    # Write some boilerplate tst.inp string to run script
    tst_str = varecof_io.writer.input_file.tst(1, 1, .1, 1)

    # Put the tst string in the aux dct
    aux_dct = {tst_name: tst_str,
               struct_name: struct_inp_str}

    # Run the script to generate the divsur.out file
    output_strs = from_input_string(
        script_str, run_dir, divsur_inp_str,
        aux_dct=aux_dct,
        script_name=CONVSTRUCT_SCRIPT_NAME,
        input_name=divsur_name,
        output_names=output_names)
    divsur_out_str = output_strs[0]

    # Read the geometries and facial symmetries from divsur out file
    if divsur_out_str is not None:
        geos = varecof_io.reader.divsur.frame_geometries(
            divsur_out_str)
        faces, faces_symm = varecof_io.writer.assess_face_symmetries(
            *geos)
    else:
        geos, faces, faces_symm = None, None, None

    return geos, faces, faces_symm
コード例 #6
0
ファイル: pac99.py プロジェクト: lpratalimaffei/autoio
def direct(script_str, run_dir, input_str, formula_str):
    """ Generates an input file for a ThermP job runs it directly.

        Need formula input to run the script
        :param input_str: string of input file with .i97 suffix
    """

    aux_dct = {NEW_GROUPS_NAME: _new_groups_str()}

    input_name = INPUT_NAME.format(formula_str)
    output_names = tuple(name.format(formula_str) for name in OUTPUT_NAMES)
    output_strs = from_input_string(script_str,
                                    run_dir,
                                    input_str,
                                    aux_dct=aux_dct,
                                    input_name=input_name,
                                    output_names=output_names)

    if not _check(output_strs):
        output_strs = None

    return output_strs
コード例 #7
0
def direct(script_str, run_dir,
           pf_str, formula_str, hform0, temps,
           enthalpyt=0.0, breakt=1000.0):
    """ Generates an input file for a ThermP job runs it directly.
    """

    input_str = thermp_io.writer.input_file(
        ntemps=len(temps),
        formula=formula_str,
        delta_h=hform0,
        enthalpy_temp=enthalpyt,
        break_temp=breakt)
    aux_dct = {'pf.dat': pf_str}

    output_names = OUTPUT_NAMES.copy()
    output_names[1] = output_names[1].format(formula_str)
    output_strs = from_input_string(
        script_str, run_dir, input_str,
        aux_dct=aux_dct,
        input_name=INPUT_NAME,
        output_names=output_names)

    return input_str, output_strs