File: gateway.rst

package info (click to toggle)
openmolcas 25.02-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 170,204 kB
  • sloc: f90: 498,088; fortran: 139,779; python: 13,587; ansic: 5,745; sh: 745; javascript: 660; pascal: 460; perl: 325; makefile: 17
file content (2469 lines) | stat: -rw-r--r-- 119,066 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
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
.. index::
   single: Program; Gateway
   single: Gateway

.. _UG\:sec\:gateway:

:program:`gateway`
==================

.. only:: html

  .. contents::
     :local:
     :backlinks: none

.. xmldoc:: <MODULE NAME="GATEWAY">
            %%Description:
            <HELP>
            The Gateway module collects information about molecular
            system (geometry, basis sets, symmetry) to be used for future calculations.
            Note that there are two input styles - the old style format and the new XYZ format.
            The input can also contain an embedded reaction field input (starts with the
            "RF-input" keyword and terminates with the "End of RF-input" keyword). Keywords below
            carrying a "(RF)" are associated with that embedded RF-input section.
            Gateway also controls options associated with auxiliary basis sets to be used
            in density fitting procedures.
            </HELP>

The Gateway module collects information about molecular
system (geometry, basis sets, symmetry) to be used for future calculations.

Gateway module is a subset of :program:`seward`. All keywords
for this module can also appear as an input for :program:`SEWARD`, however,
for clarity the information about molecular system can be placed
as an input for this module. Note, that :program:`gateway` does not
compute any integral, and so must be followed by run of :program:`SEWARD`
module.

:program:`GATEWAY` destroys the communication file :file:`RUNFILE`,
if it is used in a combination with geometry optimization it should run
outside the optimization loop.

Input
-----

This sections will describe the various possible input blocks in :program:`Gateway`.
These control

* the molecular structure (coordinates, symmetry and basis sets),
* explicit auxiliary basis sets in terms of CD basis sets (aCD and acCD) or
  external auxiliary basis sets,
* parameters for reaction field calculations, i.e. parameters for the Kirkwood model
  or the PCM model and options for Pauli repulsion integral and external field integrals,
* options for finite nuclear charge distribution models in association with relativistic calculations, and
* the option to use the Saddle method to locate transitions state geometries.

The :program:`Gateway` input section always starts with the program reference: ::

  &GATEWAY

General keywords
................

.. class:: keywordlist

:kword:`TITLE`
  The keyword followed by a title.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="TITLE" APPEAR="Title" KIND="CUSTOM" LEVEL="BASIC">
              %%Keyword: TITLE <basic>
              <HELP>
              The keyword followed by a title
              </HELP>
              </KEYWORD>

:kword:`TEST`
  :program:`GATEWAY` will only process the input and generate a non-zero return code.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="TEST" APPEAR="Test" KIND="SINGLE" LEVEL="BASIC">
              %%Keyword: Test <basic>
              <HELP>
              GATEWAY will only process the input and generate a non-zero
              return code.
              </HELP>
              </KEYWORD>

:kword:`EXPErt`
  Activates "expert mode", in which various default settings are
  altered. This will, for example, allow the user to combine
  relativistic and non-relativistic basis sets.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="EXPE" APPEAR="Expert mode" KIND="SINGLE" LEVEL="ADVANCED">
              %%Keyword: Expert <advanced>
              <HELP>
              Activates "expert mode", in which various default settings are
              altered. This will, for example, allow the user to combine
              relativistic and non-relativistic basis sets.
              </HELP>
              </KEYWORD>

:kword:`BASDIR`
  The keyword allows to set up an extra location for basis set files.
  The value can be either an absolute path (started from /) or relative to
  submit directory, e.g. BASDIR=.
  In order to use a local copy of a basis set file with name FOO --- place
  this file into directory specified in BASDIR

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="BASDIR" APPEAR="BasDir" KIND="STRING" LEVEL="BASIC">
              %%Keyword: BASDIR <basic>
              <HELP>
              The keyword allows to set up an extra location for basis set files.
              The value can be either an absolute path (started from /) or relative to
              submit directory, e.g. BASDIR=.
              In order to use a local copy of a basis set file with name FOO - place
              this file into directory specified in BASDIR
              </HELP>
              </KEYWORD>

:kword:`BASLIB`
  The keyword followed by the absolute path to the basis set library directory. The default
  is the :file:`$MOLCAS/basis_library` directory. Note that this directory must also be host to
  local copies of the .tbl files.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="BASLIB" APPEAR="BasLib" KIND="STRING" LEVEL="BASIC">
              %%Keyword: BASLIB <basic>
              <HELP>
              The keyword followed by the absolute path to the basis set library directory. The default
              is the $MOLCAS/basis_library directory. Note that this directory must also be host to
              local copies of the .tbl files.
              </HELP>
              </KEYWORD>

:kword:`RTRN`
  Max number of atoms for which bond lengths, angles and dihedral
  angles are listed, and
  the radius defining the maximum length of a bond follows on
  the next line. The latter is used as a threshold when printing out
  angles and dihedral angles. The length can be followed by
  :kword:`bohr` or
  :kword:`angstrom` which indicates the unit in which the length
  was specified, the default is
  :kword:`bohr`.
  The default values are 15 and 3.0 au.

  .. xmldoc:: %%Keyword: RTRN <advanced>
              Max number of atoms for which bond lengths, angles and dihedral
              angles are listed, and
              the radius defining the maximum length of a bond follows on
              the next line. The latter is used as a threshold when printing out
              angles and dihedral angles. The length can be followed by
              "bohr" or "angstrom" which indicates the unit in which the length
              was specified, the default is "bohr".
              The default values are 15 and 3.0 au.

:kword:`ISOTopes`
  Specify isotopic substitutions or atomic masses. By default, the mass of the most
  abundant or stable isotope is used for each atom. With this keyword different
  isotopes or arbitrary masses can be chosen. The keyword is followed by the number
  :math:`n` of isotopic specifications, and then by :math:`n` lines. Each of these
  lines should contain the symmetry-unique index of the atom for which the default
  mass is to be modified and either the mass number of the desired isotope (tabulated
  masses for most known isotopes are available in the code, use ``0`` for the default
  isotope) or the desired mass in dalton, in the latter case the keyword :kword:`Dalton`
  should follow. Note that all atoms belonging to the same "center type" must have the
  same mass. This usually means all atoms of a given element with the same basis set.
  If more fine-grained specifications are wanted, additional center types must be
  created by using several :kword:`BASIs Set` blocks for the same element (native
  input) or by using labels (XYZ input).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ISOTOPES" APPEAR="Isotopic specification" KIND="CUSTOM" LEVEL="ADVANCED">
              %%Keyword: Isotopes <advanced>
              <HELP>
              Specifies isotopes or masses. First write the number of atom masses to change,
              then that number of lines, on each: the symmetry-unique index of the atom and
              (a) the mass number of the isotope, or (b) the mass in dalton and the word DALTON.
              </HELP>
              </KEYWORD>

:kword:`ECPShow`
  Force :program:`GATEWAY` to print ECP parameters.

  .. xmldoc:: <GROUP MODULE="GATEWAY" KIND="BOX" NAME="PROPT" APPEAR="Print options" LEVEL="BASIC">

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ECPS" APPEAR="Print ECP info" KIND="SINGLE" LEVEL="BASIC">
              %%Keyword: ECPSHOW <basic>
              <HELP>
              Force GATEWAY to print ECP parameters.
              </HELP>
              </KEYWORD>

:kword:`AUXShow`
  Force :program:`GATEWAY` to print auxiliary basis set parameters.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="AUXS" APPEAR="Print auxiliary basis info" KIND="SINGLE" LEVEL="BASIC">
              %%Keyword: AUXSHOW <basic>
              <HELP>
              Force GATEWAY to print auxiliary basis set parameters.
              </HELP>
              </KEYWORD>

:kword:`BSSHow`
  Force :program:`GATEWAY` to print basis set parameters.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="BSSH" APPEAR="Print basis info" KIND="SINGLE" LEVEL="BASIC">
              %%Keyword: BSSHOW <basic>
              <HELP>
              Force GATEWAY to print basis set parameters.
              </HELP>
              </KEYWORD>

:kword:`VERBose`
  Force :program:`GATEWAY` to print a bit more verbose.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="VERB" APPEAR="Verbose output" KIND="SINGLE" LEVEL="BASIC">
              %%Keyword: Verbose <basic>
              <HELP>
              Force GATEWAY to print a bit more verbose.
              </HELP>
              </KEYWORD>

  .. xmldoc:: </GROUP>

Molecular structure: coordinates, symmetry and basis sets
.........................................................

There are three different ways to specify the molecular structure, symmetry and
the basis sets in :program:`Gateway`:

* XYZ input,
* the so-called native input (old |molcas| standard).

.. * XYZ input, and
   * Z-matrix input.

Note that only XYZ input for :program:`Gateway` is supported by Graphical User interface.
:program:`Gateway` makes a decision about the type of the input based on keywords.
If :kword:`Coord` is used, it assumes that the input is in XYZ format.

.. , if :kword:`ZMAT` is used,
   it assumes Z-matrix input.

The three different modes will be described below.

Z-matrix and XYZ input
::::::::::::::::::::::

Some times it is more convenient to set up information about coordinates in
a standard form of Z-matrix or Cartesian coordinates. In this case,
the basis set for the atoms should be specified after the :kword:`XBAS`
keyword. After that either :kword:`ZMAT` or :kword:`XYZ` should appear
to specify the coordinates.
Note that coordinates in these formats use ångström as units.

.. class:: keywordlist

:kword:`XBAS`
  A keyword to specify the basis for atoms. The specification is very similar
  to the native format: ``ATOM.BasisSet``. Each new atom is written at a new line.
  The end of the keyword is marked by an :kword:`End of basis` line.

  If all atoms have the same basis, e.g. ANO-S-VDZ, it is possible to use
  this name without element name. In this case there is no need to specify
  :kword:`End of basis`.

  .. compound::

    Example: ::

      XBAS=STO-3G

    or ::

      XBAS
      C.STO-3G
      H.STO-3G
      End of basis

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="XBAS" APPEAR="Basis set (alternate format)" KIND="CUSTOM" LEVEL="ADVANCED">
              %%Keyword: XBAS <basic>
              <HELP>
              A keyword to specify the basis for atoms. The specification is very similar
              to the native format: ATOM.BasisSet. Each new atom is written at a new line.
              The end of the keyword is marked by an 'End of basis' line.
              </HELP>

              If all atoms have the same basis, e.g. ANO-S-VDZ, it is possible to use
              this name without element name. In this case there is no need to specify
              'End of basis'.
              </KEYWORD>

:kword:`ZMAT`
  Alternative format to give coordinates in terms of bond lengths,
  bond angles, and dihedral angles.
  Each line of a Z-matrix gives the
  internal coordinates for one of the atoms within the molecule with the following
  syntax:

  .. container:: list

    **Name  I bond-length  J bond-angle  K dihedral-angle**

    **Name** is the label (atomic symbol + string) for a symmetry distinct center L;

    **I bond-length** distance of L from atom I;

    **J bond-angle** planar angle between atoms L--I--J;

    **K dihedral-angle** dihedral angle between atoms L--I--J--K.

  Note that the first atom only requires the **Name** and defines the origin of
  Cartesian axis.
  The second atom requires **Name  I bond-length** and it will define the Z axis.
  The third atom requires **Name  I bond-length  J bond-angle** and defines the
  XZ plane (and implicitly, the Y axis).

  Only numerical values must be used (no variable names) and ångströms
  and degrees are assumed as units.

  Two types of special atoms are allowed: *dummy* **X** atoms and
  *ghost* **Z** atoms. The former will appear in the calculations,
  they have a nuclear charge of 0 and have not electrons and Basis Set.
  They will also appear in the definition of internal coordinates in :program:`SLAPAF`.
  The latter are used only within the Z-Matrix definition of the geometry but
  they will appear in the final Z-matrix section in :program:`SLAPAF`.
  Both special atoms can be used to define the Cartesian axis and the symmetry elements.

  **End of ZMAT** or a blank line mark the end of the section.

  Here is an example for (S)-1-chloroethanol (:math:`C_1` symmetry): ::

    XBAS
    H.ANO-L...2s1p.
    C.ANO-L...3s2p1d.
    O.ANO-L...3s2p1d.
    Cl.ECP.Huzinaga.7s7p1d.1s2p1d.7e-NR-AIMP.
    End of basis
    ZMAT
    C1
    O2      1   1.40000
    C3      1   1.45000   2   109.471
    H4      1   1.08900   2   109.471     3   120.000
    Cl5     1   1.75000   2   109.471     3  -120.000
    H6      2   0.94700   1   109.471     3   180.000
    H7      3   1.08900   1   109.471     2   180.000
    H8      3   1.08900   1   109.471     7   120.000
    H9      3   1.08900   1   109.471     7   240.000
    End of z-matrix

  In geometry optimizations, :program:`SLAPAF` will regenerate the coordinates as
  Z-matrix in the section with the summary concerning each iteration. This will
  be possible only if *ghost* atoms are used within the first three atoms or
  if they are not used at all.

  Both :kword:`BASIs` and :kword:`ZMAT` keywords can be used at the same time. Here is an example
  for a complex between methanol and water (:math:`C_s` symmetry): ::

    Symmetry
     Y
    XBAS
    H.ANO-L...1s.
    C.ANO-L...2s1p.
    O.ANO-L...2s1p.
    End of basis
    ZMAT
    C1
    O2  1 1.3350
    H3  1 1.0890  2 109.471
    H4  1 1.0890  2 109.471  3 -120.
    H6  2 1.0890  1 109.471  3  180.
    End of z-matrix
    Basis set
    O.ANO-L...2s1p.
     O    -2.828427     0.000000     2.335000  / angstrom
    End of basis
    Basis set
    H.ANO-L...1s.
     H    -2.748759     0.819593     2.808729  / angstrom
    End of basis

  In this case :program:`SLAPAF` will not regenerate the Z-matrix.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ZMAT" APPEAR="Z-matrix" KIND="CUSTOM" LEVEL="BASIC">
              %%Keyword: ZMAT <basic>
              <HELP>
              Alternative format to give coordinates in the form of Z-matrix.
              Only numerical values must be used (no variable names) and angstroms
              and degrees are assumed as units. Special ghost Z and dummy X atoms
              are allowed. 'End of ZMAT' or a blank line marks the end of the section.
              </HELP>
              </KEYWORD>

