mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-10-31 19:23:40 +01:00
18 lines
362 B
OCaml
18 lines
362 B
OCaml
(** Reads a basis set in GAMESS format *)
|
|
let read_basis 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 []
|
|
|