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