pub fn print_geometry_preview(geometries: &[Geometry])Expand description
Prints a formatted preview of interpolated geometries for interactive confirmation.
This function displays a summary of the interpolation results, including the total number of geometries, path length, and coordinate details for key geometries (first, middle, and last). This is useful for visual inspection before proceeding with expensive quantum chemistry calculations.
§Arguments
geometries- A slice of geometries to preview
§Output Format
The function prints to stdout with the following information:
- Total number of geometries in the path
- Total path length in Angstroms
- Coordinate details for first, middle, and last geometries
- Element symbols and Cartesian coordinates for each atom
- Truncation indicator if more than 5 atoms per geometry
§Examples
use omecp::lst::{interpolate_linear, print_geometry_preview};
use omecp::geometry::Geometry;
let elements = vec!["H".to_string(), "H".to_string()];
let coords1 = vec![0.0, 0.0, 0.0, 1.0, 0.0, 0.0];
let coords2 = vec![0.0, 0.0, 0.0, 2.0, 0.0, 0.0];
let geom1 = Geometry::new(elements.clone(), coords1);
let geom2 = Geometry::new(elements, coords2);
let path = interpolate_linear(&geom1, &geom2, 3);
print_geometry_preview(&path);§Sample Output
****Geometry Preview****
Total geometries: 5
Path length: 1.000 Angstrom
--- Geometry 1 ---
H 0.000 0.000 0.000
H 1.000 0.000 0.000
--- Geometry 3 ---
H 0.000 0.000 0.000
H 1.500 0.000 0.000
--- Geometry 5 ---
H 0.000 0.000 0.000
H 2.000 0.000 0.000§Notes
- Only shows first 5 atoms per geometry to keep output manageable
- Coordinates are displayed with 3 decimal places
- Useful for interactive workflows where user confirmation is needed
- Should be called before expensive QM calculations on the path