10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-13 09:33:41 +01:00

Merge branch 'dev' of gitlab.com:scemama/QCaml into dev

This commit is contained in:
Anthony Scemama 2020-10-18 01:58:36 +02:00
commit a907572217
55 changed files with 61 additions and 36 deletions

View File

@ -16,7 +16,7 @@ let of_nuclei_and_basis_filename ?(kind=`Gaussian) ?operators ?(cartesian=false)
match kind with
| `Gaussian ->
let basis =
Gaussian_basis.Basis.of_nuclei_and_basis_filename ~nuclei filename
Gaussian.Basis.of_nuclei_and_basis_filename ~nuclei filename
in
let ao_basis =
Gaussian (Basis_gaussian.make ~basis ?operators ~cartesian nuclei )

View File

@ -1,9 +1,9 @@
open Linear_algebra
open Gaussian_basis
open Gaussian
open Gaussian_integrals
open Operators
module Basis = Gaussian_basis.Basis
module Basis = Gaussian.Basis
type t =
{

View File

@ -12,7 +12,7 @@ type t
val size : t -> int
(** Number of atomic orbitals *)
val basis : t -> Gaussian_basis.Basis.t
val basis : t -> Gaussian.Basis.t
(** One-electron basis set *)
val overlap : t -> Overlap.t
@ -45,14 +45,14 @@ val kin_ints : t -> Kinetic.t
val cartesian : t -> bool
(** If true, use cartesian Gaussians (6d, 10f, ...) *)
val values : t -> Coordinate.t -> Gaussian_basis.Basis.t Vector.t
val values : t -> Coordinate.t -> Gaussian.Basis.t Vector.t
(** Values of the AOs evaluated at a given point *)
(** {1 Creators} *)
val make : basis:Gaussian_basis.Basis.t -> ?operators:Operator.t list ->
val make : basis:Gaussian.Basis.t -> ?operators:Operator.t list ->
?cartesian:bool -> Nuclei.t -> t
(** Creates the data structure for atomic orbitals from a Gaussian basis and the
molecular geometry {Nuclei.t} *)

View File

@ -6,7 +6,7 @@
(libraries
qcaml.common
qcaml.particles
qcaml.gaussian_basis
qcaml.gaussian
qcaml.gaussian_integrals
qcaml.operators
)

View File

@ -1,6 +1,6 @@
open Alcotest
open Gaussian_integrals
open Gaussian_basis
open Gaussian
open Particles
open Operators
open Linear_algebra

View File

@ -3,7 +3,7 @@ let name = "QCaml"
let root =
let rec chop = function
| [] -> raise Not_found
| [] -> []
| x :: _ as l when x = name -> l
| _ :: rest -> chop rest
in

View File

@ -27,7 +27,6 @@ in quantum chemistry.")
(depends
(ocaml (>= 4.10))
(dune (>= 1.10))
str
lacaml
getopt
zarith

View File

@ -1,8 +1,8 @@
; name = name of the supermodule that will wrap all source files as submodules
; public_name = name of the library for ocamlfind and opam
(library
(name gaussian_basis)
(public_name qcaml.gaussian_basis)
(name gaussian)
(public_name qcaml.gaussian)
(libraries
str
qcaml.common

View File

@ -3,6 +3,6 @@
(libraries
alcotest
qcaml.particles
qcaml.gaussian_basis
qcaml.gaussian
)
(synopsis "Tests for Gaussian basis sets"))

View File

@ -1,6 +1,6 @@
open Common
open Particles
open Gaussian_basis
open Gaussian
open Alcotest
let wd = Common.Qcaml.root ^ Filename.dir_sep ^ "test"

View File

@ -7,7 +7,7 @@
str
qcaml.common
qcaml.linear_algebra
qcaml.gaussian_basis
qcaml.gaussian
qcaml.operators
)
(modules_without_implementation matrix_on_basis)

View File

@ -3,7 +3,7 @@
include Common
include Particles
include Linear_algebra
include Gaussian_basis
include Gaussian
open Util
open Constants

View File

@ -9,7 +9,7 @@ $$ %}
include module type of Matrix_on_basis
open Particles
open Gaussian_basis
open Gaussian
val of_basis_nuclei : basis:Basis.t -> Nuclei.t -> t
(** Build from a {Basis.t} and the nuclei (coordinates and charges). *)

View File

@ -1,7 +1,7 @@
(** Electron-electron repulsion integrals *)
open Common
open Gaussian_basis
open Gaussian
module Csp = Contracted_shell_pair
module Cspc = Contracted_shell_pair_couple

View File

@ -3,7 +3,7 @@
*)
open Common
open Gaussian_basis
open Gaussian
open Operators
module Csp = Contracted_shell_pair

View File

@ -1,5 +1,5 @@
open Common
open Gaussian_basis
open Gaussian
module Am = Angular_momentum
module Asp = Atomic_shell_pair

View File

@ -1,6 +1,6 @@
open Common
open Linear_algebra
open Gaussian_basis
open Gaussian
open Util
open Constants

View File

@ -1,6 +1,6 @@
(** Signature for matrices built on the {!Basis.t} *)
open Gaussian_basis
open Gaussian
open Linear_algebra
type t = (Basis.t, Basis.t) Matrix.t

View File

@ -1,6 +1,6 @@
open Common
open Linear_algebra
open Gaussian_basis
open Gaussian
open Constants
type t = (Basis.t, Basis.t) Matrix.t array
@ -222,3 +222,19 @@ let of_basis basis =
Array.iter Matrix.detri_inplace result;
result
let to_file ~filename eni_array =
let n = Matrix.dim1 eni_array in
let eni_array = Matrix.to_bigarray_inplace eni_array in
let oc = open_out filename in
for j=1 to n do
for i=1 to j do
let value = eni_array.{i,j} in
if (value <> 0.) then
Printf.fprintf oc " %5d %5d %20.15f\n" i j value;
done;
done;
close_out oc

View File

@ -10,7 +10,7 @@
*)
open Linear_algebra
open Gaussian_basis
open Gaussian
type t = (Basis.t, Basis.t) Matrix.t array
@ -60,3 +60,7 @@ val matrix_z4 : t -> (Basis.t, Basis.t) Matrix.t
(** {% $$ \langle \chi_i | z^4 | \chi_j \rangle $$ %} *)
val of_basis : Basis.t -> t
val to_file : filename:string -> (Basis.t, Basis.t) Matrix.t -> unit
(** Write a matrix to a file *)

