File: variables_multibinit.py

package info (click to toggle)
abinit 9.10.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 518,712 kB
  • sloc: xml: 877,568; f90: 577,240; python: 80,760; perl: 7,019; ansic: 4,585; sh: 1,925; javascript: 601; fortran: 557; cpp: 454; objc: 323; makefile: 77; csh: 42; pascal: 31
file content (2184 lines) | stat: -rw-r--r-- 70,783 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
# coding: utf-8
from __future__ import print_function, division, unicode_literals, absolute_import

executable = "multibinit"

from abimkdocs.variables import ValueWithUnit, MultipleValue, Range
#from abipy.abio.abivar_database.variables import ValueWithUnit, MultipleValue, Range, ValueWithConditions
ValueWithConditions = dict
Variable = dict

variables = [
Variable(
    abivarname="dipdip@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="DIPole-DIPole interaction",
    added_in_version="before_v9",
    text=r"""
* 0 --> Do not recompute the dipole-dipole interaction.
* 1 --> Recompute the dipole-dipole interaction based on ewald summation .
""",
),

Variable(
    abivarname="dipdip_prt@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_expert'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="DIPole-DIPole PRinT",
    added_in_version="before_v9",
    text=r"""
* 1 --> Print the dipole-dipole interaction into the XML.
* 0 --> Do not print the dipole-dipole interaction into the XML.
""",
),

Variable(
    abivarname="dipdip_range@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_expert'],
    dimensions=[3],
    defaultval=0,
    mnemonics="Dipole-Dipole range",
    added_in_version="before_v9",
    text=r"""
Depending of the cases, the range of the dipole-dipole interaction will be parameted by:

* dipdip_range if superior to ncell and superior to short-range interaction
* ncell if dipdip_range inferior to ncell
* short-range if dipdip_range inferior to short-range interaction

For example:

    * if dipdip_range = 2 2 2 and the short range interaction if 3 3 3, the dipdip interaction will be set on 3 3 3

    * if ncell = 15 15 15 and the dipdip_range is 6 6 6, the dipdip interaction will be set on 15 15 15
""",
),


Variable(
    abivarname="energy_reference@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['LatticeModel_useful'],
    dimensions="scalar",
    defaultval=0.0,
    mnemonics="Energy of the refences structure",
    characteristics=['[[ENERGY]]'],
    added_in_version="before_v9",
    text=r"""
Set the energy of the reference structure (from the DFT calculation)
if the energy of the reference is not specified in the DDB,
(for example if the DDB file of the ground states is not merged),
or not specified in the XML file), (by default in Hartree).
""",
),

Variable(
    abivarname="lwf_dynamics@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=["LWFModel_basic"],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Lattice Wannier Function DYNAMICS",
    added_in_version="9.8",
    text=r"""
Kind of LWF dynamics to run. Currently there is only the option 3.

* 0: Do not run LWF dynamics.

* 3: Run NVT LWF dynamics with the Berendsen thermalstat. 

""",
),


Variable(
    abivarname="lwf_init_hist_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['LWFModel_basic'],
    dimensions="scalar",
    defaultval="",
    mnemonics="LWF INITIAL state HISTory file name",
    added_in_version="9.8",
    text=r"""
Specify the initial state of the multibinit LWF dynamics calculation, which can be a lwf_hist netcdf file, usually generated from previous LWF dynamics calculations. It is used when [[multibinit:lwf_init_state]]=4 The string must be enclosed between quotation marks, for example:

    lwf_init_hist_fname "last_step_lwf_hist.nc"
""",
),


Variable(
    abivarname="lwf_init_state@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=["LWFModel_basic"],
    dimensions="scalar",
    defaultval=1,
    mnemonics="Lattice Wannier Function INITial STATE",
    added_in_version="before_v9",
    text=r"""
Flag to initialize spin state.

* 1 --> The LWF amplitudes are homogenous random numbers between -0.1 to 0.1 Bohr.

* 2 --> The LWF amplitudes are 0.

* 4 --> Restart from an input spin hist file, as specified in [[multibinit:lwf_init_hist_fname]]. 
""",
),

Variable(
    abivarname="lwf_constraint@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=["LWFModel_expert"],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Lattice Wannier Function use CONSTRAINT",
    added_in_version="9.8",
    text=r"""
    Whether to use constraint in Lattice Wannier function dynamics. The constraints are defined in a LWF initial state file by three parameters:
    n_fixed_lwf: number of fixed LWF.
    fixed_lwf_ids: indices of fixed LWFs.
    fixed_lwf_values: values of fixed LWFs.
""",
),

Variable(
    abivarname="lwf_dt@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['LWFModel_basic'],
    dimensions="scalar",
    defaultval=100,
    mnemonics="Lattice Wannier Function Delta Time",
    added_in_version="9.8",
    text=r"""
Time step for lwf dynamics. Default value is 100.
Default unit is atomic unit (2.419e-17 s).
S, Sec or Second can be appended as unit. (e.g. 1e-16 Sec).
""",
),



Variable(
    abivarname="lwf_nctime@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=["LWFModel_basic"],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Lattice Wannier function dynamics NetCdf write per number of TIME steps",
    added_in_version="before_v9",
    text=r"""
Write LWF amplitude into netcdf file in every lwf_nctime of spin dynamics time steps.
""",
),



Variable(
    abivarname="lwf_ntime@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=["LWFModel_basic"],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Lattice Wannier function dynamics total Number of TIME steps",
    added_in_version="9.8",
    text=r"""
Total number of lattice Wannier function dynamics time steps.
""",
),

Variable(
    abivarname="lwf_pot_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=["LWFModel_basic"],
    dimensions="scalar",
    defaultval="",
    mnemonics="Lattice Wannier function POTential File NAME",
    added_in_version="9.8",
    text=r"""
Specify the LWF potential file name in the multibinit lwf dynamics calculation, which is a netcdf file. The string must be enclosed between quotation marks:

    lwf_pot_fname "BaTiO3_lwf_pot.nc"
"""

),


Variable(
    abivarname="lwf_taut@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LWFModel_basic'],
    dimensions="scalar",
    defaultval=1000,
    mnemonics="Lattice Wannier function dynamics relaxation time TAUT",
    added_in_version="9.8",
    text=r"""
    Parameter used in Berendsen lattice dynamics [[multibinit:lwf_dynamics]] = 3, in which the temperature is relaxed exponentially to the target temperature, with the characteristic time of lwf_taut. 
    The default unit is atomic unit. But it is possible to use the second as the unit by adding Second or S at the end of the line, for example:

    lwf_taut 1d-15 S
""",
),



Variable(
    abivarname="lwf_temperature_start@multibinit",
    varset="multibinit",
    vartype="real",
    topics=["LWFModel_basic"],
    dimensions="scalar",
    defaultval=0.0,
    mnemonics="Lattice Wannier function TEMPERATURE START",
    added_in_version="9.8",
    text=r"""
Start point of variable temperature LWF dynamcis calculation (see [[multibinit:lwf_var_temperature]]) in lwf dynamics calculation.
""",
),

Variable(
    abivarname="lwf_temperature_end@multibinit",
    varset="multibinit",
    vartype="real",
    topics=["LWFModel_basic"],
    dimensions="scalar",
    defaultval=0.0,
    mnemonics="Lattice Wannier function TEMPERATURE END",
    added_in_version="9.8",
    text=r"""
End point of variable temperature LWF dynamics calculation (see [[multibinit:LWF_var_temperature]]) in LWF dynamics calculation.
""",
),

Variable(
    abivarname="lwf_temperature_nstep@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=["LWFModel_basic"],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Lattice Wannier function TEMPERATURE Number of STEPs",
    added_in_version="9.8",
    text=r"""
Number of steps in the variable temperature LWF dynamics calculation (see [[multibinit:lwf_var_temperature]]) in lwf dynamics calculation.
""",
),

Variable(
    abivarname="lwf_var_temperature@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=["LWFModel_basic"],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Lattice Wannier function VARiable TEMPERATURE",
    added_in_version="9.8",
    text=r"""
Switch for variable temperature calculation in LWF dynamics. 0: off. 1: on.
If switched on, a series of LWF dynamics calculation with temperatures from
[[multibinit:lwf_temperature_start]] to [[multibinit:lwf_temperature_end]],
with number of steps [[multibinit:lwf_temperature_nstep]] will be done.
The corresponding _lwf_hist.nc  file has the corresponding temperature in the filename.
""",
),






Variable(
    abivarname="ncoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_useful'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Number of anharmonic COEFFicients",
    added_in_version="before_v9",
    text=r"""
Set the number of anharmonic coefficients in the model. This number have to be in agreement with the number of coefficients present in the XML file.

If ncoeff /= 0, [[multibinit:coefficients]] have to be present in the input files
""",
),

Variable(
    abivarname="coefficients@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['LatticeModel_useful'],
    dimensions=['[[multibinit:ncoeff]]'],
    defaultval=0.0,
    mnemonics="values of the COEFFICIENTS",
    added_in_version="before_v9",
    text=r"""
Set the values of the coefficients present in the XML file
""",
),


Variable(
    abivarname="ngqpt@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_useful'],
    dimensions=[3],
    defaultval="3*1",
    mnemonics="Number of Grids points for Q PoinTs",
    added_in_version="before_v9",
    text=r"""
The Monkhorst-Pack grid linear dimensions, for the DDB (coarse grid).
""",
),

Variable(
    abivarname="nqshft@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_useful'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="Number of Q SHiFTs",
    added_in_version="before_v9",
    text=r"""
The number of vector shifts of the simple Monkhorst and Pack grid, needed to
generate the coarse grid of q points (for the series of fine grids, the number
of shifts it is always taken to be 1). Usually, put it to 1. Use 2 if BCC
sampling (Warning: not BCC lattice, BCC *sampling*), and 4 for FCC sampling
(Warning: not FCC lattice, FCC *sampling*).
""",
),

Variable(
    abivarname="prt_GF_csv@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_expert'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Print the Goal-Function values in a CSV file",
    added_in_version="v9",
    text=r"""
* 0 --> do nothing (Default)
* 1 --> Print the Goal-Function Values (GF) for all coefficients on a given processor
        at a given fit iteration into a csv file. Each iteration each processor
        prints a csv file. The colums are the GF on Energy, Force+Stresses, Forces, Stresses.
""",
),

Variable(
    abivarname="prt_model@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="PRinT the MODEL",
    added_in_version="before_v9",
    text=r"""
* 0  -->  do nothing (Default).
* 1  --> Generate the XML file with:

         * The system definition and the model (Harmonic + Anharmonic) in _model.xml

* 2  --> Generate two XML files with:

         * The system definition and the model (Harmonic) in _sys.XML
         * The model (Anharmonic) in _coeffs.xml

* 3  --> Generate only one XML file with:

         * The system definition and the model (Harmonic) in _sys.XML

* 4  --> Generate only one XML file with:

         * The model (Anharmonic) in _coeffs.xml
""",
),

Variable(
    abivarname="test_prt_ph@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_expert'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Prt test-set evaluation into file ph_test.nc",
    added_in_version="before_v9",
    text=r"""
Flag to activate the printing of the evaluation of the effective potential on to a test set into  a seperate netcdf file called ph_test.nc.

Forces, Energies, Stresses and Atomic Positions are written in ph_test.nc.
""",
),

Variable(
    abivarname="fit_coeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT anharmonic COEFFficients",
    added_in_version="before_v9",
    text=r"""
* 0  --> do not active the fit process

* 1 -->  Activate the fit process. This option will first generate a set of coefficients if [[multibinit:fit_generateCoeff]] is set to one. This generation is mainly parametrized by [[multibinit:fit_rangePower]] and [[multibinit:fit_cutoff]]. You can also provided a list of coefficients with the  model_anharmonic.MXL (see [[help:multibinit]]). Then the fit process will select the coefficients one by one up to [[multibinit:fit_ncoeff]] (see this [[cite:Escorihuela-Sayalero2017|paper]] for the details of the procedure).

* -1 --> **only for developers**, print the files for the scripts
""",
),

Variable(
    abivarname="fit_EFS@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions=[3],
    defaultval=[0,1,1],
    mnemonics="FIT on Energy, Forces, and or, Stresses",
    added_in_version="v9",
    text=r"""
Specifies on which first-principles quantities the anharmonic coefficients will be fitted.
The first number flags the fitting on the energies, the second the fitting on the forces, and the third on the stressses.

Default value is 0 1 1, so anharmonic coefficients get fitted on Forces and Stresses but not on energies
""",
),

Variable(
    abivarname="fit_factors@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['FitProcess_basic'],
    dimensions=[3],
    defaultval=[1,1,1],
    mnemonics="FIT FACTORS for Goal Function of Energy, Forces, and Stresses",
    added_in_version="v9",
    text=r"""
Specifies three factors for Energy, Forces and Stresses in the calcluation of the Goal Function which is to be minimized during the
fit process allowing to change the relative weight of the three quantities.

Default value is 1 1 1, equally balancing energy, forces and stresses.
""",
),

Variable(
    abivarname="fit_ncoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT Number of COEFFicients",
    added_in_version="before_v9",
    text=r"""
Give the number of anharmonic coefficients to add in the model during the fit process
""",
),

Variable(
    abivarname="fit_ncoeff_per_iatom@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT Number of COEFFicients per Irreducible ATOM",
    added_in_version="before_v9",
    text=r"""
Give the number of anharmonic coefficients per symmetric irreducible atom to add during fit process.
[[multibinit:fit_ncoeff]]/(nirred_atoms*fit_ncoeff_per_iatom) gives the number of fitting loops performed during the fit process, where in each loop fit_ncoeff_per_iatom coefficients for each irreducible atom will be added to the anharmonic potential.
""",
),

Variable(
    abivarname="fit_generateCoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="FIT GENERATE anharmonic COEFFicient ",
    added_in_version="before_v9",
    text=r"""
Flag to activate the generation of the anharmonic coefficient for the fit process

**Related variables:** The  power range of the coefficients ([[multibinit:fit_rangePower]]), the cut off of the interactions ([[multibinit:fit_cutoff]]), the flag to add anharmonic strain ([[multibinit:fit_anhaStrain]]), the flag to add phonon strain coupling ([[multibinit:fit_SPCoupling]])
""",
),

Variable(
    abivarname="fit_iatom@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT anharmonic terms around ATOM I",
    added_in_version="before_v9",
    text=r"""Gives the index of the atom in the reference structure around which the anharmonic terms will be generated.
If 0 (default) a loop over all atoms in the reference structure will be perforemed and fit_ncoeff coefficienst will be fitted and selected per atom.
If -1 all possible cross terms will be generated (e.G. (A_x-B_x)^2*(C_y-D_y)^1. This options generates much more terms.
""",
),

Variable(
    abivarname="fit_initializeData@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT INITIALIZE DATA for the fit",
    added_in_version="before_v9",
    text=r"""
Flag to de/activate  the precomputing and  storage of all the data for the fit, it will reduce the computation time but increase a lot the memory...
""",
),

Variable(
    abivarname="fit_rangePower@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions=[2],
    defaultval="3 4",
    mnemonics="FIT RANGE POWER for the coefficients",
    added_in_version="before_v9",
    text=r"""
Set the range of the powers for the anharmonic coefficients
""",
),

Variable(
    abivarname="fit_cutoff@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval="Unit cell",
    mnemonics="FIT CUT-OFF of the anharmonic phonon interaction",
    added_in_version="before_v9",
    text=r"""
Cut-off for the  anharmonic phonon interaction (in Bohr)
""",
),

Variable(
    abivarname="fit_anhaStrain@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT ANHARmonic STRAIN coefficients",
    added_in_version="before_v9",
    text=r"""
Flag to activate the anharmonic strain. This option will add coefficients like  (eta^4)
""",
),

Variable(
    abivarname="fit_SPCoupling@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="FIT anharmonic Strain-Phonon COUPLING coefficients",
    added_in_version="before_v9",
    text=r"""
Flag to activate the strain  phonon coupling. This option will add coefficients like  (Sr-Ti)^1 (eta^4)
""",
),

Variable(
    abivarname="fit_dispterms@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="FIT anharmonic Strain-Phonon COUPLING coefficients",
    added_in_version="before_v9",
    text=r"""
Flag to activate the generation of pure displacement coefficients. This option will generate coefficients like (Sr-Ti)^2*(Sr-O), where only atomic displacements occur.

Default value: 1 -> displacement terms are generated.
""",
),

Variable(
    abivarname="fit_SPC_maxS@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="FIT Strain Phonon Coupling maximum Strain",
    added_in_version="v9",
    text=r"""
Set maximum power of strain body in strain-phonon coupling terms.
""",
),

Variable(
    abivarname="fit_tolMSDE@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT TOLerance on Mean Standard Deviation of the Energy",
    added_in_version="before_v9",
    text=r"""
Tolerance  of the fit based on the Mean Standard Deviation of the Energy in (meV/atm)
""",
),

Variable(
    abivarname="fit_tolMSDS@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT TOLerance on Mean Standard Deviation of the Stresses",
    added_in_version="before_v9",
    text=r"""
Tolerance of the fit based on the Mean Standard Deviation of the Stresses in (eV^2/A^2)
""",
),

Variable(
    abivarname="fit_tolMSDF@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT TOLerance on Mean Standard Deviation of the Forces",
    added_in_version="before_v9",
    text=r"""
Tolerance of the fit based on the Mean Standard Deviation of the  Forces (eV^2/A^2)
""",
),

Variable(
    abivarname="fit_tolMSDFS@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT TOLerance on Mean Standard Deviation of the Forces and Stresses",
    added_in_version="before_v9",
    text=r"""
Tolerance of the fit based on the Mean Standard Deviation of the  Forces and Sressses (eV^2/A^2)
""",
),

Variable(
    abivarname="fit_nfixcoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_expert'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT Number of FIXed COEFFicients",
    added_in_version="before_v9",
    text=r"""
Number of imposed coefficients during the fit process for the model:

* -1 -->  fix all the coefficients

* 0  -->  do not fix coefficients

* n  -->  fix n coefficients (requires [[multibinit:fit_fixcoeff]] input variable)
""",
),

Variable(
    abivarname="fit_fixcoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_expert'],
    dimensions=['[[multibinit:fit_nfixcoeff]]'],
    defaultval=0,
    mnemonics="FIT FIXed COEFFicients",
    added_in_version="before_v9",
    text=r"""
Indices of the imposed coefficients during the fit process for the model:
""",
),


Variable(
    abivarname="fit_nimposecoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_expert'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT Number of IMPOSEd COEFFicients",
    added_in_version="before_v9",
    text=r"""
Number of coefficients imposed with fixed value as in the input xml during the fit process for the model:

* -1 -->  fix all the coefficients

* 0  -->  do not fix coefficients

* n  -->  fix n coefficients (requires [[multibinit:fit_imposecoeff]] input variable)
""",
),

Variable(
    abivarname="fit_imposecoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_expert'],
    dimensions=['[[multibinit:fit_nimposecoeff]]'],
    defaultval=0,
    mnemonics="FIT Number of IMPOSEd COEFFicients",
    added_in_version="before_v9",
    text=r"""
Indices of the imposed coefficients with fixed coefficient value during the fit process for the model.
""",
),

Variable(
    abivarname="fit_nbancoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_expert'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="FIT Number of BANed COEFFicients",
    added_in_version="before_v9",
    text=r"""
Number of imposed coefficients during the fit process of the model:

* 0  -->  do not ban coefficients

* n  -->  ban n coefficients (requires [[multibinit:fit_bancoeff]] input variable)
""",
),

Variable(
    abivarname="fit_bancoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_expert'],
    dimensions=['[[multibinit:fit_nbancoeff]]'],
    defaultval=0,
    mnemonics="FIT BANed COEFFicients",
    added_in_version="before_v9",
    text=r"""
Indices of the banned coefficients during the fit process of the model
""",
),

Variable(
    abivarname="ts_option@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_useful'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="fit Training Set OPTION",
    added_in_version="before_v9",
    text=r"""
* 0 --> the Training is hist from ABINIT

* 1 --> the Training contains -1 * stress  (usualy output from VASP)
""",
),

Variable(
    abivarname="bound_factors@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['FitProcess_basic'],
    dimensions=[3],
    defaultval=[1,1,1],
    mnemonics="FACTORS for Goal Function of Energy, Forces, and Stresses during bounding process",
    added_in_version="v9",
    text=r"""
Specify three factors for Energy, Forces and Stresses in the calculation of the Goal Function which is to be minimized during the
bounding process, allowing to change the relative weights of the three quantities.

Default value is 1 1 1, equally balancing energy, forces and stresses.
""",
),

Variable(
    abivarname="bound_model@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['BoundingProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="BOUND MODEL",
    added_in_version="before_v9",
    text=r"""
Flag to activate the bound process:

* 0 --> Do not activate the bound process

* 1 --> This option will generate all the possible combinations of coefficients from 1 to [[multibinit:bound_maxCoeff]]. Some constrains are imposed during the generation and the fit of the coefficients, they have to be positive and with even power. Finaly, the code will try all the possible combinations and try to find a bounded model.

* 2 -->  **new version** This option will generate a set of coefficients with a power range defined by [[multibinit:bound_rangePower]] and keep only the coefficients with even power. Then the procedure is similar to the fit process with the constrains to only keep positive coefficients. The bound process will select the coefficients one by one up to [[multibinit:bound_maxCoeff]] and try if the model is bound at each step of the process.

**Related variables:1 and 2** The number of maximum additional coefficient in the polynome ([[multibinit:bound_maxCoeff]]), the  power range for the additional coefficients ([[multibinit:bound_rangePower]]), the cut off of the additional interactions ([[multibinit:bound_cutoff]])

*3 --> Check each anharmonic term in the effective potential. If the term contains has a negative coefficient and is even in its displacement or contains odd powers in the displacement generate high order bounding terms of the same combination of displacement within the range of powers defined by the user ([[multibinit:bound_rangePower]]). The coefficients of the added high-order terms are optimized until the precision of the original effective potential is retained.
""",
),

Variable(
    abivarname="bound_maxCoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['BoundingProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="BOUND MAX COEFFicient",
    added_in_version="before_v9",
    text=r"""
Number of maximum additional coefficients for the bound process
""",
),

Variable(
    abivarname="bound_penalty@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['FitProcess_basic'],
    dimensions="scalar",
    defaultval=1.001,
    mnemonics="Goal Function penalty for determination of bounding coefficients",
    added_in_version="v9",
    text=r"""
Relative penalty for the determination of bounding coefficient values. The penalty defines the ration of the goal function before and after adding the coefficient. If the optimum value of the coefficient (-one that decreases the value of the goal function-) is negative a positive value that .
""",
),

Variable(
    abivarname="bound_rangePower@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['BoundingProcess_basic'],
    dimensions=[2],
    defaultval="6,6",
    mnemonics="BOUND RANGE POWER",
    added_in_version="before_v9",
    text=r"""
Range of the power for the additional coefficients in the bound process
""",
),

Variable(
    abivarname="bound_cutoff@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['BoundingProcess_basic'],
    dimensions="scalar",
    defaultval="1 unit cell",
    mnemonics="BOUND CUT OFF",
    added_in_version="before_v9",
    text=r"""
Cut-off for the anharmonic phonon interaction during the bound process (in Bohr)
""",
),


Variable(
    abivarname="bound_anhaStrain@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['BoundingProcess_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="BOUND ANHArmonic STRAIN coefficients",
    added_in_version="before_v9",
    text=r"""
Flag to activate the anharmonic strain. When the bound process will generate the possible coefficients for the fit, if this input variable is set to 1, the generator will consider coefficients like eta^4
""",
),

Variable(
    abivarname="bound_SPCoupling@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['BoundingProcess_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="BOUND Strain Phonon COUPLING coefficients",
    added_in_version="before_v9",
    text=r"""
Flag to activate the strain phonon coupling. When the bound process will generate the possible coefficients for the fit, if this input variable is set to 1, the generator will consider coefficients like (Sr-Ti)^2 eta^2
""",
),

Variable(
    abivarname="bound_cell@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['BoundingProcess_expert'],
    dimensions=[3],
    defaultval="6,6,6",
    mnemonics="BOUND superCELL size for the molecular dynamics",
    added_in_version="before_v9",
    text=r"""
When the process will try a given model, this input variable is used to  set the size of the supercell for the molecular dynamics
""",
),

Variable(
    abivarname="bound_temp@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['BoundingProcess_expert'],
    dimensions="scalar",
    defaultval=500,
    mnemonics="BOUND TEMPerature for the molecular dynamics (in Kelvin)",
    added_in_version="before_v9",
    text=r"""
When the process will try a given model, this input variable is used to set the temperature for the molecular dynamics
""",
),

Variable(
    abivarname="bound_step@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['BoundingProcess_expert'],
    dimensions="scalar",
    defaultval=1000,
    mnemonics="BOUND number of STEP for the molecular dynamics",
    added_in_version="before_v9",
    text=r"""
When the process will try a given model, this input variable is used to set the maximum number of molecular dynamics steps
""",
),

Variable(
    abivarname="dynamics@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Dynamics option for Multibinit",
    added_in_version="before_v9",
    text=r"""
Set the Dynamics option for Multibinit. This option is equivalent to [[abinit:ionmov]] for numbers < 100. For numbers >100, it uses algorithms implemented inside Multibinit:

* 0 --> do nothing

  * 1 --> Move atoms using molecular dynamics with optional viscous damping (friction linearly proportional to velocity). The viscous damping is controlled by the parameter "[[vis]]". If actual undamped molecular dynamics is desired, set [[vis]] to 0. The implemented algorithm is the generalisation of the Numerov technique (6th order), but is NOT invariant upon time-reversal, so that the energy is not conserved. The value [[ionmov]] = 6 will usually be preferred, although the algorithm that is implemented is lower-order. The time step is governed by [[dtion]].
**Purpose:** Molecular dynamics (if [[vis]] = 0), Structural optimization (if
[[vis]] >0)
**Cell optimization:** No (Use [[optcell]] = 0 only)
**Related variables:** Viscous parameter [[vis]], time step [[dtion]], index
of atoms fixed [[iatfix]]

  * 2 --> Conduct structural optimization using the Broyden-Fletcher-Goldfarb-Shanno minimization (BFGS). This is much more efficient for structural optimization than viscous damping, when there are less than about 10 degrees of freedom to optimize. Another version of the BFGS is available with [[ionmov]]==22, and is apparently more robust and efficient than [[ionmov]]==2.
**Purpose:** Structural optimization
**Cell optimization:** Yes (if [[optcell]]/=0)
**Related variables:**

  * 6 --> Molecular dynamics using the Verlet algorithm, see [[cite:Allen1987a]] p 81]. The only related parameter is the time step ([[dtion]]).
**Purpose:** Molecular dynamics
**Cell optimization:** No (Use [[optcell]] = 0 only)
**Related variables:** time step [[dtion]], index of atoms fixed [[iatfix]]

  * 7 --> Quenched Molecular dynamics using the Verlet algorithm, and stopping each atom for which the scalar product of velocity and force is negative. The only related parameter is the time step ([[dtion]]). The goal is not to produce a realistic dynamics, but to go as fast as possible to the minimum. For this purpose, it is advised to set all the masses to the same value (for example, use the Carbon mass, i.e. set [[amu]] to 12 for all type of atoms).
**Purpose:** Structural optimization
**Cell optimization:** No (Use [[optcell]] = 0 only)
**Related variables:** time step [[dtion]], index of atoms fixed [[iatfix]]

  * 9 --> Langevin molecular dynamics.
**Purpose:** Molecular dynamics
**Cell optimization:** No (Use [[optcell]] = 0 only)
**Related variables:** time step ([[dtion]]), temperatures ([[mdtemp]]) and
friction coefficient ([[friction]]).

* 12 --> Isokinetic ensemble molecular dynamics. The equation of motion of the ions in contact with a thermostat are solved with the algorithm proposed by Zhang [J. Chem. Phys. 106, 6102 (1997)], as worked out by Minary et al [J. Chem. Phys. 188, 2510 (2003)]. The conservation of the kinetic energy is obtained within machine precision, at each step.
**Purpose:** Molecular dynamics
**Cell optimization:** No (Use [[optcell]]=0 only)

* 13 --> Isothermal/isenthalpic ensemble. The equation of motion of the ions in contact with a thermostat and a barostat are solved with the algorithm proposed by Martyna, Tuckermann Tobias and Klein [Mol. Phys., 1996, p. 1117].
If optcell=1 or 2, the mass of the barostat ([[bmass]]) must be given in
addition.
**Purpose:** Molecular dynamics
**Cell optimization:** Yes (if [[optcell]]/=0)
**Related variables:** The time step ([[dtion]]), the temperatures
([[mdtemp]]), the number of thermostats ([[nnos]]), and the masses of
thermostats ([[qmass]]).

  * 22 --> Conduct structural optimization using the Limited-memory Broyden-Fletcher-Goldfarb-Shanno minimization (L-BFGS) [[cite:Nocedal1980]]. The working routines were based on the original implementation of J. Nocedal available on netlib.org. This algorithm can be much better than the native implementation of BFGS in ABINIT ([[ionmov]] = 2) when one approaches convergence, perhaps because of better treatment of numerical details.
**Purpose:** Structural optimization
**Cell optimization:** Yes (if [[optcell]]/=0)
**Related variables:**

  * 24 --> Simple constant energy molecular dynamics using the velocity Verlet symplectic algorithm (second order), see [[cite:Hairer2003]]. The only related parameter is the time step ([[dtion]]).
**Purpose:** Molecular dynamics
**Cell optimization:** No (Use [[optcell]] = 0 only)
**Related variables:** time step [[dtion]]

  * 25 --> Hybrid Monte Carlo sampling of the ionic positions at fixed temperature and unit cell geometry (NVT ensemble). The underlying molecular dynamics corresponds to [[ionmov]]=24. The related parameters are the time step ([[dtion]]) and thermostat temperature ([[mdtemp]]).
Within the HMC algorithm [[cite:Duane1987]], the trial states are generated via short $NVE$ trajectories (ten [[ionmov]]=24 steps in current implementation).
 The initial momenta for each trial are randomly sampled from Boltzmann distribution, and the final trajectory state is either accepted or rejected based on the Metropolis criterion.
 Such strategy allows to simultaneously update all reduced coordinates, achieve higher acceptance ratio than classical Metropolis Monte Carlo and better sampling efficiency for shallow energy landscapes [[cite:Prokhorenko2018]].
**Purpose:** Monte Carlo sampling
**Cell optimization:** No (Use [[optcell]] = 0 only)
**Related variables:** time step [[dtion]], thermostat temperature [[mdtemp]],

* 101 --> NVE ensemble with velocity Verlet algorithm  [[cite:Swope1982]] .
**Purpose:** Molecular dynamics
**Cell optimization:** No (Use [[optcell]]=0 only)
**Related variables:** The time step ([[dtion]]), the temperatures
([[multibinit:temperature]]). The time step should be small enough to make the energy conserved. The temperature is set to intialize the velocities of the atoms, which is in principle not preserved during the NVE run.

* 102 --> NVT ensemble with Langevin algorithm. [[cite:Vanden2006]] .
**Purpose:** Molecular dynamics
**Cell optimization:** No (Use [[optcell]]=0 only)
**Related variables:** The time step ([[dtion]]), the temperatures
([[multibinit:temperature]]), the friction [[multibinit:latt_friction]].
The atoms are coupled to the heat bath, which is represented by a gauss noise  in the forces, whose amplitude is defined by the temperature, and a friction term.


* 103 --> NVT ensemble. The temperature is approached by scaling the velocity of atoms. The method is proposed by Berendsen et al. in  J. Chem. Phys., 81 3684–3690 (1984) [[cite:Berendsen1984]]. Note that this method does NOT generate properly the thermostated ensemble. It does not have the correct distribution of the kinetic energy but have the correct average.  However, it approches the target temperature exponentially without oscillation, for which the steps can be easily controlled.
**Purpose:** Molecular dynamics
**Cell optimization:** No (Use [[optcell]]=0 only)
**Related variables:** The time step ([[dtion]]), the temperatures
([[multibinit:temperature]]), the ion relaxation time [[multibinit:latt_taut]].

* 120 --> Dummy mover. Atoms does not move. For testing only.
""",

# Not yet fully implemented. Need to be properly documented and tested. Disactivated temporarily.
#* 104 --> NPT ensemble with method. Similar to option 103, except the pressure is also scaled.
#**Purpose:** Molecular dynamics
#**Cell optimization:** No (Use [[optcell]]=0 only)
#**Related variables:** The time step ([[dtion]]), the temperatures
#([[multibinit:temperature]]), the ion relaxation time [[multibinit:latt_taut]], the pressure relaxation time [[multibinit:latt_taup]].




),

Variable(
    abivarname="dyn_chksym@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="DYNamics CHeK SYMmetry",
    added_in_version="v9",
    text=r"""
Flag to activate symmetry finder and imposition of symmetry of the restart structure before dynamics run, when restartxf is negativ.
Useful to do symmetry constrained relaxation with structural realxations algorithms.
Be cautious to use it with large number of atoms, symmetry detection might take a long time.

**Related variables:** Restart flag for multibinit dynamcis ([[multibinit:restartxf]]), symmetry on symmetry finder ([[multibinit:dyn_tolsym]]))
""",
),

Variable(
    abivarname="dyn_tolsym@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=1e-10,
    mnemonics="DYNamics TOLerance on SYMmetries",
    added_in_version="v9",
    text=r"""
Tolerance on symmetry finder.
**Related variables:** Activation flag for symmetry finder ([[multibinit:dyn_chksym]])
""",
),

Variable(
    abivarname="dtion@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=100,
    mnemonics="Delta Time for IONs",
    added_in_version="before_v9",
    text=r"""
See [[abinit:dtion]]
""",
),

Variable(
    abivarname="latt_friction@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=1e-4,
    mnemonics="LATTice dynamics FRICTION parameter",
    added_in_version="before_v9",
    text=r"""
    Parameter of the friction coefficient used in Langevin dynamics [[multibinit:dynamics]] =102. Typical value is 1e-4 to 1e-2.
""",
),

Variable(
    abivarname="latt_anharm_pot_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval="",
    mnemonics="LATTice HARMornic POTential File NAME",
    added_in_version="9.8",
    text=r"""
Specify the input coefficients from fitted polynomial in multibinit lattice calculation, which can be a xml file. The string must be enclosed between quotation marks:

    lat_anharm_pot_fname "BaTiO3_coeff.xml"

"""
),


Variable(
    abivarname="latt_harm_pot_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval="",
    mnemonics="LATTice HARMonic POTential File NAME",
    added_in_version="9.8",
    text=r"""
Specify the input derivative database of reference structure in multibinit lattice calculation, which can be a DDB file or a xml file. The string must be enclosed between quotation marks:

    latt_harm_pot_fname "BaTiO3.ddb"

"""
),

Variable(
    abivarname="latt_training_set_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval="",
    mnemonics="LATTice potential TRAINING SET File NAME",
    added_in_version="9.3.3",
    text=r"""
Specify the training set file name for building multibinit lattice potential, which is usually a abinit molecular dynamics history  netcdf file. The string must be enclosed between quotation marks:

    latt_training_set_fname "BaTiO3_md_hist.nc"

"""
),

Variable(
    abivarname="latt_test_set_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval="",
    mnemonics="LATTice potential TEST SET File NAME",
    added_in_version="9.8",
    text=r"""
Specify the test set file name for building multibinit lattice potential, which is usually a abinit molecular dynamics history  netcdf file. The string must be enclosed between quotation marks:

    latt_test_set_fname "BaTiO3_md_hist.nc"

"""
),


Variable(
    abivarname="latt_pot_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval="",
    mnemonics="LATTice POTential FileNAME",
    added_in_version="9.8",
    text=r"""
Specify the lattice potential file name in the multibinit lattice dynamics calculation, which can be a netcdf file. This variable is only used in the harmonic-only lattice potential for testing only. The string must be enclosed between quotation marks:

    latt_pot_fname "BaTiO3.nc"
"""
),


Variable(
    abivarname="latt_taut@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=1000,
    mnemonics="LATTice dynamics relaxation time TAUT",
    added_in_version="before_v9",
    text=r"""
    Parameter used in Berendsen lattice dynamics [[multibinit:dynamics]] =102 and 103, in which the temperature is relaxed exponentially to the target temperature, with the characteristic time of latt_taut.
    The default unit is atomic unit. But it is possible to use the second as the unit by adding Second or S at the end of the line, for example:

    latt_taut 1d-15 S

""",
),

Variable(
    abivarname="latt_taup@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=1000,
    mnemonics="LATTice dynamics relaxation time TAUP",
    added_in_version="before_v9",
    text=r"""
    Parameter used in Berendsen lattice dynamics [[multibinit:dynamics]] =103, in which the pressure is relaxed exponentially to the target temperature, with the characteristic time of latt_taup. 
    The default unit is atomic unit. But it is possible to use the second as the unit by adding Second or S at the end of the line, for example:

    latt_taup 1d-15 S


""",
),



Variable(
    abivarname="ntime@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=200,
    mnemonics="Number of TIME step",
    added_in_version="before_v9",
    text=r"""
Number of step for the dynamics.
""",
),

Variable(
    abivarname="nnos@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="Number of NOSe masses",
    added_in_version="before_v9",
    text=r"""
See [[abinit:nnos]]
""",
),

Variable(
    abivarname="qmass@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['DynamicsMultibinit_basic'],
    dimensions=['[[abinit:nnos]]'],
    defaultval=0,
    mnemonics="Q thermostat MASS",
    added_in_version="before_v9",
    text=r"""
See [[abinit:qmass]]
""",
),

Variable(
    abivarname="nctime@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="NetCdf TIME between output of molecular dynamics informations ",
    added_in_version="before_v9",
    text=r"""
Set the number of step between output the molecular dynamics informations in the NetCDF file
""",
),

Variable(
    abivarname="temperature@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=325,
    mnemonics="molecular dynamics TEMPERATURE (in Kelvin)",
    added_in_version="before_v9",
    text=r"""
Give the temperature of the dynamics in Kelvin
""",
),

Variable(
    abivarname="ncell@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions=[3],
    defaultval=[6,6,6],
    mnemonics="Number of Cell",
    added_in_version="before_v9",
    text=r"""
Give the size of the supercell for the dynamics
""",
),

Variable(
    abivarname="ncellmat@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions=[3, 3],
    defaultval=[[1,0,0],[0,1,0], [0,0,1]],
    mnemonics="Number of superCELL MATtrix",
    added_in_version="9.5.0",
    text=r"""
Give the size of the supercell for the dynamics in the format of a matrix. 
Currently allowed in spin dynamics and spin and LWF dynamics. 
It will override the [[multibinit:ncell]] if specified.
"""
),

Variable(
    abivarname="outdata_prefix",
    varset="multibinit",
    vartype="string",
    topics=['Control_useful'],
    dimensions="scalar",
    defaultval=None,
    mnemonics="OUTput DATA PREFIX",
    added_in_version="9.3.3",
    text=r"""
Prefix for output files. Replaces the analogous entry in the obsolete *files_file* .
This variable is used when Abinit is executed with the new syntax:

    multibinit run.abi > run.log 2> run.err &

If this option is not specified, a prefix is automatically constructed from the input file name
provided the filename ends with an extension, e.g. `.ext`. (`.abi` is recommended)
If the input filename does not have a file extension, a default is provided.
"""
),


Variable(
    abivarname="strfact@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=100.0,
    mnemonics="STRess FACTor",
    added_in_version="v9.1",
    text=r"""
See [[abinit:strfact]]
""",
),

Variable(
    abivarname="strtarget@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['DynamicsMultibinit_basic'],
    dimensions=[6],
    defaultval=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
    mnemonics="STRess TARGET",
    added_in_version="before_v9",
    text=r"""
See [[abinit:strtarget]]
""",
),

Variable(
    abivarname="bmass@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=10,
    mnemonics="Barostat MASS",
    added_in_version="before_v9",
    text=r"""
See [[abinit:bmass]]
""",
),

Variable(
    abivarname="optcell@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="OPTimize the CELL shape and dimensions",
    added_in_version="before_v9",
    text=r"""
See [[abinit:optcell]]
""",
),

Variable(
    abivarname="restartxf@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="RESTART from (X,F) history",
    added_in_version="before_v9",
    text=r"""
See [[abinit:restartxf]]
""",
),

Variable(
    abivarname="sel_EFS@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_basic'],
    dimensions=[3],
    defaultval=[0,1,1],
    added_in_version="v9",
    mnemonics="Select on Energy, Forces, and or, Stresses",
    text=r"""
Specifies on which goal function quantities the anharmonic coefficients will be selected.
The first number flags the selecting on the energies, the second the fitting on the forces, and the third on the stressses.

Default value is 0 1 1, so anharmonic coefficients get selected on Forces and Stresses but not on energies
""",
),

# The below are not yet functioning, comment out temporarily.
#Variable(
#    abivarname="spin_calc_correlation_obs@multibinit",
#    varset="multibinit",
#    vartype="integer",
#    topics=['SpinDynamicsMultibinit_basic'],
#    dimensions="scalar",
#    defaultval=0,
#    mnemonics="SPIN CALCulate CORRELATION OBServables",
#    added_in_version="before_v9",
#    text=r"""
#Flag to calculate spin correlation function based observables.
#
#* 0 --> do not calculate.
#
#* 1 --> calculate.
#""",
#),
#
#
#Variable(
#    abivarname="spin_calc_traj_obs@multibinit",
#    varset="multibinit",
#    vartype="integer",
#    topics=['SpinDynamicsMultibinit_basic'],
#    dimensions="scalar",
#    defaultval=0,
#    mnemonics="SPIN CALCulate TRAJectory based OBServables",
#    added_in_version="before_v9",
#    text=r"""
#Flag to calculate spin trajectory based observables. (Nothing included yet.)
#
#* 0 --> do not calculate.
#
#* 1 --> calculate.
#""",
#),

Variable(
    abivarname="spin_calc_thermo_obs@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="SPIN CALCulate THERMO dynamics OBServables",
    added_in_version="before_v9",
    text=r"""
Flag to calculate spin thermo dynamics observables,
including the specific heat, magnetic susceptibility, Binder U4 value.
It's recommend to always calculate these observables.

* 0 --> do not calculate.

* 1 --> calculate.
""",
),


Variable(
    abivarname="spin_damping@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=-1.0,
    mnemonics="SPIN gilbert DAMPING factor",
    added_in_version="before_v9",
    text=r"""
Gilbert damping factor in LLG equation for spin dynamics.

* negative value --> use damping factor from spin xml file.

* positive value --> use as damping factor. The value should be between 0.0 and 1.0 (both included).
""",
),

#Variable(
#    abivarname="spin_dipdip@multibinit",
#    varset="multibinit",
#    vartype="integer",
#    topics=['SpinDynamicsMultibinit_basic'],
#    dimensions="scalar",
#    defaultval=0,
#    mnemonics="SPIN DIPole DIPole interaction",
#    added_in_version="before_v9",
#    text=r"""
#* 0 --> Switch off spin dipole-dipole interaction.
#
#* 1 --> Switch on spin dipole-dipole interaction.
#    (Not yet implemented.)
#""",
#),

Variable(
    abivarname="spin_dt@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=100,
    mnemonics="SPIN Delta Time",
    added_in_version="before_v9",
    text=r"""
Time step for spin dynamics. Default value is 100.
Default unit is atomic unit (2.419e-17 s).
S, Sec or Second can be appended as unit. (e.g. 1e-16 Sec).
""",
),


Variable(
    abivarname="spin_dynamics@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="SPIN DYNAMICS",
    added_in_version="before_v9",
    text=r"""
Flag to run spin dynamics.

* 0 --> Do not run spin dynamics.

* 1 --> Run spin dynamics with HeunP integration method.

* 2 --> Run spin dynamics with Depondt-Mertens method [[cite:Depondt2009]].

* 3 --> Run Monte Carlo.

* 20 --> Dummy mover. Spin will not rotate. For test only.

The HeunP method does less computation for each step,
whereas the Depondt-Mertens method allow larger time step.
For system with very simple interaction terms, HeunP could be faster.
Otherwise, use Depondt-Mertens method can be more efficient.
""",
),

Variable(
    abivarname="spin_init_hist_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval="",
    mnemonics="SPIN INITIAL state HISTory file name",
    added_in_version="9.3.3",
    text=r"""
Specify the initial state of the multibinit spin dynamics calculation, which can be a spin_hist netcdf file, usually generated from previous spin dynamics calculations. It is used when [[multibinit:spin_init_state]]=4 The string must be enclosed between quotation marks, for example:

    spin_init_hist_fname "last_step_spin_hist.nc"
"""

),



Variable(
    abivarname="spin_init_state@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="SPIN INITial STATE",
    added_in_version="before_v9",
    text=r"""
Flag to initialize spin state.

* 1 --> Random spin state using uniform random numbers.

* 2 --> Reference spin state from potential file if present.

* 3 --> State with q-vector using [[multibinit:spin_init_qpoint]], [[multibinit:spin_init_rotate_axis]], and [[multibinit:spin_init_orientation]]. Please check default values for those variables.

* 4 --> Restart from last step of input spin hist file, as specified in [[multibinit:spin_init_hist_fname]]. 
""",
),


Variable(
    abivarname="spin_mag_field@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions=[3],
    defaultval=[0,0,0],
    mnemonics="SPIN Magnetic Field",
    added_in_version="before_v9",
    text=r"""
External magnetic field. Unit: Tesla.
""",
),


Variable(
    abivarname="spin_nctime@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="SPIN NetCdf write per number of TIME steps",
    added_in_version="before_v9",
    text=r"""
Write spin into netcdf file in every spin_nctime of spin dynamics time steps.
""",
),

Variable(
    abivarname="spin_ntime@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="SPIN dynamics total Number of TIME steps",
    added_in_version="before_v9",
    text=r"""
Total number of spin dynamics time  steps.
""",
),


Variable(
    abivarname="spin_ntime_pre@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="SPIN dynamics total Number of TIME steps for PREparing",
    added_in_version="before_v9",
    text=r"""
Total number of spin dynamics time  steps for preparing the system.
The results of these time step are not written to trajectory spinhist.nc file,
And they are not used for calculating the observables.
""",
),


Variable(
    abivarname="spin_init_orientation@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions=[3],
    defaultval=[0,0,1],
    mnemonics="SPIN INITial ORIENTATION",
    added_in_version="before_v9",
    text=r"""
Spin initial orientation. It is used for setting the initial spin in a supercell.
    For a spin in a cell labeled with R, the rotation angle is $2\pi Q\cdot R$
    from the initial orientation along the rotate axis.
    Default is along z(0,0,1) direction.
""",
),




Variable(
    abivarname="spin_init_qpoint@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions=[3],
    defaultval=[0,0,0],
    mnemonics="SPIN INITial QPOINT",
    added_in_version="before_v9",
    text=r"""
Spin wave vector. It is used for setting the initial spin in a supercell.
    For a spin in a cell labeled with R, the rotation angle is $2\pi Q\cdot R$
    from the initial orientation along the rotate axis.
    Default is Gamma (0, 0, 0).
""",
),



Variable(
    abivarname="spin_init_rotate_axis@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions=[3],
    defaultval=[1,0,0],
    mnemonics="SPIN INITial ROTATE AXIS",
    added_in_version="before_v9",
    text=r"""
Spin initial rotate axis. It is used for setting the initial spin in a supercell.
    For a spin in a cell labeled with R, the rotation angle is $2\pi Q\cdot R$
    from the initial orientation along the rotate axis.
    Default is along x axis (1,0,0).
""",
),

Variable(
    abivarname="spin_pot_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval="",
    mnemonics="SPIN POTential File NAME",
    added_in_version="9.3.3",
    text=r"""
Specify the spin potential file name in the multibinit spin dynamics calculation, which can be either a xml or a netcdf file. The string must be enclosed between quotation marks:

    spin_pot_fname "Fe.xml"
"""

),

Variable(
    abivarname="spin_projection_qpoint@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions=[3],
    defaultval=[0,0,0],
    mnemonics="SPIN PROJECTION QPOINT",
    added_in_version="before_v9",
    text=r"""
Spin wave vector. It is used for getting the total spin. $M_{tot}=\sum_i M_i exp(i q \cdot R_i)$. The unit is the reciprocal lattice vectors of the unitcell.
    Default is Gamma. (0, 0, 0)
""",
),


Variable(
    abivarname="spin_sia_add@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="SPIN Single Ion Anistropy ADD",
    added_in_version="before_v9",
    text=r"""
Add single ion anisotropy term to the spin model hamiltonian.
with user defined values (see [[multibinit:spin_sia_k1amp]] and [[multibinit:spin_sia_k1dir]].

* 0 --> Do not add, use the term defined in the spin model xml file.

* 1 --> Override the term in spin model xml file.

* 2 --> Add to the value defined in spin model xml file.

Default value: 0.
""",
),


Variable(
    abivarname="spin_sia_k1amp@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0.0,
    mnemonics="SPIN Single Ion Anistropy K1 AMPtitude",
    added_in_version="before_v9",
    text=r"""
User defined amplitude of single ion anistropy. Only used when [[multibinit:spin_sia_add]] is not 0.
The direction is defined with [[multibinit:spin_sia_k1dir]]. The unit is Ha. To use eV or Ry as unit,
put eV or Ry at the end.
""",
),


Variable(
    abivarname="spin_sia_k1dir@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions=[3],
    defaultval=[0.0,0.0,1.0],
    mnemonics="SPIN Single Ion Anistropy K1 DIRection",
    added_in_version="before_v9",
    text=r"""
User defined direction of single ion anistropy. Only used when [[multibinit:spin_sia_add]] is not 0.
It will be automatically normalized to 1.0.  The amplitude is defined with [[multibinit:spin_sia_k1amp]].
Default value: [0.0, 0.0,1.0].
""",
),


Variable(
    abivarname="spin_temperature@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=325,
    mnemonics="SPIN TEMPERATURE",
    added_in_version="before_v9",
    text=r"""
Temperature of spin for spin dynamics. Unit: Kelvin.
Default value: 325.
""",
),


Variable(
    abivarname="spin_var_temperature@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="SPIN  VARiable TEMPERATURE",
    added_in_version="before_v9",
    text=r"""
Switch for variable temperature calculation. 0: off. 1: on.
If switched on, a series of spin dynamics calculation with temperatures from
[[multibinit:spin_temperature_start]] to [[multibinit:spin_temperature_end]],
with number of steps [[multibinit:spin_temperature_nstep]] will be done.
The corresponding _spinhist.nc  file has the corresponding temperature in the filename.
""",
),


Variable(
    abivarname="spin_write_traj@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=1,
    mnemonics="SPIN WRITE TRAJectory to spinhist.nc file",
    added_in_version="before_v9",
    text="""
Switch for writting of spin trajectory file. 0: off. 1 on.
The trajectory is needed for postprocessing of correlation functions.
""",
),


Variable(
    abivarname="spin_temperature_start@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0.0,
    mnemonics="SPIN TEMPERATURE START",
    added_in_version="before_v9",
    text=r"""
Start point of variable temperature spin dynamcis calculation (see [[multibinit:spin_var_temperature]]) in spin dynamics calculation.
""",
),

Variable(
    abivarname="spin_temperature_end@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0.0,
    mnemonics="SPIN TEMPERATURE END",
    added_in_version="before_v9",
    text=r"""
End point of variable temperature spin dynamics calculation (see [[multibinit:spin_var_temperature]]) in spin dynamics calculation.
""",
),

Variable(
    abivarname="spin_temperature_nstep@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="SPIN TEMPERATURE Number of STEPs",
    added_in_version="before_v9",
    text=r"""
Number of steps in the variable temperature spin dynamics calculation (see [[multibinit:spin_var_temperature]]) in spin dynamics calculation.
""",
),

Variable(
    abivarname="test_effpot@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="TEST EFFective POTential",
    added_in_version="before_v9",
    text=r"""
* 0 --> nothing.
* 1 --> Evaluate the effective potential with respect to given test-set and calculate mean square differences between ab-initio energy/forces and model energy/forces
""",
),

Variable(
    abivarname="tolmxf@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['DynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=2e-5,
    mnemonics="TOLerance on the MaXimal Force",
    added_in_version="v9",
    text=r"""
Sets a maximal absolute force tolerance (in hartree/Bohr) below which BFGS structural relaxation iterations will stop. Corresponds to [[tolmxf]] of Abinit.
""",
),


Variable(
abivarname="analyze_anh_pot@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['LatticeModel_expert'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="ANALYZE ANHarmonic POTential",
    added_in_version="before_v9",
    text=r"""
* 0 --> Nothing.
* 1 --> Print energy contribution of each anharmonic term in the effective Potential.
        If it is a Molecular Dynamics (MD) run, the contribution of each term is printed for each MD-step into MD_anharmonic_terms_energy.dat .
        If the effective potential is tested against a test set the contribution of each term for each configuration in the test set is printed in TES_anharmonic_terms_energy.dat .
        If the effective potential is fitted, the contribution of each selected term for each configuration in the training set is printed in TRS_anharmonic_terms_energy.dat
""",
),


Variable(
    abivarname="opt_effpot@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_expert'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="OPTimize EFFective POTential",
    added_in_version="before_v9",
    text=r"""
* 0 --> Nothing.
* 1 --> Turn on reading of optimization of effective potential keywords (opt_).
        The optimization process gives the user the ability to refit the coefficients of specified terms with respect to the training set while keeping the rest fixed.

**Related variables:** The number of coefficients to refit ([[multibinit:opt_ncoeff]]), the  indices of the coefficients to optimize ([[multibinit:opt_coeff]]).
""",
),

Variable(
    abivarname="opt_factors@multibinit",
    varset="multibinit",
    vartype="real",
    topics=['FitProcess_basic'],
    dimensions=[3],
    defaultval=[1,1,1],
    mnemonics="FACTORS for Goal Function of Energy, Forces, and Stresses during optimization of coefficients",
    added_in_version="v9",
    text=r"""
Specifies three factors for Energy, Forces and Stresses in the calcluation of the Goal Function which is to be minimized during the
optimization process allowing to change the relative weight of the three quantities.

Default value is 1 1 1, equally balancing energy, forces and stresses.
""",
),

Variable(
  abivarname="opt_ncoeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_expert'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="OPTimize NUMBER of COEFFicients",
    added_in_version="before_v9",
    text=r"""
* Number of anharmonic terms to refit in the effective potential.
**Related variables:** [[multibinit:opt_coeff]]
""",
),

Variable(
    abivarname="opt_coeff@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['FitProcess_expert'],
    dimensions=['[[multibinit:opt_ncoeff]]'],
    defaultval=0,
    mnemonics="OPTimize Cofficients",
    added_in_version="before_v9",
    text=r"""
Indices of the terms to refit in the effective potential.
""",
),

Variable(
    abivarname="randomseed@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_expert'],
    dimensions='scalar',
    defaultval=0,
    mnemonics="RANDOM SEED",
    added_in_version="9.8",
    text=r"""
Random seed to be used in Multibinit spin/LWF dynamics. 
It should be 0, or a large positive integer.
The default value 0 means it will use the current clock time.
DO NOT set this number unless you want to repeat the previous result. If a series
of dynamics is done with the same seed, the results could be wrong due to the
artificial periodicity of the random number that is generated. Even [[randomseed@multibinit]] is set, it is not guranteed
that the previous result can be recovered, as the generation of numbers is also affected by the number of 
processors, type of type of CPU, compiler,  and version of MULTIBINIT. 
""",
),



Variable(
    abivarname="slc_coupling@multibinit",
    varset="multibinit",
    vartype="integer",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval=0,
    mnemonics="SpinLatticeCoupling_Coupling",
    added_in_version="9.0.0",
    text=r"""
Which spin-lattice coupling terms are used in the calculation, different terms can be combined in a binary fashion, i.e. 1010 turns on all terms quadratic in spin.

* 0    --> No coupling.

* 0001 --> Coupling term linear in spin and lattice coordinate

* 0010 --> Coupling term quadratic in spin and linear in lattice coordinate

* 0100 --> Coupling term linear in spin and quadratic in lattice coordinate

* 1000 --> Coupling term quadratic in spin and lattice coordinate
""",
),

Variable(
    abivarname="slc_pot_fname@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['SpinDynamicsMultibinit_basic'],
    dimensions="scalar",
    defaultval="",
    mnemonics="SLC POTential FileNAME",
    added_in_version="9.3.3",
    text=r"""
Specify the spin-lattice-coupling potential file name in the coupled spin-lattice multibinit dynamics calculation, which can be a netcdf file. The string must be enclosed between quotation marks:

    slc_pot_fname "BaTiO3_slc.nc"
"""

),

Variable(
    abivarname="outdata_prefix@multibinit",
    varset="multibinit",
    vartype="string",
    topics=['Control_useful'],
    dimensions="scalar",
    defaultval=None,
    mnemonics="OUTput DATA PREFIX",
    added_in_version="9.8.0",
    text=r"""
Prefix for output files. Replaces the analogous entry in the obsolete *files_file* .
This variable is used when MULTIBINIT is executed with the new syntax:

    multibinit run.abi > run.log 2> run.err &

If this option is not specified, a prefix is automatically constructed from the input file name
provided the filename ends with an extension, e.g. `.ext`. (`.abi` is recommended)
If the input filename does not have a file extension, a default is provided.

Example:

    outdata_prefix = "t01_o"

See also [[outdata_prefix@abinit]] and [[outdata_prefix@anaddb]]

"""
),





]