:kword:`XYZ`
  The keyword is followed by XYZ formatted file (a reference to a file),
  or file, inlined into the input.

  .. compound::

    Example: ::

      XBAS=STO-3G
      XYZ=$CurrDir/Water.xyz

    or ::

      XBAS=STO-3G
      XYZ
      1
       note angstrom units!
      C 0 0 0

  Currently, the :kword:`XYZ` keyword does not operate with symmetry, and
  the calculation is always performed without symmetry.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="XYZ" KIND="CUSTOM" LEVEL="ADVANCED" REQUIRE="XBAS">
              %%Keyword: XYZ <advanced>
              <HELP>
              Alternative format to set up geometry as XYZ formatted file.
              </HELP>
              </KEYWORD>

Advanced XYZ input
::::::::::::::::::

If the geometry is specified in XYZ format, all atoms should be specified.
The default units are ångströms. By default, maximum possible symmetry is used.

"Molcas XYZ" file format is an extension of plain XYZ format.

* First line of this file contains the number of atoms.

* Second line (a comment line) can contain "a.u." or "bohr" to
  use atomic units, instead of default ångströms.
  Also this line can contain keyword TRANS, followed by 3 numbers,
  and/or ROT, followed by 9 numbers (in this case coordinates
  will be Translated by specified vector, and/or Rotated), and SCALE (or
  SCALEX, SCALEY, SCALEZ) followed by a scale factor.

* Remaining lines are used to specify Element and cartesian
  coordinates.

  Element name might be optionally followed by a Number (e.g. ``H7``),
  a Label (separated by ``_``: e.g. ``H_INNER``), or Basis Set (separated by ``.``,
  e.g. ``H.STO-3G``)

.. class:: keywordlist

:kword:`COORD`
  The keyword followed on the next line by the name of an HDF5 (created by any module), or the name of an XYZ file,
  or inline coordinates in XYZ format. If the file is located in the same directory, where
  |molcas| job was submitted there is no need to specify the PATH to this file.
  The keyword may appear several times. In this case all coordinate files
  will be concatenated, and considered as individual fragments.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="COORD" APPEAR="Coord" KIND="CUSTOM" INPUT="REQUIRED" LEVEL="BASIC" EXCLUSIVE="BASIS (NATIVE)">
              %%Keyword: COORD (XYZ format) <basic>
              <HELP>
              The keyword followed on the next line by the name of an HDF5 or XYZ file,
              or inline coordinates in XYZ format.
              The keyword may appear several times. In this case all coordinate files
              will be concatenated, and considered as individual fragments.
              </HELP>
              </KEYWORD>

:kword:`BASIS`
  The keyword can be used to specify global basis set for all atoms, or for a group of atoms.
  The keyword followed by a label of basis set, or by comma separated list of basis sets for
  individual atoms.

  Note! The basis set definition in XYZ mode does not allow to use
  inline basis set.

  Example: ::

    COORD
    4

    C           0.00000 0.00000 0.00000
    H           1.00000 0.00000 0.00000
    H           0.00000 1.00000 0.00000
    H           0.00000 0.00000 1.00000
    BASIS
    STO-3G, H.6-31G*

  In this example, the C atom (in the origin) will have the basis set STO-3G and
  the H atoms 6-31G*.

  An individual instance of :kword:`BASIS` is limited to 80 characters, but the keyword can
  be given multiple times, e.g. ::

    BASIS
    STO-3G
    BASIS
    H.6-31G*

  If the keyword :kword:`BASIS` never appears in the input, the default basis,
  ANO-S-MB, will be used.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="BASIS (XYZ)" APPEAR="Basis set" KIND="STRING" LEVEL="BASIC">
              %%Keyword: BASIS (XYZ format) <basic>
              <HELP>
              The keyword followed on the next line by the name of global basis set for
              all atoms, or by comma separated list of basis sets for individual atoms.
              Note! The basis set definition in XYZ mode does not allow to use
              inline basis set.
              </HELP>
              </KEYWORD>

:kword:`GROUP`
  The keyword can be used to specify the symmetry of the molecule.

  The keyword must be followed by one of:

  * FULL (default) --- use maximum possible subgroup of :math:`D_{2h}`
  * NOSYM (same as E, or C1)
  * space separated list of generators: e.g. X XY (for more details see SYMMETRY keyword)

  .. Limitations: in the current implementation atom labels, and basis sets are ignored
     during symmetry recognition.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="GROUP" APPEAR="Group" KIND="STRING" LEVEL="BASIC">
              %%Keyword: GROUP (XYZ format) <basic>
              <HELP>
              The keyword followed on the next line by the list of group generators
              (with the same syntax as SYMMETRY keyword),
              or by FULL (highest possible group), or by NOSYM, if no symmetry operations
              should be used. The keyword can be used only with XYZ format of input,
              after COORD keyword.
              </HELP>
              </KEYWORD>

If XYZ input has been used in :program:`gateway`, a file with native |molcas| input will be
produced and stored in working directory under the name :file:`findsym.std`.

Note that choosing XYZ input you are expecting that the coordinates might be transformed.
It can be shown by the following example: ::

  &gateway
  coord
  3

  O 0 0 0
  H 1.0000001 0 0
  H 0 1 0.0000001
  *nomove
  *group=c1

The geometry of the molecule is slightly distorted, but within a threshold it is :math:`C_{2v}`.
Thus by default (keywords :kword:`nomove` and :kword:`group` are not active), the
coordinates will be transformed to maintain the highest possible symmetry.
If keyword :kword:`nomove` is active, the molecule is not allowed to rotate, and
a mirror plane :math:`xy` is the only symmetry element. Since the third hydrogen atom is
slightly out of this plane, it will be corrected. Only activation of the keyword :kword:`group=C1`
will ensure that the geometry is unchanged.

Native input
::::::::::::

If the geometry is specified in a native |molcas| format, only symmetry
inequivalent atoms should be specified. The default units are atomic units.
By default, symmetry is not used in the calculation.

.. class:: keywordlist

:kword:`SYMMetry`
  Symmetry specification follows on next line. There may be up to
  three different point group generators specified on that line. The
  generators of a point group is the minimal set of symmetry operators
  which is needed to generate all symmetry
  operators of a specific point group. A generator is in the input
  represented as a sequence of up to three of the characters x, y, and
  z. The order within a given sequence is arbitrary and the generators
  can be given in any sequence. Observe that the order of the irreps
  is defined by the order of the generators as
  (:math:`E`, :math:`g_1`, :math:`g_2`, :math:`g_1g_2`, :math:`g_3`, :math:`g_1g_3`, :math:`g_2g_3`,
  :math:`g_1g_2g_3`)! Note that :math:`E` is always assumed and should never
  be specified.

  Below is listed the possible generators.

  * **x** --- Reflection in the :math:`yz`-plane.
  * **y** --- Reflection in the :math:`xz`-plane.
  * **z** --- Reflection in the :math:`xy`-plane.
  * **xy** --- Twofold rotation around the :math:`z`-axis.
  * **xz** --- Twofold rotation around the :math:`y`-axis.
  * **yz** --- Twofold rotation around the :math:`x`-axis.
  * **xyz** --- Inversion through the origin.

  The default is no symmetry.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="SYMMETRY" APPEAR="Symmetry" KIND="STRING" LEVEL="BASIC" EXCLUSIVE="COORD">
              %%Keyword: Symmetry (non-XYZ format) <basic>
              Symmetry point group is specified by up to three group generators.
              Possible generators are "x", "y", "z", "xy", "xz", "yz", and "xyz".
              The order of the irreps depends on the order of the generators.
              The keyword can be used only in 'native' input format.
              </KEYWORD>

:kword:`BASIs Set`
  This notes the start of a basis set definition.
  The next line always contains a basis set label.
  The basis set definition is alway terminated with the "End of Basis" keyword.
  For the definitions of basis set labels see the subsequent sections.
  Below follows a description of the options associated with the
  basis set definition.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="BASIS (NATIVE)" APPEAR="Basis set" KIND="CUSTOM" LEVEL="ADVANCED" INPUT="REQUIRED" EXCLUSIVE="COORD">
              %%Keyword: BASIS (non-XYZ format) <basic>
              This notes the start of a basis set definition.
              The next line always contains a basis set label.
              The basis set definition is alway terminated with the "End of Basis" keyword.
              For details consult the manual.
              </KEYWORD>

  * **Label [/ option]** ---
    The label is a specification of a specific basis set, e.g.
    C.ANO...4s3p2d., which is an ANO basis set.
    If no option is specified
    :program:`GATEWAY` will look for the basis
    set in the default basis directory. If an option is specified it
    could either be the name of an alternative basis directory or
    the wording "Inline" which defines
    that the basis set will follow in the current input
    file. For the format of the
    **Inline** option see the section
    "Basis set format". Observe that the label is arbitrary for this
    option and will not be decoded.
    The **Label** card is mandatory.

  * **Name x, y, z (angstrom or bohr)** ---
    This card specifies an arbitrary (see next sentence!) name
    for a symmetry distinct center and its Cartesian coordinates.
    Observe, that the
    name "DBAS" is restricted to assign the center of the
    diffuse basis functions required to model the continuum
    orbitals in R-matrix calculations.
    The label is truncated to four characters. Observe that this
    label must be unique to each center. The coordinate unit can
    be specified as an option. The default unit is bohr.
    There should at least be one card of this type in a basis set
    definition.

  * **Charge** ---
    The real entry on the subsequent line defines
    the charge associated with
    this basis set. This will override the default which is defined in
    the basis set library. The option can be used to put in ghost
    orbitals as well as to augment the basis sets of the library.
    The **Charge** card is optional.

    .. xmldoc:: %%Keyword: Charge (non-XYZ format) <advanced>
                The real entry on the subsequent line defines
                the charge associated with
                this basis set. This will override the default which is defined in
                the basis set library. The option can be used to put in ghost
                orbitals as well as to augment the basis sets of the library.
                The "Charger" card is optional.

  * **Spherical** [option] ---
    Specifying which shells will be in real spherical Gaussians. Valid options
    are "all" or a list of the shell characters separated by a blank. The
    shell characters are s, p, d, f, etc. All shells after p are by
    default in real spherical Gaussians, except for the d-functions in the
    6-31G family of basis sets which are in Cartesian.
    The **Spherical** card is optional. The s and p shells and the d-functions of
    the 6-31G family of basis sets are by default in Cartesian Gaussians.

    .. xmldoc:: %%Keyword: Spherical (non-XYZ format) <advanced>
                Specifying which shells will be in real spherical Gaussians. Valid options
                are "all" or a list of the shell characters separated by a blank. The
                shell characters are s, p, d, f, etc. All shells after p are by
                default in real spherical Gaussians, except for the d-functions in the
                6-31G family of basis sets which are in Cartesian.
                The "Spherical" card is optional. The s and p shells and the d-functions of
                the 6-31G family of basis sets are by default in Cartesian Gaussians.

  * **Cartesian** [option] ---
    Specifying which shells will be in a Cartesian Gaussian representation. For syntax
    consult the corresponding **Spherical** keyword.

    .. xmldoc:: %%Keyword: Cartesian (non-XYZ format) <advanced>
                Specifying which shells will be in a Cartesian Gaussian representation. For syntax
                consult the corresponding Spherical keyword.

  * **Contaminant** [option] ---
    Specifying for which shells the contaminant will be kept.
    The contaminants are functions of lower rank which are generated
    when a Cartesian shell is transformed to a spherical representation
    (e.g. :math:`r^2=x^2+y^2+z^2` for d-shells, p contaminants for f-shells,
    s and d contaminants for g-shells, etc.).
    Valid options are the same as for the **Spherical** keyword.
    The default is no contaminant in any shell. The **Contaminant** card is optional.

    .. xmldoc:: %%Keyword: Contaminant (non-XYZ format) <advanced>
                Specifying for which shells the contaminant will be kept.
                The contaminants are functions of lower rank which are generated
                when a Cartesian shell is transformed to a spherical representation
                (e.g. r^2=x^2+y^2+z^2 for d-shells, p contaminants for f-shells,
                s and d contaminants for g-shells, etc.).
                Valid options are the same as for the Spherical keyword.
                The default is no contaminant in any shell. The "Contaminant" card is optional.

  * **Muon** ---
    Specifying that the basis set is muonic.

    .. xmldoc:: %%Keyword: Muon (non-XYZ format) <advanced>
                Specifying that the basis set is muonic.

  * **End of Basis set** ---
    Marks the end of the basis set specification.
    This card is mandatory.

    .. xmldoc:: %%Keyword: End of Basis set (non-XYZ format) <advanced>
                Marks the end of the basis set specification.
                This card is mandatory.

