1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-22 20:35:44 +01:00

better front end documentation for numerical attributes

This commit is contained in:
q-posev 2021-09-21 10:58:07 +02:00
parent 11a17c65d3
commit 6459543afd

View File

@ -1087,13 +1087,18 @@ def close(trexio_file):
| ~$group_dset_dtype_default$~ | Default datatype of the dataset [C] | ~double/int32_t~ |
| ~$group_dset_dtype_single$~ | Single precision datatype of the dataset [C] | ~float/int32_t~ |
| ~$group_dset_dtype_double$~ | Double precision datatype of the dataset [C] | ~double/int64_t~ |
| ~$default_prec$~ | Default precision for read/write without suffix [C] | ~64/32~ |
| ~$group_dset_f_dtype_default$~ | Default datatype of the dataset [Fortran] | ~real(8)/integer(4)~ |
| ~$group_dset_f_dtype_single$~ | Single precision datatype of the dataset [Fortran] | ~real(4)/integer(4)~ |
| ~$group_dset_f_dtype_double$~ | Double precision datatype of the dataset [Fortran] | ~real(8)/integer(8)~ |
| ~$group_dset_f_dims$~ | Dimensions in Fortran | ~(:,:)~ |
| ~$group_dset_py_dtype$~ | Standard datatype of the dataset [Python] | ~float/int~ |
| ~$default_prec$~ | Default precision for read/write without suffix [C] | ~64/32~ |
| ~$is_index$~ | Expands to ~true~ if dataset has a type ~index~ [C] | ~true/false~ |
Some of the aforementioned template variables with ~group_dset~ prefix are duplicated with ~group_num~ prefix,
e.g. you might find $group_num_dtype_double$ in the templates corresponding to numerical attributes.
The expanding values are the same as for ~group_dset~ and thus are not listed in the table above.
Note: parent group name is always added to the child objects upon
construction of TREXIO (e.g. ~num~ of ~nucleus~ group becomes
@ -1104,14 +1109,18 @@ def close(trexio_file):
object) levels of =trex.json= . The parsed data is divided in 2
parts:
1) Dimensioning variables (contain ~num~ in their names). These are always scalar integers.
1) Single attributes. These can be numerical values or strings.
2) Datasets. These can be vectors, matrices or tensors. The types are indicated in =trex.json=.
Currently supported types: int, float and strings.
Currently supported data types: int, float and strings.
For each of the aforementioned objects, TREXIO provides *has*,
*read* and *write* functionality. TREXIO supports I/O with single
or double precision for integer and floating point numbers.
*Note:* single integer attributes that contain ~num~ in their name (e.g. ~nucleus_num~) are
considered dimensioning variables and cannot be negative or 0. An attempt to write negative or 0
value will result in ~TREXIO_INVALID_ARG_2~ exit code.
** Templates for front end has/read/write a single numerical attribute
*** Introduction