Skip to content

Version 0.1.2

Letícia Maria Pequeno Madureira edited this page Nov 24, 2023 · 6 revisions

Documenting progress

  • reducing the time on overlap function by storing the normalization constant on the GaussianBasisSets type.

GOAL: change the notation to wave functions and QC notations.

julia> @benchmark overlap(basis)
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min  max):  24.750 μs  122.917 μs  ┊ GC (min  max): 0.00%  0.00%
 Time  (median):     26.750 μs               ┊ GC (median):    0.00%
 Time  (mean ± σ):   27.311 μs ±   2.738 μs  ┊ GC (mean ± σ):  0.00% ± 0.00%

            ▅▇███▅▂▁
  ▁▁▂▂▁▁▂▂▄▇████████▇▇▇▆▆▅▄▄▃▃▃▃▃▃▃▃▃▃▃▂▂▂▂▂▂▂▂▁▂▁▁▁▁▁▁▁▁▁▁▁▁▁ ▃
  24.8 μs         Histogram: frequency by time         32.5 μs <

 Memory estimate: 23.22 KiB, allocs estimate: 1337.
BenchmarkTools.Trial: 10000 samples with 8 evaluations.
 Range (min  max):  3.599 μs   17.026 μs  ┊ GC (min  max): 0.00%  0.00%
 Time  (median):     4.021 μs               ┊ GC (median):    0.00%
 Time  (mean ± σ):   4.062 μs ± 422.517 ns  ┊ GC (mean ± σ):  0.00% ± 0.00%

       ▁▃▂▁▄▅▄▅▅▆▆▃▅▆▇▇█▇▇▆ ▄▂▁▁
  ▁▂▂▅▆██████████████████████████▇▆▆▇▆▆▆▅▅▅▄▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▁ ▅
  3.6 μs          Histogram: frequency by time        4.79 μs <

 Memory estimate: 2.91 KiB, allocs estimate: 37.

Now using CartesianIndices:

julia> @benchmark overlap(basis)
BenchmarkTools.Trial: 10000 samples with 8 evaluations.
 Range (min  max):  3.229 μs   1.822 ms  ┊ GC (min  max): 0.00%  99.57%
 Time  (median):     3.412 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   3.663 μs ± 18.186 μs  ┊ GC (mean ± σ):  4.95% ±  1.00%

    ▁▆█▃             ▁
  ▂▄████▆██▇▇█▆▆▄▃▃▄▆██▅▄▄▃▄▄▃▃▃▃▂▂▂▃▂▂▂▂▂▂▁▁▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁ ▃
  3.23 μs        Histogram: frequency by time        4.14 μs <

 Memory estimate: 2.91 KiB, allocs estimate: 37.

For HF:

julia> @benchmark attraction(basis, mol)
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min  max):  253.834 μs   14.709 ms  ┊ GC (min  max): 0.00%  97.89%
 Time  (median):     264.417 μs               ┊ GC (median):    0.00%
 Time  (mean ± σ):   270.959 μs ± 200.353 μs  ┊ GC (mean ± σ):  1.62% ±  2.47%

   ▇   ▁█▃▁
  ▅█▆▅▆████▇▇▆▅▅▄▃▃▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂▂ ▃
  254 μs           Histogram: frequency by time          348 μs <

 Memory estimate: 99.59 KiB, allocs estimate: 869.
julia> @benchmark repulsion(basis, mol)
BenchmarkTools.Trial: 41 samples with 1 evaluation.
 Range (min  max):  122.392 ms  135.635 ms  ┊ GC (min  max): 0.00%  9.72%
 Time  (median):     124.144 ms               ┊ GC (median):    0.99%
 Time  (mean ± σ):   124.632 ms ±   2.435 ms  ┊ GC (mean ± σ):  1.13% ± 1.78%

         ▂█
  ▅▇▃▁▁▁███▇▁▃▁▁▁▅▃▁▃▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▃▁▁▁▁▁▁▁▁▁▁▁▃ ▁
  122 ms           Histogram: frequency by time          136 ms <

 Memory estimate: 52.20 MiB, allocs estimate: 334718.

This is the change on the BasisSets.jl package

julia> @benchmark parsebasis(mol, "6-21g")
BenchmarkTools.Trial: 132 samples with 1 evaluation.
 Range (min  max):  26.997 ms  129.966 ms  ┊ GC (min  max): 0.00%  0.00%
 Time  (median):     35.509 ms               ┊ GC (median):    0.00%
 Time  (mean ± σ):   38.202 ms ±  11.909 ms  ┊ GC (mean ± σ):  0.00% ± 0.00%

    ▁ ▁ █ ▆
  ▃▄█▅█▇█▅███▄█▄▄▃▄▃▃▃▃▃▁▃▁▁▁▃▁▃▁▃▃▁▁▁▁▁▁▁▁▁▁▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▃ ▃
  27 ms           Histogram: frequency by time         87.5 ms <

 Memory estimate: 114.91 KiB, allocs estimate: 1232.
Clone this wiki locally