10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-07 06:33:39 +01:00
QCaml/common/lib/coordinate.mli

60 lines
1.3 KiB
OCaml
Raw Normal View History

2020-12-27 17:23:47 +01:00
(* Type
*
* #+NAME: types *)
2018-02-26 10:43:21 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/coordinate.org::types][types]] *)
type bohr
type angstrom
type xyz = {
x : float ;
y : float ;
z : float ;
}
type 'a point = xyz
type t = bohr point
2020-12-27 17:23:47 +01:00
type axis = X | Y | Z
(* types ends here *)
2020-12-27 23:08:12 +01:00
(* Creation *)
2018-02-26 10:43:21 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/coordinate.org::*Creation][Creation:1]] *)
2020-12-27 23:08:12 +01:00
val make : 'a point -> t
2020-12-27 17:23:47 +01:00
val make_angstrom : 'a point -> angstrom point
2020-12-27 23:08:12 +01:00
val zero : bohr point
(* Creation:1 ends here *)
2018-02-26 10:43:21 +01:00
2020-12-27 23:08:12 +01:00
(* Conversion *)
2018-02-26 10:43:21 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/coordinate.org::*Conversion][Conversion:1]] *)
2020-12-27 17:23:47 +01:00
val bohr_to_angstrom : bohr point -> angstrom point
val angstrom_to_bohr : angstrom point -> bohr point
2020-12-27 23:08:12 +01:00
(* Conversion:1 ends here *)
2018-02-26 10:43:21 +01:00
2020-12-27 23:08:12 +01:00
(* Vector operations *)
2018-02-26 10:43:21 +01:00
2021-01-04 09:19:35 +01:00
(* [[file:~/QCaml/common/coordinate.org::*Vector%20operations][Vector operations:1]] *)
2020-12-27 23:08:12 +01:00
val neg : t -> t
val get : axis -> bohr point -> float
val dot : t -> t -> float
val norm : t -> float
2020-12-27 17:23:47 +01:00
val ( |. ) : float -> t -> t
val ( |+ ) : t -> t -> t
val ( |- ) : t -> t -> t
2020-12-27 23:08:12 +01:00
(* Vector operations:1 ends here *)
2018-02-26 10:43:21 +01:00
2020-12-27 23:08:12 +01:00
(* Printers *)
2018-03-15 15:25:49 +01:00
2018-03-16 00:23:47 +01:00
2020-12-28 01:55:03 +01:00
(* [[file:~/QCaml/common/coordinate.org::*Printers][Printers:1]] *)
2020-12-27 17:23:47 +01:00
val pp : Format.formatter -> t -> unit
val pp_bohr: Format.formatter -> t -> unit
val pp_angstrom : Format.formatter -> t -> unit
2020-12-27 17:23:47 +01:00
(* Printers:1 ends here *)