geom.functions.output

Functions

error(error_message)

Prints an error message and terminates execution.

warn(warning_message)

Prints an warning message and terminates execution.

error_dir_axis(dir_axis_input)

Prints an error message related to an unsupported axis input and exits.

logfile_init()

Initializes and opens a logfile for writing.

logfile_close(out_log)

Closes the logfile.

print_geom(molecule, output_file)

Saves molecular geometry to an XYZ file.

print_optimization_starts()

Prints a banner indicating the start of the distance optimization process.

print_optimizing_distance(distance)

Prints a message indicating that distance optimization is in progress.

print_computed_distance(dist)

Prints the computed distance after translation or optimization.

print_convergence_achieved(dist)

Prints a message indicating that convergence has been achieved.

save_distance_opt(out_log, distance, dist_new, ...)

Saves the optimized distance information in the logfile.

print_normal_termination(inp)

Prints a normal termination banner if the process completes successfully.

print_min_dist(inp, distance)

Prints the minimum distance between two geometries.

print_geom_center(inp, xyz_c)

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