1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Multi-frame Gaussian-Cube trajectory reader.
//!
//! AIMD spectroscopy workflows emit one volumetric electron-density cube per
//! step. molrs reads a single cube in [`crate::io::data::cube`]; this adds the
//! trajectory case as the reference implementation consumes it (`src/bqb_cubeframe.cpp` reads a
//! sequence of cube frames from a concatenated stream). Two ingest shapes:
//!
//! - [`read_cube_trajectory`] — one file holding N cubes back-to-back (no blank
//! separator lines, the conventional concatenation), each parsed by the
//! single-cube reader.
//! - [`read_cube_trajectory_files`] — an ordered list of single-cube files.
//!
//! Every frame is normalised to Å at the reader boundary by the underlying
//! single-cube parser; the volumetric block stays in its native `e/Bohr³` (the
//! Voronoi integrator converts to `e/ų`).
use File;
use ;
use Path;
use MolRsError;
use Frame;
use crateread_cube_from_reader;
/// Read a concatenated multi-cube trajectory file into one [`Frame`] per cube.
///
/// Cubes must be back-to-back with no blank separator lines (the standard way
/// AIMD drivers concatenate per-step cubes). Reading stops cleanly at EOF.
/// Read an ordered sequence of single-cube files into one [`Frame`] each.