10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 20:35:19 +01:00

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 _build
qp_basis_clean.native qp_basis_clean.native
qp_create_ezfio_from_xyz.native qp_create_ezfio_from_xyz.native
qp_edit.native
qp_print.native qp_print.native
qp_run.native qp_run.native
qp_set_ddci.native qp_set_ddci.native
@ -32,6 +33,7 @@ test_molecule
test_point3d test_point3d
qp_basis_clean qp_basis_clean
qp_create_ezfio_from_xyz qp_create_ezfio_from_xyz
qp_edit
qp_print qp_print
qp_run qp_run
qp_set_ddci qp_set_ddci

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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