10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-06-21 12:42:05 +02:00
QCaml/Utils/Coordinate_type.ml

27 lines
419 B
Standard ML

type point = Point.t
type bohr = Bohr.t
type angstrom = Angstrom.t
let a_to_b a = Constants.a0_inv *. a
let b_to_a b = Constants.a0 *. b
let bohr_to_angstrom { Bohr.x ; y ; z } =
Angstrom.make
{
Point.
x = b_to_a x ;
y = b_to_a y ;
z = b_to_a z ;
}
let angstrom_to_bohr { Angstrom.x ; y ; z } =
Bohr.make
{
Point.
x = a_to_b x ;
y = a_to_b y ;
z = a_to_b z ;
}