Update the EZFIO.cfg with the new keyword

This commit is contained in:
Thomas Applencourt 2015-06-18 15:01:04 +02:00
parent 0342bc009e
commit 93eafd009d
13 changed files with 94 additions and 72 deletions

2
ocaml/.gitignore vendored
View File

@ -5,6 +5,7 @@ qptypes_generator.byte
_build
qp_basis_clean.native
qp_create_ezfio_from_xyz.native
qp_edit.native
qp_print.native
qp_run.native
qp_set_ddci.native
@ -32,6 +33,7 @@ test_molecule
test_point3d
qp_basis_clean
qp_create_ezfio_from_xyz
qp_edit
qp_print
qp_run
qp_set_ddci

View File

@ -1,10 +1,10 @@
[energy]
type: double precision
doc: "Calculated CAS-SD energy"
interface: output
interface: ezfio
[energy_pt2]
type: double precision
doc: "Calculated selected CAS-SD energy with PT2 correction"
interface: output
interface: ezfio

View File

@ -1,10 +1,10 @@
[energy]
type: double precision
doc: Calculated CISD_SC2 energy of ground_state
interface: output
interface: ezfio
[energy_pt2]
type: double precision
doc: Calculated CISD_SC2 energy+pt2 of ground_state
interface: output
interface: ezfio

View File

@ -1,4 +1,4 @@
[energy]
type: double precision
doc: "Calculated CAS-SD energy"
interface: output
interface: ezfio

View File

@ -1,10 +1,10 @@
[energy]
type: double precision
doc: Calculated Selected FCI energy
interface: output
interface: ezfio
[energy_pt2]
type: double precision
doc: Calculated FCI energy + PT2
interface: output
interface: ezfio

View File

@ -1,22 +1,22 @@
[thresh_scf]
type: Threshold
doc: Threshold on the convergence of the Hartree Fock energy
interface: input
interface: ezfio,provider,ocaml
default: 1.e-10
[n_it_scf_max]
type: Strictly_positive_int
doc: Maximum number of SCF iterations
interface: input
interface: ezfio,provider,ocaml
default: 200
[mo_guess_type]
type: MO_guess
doc: Initial MO guess. Can be [ Huckel | HCore ]
interface: input
interface: ezfio,provider,ocaml
default: Huckel
[energy]
type: double precision
doc: Calculated HF energy
interface: output
interface: ezfio

View File

@ -1,4 +1,4 @@
[energy]
type: double precision
doc: Calculated MRCC energy
interface: output
interface: ezfio

View File

@ -1,19 +1,19 @@
[do_pt2_end]
type: logical
doc: If true, compute the PT2 at the end of the selection
interface: input
interface: ezfio,provider,ocaml
default: True
[PT2_max]
type: PT2_energy
doc: The selection process stops when the largest PT2 (for all the state) is lower
than pt2_max in absolute value
interface: input
interface: ezfio,provider,ocaml
default: 0.0001
[var_pt2_ratio]
type: Normalized_float
doc: The selection process stops when the energy ratio variational/(variational+PT2)
is equal to var_pt2_ratio
interface: input
interface: ezfio,provider,ocaml
default: 0.75

View File

@ -1,5 +1,5 @@
[z_one_point]
type: double precision
doc: z point on which the integrated delta rho is calculated
interface: input
interface: ezfio,provider,ocaml
default: 3.9

View File