Example of an input in native |molcas| format: ::

  &GATEWAY
  Title
  formaldehyde
  SYMMETRY
  X Y
  Basis set
  H.STO-3G....
  H1           0.000000    0.924258   -1.100293 /angstrom
  End of basis

  Basis set
  C.STO-3G....
  C3           0.000000    0.000000   -0.519589 /angstrom
  End of basis

  Basis set
  O.STO-3G....
  O            0.000000    0.000000    0.664765 /angstrom
  End of basis

  End of input

Advanced keywords:

.. class:: keywordlist

:kword:`SYMThreshold`
  followed by a real number --- threshold for symmetry recognition (default is 0.01 Å)

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="SYMT" APPEAR="Symmetry Thr" KIND="REAL" LEVEL="ADVANCED" DEFAULT_VALUE="0.01" REALTIME_UPDATE="YES">
              %%Keyword: SYMThreshold (XYZ format) <advanced>
              <HELP>
              The keyword followed on the next line by the threshold for symmetry recognition code (default is 0.01)
              </HELP>
              </KEYWORD>

:kword:`CSPF`
  Turn on the use of Condon--Shortley phase factors.
  Note that this changes the sign of basis functions, and orbital files will not be compatible
  with runs without this keyword, and orbital visualizations may be wrong!

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="CSPF" APPEAR="Condon-Shortley phase factor" KIND="SINGLE" LEVEL="ADVANCED">
              %%Keyword: CSPF <advanced>
              <HELP>
              Turn on the use of Condon-Shortley phase factors.
              Warning: Causes incompatibilities.
              </HELP>
              </KEYWORD>

:kword:`MOVE`
  allow to translate and rotate molecule in order to find highest possible symmetry.
  (this is a default for all groups, except of :math:`C_1`)

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="MOVE" APPEAR="MOVE" KIND="SINGLE" LEVEL="ADVANCED" EXCLUSIVE="NOMOVE">
              %%Keyword: MOVE (XYZ format) <advanced>
              <HELP>
              Allow to translate and rotate molecule in order to find highest possible symmetry.
              (this is a default for all groups, except of C1)
              </HELP>
              </KEYWORD>

:kword:`NOMOVE`
  do not allow to transform coordinates while searching for highest group (default for :math:`C_1` group)

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="NOMOVE" APPEAR="NoMOVE" KIND="SINGLE" LEVEL="ADVANCED" EXCLUSIVE="MOVE">
              %%Keyword: NOMOVE (XYZ format) <advanced>
              <HELP>
              Do not allow to transform coordinates while searching for highest group (default for C1 group)
              </HELP>
              </KEYWORD>

:kword:`BSSE`
  followed by an integer. Indicates which XYZ-file that should be
  treated like ghost atoms.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="BSSE" APPEAR="BSSE" KIND="INT" LEVEL="ADVANCED">
              %%Keyword: BSSE (XYZ format) <advanced>
              <HELP>
              Followed by an integer. Indicates which xyz-file that should be treated like ghost atoms.
              </HELP>
              </KEYWORD>

:kword:`VART`
  Specifies that the energy should not be considered invariant to translations.
  Translational variance is detected automatically, but sometimes it may be useful to enforce it.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="VART" APPEAR="Var Trans" KIND="SINGLE" LEVEL="ADVANCED">
              %%Keyword: VarT <advanced>
              <HELP>
              Specifies that the energy should not be considered invariant to translations.
              Translational variance is detected automatically, but sometimes it may be useful to enforce it.
              </HELP>
              </KEYWORD>

:kword:`VARR`
  Specifies that the energy should not be considered invariant to rotations.
  Rotational variance is detected automatically, but sometimes it may be useful to enforce it.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="VARR" APPEAR="Var Rot" KIND="SINGLE" LEVEL="ADVANCED">
              %%Keyword: VarR <advanced>
              <HELP>
              Specifies that the energy should not be considered invariant to rotations.
              Rotational variance is detected automatically, but sometimes it may be useful to enforce it.
              </HELP>
              </KEYWORD>

:kword:`NUMErical`
  Forces the calculation of numerical gradients even when analytic gradients are available.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="NUMERICAL" APPEAR="Numerical gradients" KIND="SINGLE" LEVEL="ADVANCED">
              %%Keyword: Numerical <advanced>
              <HELP>
              Forces the calculation of numerical gradients even when analytic gradients are available.
              </HELP>
              </KEYWORD>

:kword:`SHAKe`
  Randomly modifies the initial coordinates of the atoms, maintaining the input (or computed)
  symmetry. This can be useful to avoid a geometry optimization converging to a higher-symmetry
  saddle point. The maximum displacement per atom is read from the following
  real number. This number can be followed by :kword:`bohr` or :kword:`angstrom`, which indicates
  the unit in which the displacement is specified, the default is :kword:`bohr`.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="SHAKE" APPEAR="Shake" KIND="REAL" LEVEL="ADVANCED">
              %%Keyword: Shake <advanced>
              <HELP>
              Randomly modifies the initial coordinates of the atoms, maintaining the input (or computed)
              symmetry. This can be useful to avoid a geometry optimization converging to a higher-symmetry
              saddle point. The maximum displacement per atom is read from the following
              real number. This number can be followed by "bohr" or "angstrom", which indicates
              the unit in which the displacement is specified, the default is "bohr".
              </HELP>
              </KEYWORD>

.. compound::

  Example: ::

    &GATEWAY
    COORD
    water.xyz
    BASIS
    STO-3G

  or, in short EMIL notation: ::

    &GATEWAY
    COORD=water.xyz; BASIS=STO-3G

Coordinate file may contain variables, as demonstrated in an example: ::

  >>FILE H2.input
  2
  scale $DD
  H 0.35 0 0
  H -0.35 0 0
  >>EOF

  >> FOREACH DD IN ( 0.9 1.0 1.1 )
  &GATEWAY
  COORD=$WorkDir/H2.input
  BASIS=STO-3G
  &SEWARD
  &SCF
  >>ENDDO

The atom name in XYZ file can contain an orbitrary label (to simplify assigning of different
basis sets). To indicate the label, use ``_``: e.g. ``C_SMALL``. The same label should be
defined in the basis section: ``BASIS=C_SMALL.ANO-S-MB``. The basis set label can be also
added into the name of an element: ::

  COORD
  1

  O.ANO-S-VDZP 0 0 0

XYZ file can also contain information about point charges. There are three possibilities to
setup atomic charges in XYZ file. The main option is to use ``Q`` as an element name, and in this
case the forth number, the charge, should be specified. Another possibility is to use element
names ended with minus sign. In this case, a formal charge for the element will be used.
E.g. ``H-``, ``Li-``, ``Na-``, ``K-`` defines :math:`+1` charge located in the corresponding location.
``Mg-``, ``Ca-`` --- defines charge :math:`+2`, ``Al-`` --- :math:`+3`, ``C-``, ``Si-`` :math:`+4`, for anions, ``F-``, ``Cl-``, ``Br-``, ``I-`` defines :math:`-1`,
``O-``, ``S-`` --- :math:`-2`. Finally, a label at the comment line of XYZ file --- CLUSTER followed by
an integer number can specify how many atoms are "real", so the rest will be treated as
charges with default values for this element.

Constraints
...........

In case of optimizations with constraints these are defined in the :program:`GATEWAY` input.
For a complete description of this keyword see :numref:`UG:sec:definition_of_internal_coordinates`.

.. class:: keywordlist

:kword:`CONStraints`
  This marks the start of the definition of the constraints
  which the optimization is subject to.
  This section is always ended by the keyword
  :kword:`End of Constraints`.
  This option can be used in conjunction with any definition of the
  internal coordinates.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="CONSTRAINTS" APPEAR="Constraints" KIND="CUSTOM" LEVEL="BASIC">
              %%Keyword: Constraints <basic>
              <HELP>
              This marks the start of the definition of the constraints
              which the optimization is subject to.
              This section is always ended by the keyword "End of Constraints".
              Consult the manual for the details.
              </HELP>
              </KEYWORD>

:kword:`NGEXclude`
  This marks the start of the definition of additional restrictions for numerical differentiation.
  This section is always ended by the keyword :kword:`End of NGExclude`.
  The syntax of this section is like that of normal constraints, and the degrees of
  freedom specified here will be excluded from numerical differentiation (like phantom constraints).
  If a line containing only "Invert" is included inside the section,
  the definition is reversed and only these degrees of freedom are differentiated.
  :kword:`NGEXclude` is intended for use with the :kword:`KEEPOldGradient` keyword in :program:`ALASKA`,
  and can be combined with :kword:`CONStraints`, which will further reduce
  the numerical differentiation subspace :cite:`Stenrup2015`.
  Note that the value assigned to the constraints in this section is unused, but a ``Value`` block
  must still be included.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="NGEXCLUDE" APPEAR="Exclude from numerical differentiation" KIND="CUSTOM" LEVEL="BASIC">
              %%Keyword: NGExclude <basic>
              <HELP>
              This marks the start of the definition of additional restrictions for numerical differentiation.
              This section is always ended by the keyword "End of NGExclude".
              </HELP>
              </KEYWORD>

Explicit auxiliary basis sets
.............................

The so-called Resolution of Identity (RI) technique (also called Density
Fitting, DF) is implemented in the |molcas| package. This option involves the use
of an auxiliary basis set in the effective computation of the 2-electron
integrals. |molcas| incorporates both the use of conventionally computed,
externally provided, auxiliary basis sets (RIJ, RIJK, and RIC types), and
on-the-fly generated auxiliary basis sets. The latter are atomic CD (aCD) or the
atomic compact CD (acCD) basis
sets, based on the Cholesky decomposition method. The externally provided
auxiliary basis sets are very compact, since they are tailored for special
wave function methods. However, they are not provided for all available valence
basis sets. The aCD or acCD RI auxiliary basis sets are a more general option and
provides auxiliary basis sets for any wave function model and valence basis set.
If :variable:`MOLCAS_NEW_DEFAULTS` is set to ``YES``, acCD RI (:kword:`RICD`)
will be enabled by default, it can be disabled with :kword:`NOCD`.

.. xmldoc:: <GROUP MODULE="GATEWAY" KIND="BOX" NAME="RIDFOPTIONS" APPEAR="RI/DF options (optional)" LEVEL="BASIC">
            <HELP>
            Options of RI/DF definition of auxiliary basis sets.
            Set various thresholds and parameters for atomic CD auxiliary basis sets.
            </HELP>

.. class:: keywordlist

:kword:`RIJ`
  Use the RI-J basis in the density fitting (DF) approach to treat the two-electron integrals. Note that the valence
  basis set must have a supporting auxiliary basis set for this to work.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="RIJ" APPEAR="RI-J option" KIND="SINGLE" EXCLUSIVE="RIJK,RIC,RICD,LOW,MEDI,HIGH,NOCD,XRIC" LEVEL="BASIC">
              %%Keyword: RIJ <basic>
              <HELP>
              Use the RI-J auxiliary basis in the density fitting (DF) approach to treat the two-electron integrals.
              Note that the valence basis set must have a supporting auxiliary basis set for this to work.
              </HELP>
              </KEYWORD>

:kword:`RIJK`
  Use the RI-JK auxiliary basis in the density fitting (DF) approach to treat the two-electron integrals. Note that the valence
  basis set must have a supporting auxiliary basis set for this to work.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="RIJK" APPEAR="RI-JK option" KIND="SINGLE" EXCLUSIVE="RIJ,RIC,RICD,LOW,MEDI,HIGH,NOCD,XRIC" LEVEL="BASIC">
              %%Keyword: RIJK <basic>
              <HELP>
              Use the RI-JK auxiliary basis in the density fitting (DF) approach to treat the two-electron integrals.
              Note that the valence basis set must have a supporting auxiliary basis set for this to work.
              </HELP>
              </KEYWORD>

:kword:`RIC`
  Use the RI-C auxiliary basis in the density fitting (DF) approach to treat the two-electron integrals. Note that the valence
  basis set must have a supporting auxiliary basis set for this to work.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="RIC" APPEAR="RI-C option" KIND="SINGLE" EXCLUSIVE="RIJ,RIJK,RICD,LOW,MEDI,HIGH,NOCD,XRIC" LEVEL="BASIC">
              %%Keyword: RIC <basic>
              <HELP>
              Use the RI-C auxiliary basis in the density fitting (DF) approach to treat the two-electron integrals.
              Note that the valence basis set must have a supporting auxiliary basis set for this to work.
              </HELP>
              </KEYWORD>

