mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-14 10:03:47 +01:00
27 lines
589 B
OCaml
27 lines
589 B
OCaml
open Qptypes
|
|
open Element
|
|
|
|
let () =
|
|
let indices =
|
|
Array.init 78 (fun i -> i)
|
|
in
|
|
let out_channel =
|
|
open_out (Qpackage.root ^ "/data/list_element.txt")
|
|
in
|
|
Array.init 110 (fun i ->
|
|
let element =
|
|
try
|
|
Some (of_charge (Charge.of_int i))
|
|
with
|
|
| _ -> None
|
|
in
|
|
match element with
|
|
| None -> ""
|
|
| Some x -> Printf.sprintf "%3d %3s %s %f\n"
|
|
i (to_string x) (to_long_string x) (Positive_float.to_float @@ mass x )
|
|
)
|
|
|> Array.to_list
|
|
|> String.concat ""
|
|
|> Printf.fprintf out_channel "%s"
|
|
|