コード例 #1
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def diverged_ts(param, ref_param, cnf_param):
    """ a
    """
    info_message(
        "- Transition State conformer has",
        "diverged from original structure of",
        f"{param} {ref_param:.3f} with angle {cnf_param:.3f}")
コード例 #2
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def molecular_properties(dmom, polar):
    """ a
    """
    if dmom is not None and polar is not None:
        dmom_str = automol.util.vec.string(dmom)
        polar_str = automol.util.mat.string(polar)
        info_message(f'Dipole Moment [Debye]:\n{dmom_str}', newline=1)
        info_message(f'Polarizability []: {polar_str}')
コード例 #3
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def bad_equil_ts(cnf_dist, equi_bnd):
    """ a
    """
    info_message(
        " - Transition State conformer has",
        "converged to an",
        "equilibrium structure with dist",
        f" {cnf_dist:.3f} comp with equil {equi_bnd:.3f}")
コード例 #4
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def frequencies(freqs):
    """ Print out the Harmonic frequencies and ZPVE
    """
    if freqs is not None:
        freq_str = automol.util.vec.string(
            freqs, num_per_row=6, val_format='{0:>12.3f}')
        harm_zpe = (sum(freqs) / 2.0) * phycon.WAVEN2KCAL
        info_message(f'\nHarmonic frequencies [cm-1]:\n{freq_str}')
        info_message(f'\nHarmonic ZPVE [kcal mol-1]: {harm_zpe}\n')
コード例 #5
0
ファイル: _lj.py プロジェクト: Auto-Mech/mechdriver
def lennard_jones_params(sigmas, epsilons):
    """ Print Lennard-Jones parameters on individual lines.

        Need to convert?

        :param sigmas: list of sigma values
        :type sigmas: tuple(float)
        :param epsilons: list of epsilon values
        :type epsilons: tuple(float)
    """
    if sigmas and epsilons:
        info_message(f'{"Sigma (Ang)":<14s}{"Epsilon (cm-1)":<16s}')
        for sig, eps in zip(sigmas, epsilons):
            info_message(f'{sig:<14.4f}{eps:<16.4f}')
コード例 #6
0
ファイル: _lj.py プロジェクト: kevinmooreiii/mechdriver
def lennard_jones_params(sigmas, epsilons):
    """ Print Lennard-Jones parameters on individual lines.

        Need to convert?

        :param sigmas: list of sigma values
        :type sigmas: tuple(float)
        :param epsilons: list of epsilon values
        :type epsilons: tuple(float)
    """
    if sigmas and epsilons:
        info_message(
            '{0:<14s}{1:<16s}'.format('\nSigma (Ang)', 'Epsilon (cm-1)'))
        for sig, eps in zip(sigmas, epsilons):
            info_message(
                '{0:<14.4f}{1:<16.4f}'.format(sig, eps))
コード例 #7
0
ファイル: _thermo.py プロジェクト: Auto-Mech/mechdriver
def therm_paths_messpf_write_locations(spc_name, spc_locs_lst, spc_mods,
                                       thm_paths_dct):
    """ prints out a table with the path that the messpf thermo input is
        written for each conformer and model
    """
    info_message('MESSPF location table:')
    info_message(f'{"species name":<16}'
                 f'{"rid":<16}{"cid":<16}{"model":<16}{"path":<16}')
    info_message(f'{"============":<16}'
                 f'{"=======":<16}{"=======":<16}{"=======":<16}'
                 f'{"============":<16}')
    for spc_locs in spc_locs_lst:
        for spc_mod in spc_mods:
            path = thm_paths_dct[spc_name][tuple(spc_locs)][spc_mod][0]
            info_message(f'{spc_name:<16}'
                         f'{spc_locs[0]:<16}'
                         f'{spc_locs[1]:<16}'
                         f'{spc_mod:<16}'
                         f'{path:<16}')
コード例 #8
0
def run_rotors(run_tors_names, const_names):
    """ a
    """
    info_message('Running hindered rotor scans for the following rotors...',
                 newline=1)
    for names in run_tors_names:
        info_message(names)
    if const_names is not None:
        if set(list(chain(*run_tors_names))) == set(const_names):
            info_message(
                'User requested all torsions of system will be fixed.',
                newline=1)
コード例 #9
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_conformer_energy(sp_save_path):
    """ a
    """
    info_message(f" - Saving energy of unique geometry at {sp_save_path}...")
コード例 #10
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def initial_geom_path(label, path):
    """ a
    """
    info_message(label, 'using geom from', path)
コード例 #11
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def bad_conformer(reason):
    """ a
    """
    info_message(
        f'- Geometry is {reason}. Conformer will not be saved.')
コード例 #12
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def constraint_dictionary(dct):
    """ a
    """
    if dct is not None:
        info_message('Contraint dictionary:', dct)
コード例 #13
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def existing_path(label, path):
    """ a
    """
    # info_message(label, 'found and saved previously in', path)
    info_message('  -', label, 'found and saved previously in', path)
コード例 #14
0
def bad_conformer(reason):
    """ a
    """
    info_message(
        '- Geometry is {}. Conformer will not be saved.'.format(reason))
コード例 #15
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_irc(save_path):
    """ a
    """
    info_message(" - Saving IRC...")
    info_message(f" - Save path: {save_path}")
コード例 #16
0
def existing_path(label, path):
    """ a
    """
    info_message(label + ' found and saved previously in ', path)
コード例 #17
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def gradient(grad):
    """ a
    """
    grad_str = automol.util.mat.string(grad)
    info_message(f'Gradient [au]:\n{grad_str}', newline=1)
コード例 #18
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def geometry(geom):
    """ a
    """
    geom_str = automol.geom.string(geom)
    info_message(f'Geometry [Angstrom]:\n{geom_str}', newline=1)
