diff --git a/Cargo.toml b/Cargo.toml index 44d0bf86..9f62cfb7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,6 +80,7 @@ categories = ["science::computational-chemistry::electronic-structure", "command [[bin]] name = "rustiq" path = "src/main.rs" +doc = false [features] default = ["online", "manpages", "completions"] diff --git a/THIRD-PARTY-NOTICES.sha256 b/THIRD-PARTY-NOTICES.sha256 index 4dd906b4..260cd661 100644 --- a/THIRD-PARTY-NOTICES.sha256 +++ b/THIRD-PARTY-NOTICES.sha256 @@ -1 +1 @@ -fd10896a1c4a5a5be0dfdcabb49197b9fb5dc80a93d9e0e8a917ff746ca3169e THIRD-PARTY-NOTICES.txt +2fbcaed6277c0ee1532734dbf6474fea1965985e94c34c8fe07ab9ea0dbaf992 THIRD-PARTY-NOTICES.txt diff --git a/THIRD-PARTY-NOTICES.txt b/THIRD-PARTY-NOTICES.txt index 37b26622..d065bf9f 100644 --- a/THIRD-PARTY-NOTICES.txt +++ b/THIRD-PARTY-NOTICES.txt @@ -1,5 +1,5 @@ Cargo.lock SHA-256: 7f274ca9e7f738d58ec0e46d03be9802569df0512ec91892f4ccd1edbd90ad02 -Notice inputs SHA-256: f3b7a59fa3633c0574f9c0f0b1c6a0b767056d57307cba53913adf72ef06f236 +Notice inputs SHA-256: 23de7d7b750a771f73732580c0542ac4047e5afd0d13789e3ec333efed68208c Corresponding source: https://github.com/mveril/RustiQ/releases/download/v0.1.0-alpha.1.dev/rustiq-corresponding-source.tar.gz RustiQ third-party licenses diff --git a/crates/rustiq-core/src/hf/density_guess/one_electron.rs b/crates/rustiq-core/src/hf/density_guess/one_electron.rs index b0bb780e..42fed3da 100644 --- a/crates/rustiq-core/src/hf/density_guess/one_electron.rs +++ b/crates/rustiq-core/src/hf/density_guess/one_electron.rs @@ -25,7 +25,7 @@ impl DensityGuess for OneElectron { h_core: &DMatrix, _basis: &Basis, ) -> Result, Self::Error> { - crate::debug_assert_is_symmetric!(h_core, 1e-8); + crate::math_utils::debug_assert_is_symmetric!(h_core, 1e-8); match self.perturbation { Some(perturbation) => { perturb_fock_like_matrices(h_core, perturbation).map_err(Into::into) @@ -101,7 +101,7 @@ mod tests { let density = scf.density_matrix; // Check that the density is symmetric - crate::debug_assert_is_symmetric!(&density, 1e-8); + crate::math_utils::debug_assert_is_symmetric!(&density, 1e-8); // AO densities are normalized in the overlap metric, not the Euclidean trace. let trace = (&density * basis.overlap_ints()).trace(); diff --git a/crates/rustiq-core/src/hf/scf_setup.rs b/crates/rustiq-core/src/hf/scf_setup.rs index af1df475..eca27a66 100644 --- a/crates/rustiq-core/src/hf/scf_setup.rs +++ b/crates/rustiq-core/src/hf/scf_setup.rs @@ -135,7 +135,7 @@ fn prepare_scf_setup_with_thresholds( let step_start = Instant::now(); let overlap = builder.overlap(); timings.overlap = step_start.elapsed(); - crate::debug_assert_is_symmetric!(&overlap, 1e-8); + crate::math_utils::debug_assert_is_symmetric!(&overlap, 1e-8); progress(ScfSetupStep::OverlapOrthogonalizer); let step_start = Instant::now(); diff --git a/crates/rustiq-core/src/math_utils.rs b/crates/rustiq-core/src/math_utils.rs index 118ed120..2c1a8266 100644 --- a/crates/rustiq-core/src/math_utils.rs +++ b/crates/rustiq-core/src/math_utils.rs @@ -67,7 +67,6 @@ pub fn hermite(n: u64, PA: u32, QA: u32, p: f64, q: f64, f0: f64) -> f64 { f0 * hermite_classic(n, x) } -#[macro_export] #[cfg(debug_assertions)] macro_rules! debug_assert_is_symmetric { ($matrix:expr, $tol:expr) => {{ @@ -98,12 +97,13 @@ macro_rules! debug_assert_is_symmetric { }}; } -#[macro_export] #[cfg(not(debug_assertions))] macro_rules! debug_assert_is_symmetric { ($matrix:expr, $tol:expr) => {{}}; } +pub(crate) use debug_assert_is_symmetric; + #[cfg(test)] pub(crate) fn is_positive_definite(matrix: &DMatrix) -> bool { matrix @@ -162,11 +162,12 @@ mod tests { #[cfg(debug_assertions)] { let mat = DMatrix::from_row_slice(2, 2, &[1.0, 2.0, 2.0, 1.0]); - crate::debug_assert_is_symmetric!(&mat, 1e-12); // Should not fail + crate::math_utils::debug_assert_is_symmetric!(&mat, 1e-12); // Should not fail let mat_non_sym = DMatrix::from_row_slice(2, 2, &[1.0, 3.0, 2.0, 1.0]); // Corrected to make it non-symmetric - let result = - std::panic::catch_unwind(|| crate::debug_assert_is_symmetric!(&mat_non_sym, 1e-12)); + let result = std::panic::catch_unwind(|| { + crate::math_utils::debug_assert_is_symmetric!(&mat_non_sym, 1e-12); + }); assert!(result.is_err(), "The matrix should not be symmetric"); } }