Routines

ES Routines

es_runners for conformer

mechroutines.es._routines.conformer.initial_conformer(spc_dct_i, spc_info, ini_method_dct, method_dct, ini_cnf_save_fs, cnf_run_fs, cnf_save_fs, es_keyword_dct)

Assess if a conformer layer with a geometry exists in the save filesys for the given species. If not, attempt to generate some guess structure using InChI strings or input geom from user. and optimize it with input method. Then assess if the optimized structure corresponds to genuine minimum on the PES via a frequency calculation. If a minimum is found, save the conformer geometry, zmatrix, energy, and torsions to the save filesys. Also, the function assessess if the species is unstable and will save the appropriate information.

mechroutines.es._routines.conformer.single_conformer(zma, spc_info, mod_thy_info, cnf_run_fs, cnf_save_fs, script_str, overwrite, retryfail=True, zrxn=None, use_locs=None, resave=False, **kwargs)

generate single optimized geometry to be saved into a filesystem

mechroutines.es._routines.conformer.conformer_sampling(zma, spc_info, thy_info, cnf_run_fs, cnf_save_fs, rid, script_str, overwrite, nsamp_par=(False, 3, 3, 1, 50, 50), tors_names=(), zrxn=None, two_stage=False, retryfail=False, resave=False, repulsion_thresh=40.0, print_debug=True, **kwargs)

run sampling algorithm to find conformers

mechroutines.es._routines.conformer.ring_conformer_sampling(zma, spc_info, thy_info, cnf_run_fs, cnf_save_fs, script_str, overwrite, nsamp_par=(False, 3, 1, 3, 50, 50), ring_tors_dct=None, zrxn=None, two_stage=False, retryfail=False, **kwargs)

run sampling algorithm to find conformers

mechroutines.es._routines.conformer.save_conformer(ret, cnf_run_fs, cnf_save_fs, locs, thy_info, zrxn=None, orig_ich='', rid_traj=False, init_zma=None, ref_zma=None)

save the conformers that have been found so far # Only go through save procedure if conf not in save # may need to get geo, ene, etc; maybe make function

mechroutines.es._routines.conformer.this_conformer_was_run_in_save(zma, cnf_fs)

Assess if a conformer was run in save

mechroutines.es._routines.conformer.this_conformer_is_running(zma, cnf_run_fs)

Check the RUN filesystem for similar geometry submissions that are currently running

mechroutines.es._routines.conformer.unique_fs_ring_confs(cnf_save_fs, cnf_locs_lst, ini_cnf_save_fs, ini_cnf_locs_lst)

Assess which structures from the cnf_save_fs currently exist within the ini_cnf_save_fs. Generate a lst of unique structures in the ini_cnf_save_fs.

mechroutines.es._routines.conformer.unique_fs_confs(cnf_save_fs, cnf_save_locs_lst, ini_cnf_save_fs, ini_cnf_save_locs_lst)

Assess which structures from the cnf_save_fs currently exist within the ini_cnf_save_fs. Generate a lst of unique structures in the ini_cnf_save_fs.

mechroutines.es._routines.conformer.rng_loc_for_geo(geo, cnf_save_fs)

Find the ring-conf locators for a given geometry in the conformamer save filesystem

es_runners for coordinate scans

mechroutines.es._routines.hr.hindered_rotor_scans(zma, spc_info, mod_thy_info, scn_run_fs, scn_save_fs, rotors, tors_model, method_dct, overwrite, zrxn=None, saddle=False, increment=0.5235987756, retryfail=True)

Perform scans over each of the torsional coordinates

mechroutines.es._routines.hr.check_hr_pot(tors_pots, tors_zmas, tors_paths, emax=- 0.5, emin=- 10.0)

Check hr pot to see if a new mimnimum is needed

Routines for taking the geometry for a species or transition state conformer and calculating various molecular properties via some specified electronic structure method.A

  • Maybe put long description from run_energy here

