9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 03:23:29 +01:00

Perturbation type

This commit is contained in:
Anthony Scemama 2020-03-06 18:12:04 +01:00
parent 22e54cecd1
commit 77ca529072

View File

@ -219,22 +219,19 @@ module Perturbation : sig
end = struct end = struct
type t = type t =
| EN | EN
| Barycentric | HF
| Variance
| SOP | SOP
[@@deriving sexp] [@@deriving sexp]
let to_string = function let to_string = function
| EN -> \"EN\" | EN -> \"EN\"
| Variance -> \"Variance\" | HF -> \"HF\"
| Barycentric -> \"Barycentric\"
| SOP -> \"SOP\" | SOP -> \"SOP\"
let of_string s = let of_string s =
match (String.lowercase_ascii s) with match (String.lowercase_ascii s) with
| \"sop\" -> SOP | \"sop\" -> SOP
| \"en\" -> EN | \"en\" -> EN
| \"variance\" -> Variance | \"hf\" -> HF
| \"barycentric\" -> Barycentric
| _ -> raise (Invalid_argument (\"Wrong Perturbation type : \"^s)) | _ -> raise (Invalid_argument (\"Wrong Perturbation type : \"^s))
end end
" "