@ -35,8 +35,13 @@ Format specification :
Type:{str} | Is a fancy_type supported by the ocaml
ezfio_name:{str} | Will be the name of the file for the ezfio
(optional by default is the name of the provider)
interface:{str} | The provider is a imput or a output
default:{str} | The default value if interface == input:
interface:{str} | The provider is string sepeared by "," who can containt
ezfio (if you only whant the ezfiolib)
provider (if you want the provider)
ocaml (if you want the ocaml gestion)
So for example:
interface: provider,ezfio,ocaml
default:{str} | The default value if 'ocam' in interface:
size:{str} | the size information
(like 1 or =sum(ao_num) or (ao_num,3) )
@ -46,13 +51,13 @@ Example of EZFIO.cfg:
doc: Threshold on the convergence of the Hartree Fock energy
type: Threshold
default: 1.e-10
interface: input
interface: provider,ezfio,ocaml
size: 1
[energy]
type: double precision
doc: Calculated HF energy
interface: output
interface: ezfio
```
"""
from docopt import docopt
@ -201,7 +206,7 @@ def get_dict_config_file(module_obj):
- ezfio_dir : Will be the folder who containt the ezfio_name
* /ezfio_dir/ezfio_name
* equal to MODULE_lower name by default.
- interface : The provider is a imput or a output
- interface : The provider is lit of [provider,ezfio,ocaml]
- default : The default value /!\ stored in a Type named type!
if interface == input
- size : Is the string read in ezfio.cgf who containt the size information
@ -211,7 +216,6 @@ def get_dict_config_file(module_obj):
# I n i t #
# ~#~#~#~ #
d = defaultdict(dict)
l_info_required = ["doc", "interface"]
l_info_optional = ["ezfio_dir", "ezfio_name", "size"]
# ~#~#~#~#~#~#~#~#~#~#~ #
@ -238,8 +242,13 @@ def get_dict_config_file(module_obj):
"ezfio_dir": module_obj.lower,
"size": "1"}
# Check if type if avalaible
type_ = config_file.get(section, "type")
# Check if type is avalaible
try:
type_ = config_file.get(section, "type")
except ConfigParser.NoOptionError:
error("type", pvd, module_obj.path)
sys.exit(1)
if type_ not in type_dict:
print "{0} not avalaible. Choose in:".format(type_)
print ", ".join(sorted([i for i in type_dict]))
@ -248,12 +257,23 @@ def get_dict_config_file(module_obj):
d[pvd]["type"] = type_dict[type_]
# Fill the dict with REQUIRED information
for option in l_info_required:
try:
d[pvd][option] = config_file.get(section, option)
except ConfigParser.NoOptionError:
error(option, pvd, module_obj.path)
try:
d[pvd]["doc"] = config_file.get(section, "doc")
except ConfigParser.NoOptionError:
error("doc", pvd, module_obj.path)
sys.exit(1)
try:
interface = map(str.lower, config_file.get(section, "interface").split(","))
except ConfigParser.NoOptionError:
error("doc", pvd, module_obj.path)
sys.exit(1)
else:
if not any(i in ["ezfio", "provider", "ocaml"] for i in interface):
print "Bad keyword for interface for {0}".format(pvd)
sys.exit(1)
else:
d[pvd]["interface"] = interface
# Fill the dict with OPTIONAL information
for option in l_info_optional:
@ -264,7 +284,7 @@ def get_dict_config_file(module_obj):
d[pvd][option] = d_default[option]
# If interface is input we need a default value information
if d[pvd]["interface"].lower() == "input":
if "ocaml" in d[pvd]["interface"]:
try:
default_raw = config_file.get(section, "default")
except ConfigParser.NoOptionError:
@ -300,7 +320,7 @@ def create_ezfio_provider(dict_ezfio_cfg):
ez_p = EZFIO_Provider()
for provider_name, dict_info in dict_ezfio_cfg.iteritems():
if "input" in dict_info["interface"]:
if "provider" in dict_info["interface"]:
ez_p.set_type(dict_info['type'].fortran)
ez_p.set_name(provider_name)
ez_p.set_doc(dict_info['doc'])
@ -492,7 +512,7 @@ def create_ocaml_input(dict_ezfio_cfg, module_lower):
l_doc = []
for k, v in dict_ezfio_cfg.iteritems():
if v['interface'] == "input":
if "ocaml" in v['interface']:
l_ezfio_name.append(v['ezfio_name'])
l_type.append(v["type"])
l_doc.append(v["doc"])

View File

@ -1,112 +1,112 @@
[N_det_max]
type: Det_number_max
doc: Max number of determinants in the wave function
interface: input
interface: ezfio,provider,ocaml
default: 10000
[N_det_max_property]
type: Det_number_max
doc: Max number of determinants in the wave function when you select for a given property
interface: input
interface: ezfio,provider,ocaml
default: 10000
[N_det_max_jacobi]
type: Det_number_max
doc: Maximum number of determinants diagonalized by Jacobi
interface: input
interface: ezfio,provider,ocaml
default: 1000
[N_states]
type: States_number
doc: Number of states to consider
interface: input
interface: ezfio,provider,ocaml
default: 1
[read_wf]
type: logical
doc: If true, read the wave function from the EZFIO file
interface: input
interface: ezfio,provider,ocaml
default: False
[only_single_double_dm]
type: logical
doc: If true, The One body DM is calculated with ignoring the Double<->Doubles extra diag elements
interface: input
interface: ezfio,provider,ocaml
default: False
[s2_eig]
type: logical
doc: Force the wave function to be an eigenfunction of S^2
interface: input
interface: ezfio,provider,ocaml
default: False
[threshold_generators]
type: Threshold
doc: Thresholds on generators (fraction of the norm)
interface: input
interface: ezfio,provider,ocaml
default: 0.99
[threshold_selectors]
type: Threshold
doc: Thresholds on selectors (fraction of the norm)
interface: input
interface: ezfio,provider,ocaml
default: 0.999
[n_states_diag]
type: integer
doc: n_states_diag
interface: Ocaml
interface: ezfio, provider
[n_int]
interface: OCaml
interface: ezfio, provider
doc: n_int
type: N_int_number
[bit_kind]
interface: OCaml
interface: ezfio, provider
doc: bit_kind
type: Bit_kind
[mo_label]
interface: OCaml
interface: ezfio, provider
doc: o_label
type: character*(64)
[n_det]
interface: OCaml
interface: ezfio, provider
doc: n_det
type: integer
[psi_coef]
interface: OCaml
interface: ezfio, provider
doc: psi_coef
type: double precision
size: (determinants.n_det,determinants.n_states)
[psi_det]
interface: OCaml
interface: ezfio, provider
doc: psi_det
type: integer*8
size: (determinants.n_int*determinants.bit_kind/8,2,determinants.n_det)
[det_num]
interface: OCaml
interface: ezfio, provider
doc: det_num
type: integer
[det_occ]
interface: OCaml
interface: ezfio, provider
doc: det_occ
type: integer
size: (electrons.elec_alpha_num,determinants.det_num,2)
[det_coef]
interface: OCaml
interface: ezfio, provider
doc: det_coef
type: double precision
size: (determinants.det_num)
[expected_s2]
interface: OCaml
interface: ezfio, provider
doc: expcted_s2
type: double precision

View File

@ -1,32 +1,32 @@
[do_direct_integrals]
type: logical
doc: Compute integrals on the fly
interface: input
interface: ezfio,provider,ocaml
default: False
ezfio_name: direct
[disk_access_mo_integrals]
type: Disk_access
doc: Read/Write MO integrals from/to disk [ Write | Read | None ]
interface: input
interface: ezfio,provider,ocaml
default: None
[disk_access_ao_integrals]
type: Disk_access
doc: Read/Write AO integrals from/to disk [ Write | Read | None ]
interface: input
interface: ezfio,provider,ocaml
default: None
[ao_integrals_threshold]
type: Threshold
doc: If |<pq|rs>| < ao_integrals_threshold then <pq|rs> is zero
interface: input
interface: ezfio,provider,ocaml
default: 1.e-15
ezfio_name: threshold_ao
[mo_integrals_threshold]
type: Threshold
doc: If |<ij|kl>| < ao_integrals_threshold then <pq|rs> is zero
interface: input
interface: ezfio,provider,ocaml
default: 1.e-15
ezfio_name: threshold_mo

View File

@ -1,88 +1,88 @@
[pseudo_klocmax]
doc: test
type:integer
interface: input_without_default
interface: ezfio,provider
[pseudo_n_k]
doc: test
type: integer
interface: input_without_default
interface: ezfio,provider
size: (nuclei.nucl_num,pseudo.pseudo_klocmax)
[pseudo_v_k]
doc: test
type: double precision
interface: input_without_default
interface: ezfio,provider
size: (nuclei.nucl_num,pseudo.pseudo_klocmax)
[pseudo_dz_k]
doc: test
type: double precision
interface: input_without_default
interface: ezfio,provider
size: (nuclei.nucl_num,pseudo.pseudo_klocmax)
[pseudo_lmax]
doc: test
type:integer
interface: input_without_default
interface: ezfio,provider
[pseudo_kmax]
doc: test
type:integer
interface: input_without_default
interface: ezfio,provider
[pseudo_n_kl]
doc: test
type: integer
interface: input_without_default
interface: ezfio,provider
size: (nuclei.nucl_num,pseudo.pseudo_kmax,0:pseudo.pseudo_lmax)
[pseudo_v_kl]
doc: test
type: double precision
interface: input_without_default
interface: ezfio,provider
size: (nuclei.nucl_num,pseudo.pseudo_kmax,0:pseudo.pseudo_lmax)
[pseudo_dz_kl]
doc: test
type: double precision
interface: input_without_default
interface: ezfio,provider
size: (nuclei.nucl_num,pseudo.pseudo_kmax,0:pseudo.pseudo_lmax)
[do_pseudo]
type: logical
doc: Using pseudo potential integral of not
interface: input
interface: ezfio,provider,ocaml
default: False
[pseudo_grid_size]
type: integer
doc: Nb of points of the QMC grid
interface: input
interface: ezfio,provider,ocaml
default: 1000
[pseudo_grid_rmax]
type: double precision
doc: R_maxof the QMC grid
interface: input
interface: ezfio,provider,ocaml
default: 10.0
[ao_pseudo_grid]
type: double precision
doc: QMC grid
interface: output
interface: ezfio
size: (ao_basis.ao_num,-pseudo.pseudo_lmax:pseudo.pseudo_lmax,0:pseudo.pseudo_lmax,nuclei.nucl_num,pseudo.pseudo_grid_size)
[mo_pseudo_grid]
type: double precision
doc: QMC grid
interface: output
interface: ezfio
size: (ao_basis.ao_num,-pseudo.pseudo_lmax:pseudo.pseudo_lmax,0:pseudo.pseudo_lmax,nuclei.nucl_num,pseudo.pseudo_grid_size)
[pseudo_matrix]
type: double precision
doc: QMC grid
interface: output
interface: ezfio
size: (aux_basis.aux_basis_num_sqrt,aux_basis.aux_basis_num_sqrt)