diff --git a/ocaml/atom.ml b/ocaml/Atom.ml similarity index 100% rename from ocaml/atom.ml rename to ocaml/Atom.ml diff --git a/ocaml/basis.ml b/ocaml/Basis.ml similarity index 100% rename from ocaml/basis.ml rename to ocaml/Basis.ml diff --git a/ocaml/bit.ml b/ocaml/Bit.ml similarity index 100% rename from ocaml/bit.ml rename to ocaml/Bit.ml diff --git a/ocaml/bitlist.ml b/ocaml/Bitlist.ml similarity index 100% rename from ocaml/bitlist.ml rename to ocaml/Bitlist.ml diff --git a/ocaml/element.ml b/ocaml/Element.ml similarity index 100% rename from ocaml/element.ml rename to ocaml/Element.ml diff --git a/ocaml/excitation.ml b/ocaml/Excitation.ml similarity index 100% rename from ocaml/excitation.ml rename to ocaml/Excitation.ml diff --git a/ocaml/gto.ml b/ocaml/Gto.ml similarity index 100% rename from ocaml/gto.ml rename to ocaml/Gto.ml diff --git a/ocaml/MO_class.ml b/ocaml/MO_class.ml index 4e5a743a..8af49f38 100644 --- a/ocaml/MO_class.ml +++ b/ocaml/MO_class.ml @@ -36,10 +36,11 @@ let create_active range = Active (_mo_number_list_of_range range) ;; let create_virtual range = Virtual (_mo_number_list_of_range range) ;; let create_deleted range = Deleted (_mo_number_list_of_range range) ;; -let to_bitlist holes particles = - let mask = Bitlist.of_int64 (Int64.of_int 513) in - let l = Bitlist.to_mo_number_list mask in - let i = Inactive l in - print_string (to_string i) +let to_bitlist x = + match x with + | Core l + | Inactive l + | Active l + | Virtual l + | Deleted l -> Bitlist.of_mo_number_list n_int l ;; - diff --git a/ocaml/Makefile b/ocaml/Makefile index f1d95be7..09594f9f 100644 --- a/ocaml/Makefile +++ b/ocaml/Makefile @@ -14,7 +14,7 @@ LIBS= PKGS= OCAMLCFLAGS=-g OCAMLBUILD=ocamlbuild -cflags $(OCAMLCFLAGS) -lflags -g -MLFILES=$(wildcard *.ml) ezfio.ml qptypes.ml +MLFILES=$(wildcard *.ml) ezfio.ml Qptypes.ml MLIFILES=$(wildcard *.mli) ALL_TESTS=$(patsubst %.ml,%.byte,$(wildcard test_*.ml)) ALL_EXE=$(patsubst %.ml,%.native,$(wildcard qp_*.ml)) @@ -40,7 +40,7 @@ qptypes_generator.byte: qptypes_generator.ml $(OCAMLBUILD) qptypes_generator.byte -use-ocamlfind qptypes.ml: qptypes_generator.byte - ./qptypes_generator.byte > qptypes.ml + ./qptypes_generator.byte > Qptypes.ml rm qptypes_generator.byte ${QPACKAGE_ROOT}/EZFIO/Ocaml/ezfio.ml: diff --git a/ocaml/molecule.ml b/ocaml/Molecule.ml similarity index 100% rename from ocaml/molecule.ml rename to ocaml/Molecule.ml diff --git a/ocaml/multiplicity.ml b/ocaml/Multiplicity.ml similarity index 100% rename from ocaml/multiplicity.ml rename to ocaml/Multiplicity.ml diff --git a/ocaml/point3d.ml b/ocaml/Point3d.ml similarity index 100% rename from ocaml/point3d.ml rename to ocaml/Point3d.ml diff --git a/ocaml/primitive.ml b/ocaml/Primitive.ml similarity index 100% rename from ocaml/primitive.ml rename to ocaml/Primitive.ml diff --git a/ocaml/qpackage.ml b/ocaml/Qpackage.ml similarity index 100% rename from ocaml/qpackage.ml rename to ocaml/Qpackage.ml diff --git a/ocaml/qputils.ml b/ocaml/Qputils.ml similarity index 100% rename from ocaml/qputils.ml rename to ocaml/Qputils.ml diff --git a/ocaml/range.ml b/ocaml/Range.ml similarity index 100% rename from ocaml/range.ml rename to ocaml/Range.ml diff --git a/ocaml/mo_class.ml b/ocaml/mo_class.ml deleted file mode 100644 index 8af49f38..00000000 --- a/ocaml/mo_class.ml +++ /dev/null @@ -1,46 +0,0 @@ -open Core.Std;; -open Qptypes ;; - -type t = -| Core of MO_number.t list -| Inactive of MO_number.t list -| Active of MO_number.t list -| Virtual of MO_number.t list -| Deleted of MO_number.t list -;; - - -let to_string x = - let print_list l = - let s = List.map ~f:(fun x-> MO_number.to_int x |> string_of_int )l - |> (String.concat ~sep:", ") - in - "("^s^")" - in - - match x with - | Core l -> "Core : "^(print_list l) - | Inactive l -> "Inactive : "^(print_list l) - | Active l -> "Active : "^(print_list l) - | Virtual l -> "Virtual : "^(print_list l) - | Deleted l -> "Deleted : "^(print_list l) -;; - -let _mo_number_list_of_range range = - Range.of_string range |> List.map ~f:MO_number.of_int -;; - -let create_core range = Core (_mo_number_list_of_range range) ;; -let create_inactive range = Inactive (_mo_number_list_of_range range) ;; -let create_active range = Active (_mo_number_list_of_range range) ;; -let create_virtual range = Virtual (_mo_number_list_of_range range) ;; -let create_deleted range = Deleted (_mo_number_list_of_range range) ;; - -let to_bitlist x = - match x with - | Core l - | Inactive l - | Active l - | Virtual l - | Deleted l -> Bitlist.of_mo_number_list n_int l -;; diff --git a/ocaml/qp_set_mo_class.ml b/ocaml/qp_set_mo_class.ml index da322648..5700b2dc 100644 --- a/ocaml/qp_set_mo_class.ml +++ b/ocaml/qp_set_mo_class.ml @@ -51,13 +51,11 @@ let apply_mask mask n_int mo_tot_num = let d = append_d 12 in Ezfio.ezfio_array_of_list ~rank:4 ~dim:([| (N_int_number.to_int n_int) ; 2; 6; 1|]) ~data:d |> Ezfio.set_bitmasks_generators ; - ;; -let failure s = - raise (Failure s) +let failure s = raise (Failure s) ;; type t =