:kword:`RICD`
  Use the aCD or acCD approach :cite:`Aquilante:07b` to treat the two-electron integrals.
  This procedure will use an on-the-fly generated auxiliary basis set.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="RICD" APPEAR="RI-aCD option" KIND="SINGLE" EXCLUSIVE="RIJ,RIJK,RIC,LOW,MEDI,HIGH,NOCD,XRIC" LEVEL="BASIC">
              %%Keyword: RICD <basic>
              <HELP>
              Use the aCD or acCD approach to treat the two-electron integrals.
              This procedure will use an on-the-fly generated auxiliary basis set.
              </HELP>
              </KEYWORD>
:kword:`DCCD`
  One-center two-electron integrals will be computed exactly in the selected RI scheme.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="DCCD" APPEAR="1-center corrected RI" KIND="SINGLE" LEVEL="BASIC">
              %%Keyword: DCCD <basic>
              <HELP>
              One-center two-electron integrals will be computed exactly in the selected RI scheme.
              </HELP>
              </KEYWORD>

:kword:`XRICd`
  Use an externally generated RICD basis set available in the file :file:`$Project.RICDLib`.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="XRIC" APPEAR="x-RICD option" KIND="SINGLE" EXCLUSIVE="RIJ,RIJK,RIC,RICD,LOW,MEDI,HIGH,NOCD" LEVEL="BASIC">
              %%Keyword: xRICD <basic>
              <HELP>
              Use an externally generated RICD basis set available in the file $Project.RICDLib.
              </HELP>
              </KEYWORD>

:kword:`NOCD`
  Disable Cholesky decomposition.
  Useful in the case :kword:`RICD` has been made the default with :variable:`MOLCAS_NEW_DEFAULTS`.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="NOCD" APPEAR="No CD" KIND="SINGLE" EXCLUSIVE="RIJ,RIJK,RIC,RICD,LOW,MEDI,HIGH,XRIC" LEVEL="BASIC">
              %%Keyword: NOCD <basic>
              <HELP>
              Disable Cholesky decomposition.
              Useful in the case RICD has been made the default with MOLCAS_NEW_DEFAULTS.
              </HELP>
              </KEYWORD>

:kword:`CDTHreshold`
  Threshold for on-the-fly generation of aCD or acCD auxiliary basis sets for RI calculations
  (default value 1.0d-4).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="CDTH" APPEAR="aCD threshold" KIND="REAL" DEFAULT_VALUE="1.0D-4" REQUIRE="RICD" LEVEL="ADVANCED">
              %%Keyword: CDThreshold <advanced>
              <HELP>
              Threshold for on-the-fly generation of aCD or acCD auxiliary basis sets for RI calculations
              (default value 1.0d-4).
              </HELP>
              </KEYWORD>

:kword:`SHAC`
  Skip high angular combinations when creating on-the-fly basis sets, following the angular structure of the universal JK fitting sets of Weigend :cite:`Weigend:08`.
  (default off).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="SHAC" APPEAR="Skip high angular combinations" KIND="SINGLE" REQUIRE="RICD" EXCLUSIVE="KHAC" LEVEL="ADVANCED">
              %%Keyword: SHAC <advanced>
              <HELP>
              Skip high angular combinations when creating on-the-fly basis sets, following the angular structure of the universal JK fitting sets of Weigend
              (default off).
              </HELP>
              </KEYWORD>

:kword:`KHAC`
  Keep high angular combinations when creating on-the-fly basis sets
  (default on).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="KHAC" APPEAR="Keep high angular combinations" KIND="SINGLE" REQUIRE="RICD" EXCLUSIVE="SHAC" LEVEL="ADVANCED">
              %%Keyword: KHAC <basic>
              <HELP>
              Keep high angular combinations when creating on-the-fly basis sets
              (default on).
              </HELP>
              </KEYWORD>

:kword:`aCD basis`
  Generate an atomic CD (aCD) auxiliary basis sets (default off).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ACD" APPEAR="aCD auxiliary basis" KIND="SINGLE" REQUIRE="RICD" EXCLUSIVE="ACCD" LEVEL="ADVANCED">
              %%Keyword: aCD basis <basic>
              <HELP>
              Generate an atomic CD (aCD) auxiliary basis sets (default off).
              </HELP>
              </KEYWORD>

:kword:`acCD basis`
  Generate an atomic compact CD (acCD) auxiliary basis sets (default on).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ACCD" APPEAR="acCD auxiliary basis" KIND="SINGLE" REQUIRE="RICD" EXCLUSIVE="ACD" LEVEL="ADVANCED">
              %%Keyword: acCD basis <basic>
              <HELP>
              Generate an atomic compact CD (acCD) auxiliary basis sets (default on).
              </HELP>
              </KEYWORD>

.. xmldoc:: </GROUP>

.. index::
   single: Reaction field
   single: Cavity
   single: Solvent

.. _UG\:sec\:rfield:

Reaction field calculations
...........................

The effect of the solvent on the quantum chemical calculations has been
introduced in |molcas| through the reaction field created
by the surrounding environment, represented by a polarizable dielectric
continuum outside the boundaries of a cavity containing the solute molecule.
|molcas| supports Self Consistent Reaction Field (SCRF) and Multi
Configurational Self Consistent Reaction Field (MCSCRF) calculations within
the framework of the :program:`SCF` and the :program:`RASSCF` programs.
The reaction field, computed in a self-consistent fashion, can be
later added as a constant perturbation for the remaining programs, as
for example :program:`CASPT2`.

The purpose of this facility is to incorporate
the effect of the environment (a solvent or a solid matrix) on the studied molecule.
The utility itself it is not a program, but requires
an additional input which has to be provided to the
:program:`GATEWAY` program.
Two methods are available for SCRF calculations: one is based on the Kirkwood
model, the other is the so called Polarizable Continuum Model (PCM).
The reaction field is computed as the response of a dielectric medium polarized
by the solute molecule: the solute is placed in a "cavity" surrounded by the
dielectric. In Kirkwood model the cavity is always spherical, whereas in PCM the
cavity is modeled on the actual solute shape.

The possible set of parameters controlled by input are:

* the Kirkwood model,
* the PCM model, and
* one-electron integrals representing
  Pauli repulsion and external fields.

First a brief presentation of the Kirkwood and the PCM models.

.. index::
   single: Kirkwood model

The Kirkwood Model
::::::::::::::::::

The Kirkwood model is an expansion of the so-called Onsager model where
the surrounding will be characterized by its dielectric
permitivity and a radius describing a spherical cavity,
indicating where the dielectric medium starts.
(Note that all atoms in the studied molecule must be inside the spherical cavity.) The Pauli repulsion
due to the medium can be introduced by use of the spherical well
integrals which are generated by :program:`SEWARD`.
The charge distribution of the molecule will introduce
an electric field acting on the dielectric medium. This reaction field will interact with the
charge distribution of the molecule. This interaction will manifest itself as
a perturbation to the one-electron Hamiltonian. The perturbation will be
automatically computed in a direct fashion (no multipole integrals are stored on
disk) and added to the one-electron Hamiltonian. Due to the direct way in which
this contribution is computed rather high terms in the multipole expansion of the
charge can be afforded.

.. index::
   single: PCM

The Polarizable Continuum Model, PCM
::::::::::::::::::::::::::::::::::::

The PCM has been developed in order to describe the solvent reaction field in a
more realistic way, basically through the use of cavities of general shape, modeled on the
solute. The cavity is built as the envelope of spheres centered on solute atoms or atomic
groups (usually, hydrogen atoms are included in the same sphere as the heavy atoms they are
bonded to). The reaction field is described by means of apparent charges (solvation
charges) spread on the cavity surface, designed to reproduced the electrostatic potential
due to the polarized dielectric inside the cavity.
Such charges are used both to compute solute-solvent interactions (modifying the total energy
of the solute), and to perturb the molecular Hamiltonian through a suitable operator
(thus distorcing the solute wave-function, and affecting all the electronic properties).
The PCM operator contains both one- and two-electron terms: it is computed using
atomic integrals already present in the program, through a "geometry matrix"
connecting different points lying on the cavity surface. It can be shown that
with this approach the SCF and RASSCF variational procedures lead to the
free energy of the given molecule in solution: this is the thermodynamic meaning
of the SCF or CI energy provided by the program. More precisely, this is the
solute-solvent electrostatic contribution to the free energy
(of course, other terms depending on solute atomic motions, like vibrational and
rotational free energies, should be included separately);
it can be used to get a good
approximation of the solvation free energy, by subtracting the SCF or CI energy
computed in vacuo, and also to compute directly energy surfaces and reaction paths
in solution. On the other hand, the solute wave-function perturbed by the
reaction field can be used to compute any electronic property in solution.

Also other quantities can be computed, namely the cavitation free energy (due
the the work spent to create the cavity in the dielectric) and the
dispersion-repulsion free energy: these terms affect only the total free energy of the molecule,
and not its electronic distribution. They are collectively referred to as
non-electrostatic contributions.

Note that two other keywords are defined for the :program:`RASSCF`
program:
they refer to the CI root selected for the calculation of the reaction field (RFROOT), and
to the possibility to perform a non-equilibrium calculation (NONEQ) when vertical electronic
transitions are studied in solution. These keywords are referenced in the
:program:`RASSCF` section. To include the reaction field perturbation in a :program:`SCF`, :program:`RASSCF`, :program:`CASPT2` or :program:`RASSI`
calculation, another keyword must be specified (RFPERT), as explained in the
respective program sections.

Complete and detailed examples of how to add a reaction field,
through the Kirkwood or the PCM model, into quantum chemical
calculations in |molcas| is presented in :numref:`TUT:sec:cavity` of the
examples manual. The user is encouraged to read that section for further details.

Input for the Kirkwood and PCM models
:::::::::::::::::::::::::::::::::::::

.. _UG\:sec\:rfield_files:

Files
"""""

.. *********************************** this part should be revised

The reaction field calculations will store the information in the following files, which
will be used by the following programs

.. class:: filelist

:file:`ONEINT`
  One-electron integral file used to store the Pauli repulsion integrals

:file:`RUNFILE`
  Communications file. The last computed self-consistent reaction field (SCF or RASSCF)
  will be stored here to be used by following programs

:file:`GV.off`
  Input file for the external program "geomview" (see Tutorial section
  "Solvent models"), for the visualization of PCM cavities

Input
"""""
Below follows a description of the input to the reaction field utility in the
:program:`GATEWAY` program. The :program:`RASSCF` program has
its own keywords to compute reaction fields for excited states.

Compulsory keywords

:kword:`RF-Input`
  Activate reaction field options.

.. xmldoc:: <GROUP MODULE="GATEWAY" NAME="RF-INPUT" APPEAR="Reaction Field Options" KIND="BLOCK" LEVEL="ADVANCED">
            <HELP>
            Reaction field options.
            </HELP>

.. class:: keywordlist

:kword:`END Of RF-Input`
  This marks the end of the input to the reaction field utility.

  .. xmldoc:: %%Keyword: End of RF-input <compulsory>
              This marks the end of the input to the reaction field utility.

Optional keywords for the Kirkwood Model

.. class:: keywordlist

:kword:`REACtion Field`
  This command is exclusive to the Kirkwood model.
  It indicates the beginning of the specification of the
  reaction field parameters. The subsequent line will contain
  the dielectric constant of the medium, the radius of the
  cavity in bohrs (the cavity is always centered around the
  origin), and the angular quantum number of the highest multipole
  moment used in the expansion of the change distribution of
  the molecule (only charge is specified as 0, charge and dipole
  moments as 1, etc.).
  The input specified below specifies that
  a dielectric permitivity of 80.0 is used, that the cavity radius is 14.00 a.u.,
  and that the expansion of the charge distribution is truncated after :math:`l=4`, i.e. hexadecapole
  moments are the last moments included in the expansion.
  Optionally a fourth argument can be added giving the value of the dielectric constant of the
  fast component of the solvent (default value 1.0).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="REACTION" APPEAR="Onsager-Kirkwoord Model" KIND="CUSTOM" LEVEL="ADVANCED" EXCLUSIVE="PCM-MODEL">
              %%Keyword: Reaction field (RF) <basic>
              <HELP>
              This command is exclusive to the Kirkwood model.
              This indicated the beginning of the specification of the
              reaction field parameters. The subsequent line will contain
              the dielectric constant of the medium, the radius of the
              cavity in bohrs (the cavity is always centered around the
              origin), and the angular quantum number of the highest multipole
              moment used in the expansion of the change distribution of
              the molecule (only charge is specified as 0, charge and dipole
              moments as 1, etc.).
              The input specified below specifies that
              a dielectric permitivity of 80.0 is used, that the cavity radius is 14.00 a.u.,
              and that the expansion of the charge distribution is truncated after l=4, i.e. hexadecapole
              moments are the last moments included in the expansion.
              Optionally a fourth argument can be added giving the value of the dielectric constant of the
              fast component of the solvent (default value 1.0).
              </HELP>
              </KEYWORD>

Sample input for the reaction field part (Kirkwood model) ::

  RF-Input
  Reaction field
  80.0 14.00 4
  End Of RF-Input

Sample input for a complete reaction field calculation using the Kirkwood model.
The :program:`SCF` computes the reaction field in a
self consistent manner while the :program:`MRCI`
program adds the effect as a constant perturbation.

