-
Notifications
You must be signed in to change notification settings - Fork 384
/
input_cp2k_xc.F
1468 lines (1348 loc) · 84.3 KB
/
input_cp2k_xc.F
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
!--------------------------------------------------------------------------------------------------!
! CP2K: A general program to perform molecular dynamics simulations !
! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
! !
! SPDX-License-Identifier: GPL-2.0-or-later !
!--------------------------------------------------------------------------------------------------!
! **************************************************************************************************
!> \brief function that build the xc section of the input
!> \par History
!> 10.2009 moved out of input_cp2k_dft [jgh]
!> \author fawzi
! **************************************************************************************************
MODULE input_cp2k_xc
USE bibliography, ONLY: &
Becke1988, Becke1997, BeckeRoussel1989, Caldeweyher2020, Goedecker1996, Grimme2006, &
Grimme2010, Grimme2011, Heyd2004, Kruse2012, Lee1988, Ortiz1994, Perdew1981, Perdew1996, &
Perdew2008, Proynov2007, Tao2003, Tran2013, Vosko1980, Wellendorff2012, Zhang1998
USE cp_output_handling, ONLY: add_last_numeric,&
cp_print_key_section_create,&
high_print_level
USE input_constants, ONLY: &
do_adiabatic_hybrid_mcy3, do_adiabatic_model_pade, fxc_funct_gga, fxc_funct_lda, &
fxc_funct_pade, fxc_none, gaussian, slater, vdw_nl_drsll, vdw_nl_lmkll, vdw_nl_rvv10, &
vdw_pairpot_dftd2, vdw_pairpot_dftd3, vdw_pairpot_dftd3bj, vdw_pairpot_dftd4, &
xc_funct_b3lyp, xc_funct_beefvdw, xc_funct_blyp, xc_funct_bp, xc_funct_hcth120, &
xc_funct_no_shortcut, xc_funct_olyp, xc_funct_pade, xc_funct_pbe, xc_funct_pbe0, &
xc_funct_tpss, xc_none, xc_pot_energy_none, xc_pot_energy_sum_eigenvalues, &
xc_pot_energy_xc_functional, xc_vdw_fun_none, xc_vdw_fun_nonloc, xc_vdw_fun_pairpot
USE input_cp2k_hfx, ONLY: create_hfx_section
USE input_cp2k_mp2, ONLY: create_mp2_section
USE input_keyword_types, ONLY: keyword_create,&
keyword_release,&
keyword_type
USE input_section_types, ONLY: section_add_keyword,&
section_add_subsection,&
section_create,&
section_release,&
section_type
USE input_val_types, ONLY: char_t,&
integer_t,&
real_t
USE kinds, ONLY: dp
USE string_utilities, ONLY: s2a
USE xc_input_constants, ONLY: &
c_pw92, c_pw92dmc, c_pw92vmc, c_pz, c_pzdmc, c_pzvmc, do_vwn3, do_vwn5, ke_lc, ke_llp, &
ke_ol1, ke_ol2, ke_pbe, ke_pw86, ke_pw91, ke_t92, pz_orig, xalpha, xc_b97_3c, &
xc_b97_grimme, xc_b97_mardirossian, xc_b97_orig, xc_debug_new_routine, &
xc_default_f_routine, xc_deriv_collocate, xc_deriv_nn10_smooth, xc_deriv_nn50_smooth, &
xc_deriv_pw, xc_deriv_spline2, xc_deriv_spline2_smooth, xc_deriv_spline3, &
xc_deriv_spline3_smooth, xc_pbe_orig, xc_pbe_rev, xc_pbe_sol, xc_rho_nn10, xc_rho_nn50, &
xc_rho_no_smooth, xc_rho_spline2_smooth, xc_rho_spline3_smooth, xc_test_lsd_f_routine, &
xgga_b88x, xgga_ev93, xgga_opt, xgga_pbex, xgga_pw86, xgga_pw91, xgga_revpbe
USE xc_libxc, ONLY: libxc_add_sections
#include "./base/base_uses.f90"
IMPLICIT NONE
PRIVATE
LOGICAL, PRIVATE, PARAMETER :: debug_this_module = .TRUE.
CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_xc'
PUBLIC :: create_xc_section, create_xc_fun_section
CONTAINS
! **************************************************************************************************
!> \brief creates the structure of the section needed to select the xc functional
!> \param section the section that will be created
!> \author fawzi
! **************************************************************************************************
SUBROUTINE create_xc_fun_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="xc_functional", &
description="The eXchange-Correlation functional to use.", &
n_keywords=0, n_subsections=4, repeats=.FALSE., &
citations=(/Ortiz1994, Becke1988, Perdew1996, Zhang1998, Lee1988, &
Heyd2004, Vosko1980, Goedecker1996, Perdew1981, &
Tao2003, Wellendorff2012/))
NULLIFY (subsection, keyword)
CALL keyword_create( &
keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="Shortcut for the most common functional combinations.", &
usage="&xc_functional BLYP", &
enum_c_vals=s2a("B3LYP", "PBE0", "BLYP", "BP", "PADE", "LDA", "PBE", &
"TPSS", "HCTH120", "OLYP", "BEEFVDW", "NO_SHORTCUT", "NONE"), &
enum_i_vals=(/xc_funct_b3lyp, xc_funct_pbe0, xc_funct_blyp, xc_funct_bp, xc_funct_pade, xc_funct_pade, xc_funct_pbe, &
xc_funct_tpss, xc_funct_hcth120, xc_funct_olyp, xc_funct_beefvdw, xc_funct_no_shortcut, xc_none/), &
enum_desc=s2a("B3LYP", &
"PBE0 (see note in section XC/XC_FUNCTIONAL/PBE)", &
"BLYP", "BP", "PADE", "Alias for PADE", &
"PBE (see note in section XC/XC_FUNCTIONAL/PBE)", &
"TPSS (not available with LSD, use LIBXC version instead)", "HCTH120", "OLYP", &
"BEEFVDW", "NO_SHORTCUT", "NONE"), &
default_i_val=xc_funct_no_shortcut, &
lone_keyword_i_val=xc_funct_no_shortcut)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL section_create(subsection, __LOCATION__, name="BECKE88", &
description="Uses the Becke 88 exchange functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Becke1988/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="LYP_ADIABATIC", &
description="Uses the LYP correlation functional in an adiabatic fashion", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Lee1988/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="LAMBDA", &
description="Defines the parameter of the adiabatic curve.", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="BECKE88_LR_ADIABATIC", &
description="Uses the Becke 88 longrange exchange functional in an adiabatic fashion", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Becke1988/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="OMEGA", &
description="Potential parameter in erf(omega*r)/r", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="LAMBDA", &
description="Defines the parameter of the adiabatic curve", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="BECKE88_LR", &
description="Uses the Becke 88 longrange exchange functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Becke1988/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="OMEGA", &
description="Potential parameter in erf(omega*r)/r", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="LYP", &
description="Uses the LYP functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Lee1988/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_c", &
description="scales the correlation part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="PADE", &
description="Uses the PADE functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Goedecker1996/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="HCTH", &
description="Uses the HCTH class of functionals", &
n_keywords=0, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="PARAMETER_SET", &
description="Which version of the parameters should be used", &
usage="PARAMETER_SET 407", &
enum_c_vals=(/"93 ", "120", "147", "407", "HLE"/), &
enum_i_vals=(/93, 120, 147, 407, 408/), &
default_i_val=120)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="OPTX", &
description="Uses the OPTX functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="a1", &
description="OPTX a1 coefficient", &
default_r_val=1.05151_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="a2", &
description="OPTX a2 coefficient", &
default_r_val=1.43169_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="gamma", &
description="OPTX gamma coefficient", &
default_r_val=0.006_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL libxc_add_sections(section)
CALL section_create(subsection, __LOCATION__, name="CS1", &
description="Uses the CS1 functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="XGGA", &
description="Uses one of the XGGA functionals (optimized versions of "// &
"some of these functionals might be available outside this section).", &
n_keywords=1, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="FUNCTIONAL", &
description="Which one of the XGGA functionals should be used", &
usage="FUNCTIONAL PW86X", &
enum_c_vals=(/ &
"BECKE88X", &
"PW86X ", &
"PW91X ", &
"PBEX ", &
"REV_PBEX", &
"OPTX ", &
"EV93 "/), &
enum_i_vals=(/xgga_b88x, xgga_pw86, xgga_pw91, xgga_pbex, xgga_revpbe, xgga_opt, xgga_ev93/), &
default_i_val=xgga_b88x)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="KE_GGA", &
description="Uses one of the KE_GGA functionals (optimized versions of "// &
"some of these functionals might be available outside this section). "// &
"These functionals are needed for the computation of the kinetic "// &
"energy in the Kim-Gordon method.", &
n_keywords=1, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="FUNCTIONAL", &
description="Which one of the KE_GGA functionals should be used", &
usage="FUNCTIONAL (OL1|OL2|LLP|PW86|PW91|LC|T92|PBE)", &
enum_c_vals=(/"OL1 ", "OL2 ", "LLP ", "PW86", "PW91", "LC ", "T92 ", "PBE "/), &
enum_i_vals=(/ke_ol1, ke_ol2, ke_llp, ke_pw86, ke_pw91, ke_lc, ke_t92, ke_pbe/), &
enum_desc=s2a("Uses first Ou-Yang and Levy functional, currently not producing correct results", &
"Uses second Ou-Yang and Levy functional, currently not producing correct results", &
"Uses Lee, Lee, and Parr functional", &
"Uses Perdew and Wang's 1986 functional", &
"Uses Perdew and Wang's 1991 functional", &
"Uses Lembarki and Chermette functional", &
"Uses Thakkar functional", &
"Uses the 1996 functional of Perdew, Burke and Ernzerhof"), &
default_i_val=ke_llp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="P86C", &
description="Uses the P86C functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_c", &
description="scales the correlation part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="PW92", &
description="Uses the PerdewWang correlation functional.", &
n_keywords=1, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SCALE", &
description="Scaling of the energy functional", &
default_r_val=1.0_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="PARAMETRIZATION", &
description="Which one of parametrizations should be used", &
usage="PARAMETRIZATION DMC", &
enum_c_vals=(/ &
"ORIGINAL", &
"DMC ", &
"VMC "/), &
enum_i_vals=(/c_pw92, c_pw92dmc, c_pw92vmc/), &
default_i_val=c_pw92)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="PZ81", &
description="Uses the PZ functional.", &
n_keywords=1, n_subsections=0, repeats=.FALSE., &
citations=(/Perdew1981, Ortiz1994/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="PARAMETRIZATION", &
description="Which one of parametrizations should be used", &
usage="PARAMETRIZATION DMC", &
enum_c_vals=(/ &
"ORIGINAL", &
"DMC ", &
"VMC "/), &
enum_i_vals=(/c_pz, c_pzdmc, c_pzvmc/), &
default_i_val=pz_orig)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_c", &
description="scales the correlation part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="TFW", &
description="Uses the TFW functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="TF", &
description="Uses the TF functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="VWN", &
description="Uses the VWN functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Vosko1980/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_c", &
description="scales the correlation part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="FUNCTIONAL_TYPE", &
description="Which version of the VWN functional should be used", &
usage="FUNCTIONAL_TYPE VWN5", &
enum_c_vals=s2a("VWN5", "VWN3"), &
enum_i_vals=(/do_vwn5, do_vwn3/), &
enum_desc=s2a("This is the recommended (correct) version of the VWN functional", &
"This version is the default in Gaussian, but not recommended. "// &
"Notice that it is also employed in Gaussian's default version of B3LYP"), &
default_i_val=do_vwn5)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="XALPHA", &
description="Uses the XALPHA (SLATER) functional.", &
n_keywords=1, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="XA", &
description="Value of the xa parameter (this does not change the exponent, "// &
"just the mixing)", &
usage="XA 0.7", default_r_val=2._dp/3._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="TPSS", &
description="Uses the TPSS functional. Note, that there is no LSD version available. "// &
"In such cases, use the LIBXC version instead.", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Tao2003/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="Activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_c", &
description="scales the correlation part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="PBE", &
description="Uses the PBE functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Perdew1996, Zhang1998, Perdew2008/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="parametrization", &
description="switches between the different "// &
"parametrizations of the functional. "// &
"Note: Beta parameters used have only 5 significant digits, "// &
"as published. For higher precision and program comparison "// &
"use section XC/XC_FUNCTIONAL/LIBXC.", &
enum_i_vals=(/xc_pbe_orig, xc_pbe_rev, xc_pbe_sol/), &
enum_c_vals=(/"ORIG ", "revPBE", "PBEsol"/), &
enum_desc=(/"original PBE ", &
"revised PBE (revPBE) ", &
"PBE for solids and surfaces (PBEsol)"/), &
default_i_val=xc_pbe_orig)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_c", &
description="scales the correlation part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="XWPBE", &
description="Uses the short range PBE functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Heyd2004/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x0", &
description="scales the exchange part of the original hole PBE-functional", &
default_r_val=0.0_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="omega", &
description="screening parameter", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="BECKE97", &
description="Uses the Becke 97 exchange correlation functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Becke1997, Grimme2006/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional, if -1 the default for the given parametrization is used", &
default_r_val=-1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_c", &
description="scales the correlation part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="parametrization", &
description="switches between the B97 and Grimme parametrization ", &
enum_i_vals=(/xc_b97_orig, xc_b97_grimme, xc_b97_grimme, xc_b97_mardirossian, xc_b97_3c/), &
enum_c_vals=(/"ORIG ", "B97GRIMME ", "B97_GRIMME", "wB97X-V ", "B97-3c "/), &
default_i_val=xc_b97_orig)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="BECKE_ROUSSEL", &
description="Becke Roussel exchange hole model. Can be used "// &
"as long range correction with a truncated coulomb potential", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/BeckeRoussel1989, Proynov2007/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="CUTOFF_RADIUS", &
description="Defines the cutoff radius for the truncation. "// &
"If put to zero, the standard full range potential will be used", &
usage="CUTOFF_RADIUS 2.0", default_r_val=0.0_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="GAMMA", &
description="Parameter in the exchange hole. "// &
"Usually this is put to 1.0 or 0.8", &
usage="GAMMA 0.8", default_r_val=1.0_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="LDA_HOLE_T_C_LR", &
description="LDA exchange hole model in truncated coulomb potential", &
n_keywords=0, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SCALE_X", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="CUTOFF_RADIUS", &
description="Defines cutoff for lower integration boundary", &
default_r_val=0.0_dp, unit_str="angstrom")
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="PBE_HOLE_T_C_LR", &
description="PBE exchange hole model in trucanted coulomb potential", &
n_keywords=0, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SCALE_X", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="CUTOFF_RADIUS", &
description="Defines cutoff for lower integration boundary", &
default_r_val=1.0_dp, unit_str="angstrom")
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="GV09", &
description="Combination of three different exchange hole models", &
n_keywords=0, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SCALE_X", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="CUTOFF_RADIUS", &
description="Defines cutoff for lower integration boundary", &
default_r_val=0.0_dp, unit_str="angstrom")
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="GAMMA", &
description="Parameter for Becke Roussel hole", &
default_r_val=1.0_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="BEEF", & !rk: BEEF Exchange
description="Uses the BEEFvdW exchange functional", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Wellendorff2012/))
CALL keyword_create(keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="activates the functional", &
lone_keyword_l_val=.TRUE., default_l_val=.FALSE.)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="scale_x", &
description="scales the exchange part of the functional", &
default_r_val=1._dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
END SUBROUTINE create_xc_fun_section
! **************************************************************************************************
!> \brief creates the structure of the section needed to select an xc potential
!> \param section the section that will be created
!> \author thomas chassaing
! **************************************************************************************************
SUBROUTINE create_xc_potential_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="xc_potential", &
description="The xc potential to use (CAREFUL: xc potential here refers "// &
"to potentials that are not derived from an xc functional, but rather are "// &
"modelled directly. Therefore there is no consistent xc energy available. "// &
"To still get an energy expression, see ENERGY below", &
n_keywords=1, n_subsections=1, repeats=.FALSE.)
NULLIFY (subsection, keyword)
CALL section_create(subsection, __LOCATION__, name="SAOP", &
description="Uses the SAOP potential", &
n_keywords=3, n_subsections=0, repeats=.TRUE.)
CALL keyword_create(keyword, __LOCATION__, name="ALPHA", &
description="Value of the alpha parameter (default = 1.19).", &
usage="ALPHA 1.19", default_r_val=1.19_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="BETA", &
description="Value of the beta parameter (default = 0.01).", &
usage="BETA 0.01", default_r_val=0.01_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="K_RHO", &
description="Value of the K_rho parameter (default = 0.42).", &
usage="ALPHA 0.42", default_r_val=0.42_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL keyword_create(keyword, __LOCATION__, name="ENERGY", &
description="How to determine the total energy.", &
usage="ENERGY [NONE,XC_FUNCTIONAL,SUM_EIGENVALUES", &
enum_c_vals=s2a("NONE", "XC_FUNCTIONAL", "FUNCTIONAL", "SUM_EIGENVALUES", "SOE"), &
enum_i_vals=(/xc_pot_energy_none, &
xc_pot_energy_xc_functional, &
xc_pot_energy_xc_functional, &
xc_pot_energy_sum_eigenvalues, &
xc_pot_energy_sum_eigenvalues/), &
default_i_val=xc_pot_energy_none)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
END SUBROUTINE create_xc_potential_section
! **************************************************************************************************
!> \brief creates the structure of the section needed to select an xc kernel
!> \param section the section that will be created
!> \author JGH
! **************************************************************************************************
SUBROUTINE create_xc_kernel_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="XC_KERNEL", &
description="The xc kernel to use (CAREFUL: xc kernel here refers "// &
"to kernels that are not derived from an xc functional, but rather are "// &
"modelled directly. This kernel will be used in a TDDFPT calculation. "// &
"Cannot be combined with XC_FUNCTIONAL or XC_POTENTIAL.", &
n_keywords=1, n_subsections=1, repeats=.FALSE.)
NULLIFY (keyword)
CALL keyword_create( &
keyword, __LOCATION__, name="_SECTION_PARAMETERS_", &
description="Selection of kernel functionals.", &
usage="&XC_KERNEL LDAfxc", &
enum_c_vals=s2a("PADEfxc", "LDAfxc", "GGAfxc", "NONE"), &
enum_i_vals=(/fxc_funct_pade, fxc_funct_lda, fxc_funct_gga, fxc_none/), &
enum_desc=s2a("Fxc based on LDA PADE approximation", &
"Fxc based on LDA functionals", &
"Fxc model from fit to PBE functional", &
"NONE"), &
default_i_val=fxc_none, &
lone_keyword_i_val=fxc_none)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="PARAMETER", &
description="List of parameters specific to the kernel function", &
usage="PARAMETER <REAL> .. <REAL>", &
type_of_var=real_t, n_var=-1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="GAMMA", &
description="B97 GAMMA parameters [gx, gab, gaa]", &
usage="GAMMA <REAL> <REAL> <REAL>", &
default_r_vals=(/0.004_dp, 0.006_dp, 0.2_dp/), &
type_of_var=real_t, n_var=3)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="C_XAA", &
description="B97 C parameters for exchange", &
usage="C_XAA <REAL> <REAL> <REAL>", &
default_r_vals=(/1.0_dp, 0.63_dp, 0.94_dp/), &
type_of_var=real_t, n_var=3)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="C_CAB", &
description="B97 C parameters for same spin correlation.", &
usage="C_CAB <REAL> <REAL> <REAL>", &
default_r_vals=(/1.0_dp, 0.75_dp, -4.60_dp/), &
type_of_var=real_t, n_var=3)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="C_CAA", &
description="B97 C parameters for opposite spin correlation.", &
usage="C_CAB <REAL> <REAL> <REAL>", &
default_r_vals=(/0.17_dp, 2.35_dp, -2.55_dp/), &
type_of_var=real_t, n_var=3)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SCALE_X", &
description="Scaling parameter for exchange kernel.", &
usage="SCALE_X 0.2", default_r_val=1.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SCALE_C", &
description="Scaling parameter for correlation kernel.", &
usage="SCALE_C 0.2", default_r_val=1.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
END SUBROUTINE create_xc_kernel_section
! **************************************************************************************************
!> \brief creates the structure of the section needed to select an hfx kernel
!> \param section the section that will be created
!> \author JGH
! **************************************************************************************************
SUBROUTINE create_hfx_kernel_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="HFX_KERNEL", &
description="The hfx kernel to use. Cannot be combined with HF section.", &
n_keywords=1, n_subsections=2, repeats=.FALSE.)
NULLIFY (subsection, keyword)
CALL keyword_create(keyword, __LOCATION__, name="DO_HFXSR", &
description="Switch to use the HFXSR (short range) kernel.", &
usage="DO_HFXSR T/F", default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
NULLIFY (subsection, keyword)
CALL keyword_create(keyword, __LOCATION__, name="HFXSR_PRIMBAS", &
description="Default number of primitives in ADMM basis in HFXSR. "// &
"0 indicates the use of a contracted minimal basis. ", &
usage="HFXSR_PRIMBAS 3", default_i_val=0)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL create_hfx_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL section_create(subsection, __LOCATION__, name="HFXLR", &
description="Uses the HFXLR (long range) kernel", &
n_keywords=2, n_subsections=0, repeats=.FALSE.)
CALL keyword_create(keyword, __LOCATION__, name="RCUT", &
description="Value of lower range cutoff of interaction [Bohr]", &
usage="RCUT 5.00", default_r_val=6.00_dp, unit_str="bohr")
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SCALE", &
description="Scaling parameter for HFX kernel.", &
usage="SCALE 0.25", default_r_val=1.00_dp)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
END SUBROUTINE create_hfx_kernel_section
! **************************************************************************************************
!> \brief creates the structure of the section needed for vdW potentials
!> \param section the section that will be created
!> \author jgh
! **************************************************************************************************
SUBROUTINE create_vdw_potential_section(section)
TYPE(section_type), POINTER :: section
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: print_key, subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="vdw_potential", &
description="This section combines all possible additional dispersion "// &
"corrections to the normal XC functionals. This can be more functionals "// &
"or simple empirical pair potentials. ", &
citations=(/grimme2006, Tran2013/), &
n_keywords=1, n_subsections=1, repeats=.FALSE.)
NULLIFY (subsection, keyword)
CALL keyword_create(keyword, __LOCATION__, name="POTENTIAL_TYPE", &
variants=s2a("DISPERSION_FUNCTIONAL"), &
description="Type of dispersion/vdW functional or potential to use", &
usage="POTENTIAL_TYPE (NONE|PAIR_POTENTIAL|NON_LOCAL)", &
enum_c_vals=s2a("NONE", "PAIR_POTENTIAL", "NON_LOCAL"), &
enum_i_vals=(/xc_vdw_fun_none, xc_vdw_fun_pairpot, xc_vdw_fun_nonloc/), &
enum_desc=s2a("No dispersion/van der Waals functional", &
"Pair potential van der Waals density functional", &
"Nonlocal van der Waals density functional"), &
default_i_val=xc_vdw_fun_none)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL section_create(subsection, __LOCATION__, name="PAIR_POTENTIAL", &
description="Information on the pair potential to calculate dispersion", &
n_keywords=5, n_subsections=0, repeats=.TRUE.)
CALL keyword_create(keyword, __LOCATION__, name="R_CUTOFF", &
description="Range of potential. The cutoff will be 2 times this value. "// &
"In the case of D4 it will be used for the 3-body term", &
usage="R_CUTOFF 20.0", default_r_val=20.0_dp, &
unit_str="angstrom")
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="D4_CUTOFF", &
description="Range of potential. The cutoff will be 2 times this value. "// &
"Only used for the 2-body term of D4", &
usage="D4_CUTOFF 30.0", default_r_val=30.0_dp, &
unit_str="angstrom")
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="D4_CN_CUTOFF", &
description="Coordination number cutoff for D4", &
usage="D4_CN_CUTOFF 30.0", default_r_val=30.0_dp, &
unit_str="angstrom")
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="TYPE", &
description="Type of potential", &
citations=(/grimme2006, grimme2010, grimme2011, Caldeweyher2020/), &
usage="TYPE (DFTD2|DFTD3|DFTD3(BJ)|DFTD4)", &
enum_c_vals=s2a("DFTD2", "DFTD3", "DFTD3(BJ)", "DFTD4"), &
enum_i_vals=(/vdw_pairpot_dftd2, vdw_pairpot_dftd3, &
vdw_pairpot_dftd3bj, vdw_pairpot_dftd4/), &
enum_desc=s2a("Grimme D2 method", &
"Grimme D3 method (zero damping)", &
"Grimme D3 method (Becke-Johnson damping)", &
"Grimme D4 method (WARNING: Experimental feature under development)"), &
default_i_val=vdw_pairpot_dftd3)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="PARAMETER_FILE_NAME", &
description="Name of the parameter file, may include a path (not used for D4)", &
usage="PARAMETER_FILE_NAME <FILENAME>", &
default_lc_val="DISPERSION_PARAMETERS")
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="REFERENCE_FUNCTIONAL", &
description="Use parameters for this specific density functional. "// &
"For available D3 and D3(BJ) parameters see: "// &
"<https://www.chemie.uni-bonn.de/grimme/de/software/dft-d3>. "// &
"For the defintion of D4 parameters see: "// &
"<https://github.com/dftd4/dftd4>.", &
usage="REFERENCE_FUNCTIONAL <functional>", &
type_of_var=char_t)
CALL section_add_keyword(subsection, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="D4_REFERENCE_CODE", &
description="Calculate D4 energy using external library.", &
usage="D4_REFERENCE_CODE", default_l_val=.TRUE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(subsection, keyword)