geom.functions.output ===================== .. py:module:: geom.functions.output Functions --------- .. autoapisummary:: geom.functions.output.error geom.functions.output.warn geom.functions.output.error_dir_axis geom.functions.output.logfile_init geom.functions.output.logfile_close geom.functions.output.print_geom geom.functions.output.print_optimization_starts geom.functions.output.print_optimizing_distance geom.functions.output.print_computed_distance geom.functions.output.print_convergence_achieved geom.functions.output.save_distance_opt geom.functions.output.print_normal_termination geom.functions.output.print_min_dist geom.functions.output.print_geom_center Module Contents --------------- .. py:function:: error(error_message) Prints an error message and terminates execution. :param error_message: The error message to be displayed. :type error_message: str :returns: The function exits the program. :rtype: None .. py:function:: warn(warning_message) Prints an warning message and terminates execution. :param warn_message: The warning message to be displayed. :type warn_message: str :returns: The function prints a warning message. :rtype: None .. py:function:: error_dir_axis(dir_axis_input) Prints an error message related to an unsupported axis input and exits. :param dir_axis_input: The invalid direction axis input. :type dir_axis_input: str :returns: The function exits the program. :rtype: None .. rubric:: Notes - Accepted values: `+x`, `+y`, `+z`, `-x`, `-y`, `-z`. .. py:function:: logfile_init() Initializes and opens a logfile for writing. :returns: An open logfile in write mode (`logfile.txt`). :rtype: file object .. py:function:: logfile_close(out_log) Closes the logfile. :param out_log: The logfile object to close. :type out_log: file object :returns: None .. py:function:: print_geom(molecule, output_file) Saves molecular geometry to an XYZ file. :param molecule: The molecule object containing atomic data. :type molecule: molecule :param output_file: The name of the output XYZ file. :type output_file: str :returns: The function writes the geometry to `results_geom/{output_file}.xyz`. :rtype: None .. rubric:: Notes - The first line of the XYZ file contains the number of atoms. - The second line contains a header. - The atomic coordinates are printed with 8 decimal places. .. py:function:: print_optimization_starts() Prints a banner indicating the start of the distance optimization process. :returns: None .. py:function:: print_optimizing_distance(distance) Prints a message indicating that distance optimization is in progress. :param distance: The target distance for optimization. :type distance: float :returns: None .. py:function:: print_computed_distance(dist) Prints the computed distance after translation or optimization. :param dist: The computed distance. :type dist: float :returns: None .. py:function:: print_convergence_achieved(dist) Prints a message indicating that convergence has been achieved. :param dist: The final optimized distance. :type dist: float :returns: None .. py:function:: save_distance_opt(out_log, distance, dist_new, dir_axis_input) Saves the optimized distance information in the logfile. :param out_log: The logfile object. :type out_log: file object :param distance: The initial distance target. :type distance: float :param dist_new: The final achieved distance. :type dist_new: float :param dir_axis_input: The translation or rotation axis. :type dir_axis_input: str :returns: None .. py:function:: print_normal_termination(inp) Prints a normal termination banner if the process completes successfully. :param inp: The input class instance containing execution parameters. :type inp: input_class :returns: None .. rubric:: Notes - This function does not print if `min_dist` or `geom_center` calculations are performed. .. py:function:: print_min_dist(inp, distance) Prints the minimum distance between two geometries. :param inp: The input class instance containing file information. :type inp: input_class :param distance: The computed minimum distance. :type distance: float :returns: None .. py:function:: print_geom_center(inp, xyz_c) Prints the geometrical center of a molecule. :param inp: The input class instance containing file information. :type inp: input_class :param xyz_c: The computed (x, y, z) coordinates of the geometrical center. :type xyz_c: list[float] :returns: None