Lib¶
New, Refactored Mechdriver libs
Moldriver libs
-
mechlib.filesys.build_fs(run_prefix, save_prefix, end, rxn_locs=None, spc_locs=None, thy_locs=None, ts_locs=None, cnf_locs=None, tau_locs=None, instab_locs=None, zma_locs=None, scn_locs=None, cscn_locs=None)¶ Build the autofile filesystem objects for some specified fileystem layer using the root run/save and locs to build the full prefix path to the fileystem layer.
- Parameters:
run_prefix – root-path to the run-filesystem
save_prefix – root-path to the save-filesystem
end (str) – filesystem layer
x_locs (locs fot REACTION layer) – locs used to construct prefix to end-layer
- Type:
run_prefix: str
- Type:
save_prefix: str
-
mechlib.filesys.prefix_fs(run_prefix, save_prefix)¶ Physically make the run/save filesys root given a prefix path :param str prefix: file path - /path/to/root/run
-
mechlib.filesys.reaction_fs(run_prefix, save_prefix, rxn_info)¶ Build reaction filesystem for a big list
-
mechlib.filesys.root_locs(spc_dct_i, saddle=False, name=None)¶ Set the root locatores for the species and TS
-
mechlib.filesys.rcts_cnf_fs(rct_infos, thy_info, run_prefix, save_prefix, hbond_cutoffs=None, nprocs=1)¶ set reactant filesystem stuff
Libs for handling calculating various pieces of a reaction channel
-
mechlib.reaction.split_unstable_full(pes_rlst, spc_rlst, spc_dct, spc_model_dct_i, save_prefix, nprocs=1)¶ Loop over the pes reaction list and break up the unstable species
-
mechlib.reaction.split_unstable_pes(rxn_lst, spc_dct, spc_model_dct_i, save_prefix, nprocs=1)¶ Build a new list of reactions for a given PES where all of the reactant and product species of the channels are assessed for instability and broken up.
- Parameters:
rxn_lst –
spc_dct – species information dict[spc_name: spc_information]
spc_mod_dct_i (dict[]) –
-
mechlib.reaction.reverse_ts_zmatrix(zrxn)¶ reverses a TS zma to be the other direction of reaction
-
mechlib.reaction.zmatrix_conversion_keys(gra_forw, gra_back)¶ returns the dictionary that transforms the forward graph into the backward graph
Libraries of functions that handle input-output for AutoMech
-
mechlib.amech_io.thermo_paths(spc_dct, spc_locs_dct, spc_mods, run_prefix, spc_grp_dct)¶ Set up the path for saving the pf input and output. Placed in a MESSPF, NASA dirs high in run filesys.
-
mechlib.amech_io.rate_paths(pes_dct, run_prefix)¶ Set up the path for saveing the input and output of MESSRATE calculations.
Creates paths for two different versions of mess
- Run different types of directories (1 PES)
fml-base: Standard base rate calculations (use idx)
fml-wext: Well-Extended base calculations (use 10*idx)
-
mechlib.amech_io.output_path(dat, make_path=True, print_path=False, prefix=None)¶ Create the path for sub-directories locatted in the run directory where the MechDriver calculation was launched. These sub-directories are used to store various useful output from the MechDriver process.
- Parameters:
make_path (bool) – physically create directory for path during function
print_path (bool) – print the created path to the screen
prefix (str) – prefix for directory to be built
- Return type:
str
-
mechlib.amech_io.job_path(prefix, prog, job, fml, locs_id=None, make_path=True, print_path=False)¶ Create the path for various types of calculations for a given species or PES.
- Parameters:
prefix (str) – root prefix to run/save filesyste,
prog (str) – name of the program(s) called in the job
fml – stoichiometry of the species/PES associate with job
locs_id (int) – some identifier for leaf of the build filesys
make_path (bool) – physically create directory for path during function
print_path (bool) – print the created path to the screen
- Fml type:
str
- Return type:
str
Libraries of functions that parse the moldriver input files
-
mechlib.amech_io.parser.read_amech_input(job_path)¶ Reads all MechDriver input files provided by the user into strings. All whitespace and comment lines are stripped from the files.
- Parameters:
job_path (str) – directory path where all input files exist
- Return type:
dict[str:str]
Libraries of functions that handle input-output for AutoMech
-
mechlib.amech_io.printer.obj(key, prechar=None)¶ Print some standard object
-
mechlib.amech_io.printer.format_message(message, newline, indent)¶ Format a message string
-
mechlib.amech_io.printer.message(message_label, *args, newline=None, indent=None)¶ Print a general message to output.
-
mechlib.amech_io.printer.debug_message(message_label, *args, newline=None, indent=None, print_debug=True)¶ Print a debug message to output.
-
mechlib.amech_io.printer.info_message(message_label, *args, newline=None, indent=None)¶ Print an info message to output.
-
mechlib.amech_io.printer.error_message(message_label, *args, newline=None, indent=None)¶ Print an error message to output.
-
mechlib.amech_io.printer.warning_message(message_label, *args, newline=None, indent=None)¶ Print a warning message to output.
-
mechlib.amech_io.printer.runlst(run_inf, run_lst)¶ checks if run lst is a species lst
-
mechlib.amech_io.printer.program_header(driver)¶ print the header for a program
-
mechlib.amech_io.printer.program_exit(driver)¶ print the header for a program
-
mechlib.amech_io.printer.driver_tasks(run_es, write_messpf, run_messpf, run_nasa, write_messrate, run_messrate, run_fits, run_trans)¶ a
-
mechlib.amech_io.printer.random_cute_animal()¶ Print a picture of a fun, cute animal at random
-
mechlib.amech_io.printer.host_name()¶ print the host the calculation is running on
-
mechlib.amech_io.printer.energy(ene)¶ Print an energy value
-
mechlib.amech_io.printer.geometry(geom)¶ a
-
mechlib.amech_io.printer.gradient(grad)¶ a
-
mechlib.amech_io.printer.frequencies(freqs)¶ Print out the Harmonic frequencies and ZPVE
-
mechlib.amech_io.printer.molecular_properties(dmom, polar)¶ a
-
mechlib.amech_io.printer.constraint_dictionary(dct)¶ a
-
mechlib.amech_io.printer.existing_path(label, path)¶ a
-
mechlib.amech_io.printer.initial_geom_path(label, path)¶ a
-
mechlib.amech_io.printer.bad_conformer(reason)¶ a
-
mechlib.amech_io.printer.diverged_ts(param, ref_param, cnf_param)¶ a
-
mechlib.amech_io.printer.bad_equil_ts(cnf_dist, equi_bnd)¶ a
-
mechlib.amech_io.printer.save_conformer(cnf_save_path)¶ a
-
mechlib.amech_io.printer.save_conformer_energy(sp_save_path)¶ a
-
mechlib.amech_io.printer.save_symmetry(sym_save_path)¶ a
-
mechlib.amech_io.printer.already_running(task, path)¶ a
-
mechlib.amech_io.printer.save_reference(save_path)¶ a
-
mechlib.amech_io.printer.run_rotors(run_tors_names, const_names)¶ a
-
mechlib.amech_io.printer.save_irc(save_path)¶ a
-
mechlib.amech_io.printer.save_geo(save_path)¶ a
-
mechlib.amech_io.printer.save_energy(sp_save_path)¶ a
-
mechlib.amech_io.printer.save_anharmonicity(geo_save_path)¶ a
-
mechlib.amech_io.printer.save_frequencies(save_path)¶ a
-
mechlib.amech_io.printer.save_gradient(save_path)¶ a
-
mechlib.amech_io.printer.running(label=None, path=None, newline=False, indent=False)¶ Print a message that some task is running.
-
mechlib.amech_io.printer.results()¶ Print static results method.
-
mechlib.amech_io.printer.writing(label=None, path=None, newline=False, indent=False)¶ Print a message that some data is being written to a file.
-
mechlib.amech_io.printer.reading(label=None, path=None, newline=False, indent=False)¶ Print a message that a file is being read.
-
mechlib.amech_io.printer.saving(label=None, path=None, newline=False, indent=False)¶ Print a message that some data is being saved to a file.
-
mechlib.amech_io.printer.checking(label=None, path=None, newline=False, indent=False)¶ Print a message that a file/object is being checked..
-
mechlib.amech_io.printer.generating(label=None, path=None, newline=False, indent=False)¶ Print a message that a file/object is being generated.
-
mechlib.amech_io.printer.task_header(tsk, spc_name)¶ a
a
-
mechlib.amech_io.printer.keyword_list(es_keyword_dct, thy_dct=None)¶ a
-
mechlib.amech_io.printer.output_task_header(tsk)¶ a
-
mechlib.amech_io.printer.output_keyword_list(es_keyword_dct, thy_dct=None)¶ a
-
mechlib.amech_io.printer.messpf(statement, path=None)¶ a
-
mechlib.amech_io.printer.nasa(statement, spc_name=None, path=None)¶ a
-
mechlib.amech_io.printer.pes(pes_idx, fml, sub_pes_idx)¶ a
-
mechlib.amech_io.printer.channel(chn_idx, reacs, prods)¶ a
-
mechlib.amech_io.printer.hrpotentials(tors_pots)¶ Check hr pot to see if a new mimnimum is needed
-
mechlib.amech_io.printer.lennard_jones_params(sigmas, epsilons)¶ Print Lennard-Jones parameters on individual lines.
Need to convert?
- Parameters:
sigmas (tuple(float)) – list of sigma values
epsilons (tuple(float)) – list of epsilon values
-
mechlib.amech_io.printer.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
-
mechlib.amech_io.printer.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
-
mechlib.amech_io.printer.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
-
mechlib.amech_io.printer.missing_input(prop)¶ Print a message saying that some required information is missing from an input file.
Libraries for writing output