コード例 #19
0
ファイル: _thermo.py プロジェクト: Auto-Mech/mechdriver
def therm_paths_messpf_run_locations(spc_name, spc_locs_lst, spc_mods,
                                     thm_paths_dct):
    """ prints out a table with the path that the messpf thermo is calculated
        for each conformer and model
    """
    info_message('MESSPF location table:')
    info_message(f'{"species name":<16}'
                 f'{"rid":<16}{"cid":<16}{"model":<16}{"path":<16}')
    info_message(f'{"============":<16}'
                 f'{"=======":<16}{"=======":<16}{"=======":<16}'
                 f'{"============":<16}')
    for spc_locs in spc_locs_lst:
        for spc_mod in spc_mods:
            path1 = thm_paths_dct[spc_name][tuple(spc_locs)][spc_mod][0]
            path2 = thm_paths_dct[spc_name][tuple(spc_locs)]['mod_total'][0]
            info_message(f'{spc_name:<16}'
                         f'{spc_locs[0]:<16}'
                         f'{spc_locs[1]:<16}'
                         f'{spc_mod:<16}'
                         f'{path1:<16}')
            info_message(f'{spc_name:<16}'
                         f'{spc_locs[0]:<16}'
                         f'{spc_locs[1]:<16}'
                         f'{"mod combo":<16}'
                         f'{path2:<16}')
    info_message(f'{spc_name:<16}'
                 f'{"":<16}'
                 f'{"spc combo":<16}'
                 f'{"mod combo":<16}'
                 f'{thm_paths_dct[spc_name]["spc_total"][0]:<16}')
コード例 #20
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_anharmonicity(geo_save_path):
    """ a
    """
    info_message(" - Saving anharmonicities...")
    info_message(f" - Save path: {geo_save_path}")
コード例 #21
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_energy(sp_save_path):
    """ a
    """
    info_message(" - Saving energy...")
    info_message(f" - Save path: {sp_save_path}")
コード例 #22
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_geo(save_path):
    """ a
    """
    info_message(" - Saving geoemetry...")
    info_message(f" - Save path: {save_path}")
コード例 #23
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def energy(ene):
    """ Print an energy value
    """
    if ene is not None:
        info_message(f"Energy [au]: {ene:<16.8f}", newline=1)
コード例 #24
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def already_running(task, path):
    """ a
    """
    info_message(f'{task} already running in {path}')
コード例 #25
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_conformer(cnf_save_path):
    """ a
    """
    info_message(" - Geometry is unique. Saving...")
    info_message(f" - Save path: {cnf_save_path}")
コード例 #26
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_symmetry(sym_save_path):
    """ a
    """
    info_message(" - Saving structure in a sym directory at path "
                 f"{sym_save_path}")
コード例 #27
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_frequencies(save_path):
    """ a
    """
    info_message(" - Saving frequencies...")
    info_message(f" - Save path: {save_path}")
コード例 #28
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_reference(save_path):
    """ a
    """
    info_message(" - Saving reference geometry...")
    info_message(f" - Save path: {save_path}")
コード例 #29
0
ファイル: _thermo.py プロジェクト: Auto-Mech/mechdriver
def print_thermo(spc_dct, ckin_nasa_str, spc_locs_dct, spc_locs_idx, spc_mod):
    """ Generate and print thermo properties with the nasa polynomial string
    """

    nasa7_params_all = chemkin_io.parser.thermo.create_spc_nasa7_dct(
        ckin_nasa_str)
    templist = (298.15, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200,
                1300, 1400, 1500)
    # templist = (
    #     298.15, 300, 400, 500, 600,  800,
    #     1000, 1500, 2000, 2500, 3000)
    info_message('SPECIES            H0f(0 K)  H0f(298 K) in kcal/mol:')
    info_message(' T (K)   H - H(T)    S(T)      Cp(T) ')
    info_message('Kelvin  kcal/mol cal/(mol K) cal/(mol K)')
    whitespace2 = 45
    whitespace2 = whitespace2 * ' '
    for spc_name in nasa7_params_all:
        nasa7_params = nasa7_params_all[spc_name]
        whitespace = 18 - len(spc_name)
        whitespace = whitespace * ' '
        if spc_locs_idx == 0:
            hf0 = (spc_dct[spc_name]['Hfs']['final'][0] * phycon.EH2KCAL)
            info_message(f'{spc_name}---{"boltzmann_weighted_combo"}')
        else:
            hf0 = (spc_dct[spc_name]['Hfs'][spc_locs_idx - 1][spc_mod][0] *
                   phycon.EH2KCAL)
            idx_str = '_'.join(spc_locs_dct[spc_name][spc_locs_idx - 1])
            info_message(f'{spc_name}---{idx_str}')
        hf298 = mechanalyzer.calculator.thermo.enthalpy(nasa7_params,
                                                        298.15) / 1000.
        info_message(f'{whitespace2}{hf0:>9.2f}{hf298:>9.2f}')
        hincref = hf298
        for temp in templist:
            hinct = mechanalyzer.calculator.thermo.enthalpy(
                nasa7_params, temp) / 1000. - hincref
            entt = mechanalyzer.calculator.thermo.entropy(nasa7_params, temp)
            cpt = mechanalyzer.calculator.thermo.heat_capacity(
                nasa7_params, temp)
            info_message(f'{temp:>8.2f}{hinct:>9.2f}{entt:>9.2f}{cpt:>9.2f}')
コード例 #30
0
ファイル: _es.py プロジェクト: Auto-Mech/mechdriver
def save_gradient(save_path):
    """ a
    """
    info_message(' - Gradient found in Hessian job output.')
    info_message(" - Saving gradient...")
    info_message(f" - Save path: {save_path}")