** no reason to pass the geo and zma since the functions have the fs

and locs and can therefore read them. the geo and zma are unneeded

mechroutines.es._routines.sp.run_energy(zma, geo, spc_info, thy_info, geo_run_fs, geo_save_fs, locs, run_prefix, script_str, overwrite, zrxn=None, retryfail=True, method_dct=None, highspin=False, ref_val=None, **kwargs)

Assesses if an electronic energy exists in the CONFS/SP/THY layer of the save filesys for a species at the specified level of theory. If an energy does not exist, or if a user requests overwrite, the appropriate electronic struture calculation is set-up, launched, and then parsed within the run filesys, then that the energy and job input is written into the save filesys.

Parameters:
  • zma (automol.zmat object) – Z-Matrix for molecular structure to perform calculation

  • geo (automol.geom object) – goemetry for molecular structure to perform calculation

  • spc_info

  • thy_info

  • script_str (str) – shell script for executing electronic structure job

  • overwrite

Geo_run_fs:

filesystem object for layer where structure is in RUN

Geo_run_fs:

autofile.fs object

Geo_save_fs:

filesystem object for layer where structure is in SAVE

Geo_save_fs:

autofile.fs object

mechroutines.es._routines.sp.run_gradient(zma, geo, spc_info, thy_info, geo_run_fs, geo_save_fs, locs, run_prefix, script_str, overwrite, zrxn=None, retryfail=True, method_dct=None, ref_val=None, **kwargs)

Determine the gradient for the geometry in the given location

mechroutines.es._routines.sp.rerun_hessian_and_opt(zma, spc_info, thy_info, geo_run_fs, geo_save_fs, locs, run_prefix, script_str, zrxn=None, retryfail=True, method_dct=None, ref_val=None, attempt=0, hess_script_str=None, **hess_kwargs)

Perform a tight opt of a geometry and run the hessian. Resave all of its info.

mechroutines.es._routines.sp.run_hessian(zma, geo, spc_info, thy_info, geo_run_fs, geo_save_fs, locs, run_prefix, script_str, overwrite, zrxn=None, retryfail=True, method_dct=None, ref_val=None, correct_vals=True, attempt=0, **kwargs)

Determine the hessian for the geometry in the given location

mechroutines.es._routines.sp.run_vpt2(zma, geo, spc_info, thy_info, geo_run_fs, geo_save_fs, locs, run_prefix, script_str, overwrite, zrxn=None, retryfail=True, method_dct=None, ref_val=None, **kwargs)

Perform vpt2 analysis for the geometry in the given location

mechroutines.es._routines.sp.run_prop(zma, geo, spc_info, thy_info, geo_run_fs, geo_save_fs, locs, run_prefix, script_str, overwrite, zrxn=None, retryfail=True, method_dct=None, ref_val=None, **kwargs)

Determine the properties in the given location

es_runners

mechroutines.es._routines.tau.tau_sampling(zma, ref_ene, spc_info, mod_thy_info, tau_run_fs, tau_save_fs, script_str, overwrite, db_style='directory', nsamp_par=(False, 3, 3, 1, 50, 50), tors_names=(), repulsion_thresh=40.0, zrxn=None, resave=False, **kwargs)

Sample over torsions optimizing all other coordinates

mechroutines.es._routines.tau.run_tau(zma, spc_info, thy_info, tau_run_fs, tau_save_fs, script_str, overwrite, nsamp_par=(False, 3, 3, 1, 50, 50), tors_names=(), repulsion_thresh=40.0, zrxn=None, **kwargs)

run sampling algorithm to find tau dependent geometries

mechroutines.es._routines.tau.save_tau(tau_run_fs, tau_save_fs, mod_thy_info, db_style='directory')

save the tau dependent geometries that have been found so far

mechroutines.es._routines.tau.assess_pf_convergence(tau_save_fs, ref_ene, temps=(300.0, 500.0, 750.0, 1000.0, 1500.0))