View File

@ -2,7 +2,7 @@ open Common
open Particles
open Util
open Constants
open Gaussian_basis
open Gaussian
exception NullPair

View File

@ -1,6 +1,6 @@
open Common
open Linear_algebra
open Gaussian_basis
open Gaussian
module Am = Angular_momentum
module Bs = Basis

View File

@ -1,6 +1,6 @@
(** Orthonormalization of the basis. *)
open Gaussian_basis
open Gaussian
open Linear_algebra
type t = (Basis.t, Basis.t) Matrix.t

View File

@ -1,6 +1,6 @@
open Common
open Linear_algebra
open Gaussian_basis
open Gaussian
open Util
open Constants

View File

@ -1,7 +1,7 @@
(** Screened Electron-electron repulsion integrals (Yukawa potential). Required for F12/r12. *)
open Common
open Gaussian_basis
open Gaussian
open Operators
module Csp = Contracted_shell_pair

View File

@ -3,7 +3,7 @@
open Common
open Linear_algebra
open Gaussian_basis
open Gaussian
open Operators
open Constants

View File

@ -6,7 +6,7 @@
*)
open Common
open Gaussian_basis
open Gaussian
open Linear_algebra
open Operators

View File

@ -1,5 +1,5 @@
open Common
open Gaussian_basis
open Gaussian
module Am = Angular_momentum
module Asp = Atomic_shell_pair

View File

@ -1,5 +1,5 @@
open Common
open Gaussian_basis
open Gaussian
open Linear_algebra
module Am = Angular_momentum

View File

@ -1,6 +1,6 @@
open Common
open Particles
open Gaussian_basis
open Gaussian
open Alcotest
let wd = Common.Qcaml.root ^ Filename.dir_sep ^ "test"

View File

@ -6,7 +6,7 @@
(libraries
qcaml.common
qcaml.particles
qcaml.gaussian_basis
qcaml.gaussian
qcaml.gaussian_integrals
qcaml.operators
qcaml.ao

View File

@ -1,2 +1,8 @@
module Common = Common
module Ao = Ao
module Gaussian = Gaussian
module Gaussian_integrals = Gaussian_integrals
module Linear_algebra = Linear_algebra
module Operators = Operators
module Particles = Particles

View File

@ -6,7 +6,7 @@
(libraries
qcaml.common
qcaml.particles
qcaml.gaussian_basis
qcaml.gaussian
qcaml.gaussian_integrals
qcaml.operators
qcaml.ao