10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 04:13:33 +01:00

Update Angular_momentum

This commit is contained in:
Anthony Scemama 2017-12-30 19:12:20 +01:00
parent 2971dd0deb
commit 39d2c77243
4 changed files with 45 additions and 25 deletions

View File

@ -4,34 +4,50 @@ type t =
| S | P | D | F | G | H | I | J | K | L | M | N | O | S | P | D | F | G | H | I | J | K | L | M | N | O
let of_char = function let of_char = function
| 's' | 'S' -> S | 's' | 'S' -> S | 'p' | 'P' -> P
| 'p' | 'P' -> P | 'd' | 'D' -> D | 'f' | 'F' -> F
| 'd' | 'D' -> D | 'g' | 'G' -> G | 'h' | 'H' -> H
| 'f' | 'F' -> F | 'i' | 'I' -> I | 'j' | 'J' -> J
| 'g' | 'G' -> G | 'k' | 'K' -> K | 'l' | 'L' -> L
| 'h' | 'H' -> H | 'm' | 'M' -> M | 'n' | 'N' -> N
| 'i' | 'I' -> I
| 'j' | 'J' -> J
| 'k' | 'K' -> K
| 'l' | 'L' -> L
| 'm' | 'M' -> M
| 'n' | 'N' -> N
| 'o' | 'O' -> O | 'o' | 'O' -> O
| c -> raise (AngularMomentumError c) | c -> raise (AngularMomentumError c)
let to_string = function let to_string = function
| S -> "S" | S -> "S" | P -> "P"
| P -> "P" | D -> "D" | F -> "F"
| D -> "D" | G -> "G" | H -> "H"
| F -> "F" | I -> "I" | J -> "J"
| G -> "G" | K -> "K" | L -> "L"
| H -> "H" | M -> "M" | N -> "N"
| I -> "I"
| J -> "J"
| K -> "K"
| L -> "L"
| M -> "M"
| N -> "N"
| O -> "O" | O -> "O"
let to_char = function
| S -> 'S' | P -> 'P'
| D -> 'D' | F -> 'F'
| G -> 'G' | H -> 'H'
| I -> 'I' | J -> 'J'
| K -> 'K' | L -> 'L'
| M -> 'M' | N -> 'N'
| O -> 'O'
let to_int = function
| S -> 0 | P -> 1
| D -> 2 | F -> 3
| G -> 4 | H -> 5
| I -> 6 | J -> 7
| K -> 8 | L -> 9
| M -> 10 | N -> 11
| O -> 12
let of_int = function
| 0 -> S | 1 -> P
| 2 -> D | 3 -> F
| 4 -> G | 5 -> H
| 6 -> I | 7 -> J
| 8 -> K | 9 -> L
| 10 -> M | 11 -> N
| 12 -> O

View File

@ -3,6 +3,8 @@ exception SyntaxError of string
open Basis_parser open Basis_parser
}
let eol = ['\n'] let eol = ['\n']
let white = [' ' '\t']+ let white = [' ' '\t']+
let element = ['A'-'Z' 'a'-'z']+ white? eol let element = ['A'-'Z' 'a'-'z']+ white? eol

View File

@ -1,3 +1,5 @@
/* Parses basis sets in GAMESS format */
%{ %{
%} %}

View File

@ -3,7 +3,7 @@
LIBS= LIBS=
PKGS= PKGS=
OCAMLCFLAGS="-g" OCAMLCFLAGS="-g"
OCAMLBUILD=ocamlbuild -use-menhir -j 0 -cflags $(OCAMLCFLAGS) -lflags $(OCAMLCFLAGS) OCAMLBUILD=ocamlbuild -j 0 -cflags $(OCAMLCFLAGS) -lflags $(OCAMLCFLAGS)
MLLFILES=$(wildcard *.mll) MLLFILES=$(wildcard *.mll)
MLYFILES=$(wildcard *.mly) MLYFILES=$(wildcard *.mly)
MLFILES=$(wildcard *.ml) MLFILES=$(wildcard *.ml)