10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-25 22:52:15 +02:00

Update doc

This commit is contained in:
Thomas Applencourt 2015-06-19 18:58:36 +02:00
parent c6128f7a22
commit a07312b077
2 changed files with 77 additions and 48 deletions

View File

@ -117,3 +117,43 @@ You can type `ninja all` in a module for compiling all the submodule
ssh -fN -D 10000 user@external-server.com
# Note on EZFIO.cfg
##Format specification :
Required:
[<provider_name>] The name of the provider in irp.f90 and in the EZFIO lib
doc:<str> The plain text documentation
type:<str> A Fancy_type supported by the ocaml.
type `ei_handler.py get_supported_type` for a list
interface:<str> The interface is list of 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)
Optional:
default: <str> The default value needed,
if 'ocaml' is in interface list.
! No list is allowed for now !
size: <str> The size information.
(by default is one)
Example : 1, =sum(ao_num); (ao_num,3)
ezfio_name: <str> The name for the EZFIO lib
(by default is <provider_name>)
ezfio_dir: <str> Will be the folder of EZFIO.
(by default is <module_lower>)
##Example of EZFIO.cfg:
```
[thresh_SCF]
doc: Threshold on the convergence of the Hartree Fock energy
type: Threshold
default: 1.e-10
interface: provider,ezfio,ocaml
size: 1
[energy]
type: Strictly_negative_float
doc: Calculated HF energy
interface: ezfio
```

View File

@ -10,40 +10,44 @@ Usage:
[--ezfio_config]
[--ocaml]
[--ezfio_default]
ei_handler.py list_supported_type
ei_handler.py ocaml_global
By default all the option are executed.
Options:
-h --help
--irpf90 Create the `ezfio_interface.irpf90`
which contains all the providers needed
(aka all with the `interface: input` parameter)
in `${pwd}`
--ezfio_config Create the `${module_lower}_ezfio_interface_config` in
`${QP_ROOT}/EZFIO/config/`
This file is needed by *EZFIO* to create the `libezfio.so`
--ocaml Create the `Input_module.lower.ml` for the *qp_edit*
--ezfio_default Create the `${module_lower}_ezfio_interface_default` in
`${QP_ROOT}/data/ezfio_defaults` needed by
the ocaml
ocaml_global Create the qp_edit
--irpf90 Create the `<module>/ezfio_interface.irpf90`
which contains all the providers needed
--ezfio_config Create the `<module_lower>_ezfio_interface_config` in
`${QP_EZFIO}/config/`
--ocaml Create all the stuff needed by *qp_edit*:
-`Input_<module_lower>.ml` and
- <module_lower>_ezfio_interface_default`
ocaml_global Create the *qp_edit*
Format specification :
[provider_name] | the name of the provider in irp.f90
doc:{str} | Is the doc
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 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) )
Required:
[<provider_name>] The name of the provider in irp.f90 and in the EZFIO lib
doc:<str> The plain text documentation
type:<str> A Fancy_type supported by the ocaml.
type `ei_handler.py get_supported_type` for a list
interface:<str> The interface is list of 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)
Optional:
default: <str> The default value needed,
if 'ocaml' is in interface list.
! No list is allowed for now !
size: <str> The size information.
(by default is one)
Example : 1, =sum(ao_num); (ao_num,3)
ezfio_name: <str> The name for the EZFIO lib
(by default is <provider_name>)
ezfio_dir: <str> Will be the folder of EZFIO.
(by default is <module_lower>)
Example of EZFIO.cfg:
```
@ -198,19 +202,6 @@ def get_dict_config_file(module_obj):
size,
interface,
default}
- Type : Is a Type named tuple who containt
fortran and ocaml type
- doc : Is the doc
- ezfio_name : Will be the name of the file
- 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 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
(like 1 or =sum(ao_num))
"""
# ~#~#~#~ #
# I n i t #
@ -730,9 +721,9 @@ def code_generation(arguments, dict_ezfio_cfg, m):
str_ezfio_config = create_ezfio_config(dict_ezfio_cfg)
save_ezfio_config(module_lower, str_ezfio_config)
# ~#~#~#~#~#~#
# O c a m l #
# ~#~#~#~#~#~#
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
# O c a m l & e z f i o _ d e f a u l t #
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
if do_all or arguments["--ocaml"]:
try:
str_ocaml_input = create_ocaml_input(dict_ezfio_cfg, module_lower)
@ -741,20 +732,19 @@ def code_generation(arguments, dict_ezfio_cfg, m):
else:
save_ocaml_input(module_lower, str_ocaml_input)
# ~#~#~#~#~#~#~#~#~#~#~#~#~ #
# e z f i o _ d e f a u l t #
# ~#~#~#~#~#~#~#~#~#~#~#~#~ #
if do_all or arguments["--ezfio_default"]:
str_ezfio_default = create_ezfio_default(dict_ezfio_cfg)
save_ezfio_default(module_lower, str_ezfio_default)
if __name__ == "__main__":
arguments = docopt(__doc__)
# ___
# | ._ o _|_
# _|_ | | | |_
#
if arguments["list_supported_type"]:
for i in get_type_dict():
print i
sys.exit(0)
if arguments["ocaml_global"]:
@ -763,7 +753,6 @@ if __name__ == "__main__":
# ~#~#~#~# #
l_module = get_l_module_with_auto_generate_ocaml_lower()
print l_module
str_ocaml_qp_edit, str_ocaml_input_auto = create_ocaml_input_global(l_module)
save_ocaml_input_auto(str_ocaml_input_auto)