.. extractfile:: ug/RF.input

  &GATEWAY
  Title = HF molecule
  Symmetry
  X Y
  Basis set
  F.ANO-S...3S2P.
  F      0.00000   0.00000   1.73300
  End of basis
  Basis set
  H.ANO-S...2S.
  H      0.00000   0.00000   0.00000
  End of basis
  Well integrals
   4
   1.0 5.0  6.75
   1.0 3.5  7.75
   1.0 2.0  9.75
   1.0 1.4 11.75

  RF-Input
  Reaction field
   80.0 4.75 4
  End of RF-Input

  &SEWARD

  &SCF
  Occupied =  3 1 1 0

  &MOTRA
  LumOrb
  Frozen   =  1 0 0 0
  RFPert

  &GUGA
  Electrons =     8
  Spin      =     1
  Inactive  =     2    1    1    0
  Active    =     0    0    0    0
  CiAll     =     1

  &MRCI
  SDCI

Optional keywords for the PCM Model

.. xmldoc:: <GROUP MODULE="GATEWAY" NAME="PCM" APPEAR="PCM Options" KIND="BOX" LEVEL="ADVANCED">

.. class:: keywordlist

:kword:`PCM-model`
  If no other keywords are specified, the program will execute a standard PCM calculation
  with water as solvent. The solvent reaction field will be included in all the
  programs (:program:`SCF`, :program:`RASSCF`, :program:`CASPT2`, etc.)
  invoked after :program:`SEWARD`: note that in some cases additional keywords are required
  in the corresponding program sections. Some PCM parameters can be changed through the following
  keywords.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="PCM-MODEL" APPEAR="PCM Model" KIND="SINGLE" LEVEL="ADVANCED" EXCLUSIVE="REACTION">
              %%Keyword: PCM-model (RF) <basic>
              <HELP>
              If no other keywords are specified, the program will execute a standard PCM calculation
              with water as solvent. The solvent reaction field will be included in all the
              programs (SCF, RASSCF, CASPT2, etc.)
              invoked after SEWARD: note that in some cases additional keywords are required
              in the corresponding program sections. Many PCM parameters can be changed through the following
              keywords.
              </HELP>
              </KEYWORD>

:kword:`SOLVent`
  Used to indicate which solvent is to be simulated. The name of the requested solvent
  must be written in the line below this keyword. Find implemented solvents in the PCM model below this section.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="SOLVENT" APPEAR="Solvent" KIND="CHOICE" LEVEL="ADVANCED" REQUIRE="PCM-MODEL" LIST="WATER,ACETONITRILE,METHANOL,ETHANOL,ISOQUINOLINE,QUINOLINE,CHLOROFORM,ETHYLETHER,METHYLENECHLORIDE,DICHLOROETHANE,CARBONTETRACHLORIDE,BENZENE,TOLUENE,CHLOROBENZENE,NITROMETHANE,HEPTANE,CYCLOHEXANE,ANILINE,ACETONE,TETRAHYDROFURAN,DIMETHYLSULFOXIDE,ARGON,KRYPTON,XENON">
              %%Keyword: Solvent (RF) <basic>
              <HELP>
              Used to indicate which solvent is to be simulated.
              </HELP>
              The name of the requested solvent
              must be written in the line below this keyword. Allowed solvents are:
              WATER, ACETONITRILE, METHANOL, ETHANOL, ISOQUINOLINE,
              QUINOLINE, CHLOROFORM, ETHYLETHER, METHYLENECHLORIDE,
              DICHLOROETHANE, CARBONTETRACHLORIDE, BENZENE, TOLUENE,
              CHLOROBENZENE, NITROMETHANE, HEPTANE, CYCLOHEXANE, ANILINE,
              ACETONE, TETRAHYDROFURAN, DIMETHYLSULFOXIDE, ARGON, KRYPTON,
              XENON
              </KEYWORD>

:kword:`DIELectric constant`
  Defines a different dielectric constant for the selected solvent; useful to describe
  the system at temperatures other that 298 K, or to mimic solvent mixtures.
  The value is read in the line below the keyword.
  An optional second value might be added on the same line which
  defines a different value for the infinite frequency dielectric constant for
  the selected solvent (this is used in non-equilibrium calculations; by
  default it is defined for each solvent at 298 K).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="DIELECTRIC" APPEAR="Dielectric constant" KIND="REALS" SIZE="2" LEVEL="ADVANCED" REQUIRE="PCM-MODEL">
              %%Keyword: Dielectric constant (RF) <basic>
              <HELP>
              Defines a different dielectric constant for the selected solvent; useful to describe
              the system at temperatures other that 298 K, or to mimic solvent mixtures.
              The value is read in the line below the keyword.
              An optional second value might be added on the same line which
              defines a different value for the infinite frequency dielectric constant for
              the selected solvent (this is used in non-equilibrium calculations; by
              default it is defined for each solvent at 298 K).
              </HELP>
              </KEYWORD>

  .. :kword:`INFInite frequency dielectric constant`
       Defines a different value for the infinite frequency dielectric constant for
       the selected solvent (this is used in non-equilibrium calculations; by
       default it is defined for each solvent at 298 K).
       The value is read in the line below the keyword.

       .. .. xmldoc:: %%Keyword: Infinite frequency dielectric constant (RF) <advanced>
                      Defines a different value for the infinite frequency dielectric constant for
                      the selected solvent (this is used in non-equilibrium calculations; by
                      default it is defined for each solvent at 298 K).
                      The value is read in the line below the keyword.

:kword:`CONDuctor version`
  It requires a PCM calculation where the solvent is represented as a polarized conductor:
  this is an approximation to the dielectric model which works very well for
  polar solvents (i.e. dielectric constant greater than about 5), and it has some
  computational advantages being based on simpler equations. It can be useful in cases
  when the dielectric model shows some convergence problems.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="CONDUCTOR" APPEAR="Conductor Model" KIND="SINGLE" LEVEL="ADVANCED" REQUIRE="PCM-MODEL">
              %%Keyword: Conductor version (RF) <advanced>
              <HELP>
              It requires a PCM calculation where the solvent is represented as a polarized conductor:
              this is an approximation to the dielectric model which works very well for
              polar solvents (i.e. dielectric constant greater than about 5), and it has some
              computational advantages being based on simpler equations. It can be useful in cases
              when the dielectric model shows some convergence problems.
              </HELP>
              </KEYWORD>

:kword:`AAREa`
  It is used to define the average area (in Å\ |2|)
  of the small elements on the cavity surface
  where solvation charges are placed; when larger elements are chosen, less charges
  are defined, what speeds up the calculation but risks to worsen the results. The
  default value is 0.4 Å\ |2| (i. e. 60 charges on a sphere of radius 2 Å).
  The value is read in the line below the keyword.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="AARE" APPEAR="Tessera Average Area" KIND="REAL" LEVEL="ADVANCED" DEFAULT_VALUE="0.4" REQUIRE="PCM-MODEL">
              %%Keyword: AAREa (RF) <advanced>
              <HELP>
              It is used to define the average area (in A^2) of the small elements on the cavity surface
              where solvation charges are placed; when larger elements are chosen, less charges
              are defined, what speeds up the calculation but risks to worsen the results. The
              default value is 0.4 A^2 (i.e. 60 charges on a sphere of radius 2 A).
              The value is read in the line below the keyword.
              </HELP>
              </KEYWORD>

:kword:`R-MIn`
  It sets the minimum radius (in Å) of the spheres that the program adds to the atomic
  spheres in order to smooth the cavity surface (default 0.2 Å).
  For large solute, if the programs
  complains that too many sphere are being created, or if computational times
  become too high, it can be useful to enlarge this value (for example to 1 or 1.5
  Å), thus reducing the number of added spheres.
  The value is read in the line below the keyword.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="R-MIN" APPEAR="Minimum sphere radius" KIND="REAL" LEVEL="ADVANCED" DEFAULT_VALUE="2.0" REQUIRE="PCM-MODEL">
              %%Keyword: R-min (RF) <advanced>
              <HELP>
              It sets the minimum radius (in A) of the spheres that the program adds to the atomic
              spheres in order to smooth the cavity surface (default 0.2 A).
              For large solute, if the programs
              complains that too many sphere are being created, or if computational times
              become too high, it can be useful to enlarge this value (for example to 1 or 1.5
              A), thus reducing the number of added spheres.
              The value is read in the line below the keyword.
              </HELP>
              </KEYWORD>

:kword:`PAULing`
  It invokes the use of Pauling's radii to build the solute cavity: in
  this case, hydrogens get their own sphere (radius 1.2 Å).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="PAULING" APPEAR="Pauling radii" KIND="SINGLE" LEVEL="ADVANCED" DEFAULT_VALUE="2.0" REQUIRE="PCM-MODEL">
              %%Keyword: Pauling (RF) <advanced>
              <HELP>
              It invokes the use of Pauling's radii to build the solute cavity: in
              this case, hydrogens get their own sphere (radius 1.2 A).
              </HELP>
              </KEYWORD>

:kword:`SPHEre radius`
  It is used to provide sphere radii from input: for each sphere given
  explicitly by the user, the keyword "Sphere radius" is required,
  followed by a line containing two numbers: an integer indicating the
  atom where the sphere has to be centered, and a real indicating its
  radius (in Å). For example, "Sphere radius" followed by "3 1.5"
  indicates that a sphere of radius 1.5 Å is placed around atom #3;
  "Sphere radius" followed by "4 2.0" indicates that another sphere of
  radius 2 Å is placed around atom #4 and so on.

  .. xmldoc:: %%Keyword: Sphere radius (RF) <advanced>
              It is used to provide sphere radii from input: for each sphere given
              explicitly by the user, the keyword 'Sphere radius' is required,
              followed by a line containing two numbers: an integer indicating the
              atom where the sphere has to be centered, and a real indicating its
              radius (in A). For example, 'Sphere radius' followed by '3 1.5'
              indicates that a sphere of radius 1.5 A is placed around atom 3;
              'Sphere radius' followed by '4 2.0' indicates that another sphere of
              radius 2 A is placed around atom 4 and so on.

.. xmldoc:: </GROUP>

.. xmldoc:: </GROUP>

Solvents implemented in the PCM model are

.. %---- Table of allowed solvents ------

.. _tab\:pcm_solvents:

=================== ==========
Name                Dielectric
                    constant
=================== ==========
water                    78.39
dimethylsulfoxide        46.70
nitromethane             38.20
acetonitrile             36.64
methanol                 32.63
ethanol                  24.55
acetone                  20.70
isoquinoline             10.43
dichloroethane           10.36
quinoline                 9.03
methylenchloride          8.93
tetrahydrofuran           7.58
aniline                   6.89
chlorobenzene             5.62
chloroform                4.90
ethylether                4.34
toluene                   2.38
benzene                   2.25
carbontetrachloride       2.23
cyclohexane               2.02
heptane                   1.92
xenon                     1.71
krypton                   1.52
argon                     1.43
=================== ==========

Sample input for the reaction field part (PCM model): the solvent is
water, a surface element average area of 0.2 Å\ |2| is requested. ::

  RF-input
  PCM-model
  Solvent
  water
  AAre
  0.2
  End of RF-input

Sample input for a standard PCM calculation in water.
The :program:`SCF` and :program:`RASSCF` programs compute the reaction field
self consistently and add its contribution to the Hamiltonian. The :program:`RASSCF` is
repeated twice: first the ground state is determined, then a non-equilibrium
calculation on the first excited state is performed.

.. extractfile:: ug/RF.formaldehyde.input

  &GATEWAY
  Coord
  4
  formaldehyde
  O 0.000000 0.000000 -1.241209
  C 0.000000 0.000000 0.000000
  H 0.000000 0.949585 0.584974
  H 0.000000 -0.949585 0.584974

  Basis = STO-3G
  Group = C1
  RF-input
  PCM-model
  solvent = water
  End of RF-input

  &SEWARD ; &SCF

  &RASSCF
  nActEl   = 4 0 0
  Symmetry = 1
  Inactive = 6
  Ras2     = 3
  CiRoot
  1 1
  1
  LumOrb

  &RASSCF
  nActEl   = 4 0 0
  Symmetry = 1
  Inactive = 6
  Ras2     = 3
  CiRoot
  2 2
  1 2
  0 1
  JOBIPH
  NonEq
  RFRoot  = 2

Again the user is recommended to read :numref:`TUT:sec:cavity` of the
examples manual for further details.

Keywords associated to one-electron integrals
.............................................

.. xmldoc:: <GROUP MODULE="GATEWAY" NAME="ONE-ELECTRON" APPEAR="1-electron integral options" KIND="BOX" LEVEL="ADVANCED">

.. class:: keywordlist

:kword:`FNMC`
  Request that the so-called Finite Nuclear Mass Correction, excluded by the Born--Oppenheimer approximation,
  be added to the one-electron Hamiltonian.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="FNMC" APPEAR="Finite nuclear mass correction" KIND="SINGLE" LEVEL="ADVANCED">
              %%Keyword: FNMC <advanced>
              <HELP>
              Request that the so-called Finite Nuclear Mass Correction, excluded by the Born-Oppenheimer approximation,
              be added to the one-electron Hamiltonian.
              </HELP>
              </KEYWORD>

