/
input_cp2k_mp2.F
1624 lines (1393 loc) · 85 KB
/
input_cp2k_mp2.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 (C) 2000 - 2019 CP2K developers group !
!--------------------------------------------------------------------------------------------------!
! **************************************************************************************************
!> \brief input section for MP2
!> \par History
!> 05.2011 created
!> \author MDB
! **************************************************************************************************
MODULE input_cp2k_mp2
USE bibliography, ONLY: Bates2013,&
DelBen2012,&
DelBen2013,&
DelBen2015,&
DelBen2015b,&
Rybkin2016
USE cp_eri_mme_interface, ONLY: create_eri_mme_section
USE cp_output_handling, ONLY: add_last_numeric,&
cp_print_key_section_create,&
debug_print_level,&
high_print_level,&
low_print_level,&
medium_print_level,&
silent_print_level
USE input_constants, ONLY: &
do_eri_gpw, do_eri_mme, do_eri_os, do_hfx_potential_coulomb, do_mp2_potential_tshpsc, &
gaussian, gw_no_print_exx, gw_pade_approx, gw_print_exx, gw_read_exx, gw_skip_for_regtest, &
gw_two_pole_model, mp2_method_direct, mp2_method_gpw, mp2_method_none, &
mp2_ri_optimize_basis, numerical, ri_coulomb, ri_mp2_laplace, ri_mp2_method_gpw, &
ri_overlap, ri_rpa_g0w0_crossing_bisection, ri_rpa_g0w0_crossing_newton, &
ri_rpa_g0w0_crossing_none, ri_rpa_g0w0_crossing_z_shot, ri_rpa_method_gpw, &
wfc_mm_style_gemm, wfc_mm_style_syrk
USE input_cp2k_hfx, ONLY: create_hfx_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: integer_t,&
real_t
USE kinds, ONLY: dp
USE string_utilities, ONLY: s2a
#include "./base/base_uses.f90"
IMPLICIT NONE
PRIVATE
CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'input_cp2k_mp2'
PUBLIC :: create_mp2_section
CONTAINS
! **************************************************************************************************
!> \brief creates the input section for the mp2 part
!> \param section the section to create
!> \author MDB
! **************************************************************************************************
SUBROUTINE create_mp2_section(section)
TYPE(section_type), POINTER :: section
CHARACTER(len=*), PARAMETER :: routineN = 'create_mp2_section', &
routineP = moduleN//':'//routineN
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: print_key, subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="WF_CORRELATION", &
description="Sets up the Wavefunction-based Correlation parameters if requested ", &
n_keywords=8, n_subsections=6, repeats=.TRUE., &
citations=(/DelBen2012, DelBen2013, DelBen2015, DelBen2015b, Rybkin2016/))
NULLIFY (keyword, print_key, subsection)
CALL keyword_create( &
keyword, __LOCATION__, &
name="METHOD", &
citations=(/DelBen2012, DelBen2013/), &
description="Which method should be used to compute the MP2 energy", &
usage="METHOD MP2_GPW", &
enum_c_vals=s2a("NONE", "DIRECT_CANONICAL", "MP2_GPW", "RI_MP2_GPW", "RI_RPA_GPW", "RI_SOS_LAPLACE", &
"OPTIMIZE_RI_BASIS"), &
enum_i_vals=(/mp2_method_none, mp2_method_direct, mp2_method_gpw, ri_mp2_method_gpw, &
ri_rpa_method_gpw, ri_mp2_laplace, mp2_ri_optimize_basis/), &
enum_desc=s2a("Skip MP2 calculation", &
"Use the direct mp2 canonical approach", &
"Use the GPW approach to MP2", &
"Use the GPW approach to RI-MP2", &
"Use the GPW approach to RI-RPA", &
"Use the GPW approach to RI-SOS-Laplace-MP2", &
"Optimize RIMP2 basis set"), &
default_i_val=mp2_method_direct)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="MEMORY", &
description="Maximum allowed total memory usage during MP2 methods [MiB].", &
usage="MEMORY 1500 ", &
default_r_val=1.024E+3_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="SCALE_S", &
description="Scaling factor of the singlet energy component (opposite spin, OS). ", &
usage="SCALE_S 1.0", &
default_r_val=1.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="SCALE_T", &
description="Scaling factor of the triplet energy component (same spin, SS).", &
usage="SCALE_T 1.0", &
default_r_val=1.0_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="GROUP_SIZE", &
variants=(/"NUMBER_PROC"/), &
description="Group size used in the computation of the integrals. To use all processors set GROUP_SIZE -1 "// &
"(might lead to VERY high computation times)."// &
"A smaller group size (for example the node size), might a better choice if the actual MP2 time is large "// &
"compared to integral computation time. This is usually the case if the total number of processors is not too large.", &
usage="GROUP_SIZE 32", &
default_i_val=1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="ROW_BLOCK", &
variants=(/"ROW_BLOCK_SIZE"/), &
description="Size of the row block used in the SCALAPACK block cyclic data distribution."// &
"Default is (ROW_BLOCK=-1) is automatic. "// &
"A proper choice can speedup the parallel matrix multiplication in the case of RI-RPA and RI-SOS-MP2-Laplace.", &
usage="ROW_BLOCK 512", &
default_i_val=-1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="COL_BLOCK", &
variants=(/"COL_BLOCK_SIZE"/), &
description="Size of the column block used in the SCALAPACK block cyclic data distribution."// &
"Default is (COL_BLOCK=-1) is automatic. "// &
"A proper choice can speedup the parallel matrix multiplication in the case of RI-RPA and RI-SOS-MP2-Laplace.", &
usage="COL_BLOCK 512", &
default_i_val=-1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="CALC_COND_NUM", &
variants=(/"CALC_CONDITION_NUMBER"/), &
description="Calculate the condition number of the (P|Q) matrix for the RI methods.", &
usage="CALC_COND_NUM", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="RI_METRIC", &
variants=(/"RI"/), &
description="Define which RI metric should be used for calculating B^P_ia.", &
usage="RI_METRIC COULOMB", &
enum_c_vals=s2a("COULOMB", "OVERLAP"), &
enum_i_vals=(/ri_coulomb, ri_overlap/), &
enum_desc=s2a("Use Coulomb metric.", &
"Use overlap metric, recommended in combination with imaginary time for O(N^3) RPA."), &
default_i_val=ri_coulomb)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="ERI_METHOD", &
description="Method for calculating periodic electron repulsion integrals "// &
"(MME method is faster but experimental, forces not yet implemented)."// &
"Obara-Saika (OS) for the Coulomb operator can only be used for non-periodic calculations.", &
usage="ERI_METHOD MME", &
enum_c_vals=s2a("GPW", "MME", "OS"), &
enum_i_vals=(/do_eri_gpw, do_eri_mme, do_eri_os/), &
enum_desc=s2a("Uses Gaussian Plane Wave method [DelBen2013].", &
"Uses MiniMax-Ewald method (experimental, ERI_MME subsection, only for fully periodic "// &
"systems with orthorhombic cells).", &
"Uses Obara-Saika method (only for two-center integrals, only for gas phase"// &
"and only for cubic-scaling RPA and GW)."), &
default_i_val=do_eri_gpw)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="ERI_BLKSIZE", &
description="block sizes for tensors (only used if ERI_METHOD=MME). First value "// &
"is the block size for ORB basis, second value is the block size for RI_AUX basis.", &
usage="ERI_BLKSIZE", &
n_var=2, &
default_i_vals=(/4, 16/))
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL cp_print_key_section_create(print_key, __LOCATION__, "MP2_INFO", &
description="Controls the printing basic info about MP2 method", &
print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__")
CALL section_add_subsection(section, print_key)
CALL section_release(print_key)
CALL keyword_create( &
keyword, __LOCATION__, &
name="IM_TIME", &
variants=(/"IMAG_TIME"/), &
description="Turns on cubic scaling RI-RPA and Laplace-SOS-MP2 method using the imaginary time formalism. "// &
"If no IM_TIME section is present, the default parameters are used.", &
usage="IM_TIME", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL create_mp2_direct(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_wfc_gpw(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_ri_mp2(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_opt_ri_basis(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_ri_rpa(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_ri_laplace(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
! here we generate an imag. time subsection to use with RPA or Laplace-SOS-MP2
CALL create_ri_im_time(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_cphf(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_mp2_potential(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
CALL create_eri_mme_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
END SUBROUTINE create_mp2_section
! **************************************************************************************************
!> \brief ...
!> \param section ...
! **************************************************************************************************
SUBROUTINE create_mp2_direct(section)
TYPE(section_type), POINTER :: section
CHARACTER(len=*), PARAMETER :: routineN = 'create_mp2_direct', &
routineP = moduleN//':'//routineN
TYPE(keyword_type), POINTER :: keyword
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="DIRECT_CANONICAL", &
description="Parameters influencing the direct canonical method", &
n_keywords=1, n_subsections=0, repeats=.FALSE.)
NULLIFY (keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="BIG_SEND", &
description="Send big messages between processes (useful for >48 processors).", &
usage="BIG_SEND", &
default_l_val=.TRUE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
END SUBROUTINE create_mp2_direct
! **************************************************************************************************
!> \brief ...
!> \param section ...
! **************************************************************************************************
SUBROUTINE create_ri_mp2(section)
TYPE(section_type), POINTER :: section
CHARACTER(len=*), PARAMETER :: routineN = 'create_ri_mp2', routineP = moduleN//':'//routineN
TYPE(keyword_type), POINTER :: keyword
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="RI_MP2", &
description="Parameters influencing the RI MP2 method", &
n_keywords=3, n_subsections=0, repeats=.FALSE., &
citations=(/DelBen2013/))
NULLIFY (keyword)
CALL keyword_create(keyword, __LOCATION__, name="BLOCK_SIZE", &
variants=(/"MESSAGE_SIZE"/), &
description="Determines the blocking used for communication in RI-MP2. Larger BLOCK_SIZE "// &
"reduces communication but requires more memory. The default (-1) is automatic.", &
usage="BLOCK_SIZE 2", &
default_i_val=-1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="EPS_CANONICAL", &
description="Threshold for discriminate if a given ij pairs "// &
"of the unrelaxed MP2 density matrix has to be "// &
"calculated with a canonical reformulation based "// &
"on the occupied eigenvalues differences.", &
usage="EPS_CANONICAL 1.0E-8", type_of_var=real_t, &
default_r_val=1.0E-7_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="FREE_HFX_BUFFER", &
description="Free the buffer containing the 4 center integrals used in the Hartree-Fock exchange calculation. "// &
"This will be effective only for gradients calculations, since for the energy only "// &
"case, the buffers are released by default. (Right now debugging only).", &
usage="FREE_HFX_BUFFER", &
default_l_val=.TRUE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
END SUBROUTINE create_ri_mp2
! **************************************************************************************************
!> \brief ...
!> \param section ...
! **************************************************************************************************
SUBROUTINE create_opt_ri_basis(section)
TYPE(section_type), POINTER :: section
CHARACTER(len=*), PARAMETER :: routineN = 'create_opt_ri_basis', &
routineP = moduleN//':'//routineN
TYPE(keyword_type), POINTER :: keyword
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="OPT_RI_BASIS", &
description="Parameters influencing the optimization of the RI MP2 basis. "// &
"Only exponents of non-contracted auxiliary basis can be optimized. "// &
"An initial RI auxiliary basis has to be specified.", &
n_keywords=6, n_subsections=0, repeats=.FALSE., &
citations=(/DelBen2013/))
NULLIFY (keyword)
CALL keyword_create(keyword, __LOCATION__, name="DELTA_I_REL", &
variants=(/"DI_REL"/), &
description="Target accuracy in the relative deviation of the amplitudes calculated with "// &
"and without RI approximation, (more details in Chem.Phys.Lett.294(1998)143).", &
usage="DELTA_I_REL 1.0E-6_dp", &
default_r_val=1.0E-6_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="DELTA_RI", &
variants=(/"DRI"/), &
description="Target accuracy in the absolute difference between the RI-MP2 "// &
"and the exact MP2 energy, DRI=ABS(E_MP2-E_RI-MP2).", &
usage="DELTA_RI 1.0E-6_dp", &
default_r_val=5.0E-6_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="EPS_DERIV", &
variants=(/"EPS_NUM_DERIV"/), &
description="The derivatives of the MP2 energy with respect to the "// &
"exponents of the basis are calculated numerically. "// &
"The change in the exponent a_i employed for the numerical evaluation "// &
"is defined as h_i=EPS_DERIV*a_i.", &
usage="EPS_DERIV 1.0E-3_dp", &
default_r_val=1.0E-3_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="MAX_ITER", &
variants=(/"MAX_NUM_ITER"/), &
description="Specifies the maximum number of steps in the RI basis optimization.", &
usage="MAX_ITER 100", &
default_i_val=50)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="NUM_FUNC", &
description="Specifies the number of function, for each angular momentum (s, p, d ...), "// &
"employed in the automatically generated initial guess. "// &
"This will be effective only if RI_AUX_BASIS_SET in the KIND section is not specified.", &
usage="NUM_FUNC {number of s func.} {number of p func.} ...", &
n_var=-1, default_i_vals=(/-1/), type_of_var=integer_t)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="BASIS_SIZE", &
description="Specifies the size of the auxiliary basis set automatically "// &
"generated as initial guess. This will be effective only if RI_AUX_BASIS_SET "// &
"in the KIND section and NUM_FUNC are not specified.", &
usage="BASIS_SIZE (MEDIUM|LARGE|VERY_LARGE)", &
enum_c_vals=s2a("MEDIUM", "LARGE", "VERY_LARGE"), &
enum_i_vals=(/0, 1, 2/), &
default_i_val=0)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
END SUBROUTINE create_opt_ri_basis
! **************************************************************************************************
!> \brief ...
!> \param section ...
! **************************************************************************************************
SUBROUTINE create_ri_laplace(section)
TYPE(section_type), POINTER :: section
CHARACTER(len=*), PARAMETER :: routineN = 'create_ri_laplace', &
routineP = moduleN//':'//routineN
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="RI_LAPLACE", &
description="Parameters influencing the RI-SOS-MP2-Laplace method", &
n_keywords=3, n_subsections=1, repeats=.FALSE., &
citations=(/DelBen2013/))
NULLIFY (keyword, subsection)
CALL keyword_create( &
keyword, __LOCATION__, name="QUADRATURE_POINTS", &
variants=(/"LAPLACE_NUM_QUAD_POINTS"/), &
description="Number of quadrature points for the numerical integration in the RI-SOS-MP2-Laplace method.", &
usage="QUADRATURE_POINTS 6", &
default_i_val=5)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, name="SIZE_INTEG_GROUP", &
variants=(/"LAPLACE_GROUP_SIZE"/), &
description="Group size for the integration in the Laplace method, that is the number of processes involved in "// &
"the computation of each integration point. SIZE_INTEG_GROUP has to be a multiple "// &
"of GROUP_SIZE in the WF_CORRELATION section. The default (-1) "// &
"is automatic.", &
usage="SIZE_INTEG_GROUP 16", &
default_i_val=-1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="IM_TIME", &
variants=(/"IMAG_TIME"/), &
description="Turns on cubic scaling RI-RPA and Laplace-SOS-MP2 method using the imaginary time formalism. "// &
"If no IM_TIME section is present, default parameters are used.", &
usage="IM_TIME", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL create_ri_im_time(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
END SUBROUTINE create_ri_laplace
! **************************************************************************************************
!> \brief ...
!> \param section ...
! **************************************************************************************************
SUBROUTINE create_ri_rpa(section)
TYPE(section_type), POINTER :: section
CHARACTER(len=*), PARAMETER :: routineN = 'create_ri_rpa', routineP = moduleN//':'//routineN
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="RI_RPA", &
description="Parameters influencing the RI RPA method", &
n_keywords=8, n_subsections=4, repeats=.FALSE., &
citations=(/DelBen2013, DelBen2015/))
NULLIFY (keyword, subsection)
CALL keyword_create(keyword, __LOCATION__, name="QUADRATURE_POINTS", &
variants=(/"RPA_NUM_QUAD_POINTS"/), &
description="Number of quadrature points for the numerical integration in the RI-RPA method.", &
usage="QUADRATURE_POINTS 60", &
default_i_val=40)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SIZE_FREQ_INTEG_GROUP", &
variants=(/"RPA_GROUP_SIZE"/), &
description="Group size for frequency integration, that is the number of processes involved in "// &
"the computation of each integration point. SIZE_FREQ_INTEG_GROUP has to be a multiple "// &
"of GROUP_SIZE in the WF_CORRELATION section. The default (-1) "// &
"is automatic.", &
usage="SIZE_FREQ_INTEG_GROUP 16", &
default_i_val=-1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, &
name="MM_STYLE", &
description="Matrix multiplication style for the Q matrix.", &
usage="MM_STYLE GEMM", &
enum_c_vals=s2a("GEMM", "SYRK"), &
enum_i_vals=(/wfc_mm_style_gemm, wfc_mm_style_syrk/), &
enum_desc=s2a("Use pdgemm: more flops, maybe faster.", &
"Use pdysrk: fewer flops, maybe slower."), &
default_i_val=wfc_mm_style_gemm)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="MINIMAX_QUADRATURE", &
variants=(/"MINIMAX"/), &
description="Use the Minimax quadrature scheme for performing the numerical integration. "// &
"Maximum number of quadrature point limited to 20.", &
usage="MINIMAX_QUADRATURE", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="RI_G0W0", &
variants=(/"GW"/), &
description="Decide whether to perform an RI_G0W0 calculation on top of RI_RPA. "// &
"For cubic-scaling GW, please use IM_TIME_GW.", &
usage="RI_G0W0", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="RI_AXK", &
variants=(/"AXK"/), &
description="Decide whether to perform an RPA-AXK calculation.", &
usage="RI_AXK", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="ADMM", &
description="Decide whether to perform ADMM in the exact exchange calc. for RPA and/or GW. "// &
"Not really recommended. In most cases, the Hartree-Fock exchange is not expensive "// &
"and there is no need for ADMM. Only in case of diffuse functions for periodic systems "// &
"(only reasonable for GW bandgap calculations) exact exchange can be expensive and then, "// &
"we recommend using RI for exchange.", &
usage="ADMM", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create( &
keyword, __LOCATION__, &
name="IM_TIME", &
variants=(/"IMAG_TIME"/), &
description="Turns on cubic scaling RI-RPA and Laplace-SOS-MP2 method using the imaginary time formalism. "// &
"If no IM_TIME section is present, the default parameters are used.", &
usage="IM_TIME", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
! here we generate a hfx subsection to use in the case EXX has to be computed after RPA
CALL create_hfx_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
! here we generate a G0W0 subsection to use if G0W0 is desired
CALL create_ri_g0w0(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
! here we generate a RI_AXK subsection
CALL create_ri_axk(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
! here we generate an IM_TIME subsection
CALL create_ri_im_time(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
END SUBROUTINE create_ri_rpa
! **************************************************************************************************
!> \brief ...
!> \param section ...
! **************************************************************************************************
SUBROUTINE create_ri_axk(section)
TYPE(section_type), POINTER :: section
CHARACTER(len=*), PARAMETER :: routineN = 'create_ri_axk', routineP = moduleN//':'//routineN
!TYPE(section_type), POINTER :: subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="RI_AXK", &
description="Parameters influencing the RI-RPA-AXK method", &
n_keywords=0, n_subsections=0, repeats=.FALSE., &
citations=(/Bates2013/))
!NULLIFY (keyword, subsection)
END SUBROUTINE create_ri_axk
! **************************************************************************************************
!> \brief ...
!> \param section ...
! **************************************************************************************************
SUBROUTINE create_ri_g0w0(section)
TYPE(section_type), POINTER :: section
CHARACTER(len=*), PARAMETER :: routineN = 'create_ri_g0w0', routineP = moduleN//':'//routineN
TYPE(keyword_type), POINTER :: keyword
TYPE(section_type), POINTER :: subsection
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="RI_G0W0", &
description="Parameters influencing the RI-G0W0 method", &
n_keywords=24, n_subsections=1, repeats=.FALSE.)
NULLIFY (keyword, subsection)
CALL keyword_create(keyword, __LOCATION__, name="CORR_MOS_OCC", &
variants=(/"CORR_OCC"/), &
description="Number of occupied MOs whose energies are corrected by RI-G0W0. "// &
"Counting beginning from HOMO, e.g. 3 corrected occ. MOs correspond "// &
"to correction of HOMO, HOMO-1 and HOMO-2. Numerical effort and "// &
"storage of RI-G0W0 increase linearly with this number. In case you "// &
"want to correct all occ. MOs, insert a number larger than the number "// &
"of occ. MOs.", &
usage="CORR_OCC 3", &
default_i_val=10)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="CORR_MOS_VIRT", &
variants=(/"CORR_VIRT"/), &
description="Number of virtual MOs whose energies are corrected by RI-G0W0. "// &
"Counting beginning from LUMO, e.g. 3 corrected occ. MOs correspond "// &
"to correction of LUMO, LUMO+1 and LUMO+2. Numerical effort and "// &
"storage of RI-G0W0 increase linearly with this number. In case you "// &
"want to correct all virt. MOs, insert a number larger than the number "// &
"of virt. MOs.", &
usage="CORR_VIRT 3", &
default_i_val=10)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="NUMB_POLES", &
description="Number of poles for the fitting. Usually, two poles are sufficient. ", &
usage="NUMB_POLES 2", &
default_i_val=2)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="OMEGA_MAX_FIT", &
description="Determines fitting range for the self-energy on the imaginary axis: "// &
"[0, OMEGA_MAX_FIT] for virt orbitals, [-OMEGA_MAX_FIT,0] for occ orbitals. "// &
"Unit: Hartree. Default: 0.734996 H = 20 eV. ", &
usage="OMEGA_MAX_FIT 0.5", &
default_r_val=0.734996_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="PRINT_FIT_ERROR", &
variants=(/"FIT_ERROR"/), &
description="Print the statistical error due to the fitting. This error in most cases "// &
"is very pessimistic (e.g. can be a factor of 10 too large).", &
usage="FIT_ERROR", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="MAX_ITER_FIT", &
description="Maximum number of iterations for the Levenberg-Marquard fit.", &
usage="MAX_ITER_FIT 10000", &
default_i_val=10000)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="CHECK_FIT", &
description="If true, the self-energy on the imaginary axis and the fit are printed"// &
"the file self_energy_of_MO_<level>_for_imaginary_frequency.", &
usage="CHECK_FIT", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="CROSSING_SEARCH", &
description="Determines, how the self_energy is evaluated on the real axis.", &
usage="CROSSING_SEARCH Z_SHOT", &
enum_c_vals=s2a("NONE", "Z_SHOT", "NEWTON", "BISECTION"), &
enum_i_vals=(/ri_rpa_g0w0_crossing_none, ri_rpa_g0w0_crossing_z_shot, &
ri_rpa_g0w0_crossing_newton, ri_rpa_g0w0_crossing_bisection/), &
enum_desc=s2a("Evaluate the correlation self-energy at the energy eigenvalue of SCF.", &
"Calculate the derivative of Sigma and out of it Z. Then extrapolate using Z.", &
"Make a Newton-Raphson fix point iteration.", &
"Make a bisection fix point iteration."), &
default_i_val=ri_rpa_g0w0_crossing_z_shot)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="FERMI_LEVEL_OFFSET", &
description="Fermi level for occ. orbitals: e_HOMO + FERMI_LEVEL_OFFSET; "// &
"Fermi level for virt. orbitals: e_LUMO - FERMI_LEVEL_OFFSET. "// &
"In case e_homo + FERMI_LEVEL_OFFSET < e_lumo - FERMI_LEVEL_OFFSET, "// &
"we set Fermi level = (e_HOMO+e_LUMO)/2. For cubic-scaling GW, the Fermi level "// &
"is always equal to (e_HOMO+e_LUMO)/2 regardless of FERMI_LEVEL_OFFSET.", &
usage="FERMI_LEVEL_OFFSET 1.0E-2", &
default_r_val=2.0E-2_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="EV_SC_ITER", &
description="Maximum number of iterations for eigenvalue self-consistency cycle. The "// &
"computational effort of RPA and GW scales linearly with this number. "// &
"Eigenvalue self-consistency is not implemented for cubic-scaling GW.", &
usage="EV_SC_ITER 3", &
default_i_val=1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="EPS_EV_SC_ITER", &
description="Target accuracy for the eigenvalue self-consistency. "// &
"If the G0W0 HOMO-LUMO gap differs by less than the "// &
"target accuracy during the iteration, the eigenvalue "// &
"self-consistency cycle stops. Unit: Hartree.", &
usage="EPS_EV_SC_ITER 0.00005", &
default_r_val=0.00005_dp, &
unit_str="")
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="HF_LIKE_EV_START", &
description="If true, take as input for GW/RPA corrected HF-like eigenvalues according "// &
"to PRB 83, 115103 (2011), Sec. IV.", &
usage="HF_LIKE_EV_START", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="EV_SC_GW_REMOVE_NEG_VIRT_ENERGIES", &
variants=(/"REMOVE_NEG"/), &
description="Set all GW energies of virtual orbitals which are below the HOMO to the "// &
"value of the last eigenvalue-selfconsistency cycle.", &
usage="EV_SC_GW_REMOVE_NEG_VIRT_ENERGIES", &
default_l_val=.TRUE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="PRINT_GW_DETAILS", &
description="If true, prints additional information on the quasiparticle energies.", &
usage="PRINT_GW_DETAILS", &
default_l_val=.TRUE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="PRINT_EXX", &
description="Print exchange self-energy minus exchange correlation potential for Gamma-only "// &
"calculation (PRINT). For a GW calculation with k-points we use this output as "// &
"exchange self-energy (READ). This is a temporary solution because the hybrid MPI/OMP "// &
"parallelization in the HFX by Manuel Guidon conflicts with the parallelization in "// &
"low-scaling GW k-points which is most efficient with maximum number of MPI tasks and "// &
"minimum number of OMP threads. For HFX by M. Guidon, the density matrix is "// &
"fully replicated on every MPI rank which necessitates a high number of OMP threads per MPI "// &
"rank for large systems to prevent out of memory. "// &
"Such a high number of OMP threads would slow down the GW calculation "// &
"severely. Therefore, it was decided to temporarily divide the GW k-point calculation in a "// &
"Gamma-only HF calculation with high number of OMP threads to prevent out of memory and "// &
"a GW k-point calculation with 1 OMP thread per MPI rank reading the previousHF output.", &
usage="PRINT_EXX TRUE", &
enum_c_vals=s2a("TRUE", "FALSE", "READ", "SKIP_FOR_REGTEST"), &
enum_i_vals=(/gw_print_exx, gw_no_print_exx, gw_read_exx, gw_skip_for_regtest/), &
enum_desc=s2a("Please, put TRUE for Gamma only calculation to get the exchange self-energy. "// &
"If 'SIGMA_X' and the corresponding values for the exchange-energy are written, "// &
"the writing has been successful", &
"FALSE is needed if you want to do nothing here.", &
"Please, put READ for the k-point GW calculation to read the exact exchange. "// &
"You have to provide an output file including the exact exchange. This file "// &
"has to be named 'exx.dat'.", &
"SKIP_FOR_REGTEST is only used for the GW k-point regtest where no exchange "// &
"self-energy is computed."), &
default_i_val=gw_no_print_exx)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="RI_SIGMA_X", &
description="If true, the exchange self-energy is calculated approximatively with RI. "// &
"This is only recommended in case exact exchange is very costly, e.g. when "// &
"using diffuse basis functions (seems not to work for periodic systems).", &
usage="RI_SIGMA_X", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="IC_CORR_LIST", &
description="List of image charge correction from a previous calculation to be applied in G0W0 "// &
"or evGW. Keyword is active, if the first entry is positive (since IC corrections are positive "// &
"occupied MOs. The start corresponds to the first corrected GW level.", &
usage="IC_CORR_LIST <REAL> ... <REAL>", &
default_r_vals=(/-1.0_dp/), &
type_of_var=real_t, n_var=-1, unit_str="eV")
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="IC_CORR_LIST_BETA", &
description="IC_CORR_LIST for beta spins in case of open shell calculation.", &
usage="IC_CORR_LIST_BETA <REAL> ... <REAL>", &
default_r_vals=(/-1.0_dp/), &
type_of_var=real_t, n_var=-1, unit_str="eV")
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="PERIODIC", &
description="If true, the periodic correction scheme is used employing k-points.", &
usage="PERIODIC", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="BSE", &
description="If true, electronic excitation energies are computed from the Bethe-"// &
"Salpeter equation on top of GW eigenvalues. Parameter of BSE can be adjusted in "// &
"the corresponding section.", &
usage="BSE", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="IMAGE_CHARGE_MODEL", &
variants=(/"IC"/), &
description="If true, an image charge model is applied to mimic the renormalization of "// &
"electronic levels of a molecule at a metallic surface. For this calculation, the molecule "// &
"has to be reflected on the desired xy image plane. The coordinates of the reflected molecule "// &
"have to be added to the coord file as ghost atoms. For the ghost atoms, identical basis sets "// &
"the normal atoms have to be used.", &
usage="IC TRUE", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="ANALYTIC_CONTINUATION", &
description="Defines which type of analytic continuation for the self energy is used", &
usage="ANALYTIC_CONTINUATION", &
enum_c_vals=s2a("TWO_POLE", "PADE"), &
enum_i_vals=(/gw_two_pole_model, gw_pade_approx/), &
enum_desc=s2a("Use 'two-pole' model.", &
"Use Pade approximation."), &
default_i_val=gw_two_pole_model)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="NPARAM_PADE", &
description="Number of parameters for the Pade approximation "// &
"when using the latter for the analytic continuation of the "// &
"self energy. 16 parameters (corresponding to 8 poles) are "// &
"are recommended.", &
usage="NPARAM_PADE 16", &
default_i_val=16)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="GAMMA_ONLY_SIGMA", &
variants=(/"GAMMA"/), &
description="If true, the correlation self-energy is only computed at the Gamma point. "// &
"The Gamma point itself is obtained by averaging over all kpoints of the DFT mesh.", &
usage="GAMMA TRUE", &
default_l_val=.FALSE., &
lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
! here we generate a subsection for the periodic GW correction
CALL create_periodic_gw_correction_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
! here we generate a subsection for Bethe-Salpeter
CALL create_bse_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
! here we generate a subsection for image charge calculations
CALL create_ic_section(subsection)
CALL section_add_subsection(section, subsection)
CALL section_release(subsection)
END SUBROUTINE create_ri_g0w0
! **************************************************************************************************
!> \brief ...
!> \param section ...
! **************************************************************************************************
SUBROUTINE create_periodic_gw_correction_section(section)
TYPE(section_type), POINTER :: section
CHARACTER(len=*), PARAMETER :: routineN = 'create_periodic_gw_correction_section', &
routineP = moduleN//':'//routineN
TYPE(keyword_type), POINTER :: keyword
CPASSERT(.NOT. ASSOCIATED(section))
CALL section_create(section, __LOCATION__, name="PERIODIC", &
description="Parameters influencing correction for periodic GW.", &
n_keywords=12, n_subsections=1, repeats=.FALSE.)
NULLIFY (keyword)
CALL keyword_create(keyword, __LOCATION__, name="KPOINTS", &
description="Specify number of k-points for a single k-point grid. Internally, a "// &
"Monkhorst-Pack grid is used. Typically, even numbers are chosen such that the Gamma "// &
"point is excluded from the k-point mesh.", &
usage="KPOINTS nx ny nz", repeats=.TRUE., &
n_var=3, type_of_var=integer_t, default_i_vals=(/16, 16, 16/))
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="NUM_KP_GRIDS", &
description="Number of k-point grids around the Gamma point with different resolution. "// &
"E.g. for KPOINTS 4 4 4 and NUM_KP_GRIDS 3, there will be a 3x3x3 Monkhorst-Pack (MP) k-point "// &
"grid for the whole Brillouin zone (excluding Gamma), another 3x3x3 MP grid with smaller "// &
"spacing around Gamma (again excluding Gamma) and a very fine 4x4x4 MP grid around Gamma.", &
usage="NUM_KP_GRIDS 5", &
default_i_val=1)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="EPS_KPOINT", &
description="If the absolute value of a k-point is below EPS_KPOINT, this kpoint is "// &
"neglected since the Gamma point is not included in the periodic correction.", &
usage="EPS_KPOINT 1.0E-4", &
default_r_val=1.0E-05_dp)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="MO_COEFF_GAMMA", &
description="If true, only the MO coefficients at the Gamma point are used for the periodic "// &
"correction. Otherwise, the MO coeffs are computed at every k-point which is much more "// &
"expensive. It should be okay to use the Gamma MO coefficients.", &