Saving Arkane output¶
This module contains helper functionality for writing Arkane output files.
- class arkane.output.PrettifyVisitor(level=0, indent=4)¶
A class for traversing an abstract syntax tree to assemble a prettier version of the code used to create the tree. Used by the
prettify()
function.- generic_visit(node)¶
Called if no explicit visitor function exists for a node.
- visit(node)¶
Visit a node.
- visit_Call(node)¶
Return a pretty representation of the class or function call represented by node.
- visit_Dict(node)¶
Return a pretty representation of the dict represented by node.
- visit_List(node)¶
Return a pretty representation of the list represented by node.
- visit_Num(node)¶
Return a pretty representation of the number represented by node.
- visit_Str(node)¶
Return a pretty representation of the string represented by node.
- visit_Tuple(node)¶
Return a pretty representation of the tuple represented by node.
- visit_UnaryOp(node)¶
Return a pretty representation of the number represented by node.
- arkane.output.get_str_xyz(spc)¶
Get a string representation of the 3D coordinates from the conformer.
- Parameters:
spc (Species) – A Species instance.
- Returns:
A string representation of the coordinates
- Return type:
str
- arkane.output.prettify(string, indent=4)¶
Return a “pretty” version of the given string, representing a snippet of Python code such as a representation of an object or function. This involves splitting of tuples, lists, and dicts (including parameter lists) onto multiple lines, indenting as appropriate for readability.
- arkane.output.save_kinetics_lib(rxn_list, path, name, lib_long_desc)¶
Save an RMG kinetics library.
- Parameters:
rxn_list (list) – Entries are Reaction object instances for which kinetics will be saved.
path (str) – The base folder in which the kinetic library will be saved.
name (str) – The library name.
lib_long_desc (str) – A multiline string with relevant description.
- arkane.output.save_thermo_lib(species_list, path, name, lib_long_desc)¶
Save an RMG thermo library.
- Parameters:
species_list (list) – Entries are Species object instances for which thermo will be saved.
path (str) – The base folder in which the thermo library will be saved.
name (str) – The library name.
lib_long_desc (str) – A multiline string with relevant description.