:kword:`WELL integrals`
  Request computation of Pauli repulsion integrals for dielectric
  cavity reaction field calculations.
  The first line specifies the total number of primitive well integrals in the
  repulsion integral. Then follows a number of lines, one for each
  well integral, specifying the coefficient of the well integral in the
  linear combination of the well integrals which defines the repulsion integral,
  the exponent of the well integral, and the distance of the center of the
  Gaussian from the origin. In total three entries on each line.
  All entries in atomic units.
  If zero or a negative number is specified for the number of well integrals
  a standard set of 3 integrals with their position adjusted for the radius of
  the cavity will be used.
  If the distance of the center of the Gaussian from the origin is
  negative displacements relative to the cavity radius is assumed.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="WELL" APPEAR="Well integrals" KIND="REALS_COMPUTED" SIZE="3" LEVEL="BASIC">
              <ALTERNATE KIND="INT" />
              %%Keyword: Well integrals <basic>
              <HELP>
              Request computation of Pauli repulsion integrals for dielectric
              cavity reaction field calculations.
              </HELP>
              The first line specifies the total number of primitive well integrals in the
              repulsion integral. Then follows a number of lines, one for each
              well integral, specifying the coefficient of the well integral in the
              linear combination of the well integrals which defines the repulsion integral,
              the exponent of the well integral, and the distance of the center of the
              Gaussian from the origin. In total three entries on each line.
              All entries in atomic units.
              If zero or a negative number is specified for the number of well integrals
              a standard set of 3 integrals with their position adjusted for the radius of
              the cavity will be used.
              If the distance of the center of the Gaussian from the origin is
              negative displacements relative to the cavity radius is assumed.
              </KEYWORD>

:kword:`XFIEld integrals`
  Request the presence of an external electric field represented by a
  number of partial charges and dipoles. Optionally, polarisabilities may be specified whose
  induced dipoles are determined self-consistently during the SCF iteration.
  The first line may contain, apart from the first integer [nXF] (number of centers), up to
  four additional integers. The second integer [nOrd] specifies the maximum multipole order,
  or -1 signifying no permanent multipoles. Default is 1 (charges and dipoles). The third
  integer [p] specifies the type of external polarisabilities: 0 (default) no polarisabilities,
  1 (isotropic), or 2 (anisotropic). The fourth integer [nFrag] specifies the number of fragments one
  multipole may contribute to (relevant only if polarisabilities are present). The default is 0,
  meaning that each permanent multipole is only excluded in the calculation of the field at its own
  polarisability, 1 means that one gives a fragment number to each multipole and that the static
  multipoles do not contribute to the polarising field within the same fragment, whereas 2 can be
  used in more complex situations, e.g. polymers, allowing you to specify a second fragment number
  so that junction atoms does not contribute to either of the neighbouring fragments.
  Finally, the fifth and last integer [nRead] (relevant only if Langevin dipoles are used) may
  be 0 or 1 (where 0 is default), specifying whether an element number (e.g. 8 for oxygen) should be
  read for each multipole. In that case the default radius for that element is used to determine which
  Langevin grid points should be annihilated. A negative element number signifies that a particular
  radius should be used for that multipole, in thousandths of a bohr (-1400 meaning 1.4 bohr).
  Then follows nXF lines, one for each center. On each line is first nFrag+nRead (which may equal 0)
  integers, specifying the fragments that the multipole should not contribute to (the first fragment is
  taken as the fragment that the polarisability belongs to) and the element number. Then follows
  the three coordinates of the center, followed by the multipoles and polarisabilities. The number of
  multipole entries is 0 for nOrd=-1, 1 for nOrd=0, 4 for nOrd=1, and 10 for nOrd=2. The number of
  polarisability entries are 0 for p=0, 1 for p=1, and 6 for p=2. The order of quadrupole moment and
  anisotropic polarisability entries is xx, xy, xz, yy, yz, zz. If default is used, i.e. only specifying
  the number of centers on the first line, each of these lines will contain 7 entries (coordinates,
  charge, and dipole vector). All entries are in atomic units, if not otherwise requested by the :kword:`angstrom`
  keyword that must be placed between nXF and nOrd. All these data can be stored in a separate file whose
  name must be passed as an argument of the :kword:`XField` keyword.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="XFIELD" APPEAR="External field" KIND="CUSTOM" LEVEL="BASIC">
              <ALTERNATE KIND="STRING" />
              %%Keyword: Xfield integrals <basic>
              <HELP>
              Request the presence of an external electric field represented by a
              number of partial charges and dipoles. Optionally, polarisabilities may be specified whose
              induced dipoles are determined self-consistently during the SCF iteration.
              </HELP>
              The first line may contain, apart from the first integer (nXF) (number of centers), up to
              four additional integers. The second integer (nOrd) specifies the maximum multipole order,
              or -1 signifying no permanent multipoles. Default is 1 (charges and dipoles). The third
              integer (p) specifies the type of external polarisabilities: 0 (default) no polarisabilities,
              1 (isotropic), or 2 (anisotropic). The fourth integer (nFrag) specifies the number of fragments one
              multipole may contribute to (relevant only if polarisabilities are present). The default is 0,
              meaning that each permanent multipole is only excluded in the calculation of the field at its own
              polarisability, 1 means that one gives a fragment number to each multipole and that the static
              multipoles do not contribute to the polarising field within the same fragment, whereas 2 can be
              used in more complex situations, e.g. polymers, allowing you to specify a second fragment number
              so that junction atoms does not contribute to either of the neighbouring fragments.
              Finally, the fifth and last integer (nRead) (relevant only if Langevin dipoles are used) may
              be 0 or 1 (where 0 is default), specifying whether an element number (e.g. 8 for oxygen) should be
              read for each multipole. In that case the default radius for that element is used to determine which
              Langevin grid points should be annihilated. A negative element number signifies that a particular
              radius should be used for that multipole, in thousandths of a bohr (-1400 meaning 1.4 bohr).
              Then follows nXF lines, one for each center. On each line is first nFrag+nRead (which may equal 0)
              integers, specifying the fragments that the multipole should not contribute to (the first fragment is
              taken as the fragment that the polarisability belongs to) and the element number. Then follows
              the three coordinates of the center, followed by the multipoles and polarisabilities. The number of
              multipole entries is 0 for nOrd=-1, 1 for nOrd=0, 4 for nOrd=1, and 10 for nOrd=2. The number of
              polarisability entries are 0 for p=0, 1 for p=1, and 6 for p=2. The order of quadrupole moment and
              anisotropic polarisability entries is xx, xy, xz, yy, yz, zz. If default is used, i.e. only specifying
              the number of centers on the first line, each of these lines will contain 7 entries (coordinates,
              charge, and dipole vector). All entries are in atomic units, if not otherwise requested by the angstrom
              keyword that must be placed between nXF and nOrd. All these data can be stored in a separate file whose
              name must be passed as an argument of the XField keyword.
              </KEYWORD>

:kword:`SDIPole`
  Requests computation of velocity integrals. This is usually enabled by default.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="SDIPOLE" APPEAR="Velocity integrals" KIND="SINGLE" LEVEL="ADVANCED">
              %%Keyword: Sdipole <basic>
              <HELP>
              Requests computation of velocity integrals.
              </HELP>
              </KEYWORD>

:kword:`ANGM`
  Supplement
  :file:`ONEINT` for transition angular momentum calculations.
  Entry which specifies the angular momentum origin (in au).
  By default this is enabled with the origin at the center of mass.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ANGM" APPEAR="Angular momentum" KIND="REALS" SIZE="3" LEVEL="ADVANCED">
              %%Keyword: Angm <basic>
              <HELP>
              Supplement the file for transition angular momentum calculations.
              Enter the angular momentum operator origin (in au).
              </HELP>
              The keyword is followed by a card which specifies the angular momentum
              origin (in au).
              </KEYWORD>

:kword:`OMQI`
  Supplement
  :file:`ONEINT` for transition orbital magnetic quadrupole calculations.
  Entry which specifies the orbital magnetic quadrupole origin (in au).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="OMQI" APPEAR="Orbital magnetic quadrupole" KIND="REALS" SIZE="3" LEVEL="ADVANCED">
              %%Keyword: OMQI <basic>
              <HELP>
              Supplement the file for transition orbital magnetic quadrupole calculations.
              Enter the orbital magnetic quadrupole operator origin (in au).
              </HELP>
              The keyword is followed by a card which specifies the orbital magnetic quadrupole
              origin (in au).
              </KEYWORD>

:kword:`AMPR`
  Request the computation of angular momentum product integrals.
  The keyword is followed by values which specifies the angular momentum
  origin (in au).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="AMPR" APPEAR="Angular momentum product" KIND="REALS" SIZE="3" LEVEL="ADVANCED">
              <HELP>
              Request the computation of angular momentum product integrals and specify the
              angular momentum origin (in au).
              </HELP>
              %%Keyword: Ampr <basic>
              Request the computation of angular momentum product integrals.
              The keyword is followed by a card which specifies the angular momentum
              origin (in au).
              </KEYWORD>

:kword:`DSHD`
  Requests the computation of diamagnetic shielding integrals. The first
  entry specifies the gauge origin. Then follows an integer
  specifying the number of points at which the diamagnetic
  shielding will be computed. If this entry is zero, the diamagnetic
  shielding will be computed at each nucleus. If nonzero, then the
  coordinates (in au) for each origin has to be supplied, one entry for each
  origin.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="DSHD" APPEAR="Diamagnetic shielding" KIND="STRINGS" SIZE="10" LEVEL="ADVANCED">
              %%Keyword: DSHD <basic>
              <HELP>
              Activate the computation of diamagnetic shielding integrals. The first entry
              specifies the gauge origin. On the subsequent entries an
              integer specifying the number of points at which the diamagnetic
              shielding will be computed. If this entry is zero, the diamagnetic
              shielding will be computed at each nucleus. If nonzero, then the
              coordinates (in au) for each origin has to be supplied, one entry for each
              origin.
              </HELP>
              </KEYWORD>

:kword:`MXTC`
  Requests the computation of X2C transformed hyperfine magnetic integrals (used in subsequent
  hyperfine calculations), has to be used together with the keyword :kword:`RX2C`.
  If one wants to calculate the non-relativistic limit, one can simply set up a large
  speed of light value.
  See reference for details :cite:`Feng_JChemTheoryComput_Electron_2021`.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="MXTC" APPEAR="X2C hyperfine magnetic" KIND="SINGLE" REQUIRE="RX2C" LEVEL="BASIC">
              %%Keyword: MXTC <basic>
              <HELP>
              Requests the computation of X2C transformed hyperfine magnetic integrals (used in subsequent
              hyperfine calculations), has to be used together with the keyword RX2C.
              If one wants to calculate the non-relativistic limit, one can simply set up a large
              speed of light value.
              </HELP>
              </KEYWORD>

  .. :kword:`DOUGlas-kroll`
     Explicit request that the one-electron Hamiltonian include the scalar relativistic
     effects according to the so-called Douglas--Kroll transformation.

  ..   .. xmldoc:: %%Keyword: Douglas-Kroll <basic>
                   Explicit request that the one-electron Hamiltonian include the scalar relativistic
                   effects according to the so-called Douglas-Kroll transformation.
                   This option is automatically invoked for the ANO-RCC and ANO-DK3 basis sets.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="DOUGLAS-KROLL" KIND="SINGLE" LEVEL="UNDOCUMENTED" />

:kword:`RX2C`
  Request the scalar relativistic X2C (eXact-two-Component) corrections to the
  one-electron Hamiltonian as well as the property integrals.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="RX2C" APPEAR="Relativistic X2C integrals" KIND="SINGLE" EXCLUSIVE="RBSS" LEVEL="BASIC">
              %%Keyword: RX2C <basic>
              <HELP>
              Request the scalar relativistic X2C (eXact-two-Component) corrections to the
              one-electron Hamiltonian as well as the property integrals.
              </HELP>
              </KEYWORD>

:kword:`RBSS`
  Request the scalar relativistic BSS (Barysz--Sadlej--Snijders) corrections to the
  one-electron Hamiltonian as well as the property integrals. The non-iterative
  scheme is employed for the construction of BSS transformation.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="RBSS" APPEAR="Relativistic BSS integrals" KIND="SINGLE" EXCLUSIVE="RX2C" LEVEL="BASIC">
              %%Keyword: RBSS <basic>
              <HELP>
              Request the scalar relativistic BSS (Barysz-Sadlej-Snijders) corrections to the
              one-electron Hamiltonian as well as the property integrals. The non-iterative
              scheme is employed for the construction of BSS transformation.
              </HELP>
              </KEYWORD>

:kword:`NOAMfi`
  Explicit request for no computation of atomic mean-field integrals.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="NOAM" APPEAR="No AMFI integrals" KIND="SINGLE" EXCLUSIVE="AMFI" LEVEL="BASIC">
              %%Keyword: NOAMFI <basic>
              <HELP>
              Explicit request for no computation of atomic mean-field integrals.
              </HELP>
              </KEYWORD>

