mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-18 20:12:26 +01:00
19 lines
465 B
OCaml
19 lines
465 B
OCaml
(** Read a basis set file in GAMESS format and return an association list where the key is an
|
|
Element.t and the value is the parsed basis set. *)
|
|
let read ~filename =
|
|
let lexbuf =
|
|
let ic = open_in filename in
|
|
Lexing.from_channel ic
|
|
in
|
|
let rec aux accu =
|
|
try
|
|
let key, basis =
|
|
GamessParser.input BasisLexer.read_all lexbuf
|
|
in
|
|
aux ((key, basis)::accu)
|
|
with
|
|
| Parsing.Parse_error -> List.rev accu
|
|
in
|
|
aux []
|
|
|