10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-06-24 06:02:06 +02:00
QCaml/Utils/Coordinate_type.ml
2018-02-24 23:57:38 +01:00

25 lines
359 B
Standard ML

let bohr_to_angstrom { Bohr.x ; y ; z } =
let b_to_a b = Constants.a0 *. b in
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 } =
let a_to_b a = Constants.a0_inv *. a in
Bohr.make
{
Point.
x = a_to_b x ;
y = a_to_b y ;
z = a_to_b z ;
}