:kword:`AMFI`
  Explicit request for the computation of atomic mean-field integrals (used in
  subsequent spin--orbit calculations). These integrals are computed by default for the
  ANO-RCC and ANO-DK3 basis sets.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="AMFI" APPEAR="AMFI integrals option" KIND="SINGLE" EXCLUSIVE="NOAM" LEVEL="BASIC">
              %%Keyword: AMFI <basic>
              <HELP>
              Explicit request for the computation of atomic mean-field integrals (used in
              subsequent spin-orbit calculations). These integrals are computed by default for
              relativistic basis sets like the ANO-RCC and ANO-DK3 basis sets.
              </HELP>
              </KEYWORD>

:kword:`EPOT`
  An integer follows which represents the
  number of points for which the electric potential will be computed. If
  this number is zero, the electric potential acting on each nucleus will be
  computed. If nonzero, then the coordinates (in au) for each point have to be
  supplied, one entry for each point.
  This keyword is mutually exclusive with :kword:`EFLD` and :kword:`FLDG`.

  .. xmldoc:: <SELECT MODULE="GATEWAY" NAME="EF" APPEAR="Electric potential, field and field gradient options" LEVEL="BASIC" CONTAINS="EPOT,EFLD,FLDG">

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="EPOT" APPEAR="Electric potential" KIND="CUSTOM" LEVEL="ADVANCED">
              <HELP>
              Activate the computation of the electric potential at some points.
              The first entry is the number of points at which this should be computed.
              The coordinates (in au) for each point have to be
              supplied on the subsequent entries.
              If the number of points is zero, the electric potential on each nucleus will be computed.
              </HELP>
              %%Keyword: EPOT <basic>
              An integer follows which represents the
              number of points for which the electric potential will be computed. If
              this number is zero, the electric potential acting on each nucleus will be
              computed. If nonzero, then the coordinates (in au) for each point have to be
              supplied, one entry for each point.
              This keyword is mutually exclusive with EFLD and FLDG.
              </KEYWORD>

:kword:`EFLD`
  An integer follows which represents the
  number of points for which the electric potential and electric field will be computed. If
  this number is zero, the electric field acting on each nucleus will be
  computed. If nonzero, then the coordinates (in au) for each point have to be
  supplied, one entry for each point.
  This keyword is mutually exclusive with :kword:`EPOT` and :kword:`FLDG`.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="EFLD" APPEAR="Electric field" KIND="CUSTOM" LEVEL="ADVANCED">
              <HELP>
              Activate the computation of the electric potential and field at some points.
              The first entry is the number of points at which this should be computed.
              The coordinates (in au) for each point have to be
              supplied on the subsequent entries.
              If the number of points is zero, the electric field on each nucleus will be computed.
              </HELP>
              %%Keyword: EFLD <basic>
              Followed by a card with an integer entry which represents the
              number of points for which the electric potential and electric field will be computed. If
              this number is zero, the electric field acting on each nucleus will be
              computed. If nonzero, then the coordinates (in au) for each point have to be
              supplied, one entry for each point.
              This keyword is mutually exclusive with EPOT and FLDG.
              </KEYWORD>

:kword:`FLDG`
  An integer required which represents the
  number of points for which the electric potential, electric field and electric field gradient will be
  computed. If this number is zero, the electric field gradient acting
  on each nucleus will be computed. If nonzero, then either the coordinates (in au) for
  each point or labels for each atom center have to be supplied, one entry for each point.
  In case a label is supplied it must match one of those given previous in the input during specification
  of the coordinates of the atom centers. Using a label instead of a coordinate can e.g. be useful
  in something like a geometry optimization where the coordinate isn't known when the input is written.
  This keyword is mutually exclusive with :kword:`EPOT` and :kword:`EFLD`.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="FLDG" APPEAR="Electric field gradient" KIND="CUSTOM" LEVEL="ADVANCED">
              <HELP>
              Activate the computation of the electric potential, field and field gradient at some points.
              The first entry is the number of points at which this should be computed.
              The coordinates (in au) for each point have to be
              supplied on the subsequent entries.
              If the number of points is zero, the electric field gradient on each nucleus will be computed.
              </HELP>
              %%Keyword: FLDG <basic>
              An integer required which represents the
              number of points for which the electric potential, electric field and electric field gradient will be
              computed. If this number is zero, the electric field gradient acting
              on each nucleus will be computed. If nonzero, then either the coordinates (in au) for
              each point or labels for each atom center have to be supplied, one entry for each point.
              In case a label is supplied it must match one of those given previous in the input during specification
              of the coordinates of the atom centers. Using a label instead of a coordinate can e.g. be useful
              in something like a geometry optimization where the coordinate isn't known when the input is written.
              This keyword is mutually exclusive with EPOT and EFLD.
              </KEYWORD>

  .. xmldoc:: </SELECT>

:kword:`EMPC`
  Use point charges specified by the keyword :kword:`XField` when calculating the Orbital-Free Embedding potential.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="EMPC" APPEAR="Embedded Point Charges" KIND="SINGLE" LEVEL="BASIC">
              %%Keyword: EMPC <basic>
              <HELP>
              Use point charges specified by the keyword XFIELD when calculating the Orbital-Free Embedding potential.
              </HELP>
              </KEYWORD>

:kword:`RF-Input`
  Specification of reaction field parameters, consult the reaction field section of this manual.

  .. xmldoc:: %%Keyword: RF-input <basic>
              Specification of reaction field parameters, consult the reaction field section of this
              manual.

.. xmldoc:: </GROUP>

Keywords associated with nuclear charge distribution models
...........................................................

Input parameters associated with different models of the nuclear charge distribution. The
default is to use a point charge representation.

.. xmldoc:: <GROUP MODULE="GATEWAY" NAME="NUCLEAR" APPEAR="Nuclear Models" KIND="BOX" LEVEL="ADVANCED">

.. class:: keywordlist

:kword:`FINIte`
  Request a finite center representation of the nuclei by a single exponent s-type Gaussian.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="FINITE" APPEAR="Activate Gaussian Nuclear Charge Distribution" KIND="SINGLE" EXCLUSIVE="MGAUSSIAN" LEVEL="ADVANCED">
              %%Keyword: Finite <basic>
              <HELP>
              Request a finite center representation of the nuclei by a single exponent s-type Gaussian.
              </HELP>
              </KEYWORD>

:kword:`MGAUSsian`
  Request a finite center representation of the nuclei by a modified Gaussian.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="MGAUSSIAN" APPEAR="Activate Modified Gaussian Charge Distribution" KIND="SINGLE" EXCLUSIVE="FINITE" LEVEL="ADVANCED">
              %%Keyword: MGauss <basic>
              <HELP>
              Request a finite center representation of the nuclei by a modified Gaussian.
              </HELP>
              </KEYWORD>

.. xmldoc:: </GROUP>

The Saddle method for transition state optimization
...................................................

The Saddle method :cite:`Saddle_method` is a method to locate transition states (TS). The method, in practice, can be viewed as a
series of constrained optimization along the reaction path, which connects two starting structure (could be
the reactants and products of a reaction), to locate the region of the TS and a subsequent unconstrained optimization
to locate the TS. The only data needed for the procedure are the energies and coordinates of the two structures.
**Note** that this option will overwrite the
coordinates which have already been specified with the normal input of the molecular geometry. However, this does
not make that input section redundant and should always be included.

.. xmldoc:: <GROUP MODULE="GATEWAY" NAME="SADDLEMETHOD" APPEAR="Saddle Method" KIND="BOX" LEVEL="ADVANCED">

.. class:: keywordlist

:kword:`RP-Coordinates`
  This activates the Saddle method for TS geometry optimization.
  The line is followed by an integer specifying the number of symmetry unique coordinates to be specified. This
  is followed by two sets of input --- one line with the energy and then the Cartesian coordinates in bohr --- for
  each of the two starting structures of the Saddle method. Note that the order of the coordinates must always
  match the order specified with the conventional input of the coordinates of the molecular system.
  Alternatively, two lines with the filenames containing the coordinates of reactants and products, respectively,
  (in XYZ format) can be given.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="RP-COORD" APPEAR="Reactants and Products coordinates" KIND="STRINGS" SIZE="2" LEVEL="ADVANCED">
              %%Keyword: RP-Coordinates <advanced>
              <HELP>
              This activates the Saddle method for TS geometry optimization.
              The line is followed by an integer specifying the number of symmetry unique coordinates to be specified. This
              is followed by two sets of input - one line with the energy and then the Cartesian coordinates in bohr - for
              each of the two starting structures of the Saddle method. Note that the order of the coordinates must always
              match the order specified with the conventional input of the coordinates of the molecular system.
              Alternatively, two lines with the filenames containing the coordinates of reactants and products, respectively,
              (in XYZ format) can be given.
              </HELP>
              </KEYWORD>

:kword:`NOALign`
  By default, the two starting structures are aligned to minimize the root mean square distance (RMSD) between them,
  in particular, the first structure is moved and the second structure remains fixed.
  If this keyword is given, the starting structures are used as given.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="NOALIGN" APPEAR="No align" KIND="SINGLE" LEVEL="ADVANCED" EXCLUSIVE="ALIGNONLY">
              %%Keyword: NoAlign <advanced>
              <HELP>
              By default, the two starting structures are aligned to minimize the root mean square distance (RMSD) between them,
              in particular, the first structure is moved and the second structure remains fixed.
              If this keyword is given, the starting structures are used as given.
              </HELP>
              </KEYWORD>

:kword:`ALIGn only`
  The two starting structures are aligned, but nothing more is done.
  An input block for :program:`seward` is still needed, but no integrals are computed.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ALIGNONLY" APPEAR="Align only" KIND="SINGLE" LEVEL="ADVANCED" EXCLUSIVE="NOALIGN">
              %%Keyword: AlignOnly <advanced>
              <HELP>
              The two starting structures are aligned, but nothing more is done.
              An input block for SEWARD is still needed, but no integrals are computed.
              </HELP>
              </KEYWORD>

:kword:`WEIGhts`
  Relative weights of each atom to use for the alignment and for the calculations of the
  "distance" between structures. The possibilities are:

  .. container:: list

    **MASS**. This is the default. Each atom is given a weight proportional to its mass. Equivalent
    to mass-weighted coordinates.

    **EQUAL**. All atoms have an equal weight.

    **HEAVY**. Only heavy atoms are considered, with equal weights. Hydrogens are given zero weight.

  .. compound::

    A list of :math:`N` numbers can also be provided, and they will be used as weights for the :math:`N`
    symmetry-unique atoms. For example: ::

      WEIGhts
      0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0

    will align only atoms 7--12 out of 16.

  Note that, in any case, weights of 0 are likely to cause problems with constraints, and they will
  be increased automatically.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="WEIGHTS" APPEAR="Weights" KIND="STRING" DEFAULT_VALUE="Mass" LEVEL="ADVANCED">
              %%Keyword: Weights <advanced>
              <HELP>
              Relative weights of each atom to use for the alignment and for the calculation of the
              "distance" between structures. The possibilities are:

              MASS  -- This is the default. Each atom is given a weight proportional to its mass. Equivalent to mass-weighted coordinates.
              EQUAL -- All atoms have an equal weight.
              HEAVY -- Only heavy atoms are considered, with equal weights. Hydrogens are given zero weight.

              A list of N numbers can also be provided, and they will be used as weights for the N symmetry-unique atoms.
              </HELP>
              </KEYWORD>

:kword:`SADDle`
  Step size reduction for each macro iteration of the saddle method.
  The value is given in weighted coordinates, divided by the square root of the total weight
  (see the :kword:`WEIGHTS` keyword).
  Default value is 0.1 au.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="SADDLE" APPEAR="Saddle Step" KIND="REAL" DEFAULT_VALUE="0.1" LEVEL="ADVANCED">
              %%Keyword: SaddleStep <advanced>
              <HELP>
              Step size reduction for each macro iteration of the saddle method.
              The value is given in weighted coordinates, divided by the square root of the total weight
              (see the WEIGHTS keyword).
              Default value is 0.1 au.
              </HELP>
              </KEYWORD>

.. xmldoc:: </GROUP>

Geometry optimization using constrained internal coordinates
............................................................

.. compound::

  These keyword are used together with the :program:`geo` to optimize the relative position of two or
  more rigid fragments. The starting geometry can either be defined by supplying an xyz-file for each
  fragment using the keyword :kword:`coord` or by placing a file named :file:`$Project.zmt` in a directory
  named :file:`$Project.GEO`. The z-matrix should be in the following format: ::

    O     0.982011 0                                 1
    H     0.982013 0   104.959565 0                  2   1
    H     1.933697 1   107.655494 1   114.496053 1   2   3   1
    O     0.988177 0   173.057942 1   -56.200750 1   4   2   3
    H     0.979890 0   104.714572 0   179.879745 1   5   4   2

  where the three columns of real numbers are internal coordinates, and the last
  three columns of integers indicate which other atoms that are used to define
  the coordinate. The type of coordinates from left to right are bond distances,
  bond angles and dihedral angels, both for the coordinates and the link. The
  column of integers just to the right of each coordinate indicate if this
  coordinate should be optimized or not (1 = optimize, 0 = do not optimize).

There are also two utility-keywords used to create a z-matrix or to write out
a constraint-definition for :program:`slapaf` and keywords to rotate and translate
fragments. (See documentation for :program:`GEO` for more details)

.. class:: keywordlist

