User Tools

Site Tools


developers:abivars.yml

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
developers:abivars.yml [2017/08/08 08:05] – [Specifications for the abinit_vars.yml file] Xavier Gonzedevelopers:abivars.yml [2019/10/24 02:42] (current) – removed Matteo Giantomassi
Line 1: Line 1:
-====== Specifications for the abinit_vars.yml file ====== 
- 
-As values in the ~abinit/doc/input_variables/origin_files/abinit_vars.yml file, you can specify numbers, string, arrays, following the standard specification of YAML : 
- 
-  * [[http://en.wikipedia.org/wiki/YAML| Wikipedia YAML page]] 
-  * [[http://www.yaml.org/|The official YAML page]] 
- 
-Several "types" are defined to allow sufficient flexibility in the specifications, as follows. 
- 
- 
-===== !variable ===== 
- 
-It is the type that contains the other fields.   
-  * abivarname : the name of the variable. Note that the name for input variables of the executables anaddb, aim and optic is always finished with @anaddb, @aim or @optic. 
-  * characteristics : possibly, a specific characteristics of the input variable. To be chosen among the names in ~abinit/doc/input_variables/origin_files/characteristics.yml . 
-  * commentdefault : possibly, some comment about a default value. 
-  * commentdims : possibly, some comment about the dimension of an array. 
-  * defaultval : must be an integer or real value, possibly specified using the types presented below (e.g. !multiplevalue) 
-  * dimensions : either scalar or a list of dimensions, using YML syntax. 
-  * excludes : possible excluded values 
-  * mnemonics : a longer description of the variable role, in a few words 
-  * requires : the input variable is relevant only if this condition is fulfilled 
-  * text : free text describing the input variable 
-  * topics : a string, specified in [[developers:topics_and_tribes]] 
-  * varset : a unique "set of variables" to which the variable belong. To be chosen among the names in ~abinit/doc/input_variables/origin_files/varsets.yml . 
-  * vartype : to be chosen among integer, real or string 
-If there is no information of a type for a specific variable, its value must be "null". 
- 
-===== !multiplevalue ===== 
- 
-This is the equivalent to the X*Y syntax in fortran. 
- 
-<code> 
-  X*Y 
-</code> 
- 
-will become 
- 
-<code> 
-  !multiplevalue 
-    number : X 
-    value : Y 
-</code> 
- 
-If X is null, it means that you want to do *Y (all Y) 
- 
-===== !range ===== 
- 
-<code> 
-  !range 
-     start: 1 
-     stop: N 
-</code> 
-As a default value, it means that the default value is 1,2, ... N 
- 
-===== !valuewithconditions ===== 
- 
-This type allows to specify conditions on values: 
- 
-<code> 
-!valuewithconditions 
-    defaultval: -[[diemix]] 
-    '70 < [[iprcel]] and [[iprcel]] < 80': '[[diemix]]' 
-    '[[iscf]]<10': '[[diemix]]' 
-    '[[iprcel]]==0': '[[diemix]]' 
-</code> 
- 
-defaultval is the default value if no condition is fulfilled. 
-As condition, please use strings with the most basic expressions, containing <, < =, >, >=, ==, !=, +, -, *, /, etc to allow for further simple parsing ! 
- 
-As a convention, we use "pythonic" way for expressions, so you can use "or", "and" and "in" also as %%[[varname]]%% in [1,2,5] for example ... 
- 
-===== !valuewithunit ===== 
- 
-This type allows to specify values with units: 
-<code> 
- !valuewithunit 
-        units: eV 
-        value: 100.0 
-</code> 
- 
-means "100 eV". 
- 
-===== Constraints between variables ===== 
- 
-In the YML file (and via the GUI), there are some constraints between variables that have been introduced. 
- 
-You can specifiy "requires: CONDITION" and "excludes: CONDITION" in the YML file (or fill the fields requires and excludes in the GUI). 
- 
-If a varname has "requires: CONDITION", it means that the variable is only relevant when CONDITION is fulfilled. 
- 
-If a varname has as "excludes: CONDITION", it means that the specification of the variable in the input file forbids the CONDITION to be fulfilled. 
- 
-===== Strings ===== 
- 
-Pay attention to strings. If it is recognized as string directly, you don't need ticks (' '). 
-Otherwise, you need to put ticks.  
- 
-For example, if you want to use a link as a value, use a link shortcut like <nowiki>[[abivarname]]</nowiki>. See the doc about link shortcuts at [[developers:link_shortcuts]].  
- 
- 
  
developers/abivars.yml.1502172357.txt.gz · Last modified: 2017/08/08 08:05 by Xavier Gonze