Determine how much the partition function has converged

Interface to the elstruct library which writes, runs, and reads electronic structure calculations.

This includes single-file jobs (e.g., energies, optimizations) as well as sequences of jobs (e.g., coordinate scans).

mechroutines.es.runner.execute_job(job, script_str, run_fs, geo, spc_info, thy_info, zrxn=None, errors=(), options_mat=(), retryfail=True, feedback=False, frozen_coordinates=(), freeze_dummy_atoms=True, overwrite=False, **kwargs)

Both ruBoth runs and reads electrouct jobs

mechroutines.es.runner.run_job(job, script_str, run_fs, geo, spc_info, thy_info, zrxn=None, errors=(), options_mat=(), retryfail=True, feedback=False, frozen_coordinates=(), freeze_dummy_atoms=True, overwrite=False, **kwargs)

Run an electronic structure job in the specified RUN filesys layer by calling the elstruct package to write the input file with the information and executing the job with the specified script string.

Will first look into the RUN filesys and will either rewrite the input and rerun the job if requested.

Parameters:
  • geo – input molecular geometry or Z-Matrix

  • errors (tuple(str)) – list of error message types to search output for

  • options_mat (tuple(dict[str: str])) – varopis options to run job with

  • retryfail (bool) – re-run the job if failed job found in RUN filesys

  • feedback (bool) – update geom with job from previous sequence

  • frozen_coordinates (tuple(str)) – Z-matrix coordinate names to freeze in opts

  • freeze_dummy_atoms (bool) – freeze any coords defined by dummy atoms

  • overwrite (bool) – overwrite existing input file with new one and rerun

  • kwargs (dict[str]) – additional options for electronic structure job

mechroutines.es.runner.read_job(job, run_fs)

Searches for an output file for the specified electronic structure job in the specified RUN filesytem. If an output file is found, it is parsed for job success messages. If successful, function returns job input, output and autofile job info object.

Parameters:
  • job (str) – label for job formatted to elstruct package definitions

  • run_fs (autofile.fs.run object) – filesystem object for the run filesys where job is run

Return type:

(bool, (autofile.info_object object???, str, str))

mechroutines.es.runner.multi_stage_optimization(script_str, run_fs, geo, spc_info, thy_info, frozen_coords_lst, zrxn=None, overwrite=False, saddle=False, retryfail=False, **kwargs)

Run a series of optimizations that utilize varying constraint conditions at each state.

Parameters:
  • script_str (str) – Shell submission script for electronic structure job

  • geo (automol.geom object) – input molecular geometry or Z-Matrix

  • spc_info

  • thy_info

  • frozen_coords_lst (tuple(str)) – Z-matrix coordinate names to freeze in opts

  • overwrite (bool) – overwrite existing input file with new one and rerun

  • saddle (bool) – perform saddle-point optimization

  • retryfail (bool) – re-run the job if failed job found in RUN filesys

mechroutines.es.runner.qchem_params(method_dct, job=None, geo=None, spc_info=None)

Build the kwargs dictionary and BASH submission script string to be used to write and run the electronic structure job.

Parameters:
  • method_dct (dict[str: obj]) –

  • job (str) – elstronic structure calculation

Return type:

(dict[str:tuple(str)], str)

mechroutines.es.runner.multireference_calculation_parameters(zma, spc_info, hs_spc_info, aspace, mod_thy_info, rxn_info=None)

Prepares a keyword-argument dictionary that can be utilized by the elstruct library to perform multireference electronic structure calculations. The function is tasked with preparing two parts:

  1. A string which is placed at the top of the input file that contains all neccessary commands for calculating a guess multireference wavefunction for a given program, and

  2. Sets active-space casscf options used for the final part of the calculation that matches the user’s desired electronic structure theory level

Symmetry is also automatically turned off for all calculations

Currently, this function only preps Molpro calculations

kTP Routines

Thermo Routines

Trans Routines

Proc Routines

Models Routines