:kword:`HYPER`
  This keyword is used to specify that a geometry optimization with constrained
  internal coordinates shall be performed later, a z-matrix and a set of
  displaced geometries are therefore constructed. The keyword should be followed by three
  real numbers defining the maximum displacement for each coordinate type.
  The order from left to right is bond distances, bond angles and dihedral angles.
  To use default values for the parameters the mutually exclusive keyword
  :kword:`geo` should be entered instead.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="HYPER" APPEAR="hyper" KIND="REALS" SIZE="3" LEVEL="ADVANCED" EXCLUSIVE="GEO">
              <HELP>
              Perform a geometry optimization in constrained internal coordinates using
              user-defined parameters for hypersurface gridpoints.
              </HELP>
              %%Keyword: hyper <advanced>
              Followed by three real numbers to define hypersurface gridpoint
              parameters for bond distance, bond angles and dihedral angles. Allows for a
              geometry optimization in constrained internal coordinates.
              </KEYWORD>

:kword:`GEO`
  This keyword is used to specify that a geometry optimization with constrained
  internal coordinates shall be performed later, a z-matrix and a set of displaced
  geometries are therefore constructed. Default values of 0.15 Å, 2.5 degrees,
  and 2.5 degrees are used for the maximum displacement of bond distances, bond
  angles and dihedral angles respectively. To enter other values for the parameters
  the mutually exclusive keyword :kword:`hyper` should be used.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="GEO" APPEAR="geo" KIND="SINGLE" LEVEL="ADVANCED" EXCLUSIVE="HYPER">
              %%Keyword: geo <advanced>
              <HELP>
              Perform a geometry optimization in constrained internal coordinates using
              default parameters for hypersurface gridpoints (bond=0.15, bond angle=2.5, and
              dihedral angle=2.5)
              </HELP>
              </KEYWORD>

:kword:`OPTH`
  This keyword is used to define the specific details of the optimization algorithm used
  for the geometry optimization in constrained internal coordinates.
  This keyword should be followed by two to three lines of parameter. The first line should
  contain an integer indicating optimization type (1 = steepest descent, 2 = a mix of
  steepest descent and Newton's method, and 3 = Newton's method). The second line
  should contain a real number defining a step factor.
  This number is multiplied with the gradient to obtain the step length.
  For optimization type 2 a third line containing a real number that defines a gradient limit
  should be entered. This limit determines how large the gradient must be for the steepest
  descent algorithm to be used. When the gradient is smaller than this limit Newton's method
  is used instead.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="OPTH" APPEAR="OptH" KIND="STRINGS" SIZE="3" LEVEL="ADVANCED">
              %%Keyword: opth <advanced>
              <HELP>
              Followed by one line with an integer specifying the optimization type (1 = steepest
              descent, 2 = mixed, 3 = Newton's method), a second line with a real number specifying
              a step factor and if using type "mixed" a third line with a real number specifying
              the maximum gradient size for which steepest descent is used.
              </HELP>
              </KEYWORD>

:kword:`OLDZ`
  This keyword is used both to start a new calculation from a user-defined z-matrix and
  to restart calculations. When using the keyword for a new calculation a directory
  :file:`$Project.GEO` must exist and contain a file called :file:`$Project.zmt` with a z-matrix in
  the format defined above. The directory must not contain any files with the suffix :file:`.info`
  when performing a fresh calculation since these files contain restart information.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="OLDZ" APPEAR="Old Z-matrix" KIND="SINGLE" LEVEL="ADVANCED">
              %%Keyword: OldZ <advanced>
              <HELP>
              Start new calculation based on $Project.GEO/$Project.zmt
              </HELP>
              </KEYWORD>

:kword:`ZONLY`
  This keyword is used to construct a z-matrix from a set of xyz-files (fragments)
  and store it in the directory :file:`$Project.GEO`. The optimization parameters
  of the resulting z-matrix are set so that only coordinates linking fragments are
  set to 1 (= optimize coordinate).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ZONLY" APPEAR="z-constraints" KIND="SINGLE" LEVEL="ADVANCED">
              <HELP>
              Prints a z-matrix ($Project.zmt) in the directory $Project.GEO.
              </HELP>
              %%Keyword: zonly <advanced>
              A z-matrix ($Project.zmt) is printed in the $Project.GEO-directory. The optimization parameters
              are set so that each fragment is kept rigid and only coordinates linking fragments are
              optimized.
              </KEYWORD>

:kword:`ZCONS`
  This keyword is used to define constraints from a set of xyz-files (fragments)
  on a form that could be supplied to the
  :program:`slapaf` in order to keep the fragments rigid. The resulting constraints-file
  is named :file:`$Project.cns` and stored in the directory :file:`$Project.GEO`. The
  atom-numbers in this constraint-file will not match those of your original xyz-file and
  should not be used together with this. Instead a new xyz-file named :file:`cons.xyz` is created
  and placed into the directory :file:`$Project.GEO`, this has the proper numbering to use together with the constraints.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ZCONS" APPEAR="z-constraints" KIND="SINGLE" LEVEL="ADVANCED">
              <HELP>
              Prints a constraints-file ($Project.cns) and an xyz-file (cons.xyz)
              with matching atom numbering in the directory $Project.GEO .
              </HELP>
              %%Keyword: zcons <advanced>
              Prints a file with a constraints-definition for rigid fragments formatted for
              use in slapaf ($Project.cns) and an xyz-file (cons.xyz) with the same
              atom number. Both files are printed in the $Project.GEO-directory.
              </KEYWORD>

:kword:`ORIGIN`
  This keyword is used to translate and rotate a set of xyz-files. The keyword must be entered
  before the xyz-files is entered with :kword:`coord`.
  The keyword should be followed by two lines for each fragment in the input.
  The first row should contain 3 real numbers defining a translation (x, y, z),
  the second row should contain 9 numbers defining a rotation (row1, row2, row3 of
  rotation matrix). The keyword :kword:`origin` is mutually exclusive with the keyword :kword:`frgm`
  which is an alternative way to express the same rotations and translations.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ORIG" APPEAR="origin" KIND="UNKNOWN" LEVEL="ADVANCED" EXCLUSIVE="FRGM">
              %%Keyword: origin <advanced>
              <HELP>
              Followed by two lines for each fragment.
              The first line should have 3 real numbers defining a translation and the
              second 9 real numbers defining a rotation.
              </HELP>
              (See ROT and TRANS.)
              Must occur before the xyz-files are entered with coord.
              </KEYWORD>

:kword:`FRGM`
  This keyword is used together with the keywords :kword:`rot` and :kword:`trans` to define
  rotation and translation of a specific fragment. :kword:`Frgm` defines an active fragment (each xyz-file is considered a fragment, the files are numbered based on
  order of appearance in the input from top to bottom). The keyword must be entered before the xyz-file it is supposed to modify is
  entered with :kword:`coord`. Each occurence of
  :kword:`frgm` should be followed by either one of or both of the keywords :kword:`rot` and :kword:`trans`
  to define rotation and translation. This keyword is mutually exclusive with the keyword :kword:`origin`

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="FRGM" APPEAR="fragment" KIND="INT" LEVEL="ADVANCED" EXCLUSIVE="ORIGIN">
              %%Keyword: frgm <advanced>
              <HELP>
              Followed by a fragment number and either or both of ROT and TRANS to define
              rotation and translation of this fragment.
              </HELP>
              Each xyz-file is considered a
              fragment, numbering is from top to bottom of input. Must occur before the modified xyz-file
              is entered with coord.
              </KEYWORD>

:kword:`ROT`
  This keyword should be followed by nine real numbers defining the rotation for the fragment defined by
  the preceding :kword:`frgm`. The numbers should be the nine elements of a rotation matrix
  listed with one full row at the time.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="ROT" APPEAR="rotation" KIND="REALS" SIZE="9" LEVEL="ADVANCED" REQUIRE="FRGM">
              <HELP>
              The nine numbers define a rotation matrix.
              </HELP>
              %%Keyword: rot <advanced>
              The keyword should be followed by nine real numbers defining a rotation matrix.
              Should only be used together with the FRGM keyword.
              </KEYWORD>

:kword:`TRANS`
  This keyword should be followed by three real numbers defining the translation for the fragment defined
  by the preceding :kword:`frgm`. The numbers should be the x, y and z coordinates of the translation
  in that order.

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="TRANS" APPEAR="translation" KIND="REALS" SIZE="3" LEVEL="ADVANCED" REQUIRE="FRGM">
              <HELP>
              The three numbers define a translation. (x y z)
              </HELP>
              %%Keyword: trans <advanced>
              The keyword should be followed by three real numbers defining a translation (x y z).
              Should only be used together with the FRGM keyword.
              </KEYWORD>

Example of an input: ::

  &GATEWAY
  Title
  Water Dimer
  frgm=2
  trans=3.0 0.0 0.0
  Coord=water_monomer.xyz
  Coord=water_monomer.xyz
  Group=c1
  basis=cc-pVTZ
  hyper
  0.2 3.0 3.0
  opth
  3
  15.0d0

In this example a water dimer is constructed from a single monomer by translating
it 3.0 Å with the keyword trans. An optimization in constrained internal
coordinates using newtons method with a step-factor of 15.0d0 are prepared for. For
more details on these optimization see the manual entry for the module
:program:`geo`.

.. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="TINKER" KIND="SINGLE" LEVEL="UNDOCUMENTED" />

QM/MM calculations with |molcas|/:program:`Gromacs`
...................................................

The following keywords apply to QM/MM calculations performed with the |molcas|/:program:`GROMACS` interface (see :numref:`UG:sec:espf` for more details).

.. class:: keywordlist

:kword:`GROMacs`
  Requests that the definition of the full QM+MM system should be imported from :program:`GROMACS`. The keyword should be followed by one of the options :kword:`SIMPLE` or :kword:`CASTMM` on the next line. In the case of :kword:`SIMPLE`, all MM atoms defined in the :program:`GROMACS` input will be treated as *outer* MM atoms in |molcas|. This means, for example, that in a geometry optimization, their positions will be updated using microiterations rather than the conventional optimization scheme. Conversely, :kword:`CASTMM` requests that certain MM atoms should be treated as *inner* MM atoms in |molcas|. Their positions will be updated with the same scheme as used for the QM atoms. The :kword:`CASTMM` option should be followed by two additional input lines, the first one containing the number of MM atoms to convert from outer to inner type, and the second containing a list of those atoms (using their corresponding :program:`GROMACS` indices).

  .. xmldoc:: <GROUP MODULE="GATEWAY" NAME="GROMACS" APPEAR="Gromacs" KIND="RADIO" LEVEL="ADVANCED">
              %%Keyword: Gromacs <basic>
              Requests that the definition of the full QM+MM system should be imported from GROMACS.
              The keyword should be followed by one of the options SIMPLE or CASTMM on the next line.
              In the case of SIMPLE, all MM atoms defined in the GROMACS input will be treated as outer MM atoms in MOLCAS.
              This means, for example, that in a geometry optimization, their positions will be updated using microiterations rather than the conventional optimization scheme.
              Conversely, CASTMM requests that certain MM atoms should be treated as inner MM atoms in MOLCAS.
              Their positions will be updated with the same scheme as used for the QM atoms.
              The CASTMM option should be followed by two additional input lines,
              the first one containing the number of MM atoms to convert from outer to inner type,
              and the second containing a list of those atoms (using their corresponding GROMACS indices).

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="SIMPLE" APPEAR="Simple" KIND="SINGLE" LEVEL="UNDOCUMENTED" />

  .. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="CASTMM" APPEAR="CastMM" KIND="INTS" SIZE="2" LEVEL="UNDOCUMENTED" />

  .. xmldoc:: </GROUP>

:kword:`LINKatoms`
  Defines link atoms for use with the Morokuma updating scheme. The desired number of link atoms should be given as an integer on the next line. This should be followed by additional input lines, one for each link atom to be defined. Each definition should be of the form ILA, IQM, IMM, SCALE, where ILA, IQM and IMM are the :program:`GROMACS` indices of the link atom and the corresponding QM and MM frontier atoms, respectively. SCALE is the scaling factor to be used in the Morokuma scheme. Note that each link atom must be defined as a QM atom in the :program:`GROMACS` input. In addition, the frontier MM atom must be an inner MM atom specified as discussed above.

  .. xmldoc:: %%Keyword: LinkAtoms <advanced>
              Defines link atoms for use with the Morokuma updating scheme (MOLCAS/GROMACS calculations only).
              The desired number of link atoms should be given as an integer on the next line.
              This should be followed by additional input lines, one for each link atom to be defined.
              Each definition should be of the form ILA, IQM, IMM, SCALE, where ILA, IQM and IMM
              are the GROMACS indices of the link atom and the corresponding QM and MM frontier atoms, respectively.
              SCALE is the scaling factor to be used in the Morokuma scheme.
              Note that each link atom must be defined as a QM atom in the GROMACS input.
              In addition, the frontier MM atom must be an inner MM atom specified with the GROMACS keyword in GATEWAY.

.. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="FPCO" KIND="SINGLE" LEVEL="UNDOCUMENTED" />

.. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="FPPR" KIND="SINGLE" LEVEL="UNDOCUMENTED" />

.. xmldoc:: <KEYWORD MODULE="GATEWAY" NAME="PRINT" KIND="INTS_COMPUTED" SIZE="2" LEVEL="UNDOCUMENTED" />

.. xmldoc:: </MODULE>