10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

Ocaml default on multiple files

This commit is contained in:
Thomas Applencourt 2015-03-26 18:24:40 +01:00
parent 1a2a61edbc
commit 94e06e2a5b
5 changed files with 37 additions and 81 deletions

View File

@ -1,60 +0,0 @@
bielec_integrals
read_ao_integrals False
read_mo_integrals False
write_ao_integrals False
write_mo_integrals False
threshold_ao 1.e-15
threshold_mo 1.e-15
direct False
cis_dressed
n_state_cis 10
n_core_cis 0
n_act_cis mo_basis_mo_tot_num
mp2_dressing False
standard_doubles True
en_2_2 False
determinants
n_states 1
n_states_diag determinants_n_states
n_det_max_jacobi 1000
threshold_generators 0.99
threshold_selectors 0.999
read_wf False
s2_eig False
only_single_double_dm False
full_ci
n_det_max_fci 10000
n_det_max_fci_property 50000
pt2_max 1.e-4
do_pt2_end True
var_pt2_ratio 0.75
all_singles
n_det_max_fci 50000
pt2_max 1.e-8
do_pt2_end False
cassd
n_det_max_cassd 10000
pt2_max 1.e-4
do_pt2_end True
hartree_fock
n_it_scf_max 200
thresh_scf 1.e-10
guess "Huckel"
cisd_selected
n_det_max_cisd 10000
pt2_max 1.e-4
cisd_sc2_selected
n_det_max_cisd_sc2 10000
pt2_max 1.e-4
do_pt2_end True
properties
z_one_point 3.9

View File

View File

@ -3,7 +3,7 @@ open Qputils;;
open Core.Std;;
module Full_ci : sig
type t =
type t =
{ n_det_max_fci : Det_number_max.t;
pt2_max : PT2_energy.t;
do_pt2_end : bool;

View File

@ -2,27 +2,21 @@ open Qptypes;;
open Qputils;;
open Core.Std;;
type t_mo =
{ mo_tot_num : MO_number.t ;
mo_label : MO_label.t;
mo_occ : MO_occ.t array;
mo_coef : (MO_coef.t array) array;
ao_md5 : MD5.t;
} with sexp
module Mo_basis : sig
type t =
{ mo_tot_num : MO_number.t ;
mo_label : MO_label.t;
mo_occ : MO_occ.t array;
mo_coef : (MO_coef.t array) array;
ao_md5 : MD5.t;
} with sexp
;;
type t = t_mo
val read : unit -> t option
val to_string : t -> string
val to_rst : t -> Rst_string.t
end = struct
type t =
{ mo_tot_num : MO_number.t ;
mo_label : MO_label.t;
mo_occ : MO_occ.t array;
mo_coef : (MO_coef.t array) array;
ao_md5 : MD5.t;
} with sexp
;;
type t = t_mo
let get_default = Qpackage.get_ezfio_default "mo_basis";;

View File

@ -71,8 +71,8 @@ let executables = lazy (
)
let get_ezfio_default directory data =
let filename = root^"/data/ezfio_defaults" in
let get_ezfio_default_in_file ~directory ~data ~filename =
let lines = In_channel.with_file filename ~f:(fun in_channel ->
In_channel.input_lines in_channel) in
let rec find_dir = function
@ -93,8 +93,10 @@ let get_ezfio_default directory data =
begin
match (String.lsplit2 ~on:' ' (String.strip line)) with
| Some (l,r) ->
if (l = data) then (String.lowercase (String.strip r))
else find_data rest
if (l = data) then
String.lowercase (String.strip r)
else
find_data rest
| None -> raise Not_found
end
| [] -> raise Not_found
@ -102,3 +104,23 @@ let get_ezfio_default directory data =
find_dir lines
|> find_data ;
;;
let get_ezfio_default directory data =
let dirname = root^"/data/ezfio_defaults/" in
let rec aux = function
| [] -> raise Not_found
| filename :: tail ->
let filename =
dirname^filename
in
try
get_ezfio_default_in_file ~directory ~data ~filename
with
| Not_found -> aux tail
in
Sys.readdir dirname
|> Array.to_list
|> aux
;;