1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
|
diff -Naur abinit-6.4.2.bak/src/10_defs/defs_datatypes.F90 abinit-6.4.2/src/10_defs/defs_datatypes.F90
--- src/10_defs/defs_datatypes.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/10_defs/defs_datatypes.F90 2011-01-05 09:39:41.000000000 +0000
@@ -169,10 +169,10 @@
integer :: nsppol ! number of spin-polarizations
integer :: occopt ! Occupation option, see input variable.
- !$integer :: kptopt
- !$real(dp) :: tolwfr
- !$real(dp),pointer :: resid(mband*nkpt*nsppol)
- !$resid(mband*nkpt*nsppol)=residuals (hartree**2)
+ !%integer :: kptopt
+ !%real(dp) :: tolwfr
+ !%real(dp),pointer :: resid(mband*nkpt*nsppol)
+ !%resid(mband*nkpt*nsppol)=residuals (hartree**2)
real(dp) :: entropy ! Entropy associated with the smearing (adimensional)
real(dp) :: fermie ! Fermi energy
@@ -278,7 +278,7 @@
type coeff2_type
- !$integer :: size(2)
+ !%integer :: size(2)
real(dp), pointer :: value(:,:) !SET2NULL
end type coeff2_type
@@ -295,7 +295,7 @@
type coeff2c_type
- !$integer :: size(2)
+ !%integer :: size(2)
complex(dpc), pointer :: value(:,:) !SET2NULL
end type coeff2c_type
@@ -312,7 +312,7 @@
type coeff3_type
- !$integer :: size(3)
+ !%integer :: size(3)
real(dp), pointer :: value(:,:,:) !SET2NULL
end type coeff3_type
@@ -329,7 +329,7 @@
type coeff4_type
- !$integer :: size(4)
+ !%integer :: size(4)
real(dp), pointer :: value(:,:,:,:) !SET2NULL
end type coeff4_type
@@ -348,7 +348,7 @@
type coeff5_type
- !$integer :: size(5)
+ !%integer :: size(5)
real(dp), pointer :: value(:,:,:,:,:) !SET2NULL
end type coeff5_type
@@ -1757,7 +1757,7 @@
integer :: cplex_dij
! cplex=1 if dij are real, 2 if they are complex
- !$integer :: has_dijexxcore
+ !%integer :: has_dijexxcore
! 1 if dijexxcore is allocated
! 2 if dijexxcore is already computed
@@ -1839,7 +1839,7 @@
! dij(:,:,3) contains Dij^up-dn (only if nspinor=2)
! dij(:,:,4) contains Dij^dn-up (only if nspinor=2)
- !$real(dp),pointer :: dijexxcore(:,:)
+ !%real(dp),pointer :: dijexxcore(:,:)
! dijexxcore(cplex_dij*lmn2_size,ndij)
! Onsite matrix elements of the Fock operator generated by core electrons
@@ -2551,21 +2551,21 @@
! All the energies are in Hartree, obtained "per unit cell".
type(energies_type) :: energies
-!!$ real(dp) :: eei ! local pseudopotential energy (Hartree)
-!!$ real(dp) :: eeig ! sum of eigenvalue energy (Hartree)
-!!$ real(dp) :: eew ! Ewald energy (Hartree)
-!!$ real(dp) :: ehart ! Hartree part of total energy (Hartree)
-!!$ real(dp) :: eii ! pseudopotential core-core energy
-!!$ real(dp) :: ek ! kinetic energy (Hartree)
-!!$ real(dp) :: enefield ! the term of the energy functional that depends
-!!$ ! explicitely on the electric field
-!!$ ! enefield = -ucvol*E*P
-!!$ real(dp) :: enl ! nonlocal pseudopotential energy (Hartree)
+!!% real(dp) :: eei ! local pseudopotential energy (Hartree)
+!!% real(dp) :: eeig ! sum of eigenvalue energy (Hartree)
+!!% real(dp) :: eew ! Ewald energy (Hartree)
+!!% real(dp) :: ehart ! Hartree part of total energy (Hartree)
+!!% real(dp) :: eii ! pseudopotential core-core energy
+!!% real(dp) :: ek ! kinetic energy (Hartree)
+!!% real(dp) :: enefield ! the term of the energy functional that depends
+!!% ! explicitely on the electric field
+!!% ! enefield = -ucvol*E*P
+!!% real(dp) :: enl ! nonlocal pseudopotential energy (Hartree)
real(dp) :: entropy ! entropy (Hartree)
-!!$ real(dp) :: enxc ! exchange-correlation energy (Hartree)
-!!$ real(dp) :: enxcdc ! exchange-correlation double-counting energy (Hartree)
-!!$ real(dp) :: epaw ! PAW spherical energy (Hartree)
-!!$ real(dp) :: epawdc ! PAW spherical double-counting energy (Hartree)
+!!% real(dp) :: enxc ! exchange-correlation energy (Hartree)
+!!% real(dp) :: enxcdc ! exchange-correlation double-counting energy (Hartree)
+!!% real(dp) :: epaw ! PAW spherical energy (Hartree)
+!!% real(dp) :: epawdc ! PAW spherical double-counting energy (Hartree)
real(dp) :: etotal ! total energy (Hartree)
! for fixed occupation numbers (occopt==0,1,or 2):
! etotal=ek+ehart+enxc+eei+eew+eii+enl+PAW_spherical_part
@@ -3009,7 +3009,7 @@
! WARNING : if you modify this datatype, please check there there is no creation/destruction/copy routine,
! declared in another part of ABINIT, that might need to take into account your modification.
- integer :: stat = 1 !$=JPT_ISPOINTER =1
+ integer :: stat = 1 !%=JPT_ISPOINTER =1
complex(gwpc),pointer :: datum(:,:) SET2NULL
end type Jpt_gwpc_2D
!!***
@@ -3034,7 +3034,7 @@
! WARNING : if you modify this datatype, please check there there is no creation/destruction routine,
! declared in another part of ABINIT, that might need to take into account your modification.
- integer :: stat = 1 !$=JPT_ISPOINTER =1
+ integer :: stat = 1 !%=JPT_ISPOINTER =1
complex(gwpc),pointer :: datum(:,:,:) SET2NULL
end type Jpt_gwpc_3D
!!***
@@ -3071,8 +3071,8 @@
logical :: save_memory_devel=.FALSE.
! Use in-place storage of the PPm parameters, should be FALSE for non-developers.
- !$real(dp) :: zcut
- !$real(dp),pointer :: qibz(:,:)
+ !%real(dp) :: zcut
+ !%real(dp),pointer :: qibz(:,:)
!logical :: has_inversion
!logical :: has_time_reversal
diff -Naur abinit-6.4.2.bak/src/10_defs/defs_fftdata.F90 abinit-6.4.2/src/10_defs/defs_fftdata.F90
--- src/10_defs/defs_fftdata.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/10_defs/defs_fftdata.F90 2011-01-05 09:40:20.000000000 +0000
@@ -181,8 +181,8 @@
write(msg,'(4a,i8)')ch10,&
& ' size_goed_fft : BUG-',ch10,&
& ' nbest = ',nbest
- !$call wrtout(std_out,msg,'COLL')
- !$call leave_new('COLL')
+ !%call wrtout(std_out,msg,'COLL')
+ !%call leave_new('COLL')
write(std_out,*)msg
STOP
end if
@@ -192,8 +192,8 @@
& ' size_goed_fft : ERROR-',ch10,&
& ' nbest = ',nbest,ch10,&
& ' is larger than any allowable FFT'
- !$call wrtout(std_out,msg,'COLL')
- !$call leave_new('COLL')
+ !%call wrtout(std_out,msg,'COLL')
+ !%call leave_new('COLL')
write(std_out,*)msg
STOP
end if
diff -Naur abinit-6.4.2.bak/src/12_hide_mpi/m_xmpi.F90 abinit-6.4.2/src/12_hide_mpi/m_xmpi.F90
--- src/12_hide_mpi/m_xmpi.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/12_hide_mpi/m_xmpi.F90 2011-01-05 09:02:11.000000000 +0000
@@ -86,7 +86,7 @@
integer :: nprocs = xmpi_undefined
! The number of processors in the communicator.
- !$integer,pointer :: ranks_in_world(:) SET2NULL
+ !%integer,pointer :: ranks_in_world(:) SET2NULL
! The MPI ranks in MPI_COMM_WORLD of the nodes beloging to the communicator.
end type mpicomm_t
diff -Naur abinit-6.4.2.bak/src/18_timing/m_timer.F90 abinit-6.4.2/src/18_timing/m_timer.F90
--- src/18_timing/m_timer.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/18_timing/m_timer.F90 2011-01-05 17:23:06.000000000 +0000
@@ -21,7 +21,7 @@
MODULE m_timer
use defs_basis
- !$use m_errors TODO move m_timer to a lower level
+ !%use m_errors TODO move m_timer to a lower level
implicit none
@@ -261,7 +261,7 @@
CASE DEFAULT
write(std_out,'(a,i0)')" Wrong value for topt: ",topt
stop
- !$MSG_ERROR(msg)
+ !%MSG_ERROR(msg)
END SELECT
end subroutine timing
diff -Naur abinit-6.4.2.bak/src/27_toolbox_oop/m_errors.F90 abinit-6.4.2/src/27_toolbox_oop/m_errors.F90
--- src/27_toolbox_oop/m_errors.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/27_toolbox_oop/m_errors.F90 2011-01-05 17:33:42.000000000 +0000
@@ -748,7 +748,7 @@
& TRIM(my_msg),toupper(level),ch10,&
& TRIM(message)
call wrtout(std_out,sbuf,mode_paral)
- !$call dump_config(std_out)
+ !%call dump_config(std_out)
call dump_config_fake()
call leave_new('COLL')
diff -Naur abinit-6.4.2.bak/src/32_util/m_radmesh.F90 abinit-6.4.2/src/32_util/m_radmesh.F90
--- src/32_util/m_radmesh.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/32_util/m_radmesh.F90 2011-01-05 08:51:17.000000000 +0000
@@ -451,7 +451,7 @@
!gg = zero
int_meshsz=Pawrad%int_meshsz
- !$int_meshsz=Pawrad%mesh_size
+ !%int_meshsz=Pawrad%mesh_size
! the line below requires hh as work array.
hh = ff2
diff -Naur abinit-6.4.2.bak/src/32_util/m_special_funcs.F90 abinit-6.4.2/src/32_util/m_special_funcs.F90
--- src/32_util/m_special_funcs.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/32_util/m_special_funcs.F90 2011-01-05 08:51:59.000000000 +0000
@@ -232,7 +232,7 @@
r=SQRT(kcart(1)**2+kcart(2)**2+kcart(3)**2)
if (r<PPAD) r=r+PPAD
- !$if (r<tol10) RETURN
+ !%if (r<tol10) RETURN
rxy=SQRT(kcart(1)**2+kcart(2)**2)
if (rxy<PPAD)rxy=r+PPAD
@@ -391,7 +391,7 @@
r=SQRT(kcart(1)**2+kcart(2)**2+kcart(3)**2)
if (r<PPAD) r=r+PPAD
- !$if (r<tol10) RETURN
+ !%if (r<tol10) RETURN
rxy=SQRT(kcart(1)**2+kcart(2)**2)
if (rxy<PPAD) rxy=r+PPAD
diff -Naur abinit-6.4.2.bak/src/42_geometry/m_crystal.F90 abinit-6.4.2/src/42_geometry/m_crystal.F90
--- src/42_geometry/m_crystal.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/42_geometry/m_crystal.F90 2011-01-05 09:25:18.000000000 +0000
@@ -76,7 +76,7 @@
integer :: ntypat
! Number of type of atoms
- !$integer :: ntypalch,ntyppure
+ !%integer :: ntypalch,ntyppure
integer :: npsp
! No. of pseudopotentials
diff -Naur abinit-6.4.2.bak/src/43_ptgroups/m_defs_ptgroups.F90 abinit-6.4.2/src/43_ptgroups/m_defs_ptgroups.F90
--- src/43_ptgroups/m_defs_ptgroups.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/43_ptgroups/m_defs_ptgroups.F90 2011-01-05 16:44:37.000000000 +0000
@@ -147,11 +147,11 @@
! NB: operations are referred to the standard coordinate system.
! Page 815-816 of International Tables for crystallography Vol.A.
- !$integer,pointer :: symafm(:) SET2NULL
+ !%integer,pointer :: symafm(:) SET2NULL
! symafm(nsym)
! AFM part of the symmetry operation
- !$real(dp),pointer :: tnons(:,:) SET2NULL
+ !%real(dp),pointer :: tnons(:,:) SET2NULL
! tnons(3,nsym)
! fractional translations.
diff -Naur abinit-6.4.2.bak/src/43_ptgroups/m_ptgroups.F90 abinit-6.4.2/src/43_ptgroups/m_ptgroups.F90
--- src/43_ptgroups/m_ptgroups.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/43_ptgroups/m_ptgroups.F90 2011-01-05 16:45:10.000000000 +0000
@@ -894,7 +894,7 @@
read(unt,*,ERR=10) nirreps_k
ABI_CHECK(Gk%nclass == nirreps_k,"Gk%nclass /= nirreps_k")
- !$$ allocate(Gk%class_names(Gk%nclass))
+ !%$$ allocate(Gk%class_names(Gk%nclass))
allocate(Gk%Irreps(nirreps_k))
do irp=1,nirreps_k
diff -Naur abinit-6.4.2.bak/src/49_gw_toolbox_oop/m_bs_defs.F90 abinit-6.4.2/src/49_gw_toolbox_oop/m_bs_defs.F90
--- src/49_gw_toolbox_oop/m_bs_defs.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/49_gw_toolbox_oop/m_bs_defs.F90 2011-01-05 16:37:04.000000000 +0000
@@ -43,23 +43,23 @@
!!***
! Approximation for the excitonic Hamiltonian
-!$ integer,public,parameter :: BSE_HRPA = 1
-!$ integer,public,parameter :: BSE_HGW = 2
-!$ integer,public,parameter :: BSE_HEXC = 3
+!% integer,public,parameter :: BSE_HRPA = 1
+!% integer,public,parameter :: BSE_HGW = 2
+!% integer,public,parameter :: BSE_HEXC = 3
! Treatment of the resontant and coupling blocks of the Hamiltonian
-!$? integer,public,parameter :: BSE_HRPA = 1
-!$? integer,public,parameter :: BSE_HGW = 2
+!%? integer,public,parameter :: BSE_HRPA = 1
+!%? integer,public,parameter :: BSE_HGW = 2
-!$
-!$! Treatment of W(G1,G2)
-!$ integer,public,parameter :: BSE_WGG_DIAGONAL=1
-!$ integer,public,parameter :: BSE_WGG_FULL =2
-
-!$! Treatment of W(omega)
-!$ integer,public,parameter :: BSE_WFREQ_STATIC=1
-!$ integer,public,parameter :: BSE_WFREQ_PPM =2
-!$ integer,public,parameter :: BSE_WFREQ_FULL =2
+!%
+!%! Treatment of W(G1,G2)
+!% integer,public,parameter :: BSE_WGG_DIAGONAL=1
+!% integer,public,parameter :: BSE_WGG_FULL =2
+
+!%! Treatment of W(omega)
+!% integer,public,parameter :: BSE_WFREQ_STATIC=1
+!% integer,public,parameter :: BSE_WFREQ_PPM =2
+!% integer,public,parameter :: BSE_WFREQ_FULL =2
!----------------------------------------------------------------------
@@ -85,7 +85,7 @@
logical :: wdiag ! Use diagonal approximation for W.
logical :: wfull ! Use full inverse dielectric matrix.
logical :: use_haydock ! Use haydock iterative method to calculate epsilon.
- !$logical :: use_cg ! Use conjugate gradient minimization techniques to calculate the eigenstates.
+ !%$logical :: use_cg ! Use conjugate gradient minimization techniques to calculate the eigenstates.
logical :: gwterm ! Add QP corrections to the band structure either with scissors or GW file.
logical :: exchangeterm ! Include exchange terms in the BS Hamiltonian.
logical :: coulombterm ! Include W term in the BS Hamiltonian.
@@ -99,7 +99,7 @@
integer :: npweps ! No. of G in the Screening.
integer :: npwwfn ! No. of G for wave functions.
- !$integer :: npwx ! No. of G for the exchange part.
+ !%integer :: npwx ! No. of G for the exchange part.
integer :: npwvec ! MAX between npwwfn and npweps
integer :: nsh ! Number of shells corresponding to npwvec=MAX(npwwfn,npweps)
integer :: nbnds ! Total number of bands considered.
diff -Naur abinit-6.4.2.bak/src/51_manage_mpi/mpi_enreg_tools.F90 abinit-6.4.2/src/51_manage_mpi/mpi_enreg_tools.F90
--- src/51_manage_mpi/mpi_enreg_tools.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/51_manage_mpi/mpi_enreg_tools.F90 2011-01-05 08:53:13.000000000 +0000
@@ -675,8 +675,8 @@
MSG_ERROR(" %paral_compil_kpt/=1")
end if
-!$spaceComm=MPI_enreg%spaceComm
-!$nprocs = xcomm_size(spaceComm)
+!%spaceComm=MPI_enreg%spaceComm
+!%nprocs = xcomm_size(spaceComm)
nprocs = MPI_enreg%nproc
my_rank = MPI_enreg%me
diff -Naur abinit-6.4.2.bak/src/52_fft_mpi_noabirule/accrho.F90 abinit-6.4.2/src/52_fft_mpi_noabirule/accrho.F90
--- src/52_fft_mpi_noabirule/accrho.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/52_fft_mpi_noabirule/accrho.F90 2011-01-06 16:08:27.000000000 +0000
@@ -91,14 +91,14 @@
integer unused
unused=0
! *************************************************************************
-!$ interface
-!$ integer ( kind=4 ) function omp_get_num_threads ( )
-!$ end function omp_get_num_threads
-!$ end interface
-!$ interface
-!$ integer ( kind=4 ) function omp_get_thread_num ( )
-!$ end function omp_get_thread_num
-!$ end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_num_threads ( )
+!% end function omp_get_num_threads
+!% end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_thread_num ( )
+!% end function omp_get_thread_num
+!% end interface
write(6,*)' accrho : enter '
diff -Naur abinit-6.4.2.bak/src/52_fft_mpi_noabirule/applypot.F90 abinit-6.4.2/src/52_fft_mpi_noabirule/applypot.F90
--- src/52_fft_mpi_noabirule/applypot.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/52_fft_mpi_noabirule/applypot.F90 2011-01-06 16:09:25.000000000 +0000
@@ -91,14 +91,14 @@
integer unused
unused=0
-!$ interface
-!$ integer ( kind=4 ) function omp_get_num_threads ( )
-!$ end function omp_get_num_threads
-!$ end interface
-!$ interface
-!$ integer ( kind=4 ) function omp_get_thread_num ( )
-!$ end function omp_get_thread_num
-!$ end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_num_threads ( )
+!% end function omp_get_num_threads
+!% end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_thread_num ( )
+!% end function omp_get_thread_num
+!% end interface
write(6,*)' applypot : enter '
diff -Naur abinit-6.4.2.bak/src/52_fft_mpi_noabirule/back.F90 abinit-6.4.2/src/52_fft_mpi_noabirule/back.F90
--- src/52_fft_mpi_noabirule/back.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/52_fft_mpi_noabirule/back.F90 2011-01-07 14:21:34.000000000 +0000
@@ -90,14 +90,14 @@
#endif
! *************************************************************************
-!$ interface
-!$ integer ( kind=4 ) function omp_get_num_threads ( )
-!$ end function omp_get_num_threads
-!$ end interface
-!$ interface
-!$ integer ( kind=4 ) function omp_get_thread_num ( )
-!$ end function omp_get_thread_num
-!$ end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_num_threads ( )
+!% end function omp_get_num_threads
+!% end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_thread_num ( )
+!% end function omp_get_thread_num
+!% end interface
!DEBUG
! write(6,*)' back : enter '
@@ -121,7 +121,8 @@
lock=0
!$omp parallel default(private) &
-!$omp shared(ndat,n1,n2,n3,nd1,nd2,nd3,nd2proc,nd3proc,mpi_enreg%me_fft,mpi_enreg%nproc_fft,ncache,zr,zf,lock,icplex)
+!%omp shared(ndat,n1,n2,n3,nd1,nd2,nd3,nd2proc,nd3proc,mpi_enreg%me_fft,mpi_enreg%nproc_fft,ncache,zr,zf,lock,icplex)
+!$omp shared(ndat,n1,n2,n3,nd1,nd2,nd3,nd2proc,nd3proc,mpi_enreg,ncache,zr,zf,lock,icplex)
iam=0
npr=1
diff -Naur abinit-6.4.2.bak/src/52_fft_mpi_noabirule/back_wf.F90 abinit-6.4.2/src/52_fft_mpi_noabirule/back_wf.F90
--- src/52_fft_mpi_noabirule/back_wf.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/52_fft_mpi_noabirule/back_wf.F90 2011-01-07 14:18:09.000000000 +0000
@@ -98,14 +98,14 @@
real(KIND=8) :: tsec(2)
type(MPI_type),intent(inout) :: mpi_enreg
integer :: old_paral_level
-!$ interface
-!$ integer ( kind=4 ) function omp_get_num_threads ( )
-!$ end function omp_get_num_threads
-!$ end interface
-!$ interface
-!$ integer ( kind=4 ) function omp_get_thread_num ( )
-!$ end function omp_get_thread_num
-!$ end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_num_threads ( )
+!% end function omp_get_num_threads
+!% end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_thread_num ( )
+!% end function omp_get_thread_num
+!% end interface
if(.false.)write(6,*)iproc,nproc
if(mpi_enreg%mode_para=='b') ioption=1
diff -Naur abinit-6.4.2.bak/src/52_fft_mpi_noabirule/forw.F90 abinit-6.4.2/src/52_fft_mpi_noabirule/forw.F90
--- src/52_fft_mpi_noabirule/forw.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/52_fft_mpi_noabirule/forw.F90 2011-01-07 14:21:49.000000000 +0000
@@ -95,14 +95,14 @@
integer :: old_paral_level
#endif
! *************************************************************************
-!$ interface
-!$ integer ( kind=4 ) function omp_get_num_threads ( )
-!$ end function omp_get_num_threads
-!$ end interface
-!$ interface
-!$ integer ( kind=4 ) function omp_get_thread_num ( )
-!$ end function omp_get_thread_num
-!$ end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_num_threads ( )
+!% end function omp_get_num_threads
+!% end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_thread_num ( )
+!% end function omp_get_thread_num
+!% end interface
!DEBUG
! write(6,*)' forw : enter '
@@ -134,7 +134,8 @@
lock=0
!$omp parallel default(private) &
-!$omp shared(ndat,n1,n2,n3,nd1,nd2,nd3,nd2proc,nd3proc,mpi_enreg%me_fft,mpi_enreg%nproc_fft,ncache,zr,zf,lock,icplex)
+!%omp shared(ndat,n1,n2,n3,nd1,nd2,nd3,nd2proc,nd3proc,mpi_enreg%me_fft,mpi_enreg%nproc_fft,ncache,zr,zf,lock,icplex)
+!$omp shared(ndat,n1,n2,n3,nd1,nd2,nd3,nd2proc,nd3proc,mpi_enreg,ncache,zr,zf,lock,icplex)
iam=0
npr=1
diff -Naur abinit-6.4.2.bak/src/52_fft_mpi_noabirule/forw_wf.F90 abinit-6.4.2/src/52_fft_mpi_noabirule/forw_wf.F90
--- src/52_fft_mpi_noabirule/forw_wf.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/52_fft_mpi_noabirule/forw_wf.F90 2011-01-07 14:18:58.000000000 +0000
@@ -98,14 +98,14 @@
type(MPI_type),intent(inout) :: mpi_enreg
integer :: old_paral_level
-!$ interface
-!$ integer ( kind=4 ) function omp_get_num_threads ( )
-!$ end function omp_get_num_threads
-!$ end interface
-!$ interface
-!$ integer ( kind=4 ) function omp_get_thread_num ( )
-!$ end function omp_get_thread_num
-!$ end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_num_threads ( )
+!% end function omp_get_num_threads
+!% end interface
+!% interface
+!% integer ( kind=4 ) function omp_get_thread_num ( )
+!% end function omp_get_thread_num
+!% end interface
if(mpi_enreg%mode_para=='b') ioption=1
! call timab(542,1,tsec)
diff -Naur abinit-6.4.2.bak/src/52_fft_mpi_noabirule/m_fftw3.F90 abinit-6.4.2/src/52_fft_mpi_noabirule/m_fftw3.F90
--- src/52_fft_mpi_noabirule/m_fftw3.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/52_fft_mpi_noabirule/m_fftw3.F90 2011-01-05 09:58:51.000000000 +0000
@@ -156,7 +156,7 @@
!integer,pointer :: n(:) rank
!integer,pointer :: inembed(:) rank
!integer,pointer :: onembed(:) rank
- !$integer(C_INT) :: alignment(2) ! The alignment of the arrays used to costruct the plan.
+ !%integer(C_INT) :: alignment(2) ! The alignment of the arrays used to costruct the plan.
! needed because we cannot use fftw_malloc.
integer :: ndiv(3)=-1 ! The number of FFT divisions.
end type fftw_plan_type
@@ -1022,10 +1022,10 @@
allocate(ff(nx*ny*nz*ndat),gg(2,nx*ny*nz*ndat))
! These calls seem to make the code stuck if we link against MKL
- !$call fftw3_r2c_op(nx,ny,nz,nx,ny,nz,ndat,ff,gg,fftw_flags=wisdom_flag)
- !$call fftw3_c2r_op(nx,ny,nz,nx,ny,nz,ndat,ff,gg,fftw_flags=wisdom_flag)
- !$write(msg,'(a)')" fftw3_c2r_op done"
- !$call wrtout(std_out,msg,"COLL")
+ !%call fftw3_r2c_op(nx,ny,nz,nx,ny,nz,ndat,ff,gg,fftw_flags=wisdom_flag)
+ !%call fftw3_c2r_op(nx,ny,nz,nx,ny,nz,ndat,ff,gg,fftw_flags=wisdom_flag)
+ !%write(msg,'(a)')" fftw3_c2r_op done"
+ !%call wrtout(std_out,msg,"COLL")
deallocate(ff,gg)
diff -Naur abinit-6.4.2.bak/src/53_abiutil/m_abilasi.F90 abinit-6.4.2/src/53_abiutil/m_abilasi.F90
--- src/53_abiutil/m_abilasi.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/53_abiutil/m_abilasi.F90 2011-01-05 17:36:48.000000000 +0000
@@ -567,36 +567,36 @@
MSG_PERS_ERROR("Not coded yet")
-!$$ call init_scalapack(Slk_processor,comm)
-!$$ istwf_k=1
-!$$
-!$$ ! Initialize and fill Scalapack matrix from the global one.
-!$$ tbloc=SLK_BLOCK_SIZE
-!$$ call init_matrix_scalapack(Slk_mat,n,n,Slk_processor,istwf_k,tbloc=tbloc)
-!$$
-!$$ write(msg,'(2(a,i0))')" Using scaLAPACK version with nprocs= ",nprocs,"; block size= ",tbloc
-!$$ call wrtout(std_out,msg,"PERS")
-!$$
-!$$ call slk_matrix_from_global_dpc_2D(Slk_mat,uplo,a)
-!$$
-!$$ want_eigenvectors = starts_with(jobz,(/"V","v"/))
-!$$ if (want_eigenvectors) then ! Initialize the distributed vectors.
-!$$ call init_matrix_scalapack(Slk_vec,n,n,Slk_processor,istwf_k,tbloc=tbloc)
-!$$ end if
-!$$
-!$$ ! Solve the problem with scaLAPACK.
-!$$ call slk_pzheev(jobz,uplo,Slk_mat,Slk_vec,w)
-!$$
-!$$ call destruction_matrix_scalapack(Slk_mat)
-!$$
-!$$ if (want_eigenvectors) then ! A is overwritten with the eigenvectors
-!$$ a = czero
-!$$ call slk_matrix_to_global_dpc_2D(Slk_vec,"All",a) ! Fill the entries calculated by this node.
-!$$ call destruction_matrix_scalapack(Slk_vec)
-!$$ call xsum_mpi(a,comm,ierr) ! Fill the remaing entries of the global matrix
-!$$ end if
-!$$
-!$$ call end_scalapack(Slk_processor)
+!%% call init_scalapack(Slk_processor,comm)
+!%% istwf_k=1
+!%%
+!%% ! Initialize and fill Scalapack matrix from the global one.
+!%% tbloc=SLK_BLOCK_SIZE
+!%% call init_matrix_scalapack(Slk_mat,n,n,Slk_processor,istwf_k,tbloc=tbloc)
+!%%
+!%% write(msg,'(2(a,i0))')" Using scaLAPACK version with nprocs= ",nprocs,"; block size= ",tbloc
+!%% call wrtout(std_out,msg,"PERS")
+!%%
+!%% call slk_matrix_from_global_dpc_2D(Slk_mat,uplo,a)
+!%%
+!%% want_eigenvectors = starts_with(jobz,(/"V","v"/))
+!%% if (want_eigenvectors) then ! Initialize the distributed vectors.
+!%% call init_matrix_scalapack(Slk_vec,n,n,Slk_processor,istwf_k,tbloc=tbloc)
+!%% end if
+!%%
+!%% ! Solve the problem with scaLAPACK.
+!%% call slk_pzheev(jobz,uplo,Slk_mat,Slk_vec,w)
+!%%
+!%% call destruction_matrix_scalapack(Slk_mat)
+!%%
+!%% if (want_eigenvectors) then ! A is overwritten with the eigenvectors
+!%% a = czero
+!%% call slk_matrix_to_global_dpc_2D(Slk_vec,"All",a) ! Fill the entries calculated by this node.
+!%% call destruction_matrix_scalapack(Slk_vec)
+!%% call xsum_mpi(a,comm,ierr) ! Fill the remaing entries of the global matrix
+!%% end if
+!%%
+!%% call end_scalapack(Slk_processor)
RETURN
#endif
@@ -1086,7 +1086,7 @@
! Solve the problem with scaLAPACK.
MSG_ERROR("slk_pZHEGV not yet coded")
! TODO
- !$call slk_pzhegv(itype,jobz,uplo,Slk_matA,Slk_matB,w)
+ !%call slk_pzhegv(itype,jobz,uplo,Slk_matA,Slk_matB,w)
call destruction_matrix_scalapack(Slk_matB)
@@ -1324,37 +1324,37 @@
MSG_ERROR("Not coded yet")
- !$$ call init_scalapack(Slk_processor,comm)
- !$$ istwf_k=1
+ !%% call init_scalapack(Slk_processor,comm)
+ !%% istwf_k=1
- !$$ ! Initialize and fill Scalapack matrix from the global one.
- !$$ tbloc=SLK_BLOCK_SIZE
+ !%% ! Initialize and fill Scalapack matrix from the global one.
+ !%% tbloc=SLK_BLOCK_SIZE
- !$$ write(msg,'(2(a,i0))')" Using scaLAPACK version with nprocs= ",nprocs,"; block size= ",tbloc
- !$$ call wrtout(std_out,msg,"PERS")
+ !%% write(msg,'(2(a,i0))')" Using scaLAPACK version with nprocs= ",nprocs,"; block size= ",tbloc
+ !%% call wrtout(std_out,msg,"PERS")
- !$$ call init_matrix_scalapack(Slk_matA,n,n,Slk_processor,istwf_k,tbloc=tbloc)
- !$$ call slk_matrix_from_global_dpc_2D(Slk_matA,uplo,a)
+ !%% call init_matrix_scalapack(Slk_matA,n,n,Slk_processor,istwf_k,tbloc=tbloc)
+ !%% call slk_matrix_from_global_dpc_2D(Slk_matA,uplo,a)
- !$$ call init_matrix_scalapack(Slk_matB,n,n,Slk_processor,istwf_k,tbloc=tbloc)
- !$$ call slk_matrix_from_global_dpc_2D(Slk_matB,uplo,b)
+ !%% call init_matrix_scalapack(Slk_matB,n,n,Slk_processor,istwf_k,tbloc=tbloc)
+ !%% call slk_matrix_from_global_dpc_2D(Slk_matB,uplo,b)
- !$$ ! Solve the problem with scaLAPACK.
- !$$ MSG_ERROR("slk_pZHEGV not yet coded")
- !$$ ! TODO
- !$$ !$call slk_pzhegv(itype,jobz,uplo,Slk_matA,Slk_matB,w)
+ !%% ! Solve the problem with scaLAPACK.
+ !%% MSG_ERROR("slk_pZHEGV not yet coded")
+ !%% ! TODO
+ !%% !%call slk_pzhegv(itype,jobz,uplo,Slk_matA,Slk_matB,w)
- !$$ call destruction_matrix_scalapack(Slk_matB)
- !$$
- !$$ if (starts_with(jobz,(/"V","v"/))) then ! A is overwritten with the eigenvectors
- !$$ a = czero
- !$$ call slk_matrix_to_global_dpc_2D(Slk_matA,"All",a) ! Fill the entries calculated by this node.
- !$$ call xsum_mpi(a,comm,ierr) ! Fill the remaing entries of the global matrix
- !$$ end if
+ !%% call destruction_matrix_scalapack(Slk_matB)
+ !%%
+ !%% if (starts_with(jobz,(/"V","v"/))) then ! A is overwritten with the eigenvectors
+ !%% a = czero
+ !%% call slk_matrix_to_global_dpc_2D(Slk_matA,"All",a) ! Fill the entries calculated by this node.
+ !%% call xsum_mpi(a,comm,ierr) ! Fill the remaing entries of the global matrix
+ !%% end if
- !$$ call destruction_matrix_scalapack(Slk_matA)
+ !%% call destruction_matrix_scalapack(Slk_matA)
- !$$ call end_scalapack(Slk_processor)
+ !%% call end_scalapack(Slk_processor)
RETURN
#endif
@@ -1868,36 +1868,36 @@
#if defined HAVE_LINALG_MPI
MSG_ERROR("Not coded yet")
- !$$ call init_scalapack(Slk_processor,comm)
- !$$ istwf_k=1
+ !%% call init_scalapack(Slk_processor,comm)
+ !%% istwf_k=1
- !$$ ! Initialize and fill Scalapack matrix from the global one.
- !$$ tbloc=SLK_BLOCK_SIZE
- !$$ call init_matrix_scalapack(Slk_mat,n,n,Slk_processor,istwf_k,tbloc=tbloc)
-
- !$$ write(msg,'(2(a,i0))')" Using scaLAPACK version with nprocs= ",nprocs,"; block size= ",tbloc
- !$$ call wrtout(std_out,msg,"PERS")
-
- !$$ call slk_matrix_from_global_dpc_2D(Slk_mat,uplo,a)
-
- !$$ want_eigenvectors = starts_with(jobz,(/"V","v"/))
- !$$ if (want_eigenvectors) then ! Initialize the distributed vectors.
- !$$ call init_matrix_scalapack(Slk_vec,n,n,Slk_processor,istwf_k,tbloc=tbloc)
- !$$ end if
-
- !$$ ! Solve the problem.
- !$$ call slk_pzheevx(jobz,range,uplo,Slk_mat,vl,vu,il,iu,abstol,Slk_vec,m,w)
-
- !$$ call destruction_matrix_scalapack(Slk_mat)
- !$$
- !$$ if (want_eigenvectors) then ! A is overwritten with the eigenvectors
- !$$ z = czero
- !$$ call slk_matrix_to_global_dpc_2D(Slk_vec,"All",z) ! Fill the entries calculated by this node.
- !$$ call destruction_matrix_scalapack(Slk_vec)
- !$$ call xsum_mpi(z,comm,ierr) ! Fill the remaing entries of the global matrix
- !$$ end if
+ !%% ! Initialize and fill Scalapack matrix from the global one.
+ !%% tbloc=SLK_BLOCK_SIZE
+ !%% call init_matrix_scalapack(Slk_mat,n,n,Slk_processor,istwf_k,tbloc=tbloc)
+
+ !%% write(msg,'(2(a,i0))')" Using scaLAPACK version with nprocs= ",nprocs,"; block size= ",tbloc
+ !%% call wrtout(std_out,msg,"PERS")
+
+ !%% call slk_matrix_from_global_dpc_2D(Slk_mat,uplo,a)
+
+ !%% want_eigenvectors = starts_with(jobz,(/"V","v"/))
+ !%% if (want_eigenvectors) then ! Initialize the distributed vectors.
+ !%% call init_matrix_scalapack(Slk_vec,n,n,Slk_processor,istwf_k,tbloc=tbloc)
+ !%% end if
+
+ !%% ! Solve the problem.
+ !%% call slk_pzheevx(jobz,range,uplo,Slk_mat,vl,vu,il,iu,abstol,Slk_vec,m,w)
+
+ !%% call destruction_matrix_scalapack(Slk_mat)
+ !%%
+ !%% if (want_eigenvectors) then ! A is overwritten with the eigenvectors
+ !%% z = czero
+ !%% call slk_matrix_to_global_dpc_2D(Slk_vec,"All",z) ! Fill the entries calculated by this node.
+ !%% call destruction_matrix_scalapack(Slk_vec)
+ !%% call xsum_mpi(z,comm,ierr) ! Fill the remaing entries of the global matrix
+ !%% end if
- !$$ call end_scalapack(Slk_processor)
+ !%% call end_scalapack(Slk_processor)
RETURN
#endif
@@ -2159,7 +2159,7 @@
! Solve the problem.
MSG_ERROR("slk_pZHEGVX not coded yet")
! TODO write the scaLAPACK wrapper.
- !$call slk_pZHEGVX(itype,jobz,range,uplo,Slk_matA,Slk_matB,vl,vu,il,iu,abstol,Slk_vec,m,w)
+ !%call slk_pZHEGVX(itype,jobz,range,uplo,Slk_matA,Slk_matB,vl,vu,il,iu,abstol,Slk_vec,m,w)
call destruction_matrix_scalapack(Slk_matA)
call destruction_matrix_scalapack(Slk_matB)
@@ -2466,44 +2466,44 @@
#if defined HAVE_LINALG_MPI
MSG_ERROR("not coded yet")
- !$$ call init_scalapack(Slk_processor,comm)
- !$$ istwf_k=1
+ !%% call init_scalapack(Slk_processor,comm)
+ !%% istwf_k=1
- !$$ ! Initialize and fill Scalapack matrix from the global one.
- !$$ tbloc=SLK_BLOCK_SIZE
+ !%% ! Initialize and fill Scalapack matrix from the global one.
+ !%% tbloc=SLK_BLOCK_SIZE
- !$$ write(msg,'(2(a,i0))')" Using scaLAPACK version with nprocs= ",nprocs,"; block size= ",tbloc
- !$$ call wrtout(std_out,msg,"PERS")
+ !%% write(msg,'(2(a,i0))')" Using scaLAPACK version with nprocs= ",nprocs,"; block size= ",tbloc
+ !%% call wrtout(std_out,msg,"PERS")
- !$$ call init_matrix_scalapack(Slk_matA,n,n,Slk_processor,istwf_k,tbloc=tbloc)
- !$$ call slk_matrix_from_global_dpc_2D(Slk_matA,uplo,a)
-
- !$$ call init_matrix_scalapack(Slk_matB,n,n,Slk_processor,istwf_k,tbloc=tbloc)
- !$$ call slk_matrix_from_global_dpc_2D(Slk_matB,uplo,b)
-
- !$$ want_eigenvectors = starts_with(jobz,(/"V","v"/))
- !$$ if (want_eigenvectors) then ! Initialize the distributed vectors.
- !$$ call init_matrix_scalapack(Slk_vec,n,n,Slk_processor,istwf_k,tbloc=tbloc)
- !$$ end if
-
- !$$ ! Solve the problem.
- !$$ MSG_ERROR("slk_pZHEGVX not coded yet")
- !$$ ! TODO write the scaLAPACK wrapper.
- !$$ !$call slk_pZHEGVX(itype,jobz,range,uplo,Slk_matA,Slk_matB,vl,vu,il,iu,abstol,Slk_vec,m,w)
-
- !$$ call destruction_matrix_scalapack(Slk_matA)
- !$$ call destruction_matrix_scalapack(Slk_matB)
- !$$
- !$$ if (want_eigenvectors) then ! A is overwritten with the eigenvectors
- !$$ z = czero
- !$$ call slk_matrix_to_global_dpc_2D(Slk_vec,"All",z) ! Fill the entries calculated by this node.
- !$$ call destruction_matrix_scalapack(Slk_vec)
- !$$ call xsum_mpi(z,comm,ierr) ! Fill the remaing entries of the global matrix
- !$$ end if
+ !%% call init_matrix_scalapack(Slk_matA,n,n,Slk_processor,istwf_k,tbloc=tbloc)
+ !%% call slk_matrix_from_global_dpc_2D(Slk_matA,uplo,a)
+
+ !%% call init_matrix_scalapack(Slk_matB,n,n,Slk_processor,istwf_k,tbloc=tbloc)
+ !%% call slk_matrix_from_global_dpc_2D(Slk_matB,uplo,b)
+
+ !%% want_eigenvectors = starts_with(jobz,(/"V","v"/))
+ !%% if (want_eigenvectors) then ! Initialize the distributed vectors.
+ !%% call init_matrix_scalapack(Slk_vec,n,n,Slk_processor,istwf_k,tbloc=tbloc)
+ !%% end if
+
+ !%% ! Solve the problem.
+ !%% MSG_ERROR("slk_pZHEGVX not coded yet")
+ !%% ! TODO write the scaLAPACK wrapper.
+ !%% !%call slk_pZHEGVX(itype,jobz,range,uplo,Slk_matA,Slk_matB,vl,vu,il,iu,abstol,Slk_vec,m,w)
+
+ !%% call destruction_matrix_scalapack(Slk_matA)
+ !%% call destruction_matrix_scalapack(Slk_matB)
+ !%%
+ !%% if (want_eigenvectors) then ! A is overwritten with the eigenvectors
+ !%% z = czero
+ !%% call slk_matrix_to_global_dpc_2D(Slk_vec,"All",z) ! Fill the entries calculated by this node.
+ !%% call destruction_matrix_scalapack(Slk_vec)
+ !%% call xsum_mpi(z,comm,ierr) ! Fill the remaing entries of the global matrix
+ !%% end if
- !$$ call end_scalapack(Slk_processor)
+ !%% call end_scalapack(Slk_processor)
- !$$ RETURN
+ !%% RETURN
#endif
MSG_PERS_BUG("You should not be here!")
@@ -2927,7 +2927,7 @@
MSG_PERS_ERROR(msg)
end if
- !$call slk_matrix_from_global_dpc_2D(Slk_mat,"All",a)
+ !%call slk_matrix_from_global_dpc_2D(Slk_mat,"All",a)
ipiv_size = my_locr(Slk_mat) + Slk_mat%descript%tab(MB_)
allocate(ipiv(ipiv_size))
@@ -2968,7 +2968,7 @@
! Reconstruct the global matrix from the distributed one.
a = czero
- !$call slk_matrix_to_global_dpc_2D(Slk_mat,"All",a) ! Fill the entries calculated by this node.
+ !%call slk_matrix_to_global_dpc_2D(Slk_mat,"All",a) ! Fill the entries calculated by this node.
call destruction_matrix_scalapack(Slk_mat)
call xsum_mpi(a,comm,ierr) ! Fill the remaing entries of the global matrix
diff -Naur abinit-6.4.2.bak/src/53_ffts/fftw3_fourwf.F90 abinit-6.4.2/src/53_ffts/fftw3_fourwf.F90
--- src/53_ffts/fftw3_fourwf.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/53_ffts/fftw3_fourwf.F90 2011-01-05 17:22:28.000000000 +0000
@@ -432,8 +432,8 @@
end do
cplex=0; istwf_k=1; option=3
-!$ call sg_fftrisc(cplex,dum_denpot,fofgin,dum_fofgin,fofr,gbound,gbound,istwf_k,dum_gvec,gvec,&
-!$& mgfft,ngfft,npwwfn,npwwfn,ldx,ldy,ldz,option,weight)
+!% call sg_fftrisc(cplex,dum_denpot,fofgin,dum_fofgin,fofr,gbound,gbound,istwf_k,dum_gvec,gvec,&
+!%& mgfft,ngfft,npwwfn,npwwfn,ldx,ldy,ldz,option,weight)
allocate(ftarr(2,ldx,ldy,ldz))
!This call gives weird results for R-->G, while G-->R is ok!!!!
diff -Naur abinit-6.4.2.bak/src/53_ffts/sphere_fft.F90 abinit-6.4.2/src/53_ffts/sphere_fft.F90
--- src/53_ffts/sphere_fft.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/53_ffts/sphere_fft.F90 2011-01-09 11:05:00.000000000 +0000
@@ -99,7 +99,7 @@
!ENDDEBUG
!Insert cg into cfft with extra 0 s around outside:
-!$OMP PARALLEL DO PRIVATE(i1,i2,i3) SHARED(cfft,ndat,n1,n2,n3)
+!%$OMP PARALLEL DO PRIVATE(i1,i2,i3) SHARED(cfft,ndat,n1,n2,n3)
!do i2=1,nd2proc*ndat
!do i3=1,n3
!do i1=1,n1
@@ -108,7 +108,7 @@
!end do
!end do
!end do
-!$OMP END PARALLEL DO
+!%$OMP END PARALLEL DO
cfft(:,:,:,:)=zero
!$OMP PARALLEL DO PRIVATE(i1,i2,i3,idat,ipw) SHARED(cfft,cg,kg_k,ndat,npw)
!write(6,*)'In sphere fft,i1,i2,i3,ipw,cfft=cg'
@@ -229,7 +229,7 @@
!ENDDEBUG
!Insert cg into cfft with extra 0 s around outside:
-!$OMP PARALLEL DO PRIVATE(i1,i2,i3) SHARED(cfft,ndat,n1,n2,n3)
+!%$OMP PARALLEL DO PRIVATE(i1,i2,i3) SHARED(cfft,ndat,n1,n2,n3)
!do i2=1,nd2proc*ndat
!do i3=1,n3
!do i1=1,n1
@@ -238,7 +238,7 @@
!end do
!end do
!end do
-!$OMP END PARALLEL DO
+!%$OMP END PARALLEL DO
cfft(:,:,:,:)=zero
!$OMP PARALLEL DO PRIVATE(i1,i2,i3,idat,ipw) SHARED(cfft,cg,kg_k,ndat,npw)
!write(6,*)'In sphere fft,i1,i2,i3,ipw,cfft=cg'
diff -Naur abinit-6.4.2.bak/src/57_iovars/invars2.F90 abinit-6.4.2/src/57_iovars/invars2.F90
--- src/57_iovars/invars2.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/57_iovars/invars2.F90 2011-01-05 16:51:21.000000000 +0000
@@ -72,7 +72,7 @@
use defs_datatypes
use defs_abitypes
- !$use m_gwdefs, only: gw_sctype_from_name
+ !%use m_gwdefs, only: gw_sctype_from_name
!This section has been created automatically by the script Abilint (TD).
!Do not modify the following lines by hand.
diff -Naur abinit-6.4.2.bak/src/59_io_mpi/hdr_io.F90 abinit-6.4.2/src/59_io_mpi/hdr_io.F90
--- src/59_io_mpi/hdr_io.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/59_io_mpi/hdr_io.F90 2011-01-05 08:53:52.000000000 +0000
@@ -209,7 +209,7 @@
use defs_basis
use defs_abitypes
use m_errors
-!$use m_header
+!%use m_header
use m_io_tools, only : flush_unit
diff -Naur abinit-6.4.2.bak/src/64_atompaw/m_lmn_indices.F90 abinit-6.4.2/src/64_atompaw/m_lmn_indices.F90
--- src/64_atompaw/m_lmn_indices.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/64_atompaw/m_lmn_indices.F90 2011-01-05 08:54:53.000000000 +0000
@@ -251,10 +251,10 @@
indklmn(6,klmn)=jlm ! jlm
! TODO additional mapping (At present it is in klmntomn)
- !$indklmn(7 ,klmn)=indlmn(2,ilmn)+il+1 ! im
- !$indklmn(8 ,klmn)=indlmn(2,jlmn)+jl+1 ! jm
- !$indklmn(9 ,klmn)=indlmn(3,ilmn) ! in
- !$indklmn(10,klmn)=indlmn(3,jlmn) ! jn
+ !%indklmn(7 ,klmn)=indlmn(2,ilmn)+il+1 ! im
+ !%indklmn(8 ,klmn)=indlmn(2,jlmn)+jl+1 ! jm
+ !%indklmn(9 ,klmn)=indlmn(3,ilmn) ! in
+ !%indklmn(10,klmn)=indlmn(3,jlmn) ! jn
if (ilm==jlm) klm_diag(klmn)=1
end do
@@ -329,8 +329,8 @@
il= indlmn(1,ilmn); iln=indlmn(5,ilmn)
jl= indlmn(1,jlmn); jln=indlmn(5,jlmn)
- !$in = indklmn(9 ,klmn) !=indlmn(3,ilmn)
- !$jn = indklmn(10,klmn) !=indlmn(3,jlmn)
+ !%in = indklmn(9 ,klmn) !=indlmn(3,ilmn)
+ !%jn = indklmn(10,klmn) !=indlmn(3,jlmn)
in = indlmn(3,ilmn)
jn = indlmn(3,jlmn)
diff -Naur abinit-6.4.2.bak/src/65_nonlocal/m_hamiltonian.F90 abinit-6.4.2/src/65_nonlocal/m_hamiltonian.F90
--- src/65_nonlocal/m_hamiltonian.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/65_nonlocal/m_hamiltonian.F90 2011-01-05 16:38:16.000000000 +0000
@@ -142,7 +142,7 @@
! "V": all eigenvalues in the half-open interval (VL,VU] will be found.
! "I": the IL-th through IU-th eigenvalues will be found.
- !$character(len=fnlen) :: fname
+ !%character(len=fnlen) :: fname
! The name of the file storing the eigenvectors and eigenvalues (only if jobz="V")
end type ddiago_ctl_type
@@ -391,7 +391,7 @@
gs_hamk%nfft =nfft
gs_hamk%ngfft(:) =ngfft(:)
gs_hamk%nloalg(:) =nloalg(:)
- !$gs_hamk%matblk=nloalg(4); if (nloalg(1)>0) gs_hamk%matblk=natom
+ !%gs_hamk%matblk=nloalg(4); if (nloalg(1)>0) gs_hamk%matblk=natom
gs_hamk%nspinor =nspinor
gs_hamk%ntypat =ntypat
diff -Naur abinit-6.4.2.bak/src/65_psp/psp5lo.F90 abinit-6.4.2/src/65_psp/psp5lo.F90
--- src/65_psp/psp5lo.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/65_psp/psp5lo.F90 2011-01-05 16:38:46.000000000 +0000
@@ -111,8 +111,8 @@
call ctrap(mmax,work,al,result)
!Do integral from r(mmax) to infinity
!compute decay length lambda at r(mmax)
-!$\lambda=-\log((rad(im1)*vloc(im1)+zion)$/ &
-!$(rad(imat)*vloc(imat)+zion))/(rad(im1)-rad(imat))$
+!%\lambda=-\log((rad(im1)*vloc(im1)+zion)$/ &
+!%(rad(imat)*vloc(imat)+zion))/(rad(im1)-rad(imat))$
!rmtoin=$(rad(mmax)*vloc(mmax)+zion)*(rad(mmax)+1.d0/\lambda)/\lambda$
!Due to inability to fit exponential decay to r*V(r)+Zv
!in tail, NO TAIL CORRECTION IS APPLIED
diff -Naur abinit-6.4.2.bak/src/66_paw/m_paw_slater.F90 abinit-6.4.2/src/66_paw/m_paw_slater.F90
--- src/66_paw/m_paw_slater.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/66_paw/m_paw_slater.F90 2011-01-05 08:57:00.000000000 +0000
@@ -352,7 +352,7 @@
Slatang3l(klm)%sggselect = 0
do ilsl=lslat_min,lslat_max
- !$do ilsl=lslat_min,lslat_max,2
+ !%do ilsl=lslat_min,lslat_max,2
lsl = ilsl-1
do ilc=1,lc_max
lc = ilc-1
@@ -695,7 +695,7 @@
end if
indlmn => Psps%indlmn(1:6,1:lmn_size,itypat)
- !$indlmn => Pawtab%indklmn(1:6,1:lmn2_size) !TODO indlmn should be in Pawtab!!!
+ !%indlmn => Pawtab%indklmn(1:6,1:lmn2_size) !TODO indlmn should be in Pawtab!!!
indklmn => Pawtab%indklmn(1:6,1:lmn2_size)
allocate(kln2ln(6,ln2_size))
@@ -874,7 +874,7 @@
lm2_size = lm_size*(lm_size+1)/2
indlmn => Psps%indlmn(1:6,1:lmn_size,itypat) !this is the reason why we still need itypat
- !$indlmn => Pawtab%indlmn(1:6,1:lmn_size) !TODO indlmn should be in Pawtab!!!
+ !%indlmn => Pawtab%indlmn(1:6,1:lmn_size) !TODO indlmn should be in Pawtab!!!
indklmn => Pawtab%indklmn(1:6,1:lmn2_size)
! * Setup of useful tables.
@@ -1327,7 +1327,7 @@
!
! Useful table for looping.
indlmn => Psps%indlmn(1:6,1:lmn_size,itypat)
- !$indlmn => Pawtab%indlmn(1:6,1:lmn2_size) !TODO indlmn should be in Pawtab!!!
+ !%indlmn => Pawtab%indlmn(1:6,1:lmn2_size) !TODO indlmn should be in Pawtab!!!
indklmn => Pawtab%indklmn(1:6,1:lmn2_size)
allocate(kln2ln(6,ln2_size))
@@ -1822,7 +1822,7 @@
slat_intg=zero
if (Slatrad4(slt_idx)%nintgl>0) then
do ilsum=Slatrad4(slt_idx)%lslat_min,Slatrad4(slt_idx)%lslat_max
- !$do ilsum=Slatrad4(slt_idx)%lslat_min,Slatrad4(slt_idx)%lslat_max,2
+ !%do ilsum=Slatrad4(slt_idx)%lslat_min,Slatrad4(slt_idx)%lslat_max,2
isel = Slatrad4(slt_idx)%intgl_select(ilsum)
if (isel/=0) then
sltL_ijkl = Slatrad4(slt_idx)%intgl(isel)
diff -Naur abinit-6.4.2.bak/src/66_paw/m_paw_toolbox.F90 abinit-6.4.2/src/66_paw/m_paw_toolbox.F90
--- src/66_paw/m_paw_toolbox.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/66_paw/m_paw_toolbox.F90 2011-01-05 08:57:50.000000000 +0000
@@ -1102,8 +1102,8 @@
!MG This is the coding PRESENTLY used in pawdenpot but the commented code should be the correct one
!MT: don't agreee for nspden (there is no dependance of vH^(1) with nspden)
allocate(Paw_an(iat)%vh1(cplex*Pawtab(itypat)%mesh_size,1,1))
- !$allocate(Paw_an(iat)%vh1 (cplex*Pawtab(itypat)%mesh_size,lm_size,nspden))
- !$allocate(Paw_an(iat)%vht1(cplex*Pawtab(itypat)%mesh_size,lm_size,nspden))
+ !%allocate(Paw_an(iat)%vh1 (cplex*Pawtab(itypat)%mesh_size,lm_size,nspden))
+ !%allocate(Paw_an(iat)%vht1(cplex*Pawtab(itypat)%mesh_size,lm_size,nspden))
end if
end if
diff -Naur abinit-6.4.2.bak/src/66_paw/pawmkaewf.F90 abinit-6.4.2/src/66_paw/pawmkaewf.F90
--- src/66_paw/pawmkaewf.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/66_paw/pawmkaewf.F90 2011-01-04 17:16:03.000000000 +0000
@@ -99,7 +99,7 @@
#if defined HAVE_ETSF_IO
use etsf_io
- !use etsf_io_file, only : etsf_io_file_merge
+ use etsf_io_file, only : etsf_io_file_merge
use m_abi_etsf, only : abi_etsf_dims_init
#endif
@@ -890,7 +890,7 @@
out_file="test_merge"
write(msg,'(2a)')'Master node is merging NETCDF partial files into: ',TRIM(out_file)
call wrtout(std_out, msg,'COLL')
- !$call etsf_io_file_merge(out_file,merge_files,lstat,Error)
+ call etsf_io_file_merge(out_file,merge_files,lstat,Error)
if (.not.lstat) goto 1000
end if
call xbarrier_mpi(spaceComm)
diff -Naur abinit-6.4.2.bak/src/66_wfs/envlop.F90 abinit-6.4.2/src/66_wfs/envlop.F90
--- src/66_wfs/envlop.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/66_wfs/envlop.F90 2011-01-05 16:40:07.000000000 +0000
@@ -67,7 +67,7 @@
! *************************************************************************
-!$(k+G)^2$ evaluated using metric and kpoint
+!%$(k+G)^2$ evaluated using metric and kpoint
gsq(i1,i2,i3)=gmet(1,1)*(kpoint(1)+dble(i1))**2+&
& gmet(2,2)*(kpoint(2)+dble(i2))**2+&
& gmet(3,3)*(kpoint(3)+dble(i3))**2+&
@@ -78,7 +78,7 @@
!cutoff function
fcut(gs)=(1.0_dp-(gs/cutoff))**power
-!$(k+G)^2$ cutoff from $(1/2)(2 Pi (k+G))^2 = ecut$
+!%$(k+G)^2$ cutoff from $(1/2)(2 Pi (k+G))^2 = ecut$
kpgsqc=ecut/(2.0_dp*pi**2)
cutoff = kpgsqc
diff -Naur abinit-6.4.2.bak/src/66_wfs/m_bands_sym.F90 abinit-6.4.2/src/66_wfs/m_bands_sym.F90
--- src/66_wfs/m_bands_sym.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/66_wfs/m_bands_sym.F90 2011-01-05 16:43:49.000000000 +0000
@@ -172,7 +172,7 @@
! Number of states in each degenerate subspace. Cannot be larger that nclass provided
! that no accidental degeneracy occurs.
- !$integer,pointer :: class_ids(:,:) SET2NULL
+ !%integer,pointer :: class_ids(:,:) SET2NULL
! class_ids(2,nclass)
! (1,icl) = index of the first symmetry of class icl
! (2,icl) = index of the last symmetry of class icl
@@ -498,12 +498,12 @@
MSG_ERROR("Not coded")
! Read little groups from the external database.
- !$call init_groupk_from_file(Lgrp,spgroup,lgroup_fname,ierr)
+ !%call init_groupk_from_file(Lgrp,spgroup,lgroup_fname,ierr)
! Save the irreducible representations in BSym.
! Reorder symmetries such that they correspond to the Bilbao database.
- !$allocate(BSym%Ref_irreps(BSym%nclass))
- !$call copy_irrep(Irreps, BSym%Ref_irreps)
+ !%allocate(BSym%Ref_irreps(BSym%nclass))
+ !%call copy_irrep(Irreps, BSym%Ref_irreps)
else
write(msg,'(7a)')&
@@ -769,8 +769,8 @@
deallocate(sgk,tr_sgk,elements_idx)
- !$allocate(BSym%irrep2b(0:BSym%nclass))
- !$call nullify_coeff(BSym%irrep2b)
+ !%allocate(BSym%irrep2b(0:BSym%nclass))
+ !%call nullify_coeff(BSym%irrep2b)
!
! 1) Allocate space for the irreducible representations.
diff -Naur abinit-6.4.2.bak/src/66_wfs/m_wfs.F90 abinit-6.4.2/src/66_wfs/m_wfs.F90
--- src/66_wfs/m_wfs.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/66_wfs/m_wfs.F90 2011-01-05 16:42:27.000000000 +0000
@@ -95,7 +95,7 @@
! The boundary of the basis sphere of G vectors at a given k point.
! for use in improved zero padding of ffts in 3 dimensions.
- !$real(dp) :: kpoint(3)
+ !%real(dp) :: kpoint(3)
!real(dp),pointer :: ph1d(:,:) SET2NULL
! ph1d(2,3*(2*mgfft+1)*natom)
@@ -113,20 +113,20 @@
! fnlylm(npw,dim_fnlylm,lmnmax,ntypat)
! nonlocal form factors
- !$real(dp),pointer :: ylm(:,:) SET2NULL
+ !%real(dp),pointer :: ylm(:,:) SET2NULL
! ylm(npw,mpsang**2*useylm)
! Real spherical harmonics for each G
- !$integer :: ngfft(18)
+ !%integer :: ngfft(18)
! Information about 3D FFT, see ~abinit/doc/input_variables/vargs.htm#ngfft.
- !$integer :: mgfft
+ !%integer :: mgfft
! MAXVAL(ngfft(1:3)), used to dimension some arrays.
- !$integer :: nfftot
+ !%integer :: nfftot
! PRODUCT(ngfft(1:3)), ie the total number of FFT points.
- !$integer :: nfft
+ !%integer :: nfft
! The number of points treated by this node.
end type kdata_t
@@ -229,7 +229,7 @@
integer :: lmnmax
integer :: mband ! MAX(nband)
integer :: mgfft ! Maximum size of 1D FFTs
- !$integer :: mpsang
+ !%integer :: mpsang
integer :: natom
integer :: nfft ! Number of FFT points treated by this processor
integer :: nfftot ! Total number of points in the FFT grid
@@ -247,7 +247,7 @@
integer :: my_rank ! The rank of my processor inside the MPI communicator comm.
integer :: nproc ! The number of processors in MPI comm.
- !$ integer :: cplex
+ !% integer :: cplex
! cplex= if 1 , wavefunctions are real, if 2 they are complex
! In systems with time-reversal and spatial inversion, wavefunctions are real.
! One might use this to reduce memory in wave_t.
@@ -311,7 +311,7 @@
! nlmn_type(ntypat)
! Number of (n,l,m) channels for each type of atom. Only for PAW.
- !$integer,pointer :: typat(:) SET2NULL
+ !%integer,pointer :: typat(:) SET2NULL
! typat(natom)
! The type of each atom.
@@ -343,7 +343,7 @@
! keep(mband,nkibz,nsppol)
! Storage strategy: keep or not keep calculated u(r) in memory.
- !$type(mpicomm_t),pointer :: comm_spin(:)
+ !%type(mpicomm_t),pointer :: comm_spin(:)
! comm(0:nsppol)
! MPI communicators.
! comm(1), comm(2) are the MPI communicators of the nodes treating the different spins.
@@ -978,7 +978,7 @@
#if 0
! TODO enable this call when k-centered G-spheres are used.
- !$if (wfd_ihave_ug(Wfd,0,ik_ibz,0)) then
+ !%if (wfd_ihave_ug(Wfd,0,ik_ibz,0)) then
call kdata_init(Wfd%Kdata(ik_ibz),Cryst,Psps,kpoint,istwf_k,ngfft,Wfd%MPI_enreg,kg_k=Wfd%gvec)
!endif
#else
@@ -1735,12 +1735,12 @@
dimffnl = Wfd%Kdata(ik_ibz)%dim_fnlylm
ph3d => Wfd%Kdata(ik_ibz)%ph3d
ffnl => Wfd%Kdata(ik_ibz)%fnlylm
- !$phkxred => Wfd%Kdata(ik_ibz)%phkxred
+ !%phkxred => Wfd%Kdata(ik_ibz)%phkxred
! Compute (k+G) vectors
nkpg=0
- !$if (choice==3.or.choice==2.or.choice==23) nkpg=3*Wfd%nloalg(5)
- !$if (choice==4.or.choice==24) nkpg=9*Wfd%nloalg(5)
+ !%if (choice==3.or.choice==2.or.choice==23) nkpg=3*Wfd%nloalg(5)
+ !%if (choice==4.or.choice==24) nkpg=9*Wfd%nloalg(5)
allocate(kpg(npw_k,nkpg)); if (nkpg>0) call mkkpg(kg_k,kpg,kpoint,nkpg,npw_k)
! Allocate and compute the arrays phkxred and ph3d
@@ -3793,11 +3793,11 @@
end if
end do
- !$mcg = npw_k*Wfd%nspinor*(Wfd%my_maxb-Wfd%my_minb+1)
+ !%mcg = npw_k*Wfd%nspinor*(Wfd%my_maxb-Wfd%my_minb+1)
ABI_CHECK(SIZE(cg,DIM=2)>=(mcg+ikg),"cg too small")
do band=1,Wfd%nband(ik_ibz,spin)
- !$cg_bpad=npw_k*Wfd%nspinor*(band-Wfd%my_minb)
+ !%cg_bpad=npw_k*Wfd%nspinor*(band-Wfd%my_minb)
do ispinor=1,Wfd%nspinor
cg_spad=(ispinor-1)*npw_k
gw_spad=(ispinor-1)*Wfd%npwwfn
diff -Naur abinit-6.4.2.bak/src/67_common/hartre1.F90 abinit-6.4.2/src/67_common/hartre1.F90
--- src/67_common/hartre1.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/67_common/hartre1.F90 2011-01-05 17:31:18.000000000 +0000
@@ -213,7 +213,7 @@
!numerator: $1/2$ [double counting] $\times 4\pi$ [Poisson eq] $= 2\pi$
!denominator: $2\pi$ [reciprocal lattice vectors] squared $= (2\pi)^2$
!gives the same result as real space evaluation via
-!$\frac{1}{2}\int n(\vec r)*V_{H}(\vec r) d^3r$
+!%$\frac{1}{2}\int n(\vec r)*V_{H}(\vec r) d^3r$
sum(:)=sum(:)*ucvol*2*pi/(2*pi)**2
!MF
diff -Naur abinit-6.4.2.bak/src/67_common/ks_ddiago.F90 abinit-6.4.2/src/67_common/ks_ddiago.F90
--- src/67_common/ks_ddiago.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/67_common/ks_ddiago.F90 2011-01-05 17:32:44.000000000 +0000
@@ -199,7 +199,7 @@
isppol = Diago_ctl%isppol
kpoint = Diago_ctl%kpoint
istwf_k = Diago_ctl%istwf_k
-!$nband_k = Diago_ctl%nband_k
+!%nband_k = Diago_ctl%nband_k
npw_k = Diago_ctl%npw_k
nloalg = Diago_ctl%nloalg
ecut = Diago_ctl%ecut
@@ -405,7 +405,7 @@
end do
end if
-!$call finalize_hamiltonian(gs_hamk,isppol,npw_k,istwfk,kpoint,Paw_ij)
+!%call finalize_hamiltonian(gs_hamk,isppol,npw_k,istwfk,kpoint,Paw_ij)
!Prepare the call to getghc.
ndat=1; lambda=zero; type_calc=0 ! For applying the whole Hamiltonian
diff -Naur abinit-6.4.2.bak/src/67_common/m_coulombian.F90 abinit-6.4.2/src/67_common/m_coulombian.F90
--- src/67_common/m_coulombian.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/67_common/m_coulombian.F90 2011-01-05 17:28:43.000000000 +0000
@@ -1950,7 +1950,7 @@
real(dp) :: F3
!************************************************************************
- !$F3(z)=z*\sin(qpg_para_*z)/\sqrt(rcut^2+z^2)$
+ !%$F3(z)=z*\sin(qpg_para_*z)/\sqrt(rcut^2+z^2)$
F3=xx*SIN(qpg_para_*xx)/SQRT(rcut_**2+xx**2)
end function F3
@@ -2039,7 +2039,7 @@
real(dp) :: k0,rho,arg
!************************************************************************
- !$K0cos(y)=K0(\rho*|qpg_z|)*COS(x.qpg_x+y*qpg_y)$
+ !%$K0cos(y)=K0(\rho*|qpg_z|)*COS(x.qpg_x+y*qpg_y)$
rho=SQRT(xx_**2+yy**2) ; arg=qpg_para_*rho
call CALCK0(arg,k0,1)
K0cos=k0*COS(qpgx_*xx_+qpgy_*yy)
@@ -2065,7 +2065,7 @@
real(dp) :: quad
!************************************************************************
- !$ K0cos_dy(x)=\int_{-b/2}^{b/2} K0(|qpg_z|\rho)cos(x.qpg_x+y.qpg_y)dy$
+ !%$K0cos_dy(x)=\int_{-b/2}^{b/2} K0(|qpg_z|\rho)cos(x.qpg_x+y.qpg_y)dy$
xx_=xx
call quadrature(K0cos,-hb_,+hb_,qopt_,quad,ierr,ntrial_,accuracy_,npts_)
if (ierr/=0) then
diff -Naur abinit-6.4.2.bak/src/67_common/m_io_kss.F90 abinit-6.4.2/src/67_common/m_io_kss.F90
--- src/67_common/m_io_kss.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/67_common/m_io_kss.F90 2011-01-05 17:30:48.000000000 +0000
@@ -706,7 +706,7 @@
write(msg,'(3a)')ch10,' Opening file for KS structure output: ',TRIM(filekss)
call wrtout(std_out,msg,'COLL')
- !$call wrtout(ab_out,msg,'COLL')
+ !%call wrtout(ab_out,msg,'COLL')
write(msg,'(a,i6)') ' number of Gamma centered plane waves ',npwkss
call wrtout(std_out,msg,'COLL')
diff -Naur abinit-6.4.2.bak/src/67_common/m_oscillators.F90 abinit-6.4.2/src/67_common/m_oscillators.F90
--- src/67_common/m_oscillators.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/67_common/m_oscillators.F90 2011-01-05 17:29:29.000000000 +0000
@@ -725,7 +725,7 @@
Osc%iq_bz = iq_bz
Osc%q_bz = Qmesh%bz(:,iq_bz)
- !$call get_BZ_item(Qmesh,Osc%iq_bz,Osc%q_bz,Osc%iq_ibz,Osc%isym_q,Osc%itim_q,Osc%ph_mqt)
+ !%call get_BZ_item(Qmesh,Osc%iq_bz,Osc%q_bz,Osc%iq_ibz,Osc%isym_q,Osc%itim_q,Osc%ph_mqt)
! Get index of k-q = BZ(k-q) + g0. Note that k-q might fall outside the first BZ.
call get_BZ_diff(Kmesh,Osc%k_bz,Osc%q_bz,Osc%ikmq_bz,Osc%g0,nfound)
diff -Naur abinit-6.4.2.bak/src/67_common/outkss.F90 abinit-6.4.2/src/67_common/outkss.F90
--- src/67_common/outkss.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/67_common/outkss.F90 2011-01-05 17:23:51.000000000 +0000
@@ -132,7 +132,7 @@
#endif
use m_io_tools, only : get_unit
- !$use m_numeric_tools, only : bisect
+ !%use m_numeric_tools, only : bisect
use m_gsphere, only : merge_and_sort_kg, table_gbig2kg, get_kg
use m_io_kss, only : write_kss_wfgk, write_kss_header, k2gamma_centered
use m_hamiltonian, only : ddiago_ctl_type, init_ddiago_ctl
@@ -461,7 +461,7 @@
EXIT
end if
end do
-!$ ishm=bisect(shlim,npwkss)
+!% ishm=bisect(shlim,npwkss)
if (shlim(ishm)/=npwkss) then
nrst1=shlim(ishm)
diff -Naur abinit-6.4.2.bak/src/68_gw/bloch_interp.F90 abinit-6.4.2/src/68_gw/bloch_interp.F90
--- src/68_gw/bloch_interp.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/bloch_interp.F90 2011-01-05 16:23:50.000000000 +0000
@@ -466,7 +466,7 @@
call get_BZ_item(Kmesh,ik2_bz,kk2,ik2_ibz,k2_sym,k2_tim,k2_eimkt,k2_umklp)
- !$ik2_ibz = Kmesh%tab(ik2_bz)
+ !%ik2_ibz = Kmesh%tab(ik2_bz)
nband_k2 = Wfd%nband(ik2_ibz,spin)
inv_k2_sym = toinv(1,k2_sym)
@@ -567,19 +567,19 @@
write(*,*)"with_sym",with_sym," without_sym",without_sym
#endif
- !$if (Wfd%usepaw==1) then
- !$ allocate(Cp_k1 (Wfd%natom,nspinor))
- !$ call cprj_alloc(Cp_k1,0,Wfd%nlmn_atm)
-
- !$ allocate(Cp_k2 (Wfd%natom,nspinor))
- !$ call cprj_alloc(Cp_k2,0,Wfd%nlmn_atm)
- !$end if
+ !%if (Wfd%usepaw==1) then
+ !% allocate(Cp_k1 (Wfd%natom,nspinor))
+ !% call cprj_alloc(Cp_k1,0,Wfd%nlmn_atm)
+
+ !% allocate(Cp_k2 (Wfd%natom,nspinor))
+ !% call cprj_alloc(Cp_k2,0,Wfd%nlmn_atm)
+ !%end if
call wrtout(std_out,"Using version without symmetries","COLL")
do ik2_bz=1,Kmesh%nbz
call get_BZ_item(Kmesh,ik2_bz,kk2,ik2_ibz,k2_sym,k2_tim,k2_eimkt,k2_umklp,k2_isirred)
- !$ik2_ibz = Kmesh%tab(ik2_bz)
+ !%ik2_ibz = Kmesh%tab(ik2_bz)
nband_k2 = Wfd%nband(ik2_ibz,spin)
@@ -597,7 +597,7 @@
do ik1_bz=1,ik2_bz
- !$ik1_ibz = Kmesh%tab(ik1_bz)
+ !%ik1_ibz = Kmesh%tab(ik1_bz)
call get_BZ_item(Kmesh,ik1_bz,kk1,ik1_ibz,k1_sym,k1_tim,k1_eimkt,k1_umklp,k1_isirred)
nband_k1 = Wfd%nband(ik1_ibz,spin)
@@ -616,7 +616,7 @@
end if
if (Wfd%usepaw==1) then
- !$call paw_symcprj(ik1_bz,nspinor,1,Cryst,Kmesh,Psps,Pawtab,Pawang,Cp_k1)
+ !%call paw_symcprj(ik1_bz,nspinor,1,Cryst,Kmesh,Psps,Pawtab,Pawang,Cp_k1)
Cp_k1 => Pku_bz(:,:,band1,ik1_bz)
ovlp_paw = paw_overlap(Cp_k1,Cp_k2,typat_sort,Pawtab) ! Be careful as Cp are always sorted.
blk_ovlp = blk_ovlp + DCMPLX(ovlp_paw(1),ovlp_paw(2))
@@ -671,8 +671,8 @@
end do
end do
deallocate(Pku_bz)
- !$call cprj_free(Cp_k1); deallocate(Cp_k1)
- !$call cprj_free(Cp_k2); deallocate(Cp_k2)
+ !%call cprj_free(Cp_k1); deallocate(Cp_k1)
+ !%call cprj_free(Cp_k2); deallocate(Cp_k2)
end if
!
! ========================================
@@ -718,8 +718,8 @@
!
!istwfk=1; nsppol_=1; nkibz_=1: nband_(:,:)=blc_size
- !$call wfd_init(Wlcd,Cryst,Pawtab,Psps,keep_ur,Wfd%paral_kgb,Wfd%npwwfn,blc_size,nband_,nkibz_,nsppol_,bks_mask,&
- !$& Wfd%nspden,Wfd%nspinor,istwfk,kibz,ngfft,mg0,gvec,nloalg,comm)
+ !%call wfd_init(Wlcd,Cryst,Pawtab,Psps,keep_ur,Wfd%paral_kgb,Wfd%npwwfn,blc_size,nband_,nkibz_,nsppol_,bks_mask,&
+ !%& Wfd%nspden,Wfd%nspinor,istwfk,kibz,ngfft,mg0,gvec,nloalg,comm)
allocate(blc_ug(Wfd%npwwfn*nspinor,blc_size))
allocate(sum_ur(Wfd%nfft*nspinor))
@@ -799,7 +799,7 @@
write(blc_unt,rec=1)reclen,Wfd%npwwfn,nspinor,blc_size,spin
do blc=1,blc_size
- !$write(blc_unt,rec=1+blc)blc_ug(:,blc)
+ !%write(blc_unt,rec=1+blc)blc_ug(:,blc)
end do
close(unit=blc_unt)
@@ -1274,11 +1274,11 @@
! Recalculate new occupation numbers and new Fermi level.
! FIXME Have to calculate new occ for semiconductors
- !$call update_occ(ioBSt,Dtset%fixmom,Dtset%stmbias,Dtset%prtvol)
+ !%call update_occ(ioBSt,Dtset%fixmom,Dtset%stmbias,Dtset%prtvol)
call bst_write_bands(ioBSt,Cryst%gmet,"interpolated",ierr)
- !$call bst_print_fs(ioBst,Cryst,Dtset%kptrlatt,Dtset%nshiftk,Dtset%shiftk,"Fermi_surface",ierr)
+ !%call bst_print_fs(ioBst,Cryst,Dtset%kptrlatt,Dtset%nshiftk,Dtset%shiftk,"Fermi_surface",ierr)
!
! ===================================
! ==== Optionally Write WFK file ====
@@ -1380,8 +1380,8 @@
end do
deallocate(umat_k)
- !$call XGEMM('N','N',nsize,sizegw,rangeb,cone_gw,wf_ks(:,lowerb:upperb),nsize,&
- !$& umat_k,rangeb,czero_gw,wf_qp(spad+1:spad+nsize,b1gw:b2gw),nsize)
+ !%call XGEMM('N','N',nsize,sizegw,rangeb,cone_gw,wf_ks(:,lowerb:upperb),nsize,&
+ !%& umat_k,rangeb,czero_gw,wf_qp(spad+1:spad+nsize,b1gw:b2gw),nsize)
#if 0
! * Perform conversion of the basis set.
diff -Naur abinit-6.4.2.bak/src/68_gw/calc_density.F90 abinit-6.4.2/src/68_gw/calc_density.F90
--- src/68_gw/calc_density.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/calc_density.F90 2011-01-05 16:15:05.000000000 +0000
@@ -336,8 +336,8 @@
end if
call wrtout(std_out,msg,'COLL') ; call wrtout(ab_out,msg,'COLL')
-!$write(msg,'(a,f9.4)')' Renormalizing smooth charge density using nratio = ',nratio
-!$ rhor(:,:)=nratio*rhor(:,:)
+!%write(msg,'(a,f9.4)')' Renormalizing smooth charge density using nratio = ',nratio
+!% rhor(:,:)=nratio*rhor(:,:)
write(msg,'(a,f9.6)')' average of density, n = ',rhoav
call wrtout(std_out,msg,'COLL') ; call wrtout(ab_out,msg,'COLL')
diff -Naur abinit-6.4.2.bak/src/68_gw/calc_sigc_cd.F90 abinit-6.4.2/src/68_gw/calc_sigc_cd.F90
--- src/68_gw/calc_sigc_cd.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/calc_sigc_cd.F90 2011-01-05 16:28:20.000000000 +0000
@@ -137,7 +137,7 @@
call spline(DBLE(omega(1:nomegaer)),DBLE(epsrho(ig,1:nomegaer)),nomegaer,zero,zero,rtmp_r)
call spline(DBLE(omega(1:nomegaer)),DBLE(AIMAG(epsrho(ig,1:nomegaer))),nomegaer,zero,zero,rtmp_i)
- !$call spline_complex( DBLE(omega(1:nomegaer)), epsrho(ig,1:nomegaer), nomegaer, zero, zero, rtmp )
+ !%call spline_complex( DBLE(omega(1:nomegaer)), epsrho(ig,1:nomegaer), nomegaer, zero, zero, rtmp )
do ios=1,nomega
@@ -150,7 +150,7 @@
call splint(nomegaer,DBLE(omega(1:nomegaer)),DBLE(AIMAG(epsrho(ig,1:nomegaer))),rtmp_i,1,tmp_x,tmp_y)
rt_imag = tmp_y(1)
- !$call splint_complex(nomegaer,DBLE(omega(1:nomegaer)),epsrho(ig,1:nomegaer),rtmp,1,tmp_x,yfit)
+ !%call splint_complex(nomegaer,DBLE(omega(1:nomegaer)),epsrho(ig,1:nomegaer),rtmp,1,tmp_x,yfit)
ct=DCMPLX(rt_real,rt_imag)
diff -Naur abinit-6.4.2.bak/src/68_gw/calc_sigc_me.F90 abinit-6.4.2/src/68_gw/calc_sigc_me.F90
--- src/68_gw/calc_sigc_me.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/calc_sigc_me.F90 2011-01-05 16:35:54.000000000 +0000
@@ -266,7 +266,7 @@
! Index of the GW point in the BZ array, its image in IBZ and time-reversal ===
jk_bz=Sigp%kptgw2bz(ikcalc)
call get_BZ_item(Kmesh,jk_bz,kgw,jk_ibz,isym_kgw,jik,ph_mkgwt)
- !$call get_IBZ_item(Kmesh,jk_ibz,kibz,wtk)
+ !%call get_IBZ_item(Kmesh,jk_ibz,kibz,wtk)
spinrot_kgw=Cryst%spinrot(:,isym_kgw)
!
ib1=minbnd
@@ -450,10 +450,10 @@
! pass it to the setup_ppmodel
! * It would be possible to calculate rho(G) using Paw_pwff though. Maybe faster but
! results would depend on the expression used for the matrix elements. This is safer.
-!$ allocate(ks_rhor_paw(rho_nfftot,Dtset%nspden))
-!$ call denfgr(Cryst%natom,Dtset%nspden,ks_nhat,Cryst%ntypat,Pawfgr,Pawfgrtab,Pawrad,KS_pawrhoij,Pawtab,&
-!$ & ks_rhor,ks_rhor_paw,Psps,Cryst%typat)
-!$ deallocate(ks_rhor_paw)
+!% allocate(ks_rhor_paw(rho_nfftot,Dtset%nspden))
+!% call denfgr(Cryst%natom,Dtset%nspden,ks_nhat,Cryst%ntypat,Pawfgr,Pawfgrtab,Pawrad,KS_pawrhoij,Pawtab,&
+!% & ks_rhor,ks_rhor_paw,Psps,Cryst%typat)
+!% deallocate(ks_rhor_paw)
end if ! usepaw==1
!
!
@@ -640,8 +640,8 @@
#ifdef HAVE_CLIB
call clib_progress_bar(ik_bz,Kmesh%nbz)
#else
- !$write(msg,'(2(a,i4),a,i3)')' csigme : ik_bz ',ik_bz,'/',Kmesh%nbz,' done by processor ',Wfd%my_rank
- !$call wrtout(std_out,msg,'PERS')
+ !%write(msg,'(2(a,i4),a,i3)')' csigme : ik_bz ',ik_bz,'/',Kmesh%nbz,' done by processor ',Wfd%my_rank
+ !%call wrtout(std_out,msg,'PERS')
#endif
!
! === Find the corresponding irred q-point ===
diff -Naur abinit-6.4.2.bak/src/68_gw/calc_sigx_me.F90 abinit-6.4.2/src/68_gw/calc_sigx_me.F90
--- src/68_gw/calc_sigx_me.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/calc_sigx_me.F90 2011-01-05 10:06:07.000000000 +0000
@@ -237,7 +237,7 @@
! === Index of the GW point in the BZ array, its image in IBZ and time-reversal ===
jk_bz=Sigp%kptgw2bz(ikcalc)
call get_BZ_item(Kmesh,jk_bz,kgw,jk_ibz,isym_kgw,jik,ph_mkgwt)
- !$call get_IBZ_item(Kmesh,jk_ibz,kibz,wtk)
+ !%call get_IBZ_item(Kmesh,jk_ibz,kibz,wtk)
spinrot_kgw(:)=Cryst%spinrot(:,isym_kgw)
!
write(msg,'(2a,3f8.3,2a,2(i3,a))')ch10,&
@@ -486,8 +486,8 @@
#ifdef HAVE_CLIB
call clib_progress_bar(ik_bz,Kmesh%nbz)
#else
- !$write(msg,'(2(a,i4),a,i3)')' calc_sigx_me : ik_bz ',ik_bz,'/',Kmesh%nbz,' done by processor ',Wfd%my_rank
- !$call wrtout(std_out,msg,'PERS')
+ !%write(msg,'(2(a,i4),a,i3)')' calc_sigx_me : ik_bz ',ik_bz,'/',Kmesh%nbz,' done by processor ',Wfd%my_rank
+ !%call wrtout(std_out,msg,'PERS')
#endif
!
! * Find the corresponding irreducible q-point.
diff -Naur abinit-6.4.2.bak/src/68_gw/cchi0.F90 abinit-6.4.2/src/68_gw/cchi0.F90
--- src/68_gw/cchi0.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/cchi0.F90 2011-01-05 10:06:42.000000000 +0000
@@ -417,7 +417,7 @@
call clib_progress_bar(ik_bz,Kmesh%nbz)
#else
write(msg,'(2(a,i4),a,i2,a,i3)')' ik = ',ik_bz,' / ',Kmesh%nbz,' is = ',is,' done by processor ',Wfd%my_rank
- !$call wrtout(std_out,msg,'PERS')
+ !%call wrtout(std_out,msg,'PERS')
#endif
!
! * Get ik_ibz, non-symmorphic phase, ph_mkt, and symmetries from ik_bz.
diff -Naur abinit-6.4.2.bak/src/68_gw/classify_bands.F90 abinit-6.4.2/src/68_gw/classify_bands.F90
--- src/68_gw/classify_bands.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/classify_bands.F90 2011-01-05 16:28:45.000000000 +0000
@@ -253,7 +253,7 @@
!tmp_sym(:,:,isym) = Cryst%symrec(:,:,isym)
!tmp_sym(:,:,isym) = TRANSPOSE(Cryst%symrec(:,:,isym))
end do
- !$call setsymrhoij(Cryst%rprimd,lmax,Cryst%nsym,3,Cryst%gprimd,tmp_sym,zarot)
+ !%call setsymrhoij(Cryst%rprimd,lmax,Cryst%nsym,3,Cryst%gprimd,tmp_sym,zarot)
!call setsymrhoij(Cryst%gprimd,lmax,Cryst%nsym,1,Cryst%rprimd,tmp_sym,zarot)
deallocate(tmp_sym)
zarot = Pawang%zarot
diff -Naur abinit-6.4.2.bak/src/68_gw/cohsex_me.F90 abinit-6.4.2/src/68_gw/cohsex_me.F90
--- src/68_gw/cohsex_me.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/cohsex_me.F90 2011-01-05 10:14:27.000000000 +0000
@@ -228,7 +228,7 @@
! Index of the GW point in the BZ array, its image in IBZ and time-reversal ===
jk_bz=Sigp%kptgw2bz(ikcalc)
call get_BZ_item(Kmesh,jk_bz,kgw,jk_ibz,isym_kgw,jik,ph_mkgwt)
- !$call get_IBZ_item(Kmesh,jk_ibz,kibz,wtk)
+ !%call get_IBZ_item(Kmesh,jk_ibz,kibz,wtk)
spinrot_kgw=Cryst%spinrot(:,isym_kgw)
!
ib1=minbnd
@@ -559,8 +559,8 @@
#ifdef HAVE_CLIB
call clib_progress_bar(ik_bz,Kmesh%nbz)
#else
- !$write(msg,'(2(a,i4),a,i3)')' csigme : ik_bz ',ik_bz,'/',Kmesh%nbz,' done by processor ',Wfd%my_rank
- !$call wrtout(std_out,msg,'PERS')
+ !%write(msg,'(2(a,i4),a,i3)')' csigme : ik_bz ',ik_bz,'/',Kmesh%nbz,' done by processor ',Wfd%my_rank
+ !%call wrtout(std_out,msg,'PERS')
#endif
!
! === Find the corresponding irred q-point ===
diff -Naur abinit-6.4.2.bak/src/68_gw/debug_tools.F90 abinit-6.4.2/src/68_gw/debug_tools.F90
--- src/68_gw/debug_tools.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/debug_tools.F90 2011-01-05 16:31:28.000000000 +0000
@@ -624,9 +624,9 @@
! FIXME should check the expression in case of non zero tnons.
! /***********************************************************************/
- !$all init_oscillator(Osc,isppol,jkbz,Kmesh,iq_bz,Qmesh,Ep%npwe,nspinor,(/ib,ib/),(/ib1,ib2/) )
- !$call calc_pw_oscillator(Wf_info,Cryst,Osc,MPI_enreg)
- !$call destroy_oscillator(Osc)
+ !%all init_oscillator(Osc,isppol,jkbz,Kmesh,iq_bz,Qmesh,Ep%npwe,nspinor,(/ib,ib/),(/ib1,ib2/) )
+ !%call calc_pw_oscillator(Wf_info,Cryst,Osc,MPI_enreg)
+ !%call destroy_oscillator(Osc)
do ib1=1,Ep%nbnds ! Loop over "conduction" states.
do ib2=1,Ep%nbnds ! Loop over "valence" states.
diff -Naur abinit-6.4.2.bak/src/68_gw/gw_tools.F90 abinit-6.4.2/src/68_gw/gw_tools.F90
--- src/68_gw/gw_tools.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/gw_tools.F90 2011-01-05 10:04:31.000000000 +0000
@@ -760,7 +760,7 @@
if (ABS(deltaf_b1kmq_b2k) >= GW_TOL_DOCC) then
bbp_mask(ib1,ib2)=.TRUE.
if (deltaeGW_b1kmq_b2k<zero) bbp_mask(ib1,ib2)=.FALSE. ! Only positive frequencies are needed for the Hilbert transform.
- !$if (use_tr .and. ib1<ib2) bbp_mask(ib1,ib2)=.FALSE. ! GAIN a factor ~2 thanks to time-reversal.
+ !%if (use_tr .and. ib1<ib2) bbp_mask(ib1,ib2)=.FALSE. ! GAIN a factor ~2 thanks to time-reversal.
end if
CASE DEFAULT
diff -Naur abinit-6.4.2.bak/src/68_gw/m_dyson_solver.F90 abinit-6.4.2/src/68_gw/m_dyson_solver.F90
--- src/68_gw/m_dyson_solver.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/m_dyson_solver.F90 2011-01-05 10:04:58.000000000 +0000
@@ -172,7 +172,7 @@
! Index of this k-point in the IBZ array.
ikbz_gw=Sigp%kptgw2bz(ikcalc)
call get_BZ_item(Kmesh,ikbz_gw,kbz_gw,jkibz,isym,itim,phase)
- !$call get_IBZ_item(Kmesh,jkibz,kibz,wtk)
+ !%call get_IBZ_item(Kmesh,jkibz,kibz,wtk)
sigc=czero; dsigc=czero
diff -Naur abinit-6.4.2.bak/src/68_gw/m_fft_prof.F90 abinit-6.4.2/src/68_gw/m_fft_prof.F90
--- src/68_gw/m_fft_prof.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/m_fft_prof.F90 2011-01-05 10:05:26.000000000 +0000
@@ -64,11 +64,11 @@
type,public :: FFT_prof_t
!private
integer :: ncalls
- !$integer :: ndat
+ !%integer :: ndat
character(len=TNAME_LEN) :: test_name
real(dp) :: cpu_time
real(dp) :: wall_time
- !$integer :: ngfft(18)=-1
+ !%integer :: ngfft(18)=-1
real(dp),pointer :: results(:,:,:) SET2NULL
end type FFT_prof_t
diff -Naur abinit-6.4.2.bak/src/68_gw/m_gwannier.F90 abinit-6.4.2/src/68_gw/m_gwannier.F90
--- src/68_gw/m_gwannier.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/m_gwannier.F90 2011-01-05 16:34:34.000000000 +0000
@@ -365,8 +365,8 @@
call destroy_BZ_mesh_type(Kpath)
call bstruct_clean(KS_BSt)
call bstruct_clean(QP_BSt)
- !$call bstruct_clean(QP_intp)
- !$call bstruct_clean(KS_intp)
+ !%call bstruct_clean(QP_intp)
+ !%call bstruct_clean(KS_intp)
call hdr_clean(Hdr)
STOP 'myGWannier OK'
diff -Naur abinit-6.4.2.bak/src/68_gw/m_io_screening.F90 abinit-6.4.2/src/68_gw/m_io_screening.F90
--- src/68_gw/m_io_screening.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/m_io_screening.F90 2011-01-05 16:19:49.000000000 +0000
@@ -66,69 +66,69 @@
!!
!! SOURCE
-!$ type,public :: ScrHdr_type
-!$
-!$ !Other variables that can be added are, for the moment, commented out.
-!$ !Most of them are related to the Abinit implementation and should not compare in the ETSF specs
-!$
-!$ !Index of the qlwl section?
-!$ !gwcomp, gwencomp ! Info on the extrapolar algorithm
-!$
-!$ integer :: ID ! Matrix identifier: O if not yet defined, 1 for chi0,
-!$ ! 2 for chi, 3 for epsilon, 4 for espilon^{-1}
-!$ integer :: ikxc ! Kxc kernel used, 0 for None (RPA), >0 for static TDDFT (=ixc), <0 for frequency-dependent TDDFT
-!$ integer :: inclvkb ! q-->0 treatment, 0 for None, 1-2 for transversal gauge, 3 for longitudinal
-!$ integer :: headform ! format of the SCR header
-!$ integer :: fform ! File format:
-!$ integer :: gwcalctyp ! Calculation type (G0W0, G0W, GW ...)
-!$ integer :: nI,nJ ! Number of spin components (rows,columns) in chi|eps^-1. (1,1) if collinear.
-!$ ! The internal representation of the matrix is eps(nI*npwe,nJ*npwe)
-!$ integer :: nqibz ! Number of q-points in the IBZ.
-!$ integer :: nqlwl ! Number of points for the treatment of the long wavelength limit.
-!$ integer :: nomega ! Total number of frequencies.
-!$ integer :: nbnds_used ! Number of bands used during the screening calculation (only for info)
-!$ integer :: npwe ! Number of G vectors reported on the file.
-!$ integer :: npwwfn_used ! Number of G vectors for wavefunctions used during the screening calculation (only for info)
-!$ integer :: spmeth ! Method used to approximate the delta function in the expression for Im Chi_0
-!$ integer :: test_type ! 0 for None, 1 for TEST-PARTICLE, 2 for TEST-ELECTRON (only for TDDFT)
-!$ integer :: tordering ! 0 if not defined, 1 for Time-Ordered, 2 for Advanced, 3 for Retarded.
-!$
-!$ real(dp) :: soenergy ! Scissor Energy, zero if not used
-!$ real(dp) :: spsmear ! Smearing of the delta in case of spmeth==2
-!$ real(dp) :: zcut ! Imaginary shift to avoid the poles along the real axis.
-!$
-!$ type(Hdr_type) :: Hdr ! The abinit header.
-!$
-!$!arrays
-!$ character(len=80) :: title(2)
-!$ ! Title describing the content of the file.
-!$
-!$ integer,pointer :: gvec(:,:)
-!$ ! gvec(3,npwe)
-!$ ! G vectors in r.l.u.
-!$
-!$ real(dp),pointer :: qibz(:,:)
-!$ ! qibz(3,nqibz)
-!$ ! q-points in r.l.u.
-!$
-!$ real(dp),pointer :: qlwl(:,:)
-!$ ! qlwl(3,nqlwl)
-!$ ! q-points for the long wave-length limit treatment (r.l.u)
-!$
-!$ complex(dpc),pointer :: lwing(:,:,:)
-!$ ! lwing(npwe,nomega,nqlwl)
-!$ ! Lower wings for the different q"s -->0
-!$
-!$ complex(dpc),pointer :: omega(:)
-!$ ! omega(nomega)
-!$ ! All frequencies calculated both along the real and the imaginary axis.
-!$
-!$ complex(dpc),pointer :: uwing(:,:,:)
-!$ ! uwing(npwe,nomega,nqlwl)
-!$ ! Upper wings for the different q"s -->0
-!$
-!$ end type ScrHdr_type
-!$!!***
+!% type,public :: ScrHdr_type
+!%
+!% !Other variables that can be added are, for the moment, commented out.
+!% !Most of them are related to the Abinit implementation and should not compare in the ETSF specs
+!%
+!% !Index of the qlwl section?
+!% !gwcomp, gwencomp ! Info on the extrapolar algorithm
+!%
+!% integer :: ID ! Matrix identifier: O if not yet defined, 1 for chi0,
+!% ! 2 for chi, 3 for epsilon, 4 for espilon^{-1}
+!% integer :: ikxc ! Kxc kernel used, 0 for None (RPA), >0 for static TDDFT (=ixc), <0 for frequency-dependent TDDFT
+!% integer :: inclvkb ! q-->0 treatment, 0 for None, 1-2 for transversal gauge, 3 for longitudinal
+!% integer :: headform ! format of the SCR header
+!% integer :: fform ! File format:
+!% integer :: gwcalctyp ! Calculation type (G0W0, G0W, GW ...)
+!% integer :: nI,nJ ! Number of spin components (rows,columns) in chi|eps^-1. (1,1) if collinear.
+!% ! The internal representation of the matrix is eps(nI*npwe,nJ*npwe)
+!% integer :: nqibz ! Number of q-points in the IBZ.
+!% integer :: nqlwl ! Number of points for the treatment of the long wavelength limit.
+!% integer :: nomega ! Total number of frequencies.
+!% integer :: nbnds_used ! Number of bands used during the screening calculation (only for info)
+!% integer :: npwe ! Number of G vectors reported on the file.
+!% integer :: npwwfn_used ! Number of G vectors for wavefunctions used during the screening calculation (only for info)
+!% integer :: spmeth ! Method used to approximate the delta function in the expression for Im Chi_0
+!% integer :: test_type ! 0 for None, 1 for TEST-PARTICLE, 2 for TEST-ELECTRON (only for TDDFT)
+!% integer :: tordering ! 0 if not defined, 1 for Time-Ordered, 2 for Advanced, 3 for Retarded.
+!%
+!% real(dp) :: soenergy ! Scissor Energy, zero if not used
+!% real(dp) :: spsmear ! Smearing of the delta in case of spmeth==2
+!% real(dp) :: zcut ! Imaginary shift to avoid the poles along the real axis.
+!%
+!% type(Hdr_type) :: Hdr ! The abinit header.
+!%
+!%!arrays
+!% character(len=80) :: title(2)
+!% ! Title describing the content of the file.
+!%
+!% integer,pointer :: gvec(:,:)
+!% ! gvec(3,npwe)
+!% ! G vectors in r.l.u.
+!%
+!% real(dp),pointer :: qibz(:,:)
+!% ! qibz(3,nqibz)
+!% ! q-points in r.l.u.
+!%
+!% real(dp),pointer :: qlwl(:,:)
+!% ! qlwl(3,nqlwl)
+!% ! q-points for the long wave-length limit treatment (r.l.u)
+!%
+!% complex(dpc),pointer :: lwing(:,:,:)
+!% ! lwing(npwe,nomega,nqlwl)
+!% ! Lower wings for the different q"s -->0
+!%
+!% complex(dpc),pointer :: omega(:)
+!% ! omega(nomega)
+!% ! All frequencies calculated both along the real and the imaginary axis.
+!%
+!% complex(dpc),pointer :: uwing(:,:,:)
+!% ! uwing(npwe,nomega,nqlwl)
+!% ! Upper wings for the different q"s -->0
+!%
+!% end type ScrHdr_type
+!%!!***
public :: scr_hdr_io ! I/O of the header (read/write/echo).
public :: print_ScrHdr ! Print the SCR related part of the header.
@@ -748,7 +748,7 @@
Hscr%ikxc =ikxc
Hscr%inclvkb =Ep%inclvkb
Hscr%fform =1002
- !$Hscr%fform =1102
+ !%Hscr%fform =1102
Hscr%headform =HSCR_LATEST_HEADFORM
Hscr%gwcalctyp =Ep%gwcalctyp
Hscr%nI =Ep%nI
diff -Naur abinit-6.4.2.bak/src/68_gw/m_qparticles.F90 abinit-6.4.2/src/68_gw/m_qparticles.F90
--- src/68_gw/m_qparticles.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/m_qparticles.F90 2011-01-05 16:22:01.000000000 +0000
@@ -333,7 +333,7 @@
! =====================
! Dump info on the crystal structure.
- !$call abi_crystal_put(Cryst,filetsf)
+ !%call abi_crystal_put(Cryst,filetsf)
call etsf_io_low_set_write_mode(ncid,lstat,Error_data=Error)
if (.not.lstat) goto 1000
@@ -500,7 +500,7 @@
ABI_CHECK(dimrho==0.or.dimrho==1,'dimrho must be 0 or 1')
! This does not work in parallel !!?
- !$my_rank = xcomm_rank(MPI_enreg%spaceComm)
+ !%my_rank = xcomm_rank(MPI_enreg%spaceComm)
call xme_init(MPI_enreg,my_rank)
master=0
!
@@ -691,7 +691,7 @@
call rhoij_io(pawrhoij,unqps,BSt%nsppol,BSt%nspinor,nspden,nlmn_type,Cryst%typat,&
& HDR_LATEST_HEADFORM,"Read",form="formatted")
- !$call rhoij_io(pawrhoij,std_out,BSt%nsppol,BSt%nspinor,nspden,nlmn_type,Cryst%typat,HDR_LATEST_HEADFORM,"Echo")
+ !%call rhoij_io(pawrhoij,std_out,BSt%nsppol,BSt%nspinor,nspden,nlmn_type,Cryst%typat,HDR_LATEST_HEADFORM,"Echo")
deallocate(nlmn_type,typatR)
end if ! usepaw
@@ -739,9 +739,9 @@
deallocate(full_rmtmp)
! Read energies.
- !$call etsf_io_low_read_var(ncid,'m_lda_to_qp',m_lda_to_qp,lstat,Error_data=Error)
- !$if (.not.lstat) goto 1000
- !$BSt%eig(1:nbsc,ik,isppol)=en_tmp(1:nbsc)
+ !%call etsf_io_low_read_var(ncid,'m_lda_to_qp',m_lda_to_qp,lstat,Error_data=Error)
+ !%if (.not.lstat) goto 1000
+ !%BSt%eig(1:nbsc,ik,isppol)=en_tmp(1:nbsc)
if ( ALL(ngfftf(1:3)==(/n1,n2,n3/)) ) then
call etsf_io_low_read_var(ncid,'qp_density',rhor_out,lstat,Error_data=Error)
diff -Naur abinit-6.4.2.bak/src/68_gw/m_screening.F90 abinit-6.4.2/src/68_gw/m_screening.F90
--- src/68_gw/m_screening.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/m_screening.F90 2011-01-05 16:30:36.000000000 +0000
@@ -360,7 +360,7 @@
end do
rdwr=4
- !$call hdr_io_int(Er%fform,Er%Hscr%Hdr,rdwr,unt)
+ !%call hdr_io_int(Er%fform,Er%Hscr%Hdr,rdwr,unt)
end if ! verbose>0
end subroutine print_epsilonm1_results
@@ -712,7 +712,7 @@
call metric(gmet,gprimd,-1,rmet,Vcp%rprimd,ucvol)
- !$ if (Er%ID/=0) call reset_Epsilonm1(Er)
+ !% if (Er%ID/=0) call reset_Epsilonm1(Er)
Er%ID=id_required
if (Er%ID==Er%Hscr%ID) then
@@ -1790,7 +1790,7 @@
end if
if (iqibz==1) then
- !$vc_sqrt => Vcp%vcqlwl_sqrt(:,iqlwl) ! Use Coulomb term for q-->0
+ !%vc_sqrt => Vcp%vcqlwl_sqrt(:,iqlwl) ! Use Coulomb term for q-->0
vc_sqrt => Vcp%vcqlwl_sqrt(:,1) ! TODO add treatment of non-Analytic behavior
else
vc_sqrt => Vcp%vc_sqrt(:,iqibz)
@@ -2169,7 +2169,7 @@
!
! Change the body but do not add the corrections due to the head and the wings.
! since they can be obtained on the fly from eps_body and the wings of eps^{-1}.
- !$chi0(2:,2:,iomega) = eps_body
+ !%chi0(2:,2:,iomega) = eps_body
end do !iomega
deallocate(modg_inv,cvec)
diff -Naur abinit-6.4.2.bak/src/68_gw/m_sigma_results.F90 abinit-6.4.2/src/68_gw/m_sigma_results.F90
--- src/68_gw/m_sigma_results.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/m_sigma_results.F90 2011-01-05 16:32:15.000000000 +0000
@@ -1220,7 +1220,7 @@
allocate(gw_corrections(2,KS_BSt%mband,KS_BSt%nkpt,KS_BSt%nsppol))
gw_corrections=zero
gw_corrections(1,:,:,:) = QP_BSt%eig - KS_BSt%eig
- !$gw_corrections = c2r(Sr%degw)
+ !%gw_corrections = c2r(Sr%degw)
GWdata%gw_corrections%data4D => gw_corrections
call etsf_io_gwdata_put(ncid,GWdata,lstat,Error_data)
diff -Naur abinit-6.4.2.bak/src/68_gw/print_psps.F90 abinit-6.4.2/src/68_gw/print_psps.F90
--- src/68_gw/print_psps.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/print_psps.F90 2011-01-05 16:29:06.000000000 +0000
@@ -182,7 +182,7 @@
! If mpspso is 2, lmnmax takes into account the spin-orbit projectors,
! so, it is equal to the max of lmnprojso or lnprojso, see pspheader_type
-!$integer, pointer :: indlmn(:,:,:)
+!%integer, pointer :: indlmn(:,:,:)
! indlmn(6,lmnmax,ntypat)
! For each type of psp,
! array giving l,m,n,lm,ln,spin for i=ln (if useylm=0)
diff -Naur abinit-6.4.2.bak/src/68_gw/setup_screening.F90 abinit-6.4.2/src/68_gw/setup_screening.F90
--- src/68_gw/setup_screening.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/setup_screening.F90 2011-01-05 16:27:08.000000000 +0000
@@ -238,10 +238,10 @@
call print_BZ_mesh(Kmesh,"K-mesh for the wavefunctions",std_out,Dtset%prtvol,"COLL")
call print_BZ_mesh(Kmesh,"K-mesh for the wavefunctions",ab_out, 0, "COLL")
- !$call nullify_BZ_mesh(Kmesh4test)
- !$call make_mesh(Kmesh4test,Cryst,Dtset%kptopt,Dtset%kptrlatt,Dtset%nshiftk,Dtset%shiftk)
- !$call print_BZ_mesh(Kmesh4test,"Kmesh4test",std_out,prtvol=10)
- !$call destroy_BZ_mesh_type(Kmesh4test)
+ !%call nullify_BZ_mesh(Kmesh4test)
+ !%call make_mesh(Kmesh4test,Cryst,Dtset%kptopt,Dtset%kptrlatt,Dtset%nshiftk,Dtset%shiftk)
+ !%call print_BZ_mesh(Kmesh4test,"Kmesh4test",std_out,prtvol=10)
+ !%call destroy_BZ_mesh_type(Kmesh4test)
!
! === Find Q-mesh, and do setup for long wavelength limit ===
! * Stop if a nonzero umklapp is needed to reconstruct the BZ. In this case, indeed,
@@ -465,7 +465,7 @@
! To write the SCR header correctly, with heads and wings, we have
! to make sure that q==0, if present, is the first q-point in the list.
- !$has_q0=(ANY(normv(Ep%qcalc(:,:),gmet,'G')<GW_TOLQ0)) !commented to avoid problems with sunstudio12
+ !%has_q0=(ANY(normv(Ep%qcalc(:,:),gmet,'G')<GW_TOLQ0)) !commented to avoid problems with sunstudio12
has_q0=.FALSE.
do iq=1,Ep%nqcalc
if (normv(Ep%qcalc(:,iq),gmet,'G')<GW_TOLQ0) then
@@ -522,7 +522,7 @@
!write(*,*)MAXVAL(ABS(occfact(:)-KS_BSt%occ(:)))
!TODO call update_occ here
- !$call update_occ(KS_BSt,fixmom,stmbias,Dtset%prtvol)
+ !%call update_occ(KS_BSt,fixmom,stmbias,Dtset%prtvol)
deallocate(doccde,eigen,npwarr)
diff -Naur abinit-6.4.2.bak/src/68_gw/setup_sigma.F90 abinit-6.4.2/src/68_gw/setup_sigma.F90
--- src/68_gw/setup_sigma.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/setup_sigma.F90 2011-01-05 16:33:32.000000000 +0000
@@ -421,7 +421,7 @@
& Kmesh%nibz,npwarr,Dtset%nsppol,Dtset%nspinor,Dtset%tphysel,Dtset%tsmear,Dtset%occopt,occfact,Kmesh%wt)
!TODO call update_occ here
- !$call update_occ(KS_BSt,fixmom,stmbias,Dtset%prtvol)
+ !%call update_occ(KS_BSt,fixmom,stmbias,Dtset%prtvol)
! this fails simply because in case of NSCF occ are zero
! TODO outkss should calculate occ factors in case of NSCF run.
diff -Naur abinit-6.4.2.bak/src/68_gw/trashme.F90 abinit-6.4.2/src/68_gw/trashme.F90
--- src/68_gw/trashme.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_gw/trashme.F90 2011-01-05 16:29:33.000000000 +0000
@@ -911,7 +911,7 @@
deallocate(umat_k)
deallocate(wf_ks,wf_qp)
- !$call wfd_reset_ur(Wf_info)
+ !%call wfd_reset_ur(Wf_info)
DBG_EXIT("COLL")
diff -Naur abinit-6.4.2.bak/src/68_rsprc/ladielmt.F90 abinit-6.4.2/src/68_rsprc/ladielmt.F90
--- src/68_rsprc/ladielmt.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_rsprc/ladielmt.F90 2011-01-05 09:31:41.000000000 +0000
@@ -246,9 +246,9 @@
!***********************************************************************************
-!Getting the localy averaged non-local potential ***
-!$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
-!**********************************************************************************
+! Getting the localy averaged non-local potential ***
+!%$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
+!***********************************************************************************
qphon=zero
@@ -671,36 +671,36 @@
! lavnlr(:,ispden) = -min
-! !$ write(filapp,*) 'orig-lavnl-0.00'
-! !$ call out1line(filapp,lavnlr,dtset,0,0)
-! !$ write(filapp,*) 'orig-lavnl-0.25'
-! !$ call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/4,dtset%ngfft(2)/4)
-! !$ write(filapp,*) 'orig-lavnl-0.50'
-! !$ call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/2,dtset%ngfft(2)/2)
-! !$ lavnlr=lavnlr*(rhor+0.0001_dp)
-! !$ !DEBUG
-! !$write(0,*) "DEBUG ================ lavnl ==========================="
-! !$write(0,*) "DEBUG lavnl: density analysis"
-! !$ !ENDDEBUG
-! !$ do ifft=1,dtset%nfft
-! !$ if((rhor(ifft,ispden)+0.0001_dp > zero).and.(lavnlr(ifft,ispden) >= zero)) then
-! !$ lavnlr(ifft,ispden) = lavnlr(ifft,ispden)/(rhor(ifft,ispden)+0.0001_dp)
-! !$ else
-! !$ !DEBUG
-! !$ !write(0,*) "DEBUG lavnl: for ifft=",ifft,"(rhor(ifft,ispden)+0.0001_dp)=",&
-! !$ ! & (rhor(ifft,ispden)+0.0001_dp),'lavnlr=',lavnlr(ifft,ispden)
-! !$ !ENDDEBUG
-! !$ lavnlr(ifft,ispden)=zero
-! !$ !lavnlr(ifft,ispden) = lavnlr(ifft,ispden)/(rhor(ifft,ispden)+0.0001_dp)
-! !$ end if
-! !$ end do
-! !$
-! !$ write(filapp,*) 'neww-lavnl-0.00'
-! !$ call out1line(filapp,lavnlr,dtset,0,0)
-! !$ write(filapp,*) 'neww-lavnl-0.25'
-! !$ call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/4,dtset%ngfft(2)/4)
-! !$ write(filapp,*) 'neww-lavnl-0.50'
-! !$ call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/2,dtset%ngfft(2)/2)
+! !% write(filapp,*) 'orig-lavnl-0.00'
+! !% call out1line(filapp,lavnlr,dtset,0,0)
+! !% write(filapp,*) 'orig-lavnl-0.25'
+! !% call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/4,dtset%ngfft(2)/4)
+! !% write(filapp,*) 'orig-lavnl-0.50'
+! !% call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/2,dtset%ngfft(2)/2)
+! !% lavnlr=lavnlr*(rhor+0.0001_dp)
+! !% !DEBUG
+! !%write(0,*) "DEBUG ================ lavnl ==========================="
+! !%write(0,*) "DEBUG lavnl: density analysis"
+! !% !ENDDEBUG
+! !% do ifft=1,dtset%nfft
+! !% if((rhor(ifft,ispden)+0.0001_dp > zero).and.(lavnlr(ifft,ispden) >= zero)) then
+! !% lavnlr(ifft,ispden) = lavnlr(ifft,ispden)/(rhor(ifft,ispden)+0.0001_dp)
+! !% else
+! !% !DEBUG
+! !% !write(0,*) "DEBUG lavnl: for ifft=",ifft,"(rhor(ifft,ispden)+0.0001_dp)=",&
+! !% ! & (rhor(ifft,ispden)+0.0001_dp),'lavnlr=',lavnlr(ifft,ispden)
+! !% !ENDDEBUG
+! !% lavnlr(ifft,ispden)=zero
+! !% !lavnlr(ifft,ispden) = lavnlr(ifft,ispden)/(rhor(ifft,ispden)+0.0001_dp)
+! !% end if
+! !% end do
+! !%
+! !% write(filapp,*) 'neww-lavnl-0.00'
+! !% call out1line(filapp,lavnlr,dtset,0,0)
+! !% write(filapp,*) 'neww-lavnl-0.25'
+! !% call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/4,dtset%ngfft(2)/4)
+! !% write(filapp,*) 'neww-lavnl-0.50'
+! !% call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/2,dtset%ngfft(2)/2)
! i1=1
! i2=1
diff -Naur abinit-6.4.2.bak/src/68_rsprc/lavnl.F90 abinit-6.4.2/src/68_rsprc/lavnl.F90
--- src/68_rsprc/lavnl.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_rsprc/lavnl.F90 2011-01-05 09:30:40.000000000 +0000
@@ -172,9 +172,9 @@
! *************************************************************************
!***********************************************************************************
-!Getting the localy averaged non-local potential ***
-!$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
-!**********************************************************************************
+! Getting the localy averaged non-local potential ***
+!%$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
+!***********************************************************************************
qphon=zero
@@ -567,36 +567,36 @@
end do
lavnlr(:,ispden) = lavnlr(:,ispden)-min
! lavnlr(:,ispden) = -min
-! !$ write(filapp,*) 'orig-lavnl-0.00'
-! !$ call out1line(filapp,lavnlr,dtset,0,0)
-! !$ write(filapp,*) 'orig-lavnl-0.25'
-! !$ call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/4,dtset%ngfft(2)/4)
-! !$ write(filapp,*) 'orig-lavnl-0.50'
-! !$ call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/2,dtset%ngfft(2)/2)
-! !$ lavnlr=lavnlr*(rhor+0.0001_dp)
-! !$ !DEBUG
-! !$write(0,*) "DEBUG ================ lavnl ==========================="
-! !$write(0,*) "DEBUG lavnl: density analysis"
-! !$ !ENDDEBUG
-! !$ do ifft=1,dtset%nfft
-! !$ if((rhor(ifft,ispden)+0.0001_dp > zero).and.(lavnlr(ifft,ispden) >= zero)) then
-! !$ lavnlr(ifft,ispden) = lavnlr(ifft,ispden)/(rhor(ifft,ispden)+0.0001_dp)
-! !$ else
-! !$ !DEBUG
-! !$ !write(0,*) "DEBUG lavnl: for ifft=",ifft,"(rhor(ifft,ispden)+0.0001_dp)=",&
-! !$ ! & (rhor(ifft,ispden)+0.0001_dp),'lavnlr=',lavnlr(ifft,ispden)
-! !$ !ENDDEBUG
-! !$ lavnlr(ifft,ispden)=zero
-! !$ !lavnlr(ifft,ispden) = lavnlr(ifft,ispden)/(rhor(ifft,ispden)+0.0001_dp)
-! !$ end if
-! !$ end do
-! !$
-! !$ write(filapp,*) 'neww-lavnl-0.00'
-! !$ call out1line(filapp,lavnlr,dtset,0,0)
-! !$ write(filapp,*) 'neww-lavnl-0.25'
-! !$ call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/4,dtset%ngfft(2)/4)
-! !$ write(filapp,*) 'neww-lavnl-0.50'
-! !$ call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/2,dtset%ngfft(2)/2)
+! !% write(filapp,*) 'orig-lavnl-0.00'
+! !% call out1line(filapp,lavnlr,dtset,0,0)
+! !% write(filapp,*) 'orig-lavnl-0.25'
+! !% call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/4,dtset%ngfft(2)/4)
+! !% write(filapp,*) 'orig-lavnl-0.50'
+! !% call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/2,dtset%ngfft(2)/2)
+! !% lavnlr=lavnlr*(rhor+0.0001_dp)
+! !% !DEBUG
+! !%write(0,*) "DEBUG ================ lavnl ==========================="
+! !%write(0,*) "DEBUG lavnl: density analysis"
+! !% !ENDDEBUG
+! !% do ifft=1,dtset%nfft
+! !% if((rhor(ifft,ispden)+0.0001_dp > zero).and.(lavnlr(ifft,ispden) >= zero)) then
+! !% lavnlr(ifft,ispden) = lavnlr(ifft,ispden)/(rhor(ifft,ispden)+0.0001_dp)
+! !% else
+! !% !DEBUG
+! !% !write(0,*) "DEBUG lavnl: for ifft=",ifft,"(rhor(ifft,ispden)+0.0001_dp)=",&
+! !% ! & (rhor(ifft,ispden)+0.0001_dp),'lavnlr=',lavnlr(ifft,ispden)
+! !% !ENDDEBUG
+! !% lavnlr(ifft,ispden)=zero
+! !% !lavnlr(ifft,ispden) = lavnlr(ifft,ispden)/(rhor(ifft,ispden)+0.0001_dp)
+! !% end if
+! !% end do
+! !%
+! !% write(filapp,*) 'neww-lavnl-0.00'
+! !% call out1line(filapp,lavnlr,dtset,0,0)
+! !% write(filapp,*) 'neww-lavnl-0.25'
+! !% call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/4,dtset%ngfft(2)/4)
+! !% write(filapp,*) 'neww-lavnl-0.50'
+! !% call out1line(filapp,lavnlr,dtset,dtset%ngfft(1)/2,dtset%ngfft(2)/2)
! i1=1
! i2=1
diff -Naur abinit-6.4.2.bak/src/68_rsprc/prctfvw1.F90 abinit-6.4.2/src/68_rsprc/prctfvw1.F90
--- src/68_rsprc/prctfvw1.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_rsprc/prctfvw1.F90 2011-01-05 09:32:35.000000000 +0000
@@ -209,9 +209,9 @@
type(cprj_type) :: cprj_dum(1,1)
! *************************************************************************
!***********************************************************************************
-!Getting the localy averaged non-local potential ***
-!$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
-!**********************************************************************************
+! Getting the localy averaged non-local potential ***
+!%$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
+!***********************************************************************************
znucl=1.0_dp
typat=1
xredcp = xred
diff -Naur abinit-6.4.2.bak/src/68_rsprc/prctfvw2.F90 abinit-6.4.2/src/68_rsprc/prctfvw2.F90
--- src/68_rsprc/prctfvw2.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_rsprc/prctfvw2.F90 2011-01-05 09:30:14.000000000 +0000
@@ -228,8 +228,8 @@
xredcp = xred
!*************************************************************************
!***********************************************************************************
-!Getting the localy averaged non-local potential ***
-!$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
+! Getting the localy averaged non-local potential ***
+!%$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
!***********************************************************************************
!Test size of FFT grids (1 grid in norm-conserving, 2 grids in PAW)
nfftotf=ngfftf(1)*ngfftf(2)*ngfftf(3)
@@ -659,8 +659,8 @@
!******************************************************************
!Finding the density which minimizes the associated Energy **
!******************************************************************
-!!$ !compute the total charge number
-!!$ !first switch to the sqrt of the density...
+!!% !compute the total charge number
+!!% !first switch to the sqrt of the density...
cplex=1;
option=1;
call dotprod_vn(cplex,& !complex density/pot
@@ -676,46 +676,46 @@
&ucvol) !cell volume
!enable the use of the functions eneofrho_tfw and deneofrho_tfw
Z=real(nint(Z),dp)
-!!$ call init_eneofrho_tfw(dtset,dtset%intxc,dtset%ixc,psps%usepaw,n3xccc,ngfftf,&
-!!$ &nfftf,nkxc,nspden,mpi_enreg,deltaW,gprimd,gsqcut,&
-!!$ &lavnlfft,rhor,rprimd,ucvol,vout_unmixed,vpsp,vtrial,xccc3d,Z)
-!!$ !minimizes Etfw with respect to sqrtrhor instead of rhor
-!!$ !sqrtrhor(:,:)=two*Z/nfftf
-!!$ !call random_number(rhor)
-!!$ !eei=zero
-!!$ !do ifft=1,nfft
-!!$ ! eei=max(eei,sqrtrhor(ifft,1))
-!!$ !end do
-!!$ !eei=0.05_dp*eei
-!!$ !call newdensity(eei,rhor,sqrtrhor)
-!!$ call cgpr(eneofrho_tfw,deneofrho_tfw,newdensity,abs(deltae*real(0.001,dp)/etotal),55,sqrtrhor,dummy,dummy2)
-!!$ !dummy=eneofrho_tfw(sqrtrhor)
-!!$ ! free the dynamically allocated memory used by eneofrho_tfw and deneofrho_tfw
-!!$ call end_eneofrho_tfw()
-!!$ !new density from the minimised sqrtrhor
-!!$ count=0
-!!$ do ifft=1,nfftf
-!!$ if (sqrtrhor(ifft,1)<zero) then
-!!$ count=count+1
-!!$ end if
-!!$ end do
-!!$ write(0,*) 'nombre sous zero',count
-!!$ rhor(:,:)=sqrtrhor(:,:)*sqrtrhor(:,:)
-!!$
-!!$
-!!$ write(0,*) 'n1 n2 n3',n1,n2,n3
-!!$ i1=1
-!!$ i2=1
-!!$
-!!$ do i3=1,n3
-!!$ ifft=i1+n1*(i2-1+n2*(i3-1))
-!!$ ifft2=i1+6+n1*(i2+6-1+n2*(i3-1))
-!!$ write(79,*) deltaW(ifft,1),deltaW(ifft2,1),&
-!!$ & lavnlfft(ifft,1),lavnlfft(ifft2,1),&
-!!$ & vpsp(ifft)+vout_unmixed(ifft,1)-vtrial(ifft,1),&
-!!$ & vpsp(ifft2)+vout_unmixed(ifft2,1)-vtrial(ifft2,1),&
-!!$ & sqrtrhor(ifft,1),sqrtrhor(ifft2,1)
-!!$ end do
+!!% call init_eneofrho_tfw(dtset,dtset%intxc,dtset%ixc,psps%usepaw,n3xccc,ngfftf,&
+!!% &nfftf,nkxc,nspden,mpi_enreg,deltaW,gprimd,gsqcut,&
+!!% &lavnlfft,rhor,rprimd,ucvol,vout_unmixed,vpsp,vtrial,xccc3d,Z)
+!!% !minimizes Etfw with respect to sqrtrhor instead of rhor
+!!% !sqrtrhor(:,:)=two*Z/nfftf
+!!% !call random_number(rhor)
+!!% !eei=zero
+!!% !do ifft=1,nfft
+!!% ! eei=max(eei,sqrtrhor(ifft,1))
+!!% !end do
+!!% !eei=0.05_dp*eei
+!!% !call newdensity(eei,rhor,sqrtrhor)
+!!% call cgpr(eneofrho_tfw,deneofrho_tfw,newdensity,abs(deltae*real(0.001,dp)/etotal),55,sqrtrhor,dummy,dummy2)
+!!% !dummy=eneofrho_tfw(sqrtrhor)
+!!% ! free the dynamically allocated memory used by eneofrho_tfw and deneofrho_tfw
+!!% call end_eneofrho_tfw()
+!!% !new density from the minimised sqrtrhor
+!!% count=0
+!!% do ifft=1,nfftf
+!!% if (sqrtrhor(ifft,1)<zero) then
+!!% count=count+1
+!!% end if
+!!% end do
+!!% write(0,*) 'nombre sous zero',count
+!!% rhor(:,:)=sqrtrhor(:,:)*sqrtrhor(:,:)
+!!%
+!!%
+!!% write(0,*) 'n1 n2 n3',n1,n2,n3
+!!% i1=1
+!!% i2=1
+!!%
+!!% do i3=1,n3
+!!% ifft=i1+n1*(i2-1+n2*(i3-1))
+!!% ifft2=i1+6+n1*(i2+6-1+n2*(i3-1))
+!!% write(79,*) deltaW(ifft,1),deltaW(ifft2,1),&
+!!% & lavnlfft(ifft,1),lavnlfft(ifft2,1),&
+!!% & vpsp(ifft)+vout_unmixed(ifft,1)-vtrial(ifft,1),&
+!!% & vpsp(ifft2)+vout_unmixed(ifft2,1)-vtrial(ifft2,1),&
+!!% & sqrtrhor(ifft,1),sqrtrhor(ifft2,1)
+!!% end do
!******************************************************************
!Finding the density which minimizes the first term **
!******************************************************************
@@ -764,46 +764,46 @@
!vrespc=vrespc/diemix
!call laplacian(vrespc,lvres,ngfft,rprimd)
!lvres=-lvres*(two*two_pi)
-!!$ write(0,*) 'efermi=',efermi
-!!$ write(filapp,770) 'myoutput-opA',1
-!!$ call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
-!!$ & rhor,rprimd,&
-!!$ & typat,ucvol,opA,xredcp,znucl)
-!!$ write(filapp,770) 'myoutput-opB',1
-!!$ call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
-!!$ & rhor,rprimd,&
-!!$ & typat,ucvol,opB,xredcp,znucl)
-!!$ write(filapp,770) 'myoutput-partial',1
-!!$ call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
-!!$ & rhor,rprimd,&
-!!$ & typat,ucvol,vpsp,xredcp,znucl)
-!!$ write(filapp,770) 'myoutput-partial',2
-!!$ call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
-!!$ & rhor,rprimd,&
-!!$ & typat,ucvol,vhartr,xredcp,znucl)
-!!$ write(filapp,770) 'myoutput-partial',3
-!!$ bla=seven/six*(alpha32*rhor(:,:))**(two_thirds)
-!!$ call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
-!!$ & rhor,rprimd,&
-!!$ & typat,ucvol,bla,xredcp,znucl)
-!!$ write(filapp,770) 'myoutput-partial',4
-!!$ bla(:,1)=2*kxc(:,1)*rhor(:,1)
-!!$ call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
-!!$ & rhor,rprimd,&
-!!$ & typat,ucvol,bla,xredcp,znucl)
-!!$ write(filapp,770) 'myoutput-partial',5
-!!$ call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
-!!$ & rhor,rprimd,&
-!!$ & typat,ucvol,lavnlfft,xredcp,znucl)
-!!$ write(filapp,770) 'myoutput-partial',6
-!!$ call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
-!!$ & rhor,rprimd,&
-!!$ & typat,ucvol,vxc,xredcp,znucl)
-!!$bla=efermi
-!!$ write(filapp,770) 'myoutput-partial',7
-!!$ call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
-!!$ & rhor,rprimd,&
-!!$ & typat,ucvol,bla,xredcp,znucl)
+!!% write(0,*) 'efermi=',efermi
+!!% write(filapp,770) 'myoutput-opA',1
+!!% call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
+!!% & rhor,rprimd,&
+!!% & typat,ucvol,opA,xredcp,znucl)
+!!% write(filapp,770) 'myoutput-opB',1
+!!% call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
+!!% & rhor,rprimd,&
+!!% & typat,ucvol,opB,xredcp,znucl)
+!!% write(filapp,770) 'myoutput-partial',1
+!!% call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
+!!% & rhor,rprimd,&
+!!% & typat,ucvol,vpsp,xredcp,znucl)
+!!% write(filapp,770) 'myoutput-partial',2
+!!% call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
+!!% & rhor,rprimd,&
+!!% & typat,ucvol,vhartr,xredcp,znucl)
+!!% write(filapp,770) 'myoutput-partial',3
+!!% bla=seven/six*(alpha32*rhor(:,:))**(two_thirds)
+!!% call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
+!!% & rhor,rprimd,&
+!!% & typat,ucvol,bla,xredcp,znucl)
+!!% write(filapp,770) 'myoutput-partial',4
+!!% bla(:,1)=2*kxc(:,1)*rhor(:,1)
+!!% call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
+!!% & rhor,rprimd,&
+!!% & typat,ucvol,bla,xredcp,znucl)
+!!% write(filapp,770) 'myoutput-partial',5
+!!% call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
+!!% & rhor,rprimd,&
+!!% & typat,ucvol,lavnlfft,xredcp,znucl)
+!!% write(filapp,770) 'myoutput-partial',6
+!!% call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
+!!% & rhor,rprimd,&
+!!% & typat,ucvol,vxc,xredcp,znucl)
+!!%bla=efermi
+!!% write(filapp,770) 'myoutput-partial',7
+!!% call out1dm(filapp,natom,nfftf,ngfftf,nspden,ntypat,&
+!!% & rhor,rprimd,&
+!!% & typat,ucvol,bla,xredcp,znucl)
a=1.e9
b=1.e9
do ifft=1,nfftf
@@ -837,17 +837,17 @@
!******************************************************************
cplex=1;
option=1;
-!!$ call dotprod_vn(cplex,& !complex density/pot
-!!$ &phi2,& !density
-!!$ &a,& !resulting dorproduct integrated over r
-!!$ &doti,& !imaginary part of the integral
-!!$ &mpi_enreg,& !
-!!$ &size(rhor,1),& !number of localy(cpu) attributed grid point
-!!$ &nfftotf,& !real total number of grid point
-!!$ &size(rhor,2),& !nspden
-!!$ &option,& !1=compute only the real part 2=compute also the imaginary part
-!!$ &phi2,& !density
-!!$ &ucvol) !cell volume
+!!% call dotprod_vn(cplex,& !complex density/pot
+!!% &phi2,& !density
+!!% &a,& !resulting dorproduct integrated over r
+!!% &doti,& !imaginary part of the integral
+!!% &mpi_enreg,& !
+!!% &size(rhor,1),& !number of localy(cpu) attributed grid point
+!!% &nfftotf,& !real total number of grid point
+!!% &size(rhor,2),& !nspden
+!!% &option,& !1=compute only the real part 2=compute also the imaginary part
+!!% &phi2,& !density
+!!% &ucvol) !cell volume
call dotprod_vn(cplex,& !complex density/pot
&phi2,& !density
&b,& !resulting dorproduct integrated over r
@@ -870,19 +870,19 @@
&option,& !1=compute only the real part 2=compute also the imaginary part
&sqrtrhor,& !density
&ucvol) !cell volume
-!!$ discr= b*b-four*a*c
-!!$ if(discr > zero) then
-!!$ discr=sqrt(discr)
-!!$ fermi1p=(-b+discr)/(two*a)
-!!$ fermi1m=(-b-discr)/(two*a)
-!!$ else if (discr == zero) then
-!!$ fermi1p=-b/(two*a)
-!!$ fermi1m=-b/(two*a)
-!!$ else
-!!$ fermi1p=zero
-!!$ fermi1m=zero
-!!$ end if
-!!$ dfermi=merge(fermi1p,fermi1m,abs(fermi1p) <= abs(fermi1m))
+!!% discr= b*b-four*a*c
+!!% if(discr > zero) then
+!!% discr=sqrt(discr)
+!!% fermi1p=(-b+discr)/(two*a)
+!!% fermi1m=(-b-discr)/(two*a)
+!!% else if (discr == zero) then
+!!% fermi1p=-b/(two*a)
+!!% fermi1m=-b/(two*a)
+!!% else
+!!% fermi1p=zero
+!!% fermi1m=zero
+!!% end if
+!!% dfermi=merge(fermi1p,fermi1m,abs(fermi1p) <= abs(fermi1m))
dfermi = -c/b !since the term in a must be neglected !(??)
sqrtrhor(:,:)=phi1+dfermi*phi2
!****************************************************************** !
@@ -1056,115 +1056,115 @@
!vtrial fourier
!vnewfourier
!ref
-!!$ count=0
-!!$ count1=0
-!!$ count2=0
-!!$ count3=0
-!!$ count4=0
-!!$ count5=0
-!!$ count6=0
-!!$ count7=0
-!!$ count8=0
-!!$ count9=0
-!!$ count10=0
-!!$ count11=0
-!!$ count12=0
-!!$ count13=0
-!!$ count14=0
-!!$ count15=0
-!!$ count16=0
-!!$ count17=0
-!!$ count18=0
-!!$ do ispden=1,nspden
-!!$ do ifft=1,nfftf
-!!$ aa=vrefg(:,ifft,ispden)
-!!$ bb=vin_oldfourier(:,ifft,ispden)-aa
-!!$ cc=newvoutfourier(:,ifft,ispden)-aa
-!!$ principal: if((g2cart(ifft).lt.one).and.(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-5) then
-!!$ ong: if(g2cart(ifft).lt.one*0.2) then
-!!$ onv2:if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.2d-1) then
-!!$ if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
-!!$ count15=count15+1
-!!$ else
-!!$ count16=count16+1
-!!$ end if
-!!$ else if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-2) then
-!!$ if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
-!!$ count1=count1+1
-!!$ else
-!!$ count2=count2+1
-!!$ end if
-!!$
-!!$ else if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-3) then
-!!$ if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
-!!$ count3=count3+1
-!!$ else
-!!$ count4=count4+1
-!!$ end if
-!!$ else
-!!$ if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
-!!$ count5=count5+1
-!!$ else
-!!$ count6=count6+1
-!!$ end if
-!!$ end if onv2
-!!$ else
-!!$ onv22:if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.2d-1) then
-!!$ if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
-!!$ count17=count17+1
-!!$ else
-!!$ count18=count18+1
-!!$ end if
-!!$ else if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-2) then
-!!$ if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
-!!$ count1=count1+1
-!!$ else
-!!$ count2=count2+1
-!!$ end if
-!!$ else if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-3) then
-!!$ if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
-!!$ count9=count9+1
-!!$ else
-!!$ count10=count10+1
-!!$ end if
-!!$ else
-!!$ if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
-!!$ count11=count11+1
-!!$ else
-!!$ count12=count12+1
-!!$ end if
-!!$ end if onv22
-!!$ end if ong
-!!$ end if principal
-!!$ if(abs(vref(ifft,ispden)-vtrial(ifft,ispden)).gt.&
-!!$ &abs(vref(ifft,ispden)-vtrialold(ifft,ispden))) then
-!!$ count14=count14+1
-!!$ else
-!!$ count13=count13+1
-!!$ end if
-!!$
-!!$ end do
-!!$ end do
-!!$ write(1111,*),'---------------------------------------------------------------------------------'
-!!$ write(1111,*),'| g2<0.2 | g2<1.0 |'
-!!$ write(1111,*),'| ok | bad | ok | bad | '
-!!$ write(1111,*),'|',count16,'|',count15,'|',count18,'|',count17,'| ','||V||>2e-1'
-!!$ write(1111,*),'|',count2,'|',count1,'|',count8,'|',count7,'| ','||V||>5e-2'
-!!$ write(1111,*),'|',count4,'|',count3,'|',count10,'|',count9,'| ','||V||>5e-3'
-!!$ write(1111,*),'|',count6,'|',count5,'|',count12,'|',count11,'| ','||V||>5e-5'
-!!$ write(1111,*),'---------------------------------------------------------------------------------'
-!!$ write(0,*),'---------------------------------------------------------------------------------'
-!!$ write(0,*),'| g2<0.2 | g2<1.0 |'
-!!$ write(0,*),'| ok | bad | ok | bad | '
-!!$ write(0,*),'|',count16,'|',count15,'|',count18,'|',count17,'| ','||V||>2e-1'
-!!$ write(0,*),'|',count2,'|',count1,'|',count8,'|',count7,'| ','||V||>5e-2'
-!!$ write(0,*),'|',count4,'|',count3,'|',count10,'|',count9,'| ','||V||>5e-3'
-!!$ write(0,*),'|',count6,'|',count5,'|',count12,'|',count11,'| ','||V||>5e-5'
-!!$ write(0,*),'---------------------------------------------------------------------------------'
-!!$
-!!$
-!!$ write(0,*) 'les mauvais r:',count14,'les bons r',count13
-!!$ write(1111,*) 'les mauvais r:',count14,'les bons r',count13
+!!% count=0
+!!% count1=0
+!!% count2=0
+!!% count3=0
+!!% count4=0
+!!% count5=0
+!!% count6=0
+!!% count7=0
+!!% count8=0
+!!% count9=0
+!!% count10=0
+!!% count11=0
+!!% count12=0
+!!% count13=0
+!!% count14=0
+!!% count15=0
+!!% count16=0
+!!% count17=0
+!!% count18=0
+!!% do ispden=1,nspden
+!!% do ifft=1,nfftf
+!!% aa=vrefg(:,ifft,ispden)
+!!% bb=vin_oldfourier(:,ifft,ispden)-aa
+!!% cc=newvoutfourier(:,ifft,ispden)-aa
+!!% principal: if((g2cart(ifft).lt.one).and.(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-5) then
+!!% ong: if(g2cart(ifft).lt.one*0.2) then
+!!% onv2:if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.2d-1) then
+!!% if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
+!!% count15=count15+1
+!!% else
+!!% count16=count16+1
+!!% end if
+!!% else if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-2) then
+!!% if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
+!!% count1=count1+1
+!!% else
+!!% count2=count2+1
+!!% end if
+!!%
+!!% else if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-3) then
+!!% if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
+!!% count3=count3+1
+!!% else
+!!% count4=count4+1
+!!% end if
+!!% else
+!!% if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
+!!% count5=count5+1
+!!% else
+!!% count6=count6+1
+!!% end if
+!!% end if onv2
+!!% else
+!!% onv22:if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.2d-1) then
+!!% if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
+!!% count17=count17+1
+!!% else
+!!% count18=count18+1
+!!% end if
+!!% else if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-2) then
+!!% if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
+!!% count1=count1+1
+!!% else
+!!% count2=count2+1
+!!% end if
+!!% else if(sqrt(vrefg(1,ifft,ispden)**2+vrefg(2,ifft,ispden)).gt.5d-3) then
+!!% if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
+!!% count9=count9+1
+!!% else
+!!% count10=count10+1
+!!% end if
+!!% else
+!!% if(bb(1)**2+bb(2)**2.lt.cc(1)**2+cc(2)**2) then
+!!% count11=count11+1
+!!% else
+!!% count12=count12+1
+!!% end if
+!!% end if onv22
+!!% end if ong
+!!% end if principal
+!!% if(abs(vref(ifft,ispden)-vtrial(ifft,ispden)).gt.&
+!!% &abs(vref(ifft,ispden)-vtrialold(ifft,ispden))) then
+!!% count14=count14+1
+!!% else
+!!% count13=count13+1
+!!% end if
+!!%
+!!% end do
+!!% end do
+!!% write(1111,*),'---------------------------------------------------------------------------------'
+!!% write(1111,*),'| g2<0.2 | g2<1.0 |'
+!!% write(1111,*),'| ok | bad | ok | bad | '
+!!% write(1111,*),'|',count16,'|',count15,'|',count18,'|',count17,'| ','||V||>2e-1'
+!!% write(1111,*),'|',count2,'|',count1,'|',count8,'|',count7,'| ','||V||>5e-2'
+!!% write(1111,*),'|',count4,'|',count3,'|',count10,'|',count9,'| ','||V||>5e-3'
+!!% write(1111,*),'|',count6,'|',count5,'|',count12,'|',count11,'| ','||V||>5e-5'
+!!% write(1111,*),'---------------------------------------------------------------------------------'
+!!% write(0,*),'---------------------------------------------------------------------------------'
+!!% write(0,*),'| g2<0.2 | g2<1.0 |'
+!!% write(0,*),'| ok | bad | ok | bad | '
+!!% write(0,*),'|',count16,'|',count15,'|',count18,'|',count17,'| ','||V||>2e-1'
+!!% write(0,*),'|',count2,'|',count1,'|',count8,'|',count7,'| ','||V||>5e-2'
+!!% write(0,*),'|',count4,'|',count3,'|',count10,'|',count9,'| ','||V||>5e-3'
+!!% write(0,*),'|',count6,'|',count5,'|',count12,'|',count11,'| ','||V||>5e-5'
+!!% write(0,*),'---------------------------------------------------------------------------------'
+!!%
+!!%
+!!% write(0,*) 'les mauvais r:',count14,'les bons r',count13
+!!% write(1111,*) 'les mauvais r:',count14,'les bons r',count13
!stop
!----------------------------------------------------------------------------------------------------------
!last FREE
diff -Naur abinit-6.4.2.bak/src/68_rsprc/prctfw3.F90 abinit-6.4.2/src/68_rsprc/prctfw3.F90
--- src/68_rsprc/prctfw3.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/68_rsprc/prctfw3.F90 2011-01-05 09:33:04.000000000 +0000
@@ -170,9 +170,9 @@
! *************************************************************************
!***********************************************************************************
-!Getting the localy averaged non-local potential ***
-!$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
-!**********************************************************************************
+! Getting the localy averaged non-local potential ***
+!%$Vnl(r) = [\sum_{n,k} f_{n,k} \psi_{n,k}(r) (Vnl(r,r') |\psi_{n,k}(r')>)]/n(r)$***
+!***********************************************************************************
rhor=rhor_in
qphon=zero
xred2=xred
diff -Naur abinit-6.4.2.bak/src/69_bse/cexch_haydock.F90 abinit-6.4.2/src/69_bse/cexch_haydock.F90
--- src/69_bse/cexch_haydock.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/69_bse/cexch_haydock.F90 2011-01-05 16:47:03.000000000 +0000
@@ -185,7 +185,7 @@
! There is no need to shift the G-sphere as we only have vertical transitions.
mgfft_osc = MAXVAL(ngfft_osc(1:3))
fftalga_osc = ngfft_osc(7)/100 !; fftalgc_osc=MOD(ngfft_osc(7),10)
- use_padfft=0; !$if (fftalga_osc==3) use_padfft=1 ! Padded FFTW3 is safe instead!
+ use_padfft=0; !%if (fftalga_osc==3) use_padfft=1 ! Padded FFTW3 is safe instead!
allocate(gbound(2*mgfft_osc+8,2*use_padfft))
if (use_padfft==1) call sphereboundary(gbound,1,Gsph_Max%gvec,mgfft_osc,BSp%npweps)
@@ -315,8 +315,8 @@
do ic=BSp%lomo,BSp%nbnds ! loop over band C
! Symmetry index for IBZ = 1 (in ktabr(:,1)
- !$call wfd_get_ur(Wfd,iv,ik,spin,wfr1)
- !$call wfd_get_ur(Wfd,ic,ik,spin,wfr2)
+ !%call wfd_get_ur(Wfd,iv,ik,spin,wfr1)
+ !%call wfd_get_ur(Wfd,ic,ik,spin,wfr2)
call rho_tw_g(paral_kgb,nspinor,BSp%npweps,nfftot_osc,ngfft_osc,map2sphere,use_padfft,igfftg0,gbound,&
& wfnr(:,iv,ik),1,ktabr(:,1),ph_mkt,spinrot_k,&
@@ -533,8 +533,8 @@
do iv=BSp%lomo,BSp%homo ! loop over band V
do ivp=BSp%lomo,BSp%homo ! loop over band VP
- !$call wfd_get_ur(Wfd,ivp,ikp_ibz,spin,wfr1)
- !$call wfd_get_ur(Wfd,iv ,ik_ibz ,spin,wfr2)
+ !%call wfd_get_ur(Wfd,ivp,ikp_ibz,spin,wfr1)
+ !%call wfd_get_ur(Wfd,iv ,ik_ibz ,spin,wfr2)
call rho_tw_g(paral_kgb,nspinor,BSp%npweps,nfftot_osc,ngfft_osc,map2sphere,use_padfft,igfftg0,gbound,&
& wfnr(:,ivp,ikp_ibz),itim_kp,ktabr_kp,ph_mkpt,spinrot_kp,&
@@ -556,8 +556,8 @@
do icp=BSp%lumo,BSp%nbnds ! loop over band C_prime
do ic=BSp%lumo,BSp%nbnds ! loop over band C
- !$call wfd_get_ur(Wfd,icp,ikp_ibz,spin,wfr1)
- !$call wfd_get_ur(Wfd,ic ,ik_ibz ,spin,wfr2)
+ !%call wfd_get_ur(Wfd,icp,ikp_ibz,spin,wfr1)
+ !%call wfd_get_ur(Wfd,ic ,ik_ibz ,spin,wfr2)
call rho_tw_g(paral_kgb,nspinor,BSp%npweps,nfftot_osc,ngfft_osc,map2sphere,use_padfft,igfftg0,gbound,&
& wfnr(:,icp,ikp_ibz),itim_kp,ktabr_kp,ph_mkpt,spinrot_kp,&
@@ -613,7 +613,7 @@
! then sum on G': sum_G' (rho_c'c(G) W*(G,G'))* rho_v'v(G')
http = -faq * DOT_PRODUCT(ctccp(:),rhxtwg_vv(:,ivp,iv))
- !$http = -faq * xdotc(BSp%npweps,ctccp,1,rhxtwg_vv(:,ivp,iv),1)
+ !%http = -faq * xdotc(BSp%npweps,ctccp,1,rhxtwg_vv(:,ivp,iv),1)
bsh_k(irv,irc,ikp,irvp,ircp) = http
! write(*,'("ik,ikp,iv,ivp,ic,icp, it, itp",8I3)')ik,ikp,iv,ivp,ic,icp, it, itp
@@ -663,7 +663,7 @@
! sum over G
ctemp = DOT_PRODUCT(rhotwg1(2:),rhotwg2(2:))
- !$ctemp = XDOTC(BSp%npweps-1,rhotwg1(2:),1,rhotwg2(2:),1)
+ !%ctemp = XDOTC(BSp%npweps-1,rhotwg1(2:),1,rhotwg2(2:),1)
ctemp = two * ctemp * faq
bsh_k(irv,irc,ikp,irvp,ircp)=bsh_k(irv,irc,ikp,irvp,ircp)+ctemp
diff -Naur abinit-6.4.2.bak/src/69_bse/exceig.F90 abinit-6.4.2/src/69_bse/exceig.F90
--- src/69_bse/exceig.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/69_bse/exceig.F90 2011-01-05 16:48:51.000000000 +0000
@@ -155,11 +155,11 @@
! Check the size of hamiltonian matrix
! Not possible anymore, this info should be reported in the header.
- !$read(hreso_unt,rec=((nh*nh + nh)/2)+1) itemp
- !$if(itemp/=nh) then
- !$ write(msg,'(a,i0,a,i0,a)')'nt should be ',nh,' but read ',itemp,' wrong file fort.55 *.exh'
- !$ MSG_ERROR(msg)
- !$end if
+ !%read(hreso_unt,rec=((nh*nh + nh)/2)+1) itemp
+ !%if(itemp/=nh) then
+ !% write(msg,'(a,i0,a,i0,a)')'nt should be ',nh,' but read ',itemp,' wrong file fort.55 *.exh'
+ !% MSG_ERROR(msg)
+ !%end if
! Construct full excitonic Hamiltonian using Hermiticity. file is always in double precision.
do itp=1,nh
@@ -181,7 +181,7 @@
call wrtout(std_out," Partial diagonalization via XHEEVX","COLL")
abstol=zero; ldz=nh
allocate(exc_vec(ldz,nh)) ! TODO Single precision is not available.
- !$call xheevx("Vectors","All","Upper",nh,exc_mat,vl,vu,il,iu,abstol,mene_found,exc_ene,exc_vec,ldz)
+ !%call xheevx("Vectors","All","Upper",nh,exc_mat,vl,vu,il,iu,abstol,mene_found,exc_ene,exc_vec,ldz)
exc_mat = exc_vec
deallocate(exc_vec)
end if
@@ -287,28 +287,28 @@
call wrtout(std_out,' Writing eigenvalues/vectors on file: '//TRIM(filbseig),"COLL")
- !$ Very inefficient coding. Allocate global array to store the distributed eigenvectors
- !$ Fill the matrix, then the master node writes the final results on file
- !$allocate(exc_mat_dpc(nh,nh), STAT=istat)
- !$ABI_CHECK(istat==0,'out of memory: excitonic eigenvectors')
- !$exc_mat_dpc = czero
-
- !$call slk_matrix_to_global_dpc_2D(Slk_vec,"All",exc_mat_dpc)
- !$call xsum_master(exc_mat_dpc,master,spaceComm,ierr)
-
- !$if (my_rank==master) then
- !$ eig_unt=get_unit()
- !$ open(eig_unt,file=filbseig,form='unformatted')
- !$
- !$ write(eig_unt) nh
- !$ write(eig_unt) CMPLX(exc_ene(1:nh),kind=dpc)
- !$ do mi=1,nh
- !$ write(eig_unt) CMPLX(exc_mat_dpc(1:nh,mi),kind=dpc)
- !$ end do
- !$ close(eig_unt)
- !$end if
- !$
- !$deallocate(exc_mat_dpc)
+ !% Very inefficient coding. Allocate global array to store the distributed eigenvectors
+ !% Fill the matrix, then the master node writes the final results on file
+ !%allocate(exc_mat_dpc(nh,nh), STAT=istat)
+ !%ABI_CHECK(istat==0,'out of memory: excitonic eigenvectors')
+ !%exc_mat_dpc = czero
+
+ !%call slk_matrix_to_global_dpc_2D(Slk_vec,"All",exc_mat_dpc)
+ !%call xsum_master(exc_mat_dpc,master,spaceComm,ierr)
+
+ !%if (my_rank==master) then
+ !% eig_unt=get_unit()
+ !% open(eig_unt,file=filbseig,form='unformatted')
+ !%
+ !% write(eig_unt) nh
+ !% write(eig_unt) CMPLX(exc_ene(1:nh),kind=dpc)
+ !% do mi=1,nh
+ !% write(eig_unt) CMPLX(exc_mat_dpc(1:nh,mi),kind=dpc)
+ !% end do
+ !% close(eig_unt)
+ !%end if
+ !%
+ !%deallocate(exc_mat_dpc)
! Write distributed matrix on file tmp_fname using streams instead of Fortran records.
tmp_fname=pick_aname()
@@ -661,8 +661,8 @@
! Check the size of hamiltonian matrix
! Not possible anymore, this info should be reported in the header.
- !$read(hreso_unt,rec=((nh*nh + nh)/2)+1) itemp
- !$ABI_CHECK(itemp==nh,'Wrong resonant file')
+ !%read(hreso_unt,rec=((nh*nh + nh)/2)+1) itemp
+ !%ABI_CHECK(itemp==nh,'Wrong resonant file')
do itp=1,nh
do it=1,itp
@@ -687,8 +687,8 @@
! Check the size of hamiltonian matrix
! Not possible anymore, this info should be reported in the header.
- !$read(hcoup_unt,rec=((nh*nh + nh)/2)+1) itemp
- !$ABI_CHECK(itemp==nh,'wrong file .exc')
+ !%read(hcoup_unt,rec=((nh*nh + nh)/2)+1) itemp
+ !%ABI_CHECK(itemp==nh,'wrong file .exc')
do itp=1,nh
do it=1,itp
@@ -970,28 +970,28 @@
! Fill the matrix, then master node writes the final results on file
! (better coding requires either scaLAPACK tool or MPI-IO (the later should be much faster).
- !$allocate(ovlp_dpc(nh2,nh2), STAT=istat)
- !$ABI_CHECK(istat==0,'out of memory ovlp_dpc')
- !$ovlp_dpc = czero
-
- !$call slk_matrix_to_global_dpc_2D(Slk_mat,"All",ovlp_dpc)
- !$call xsum_master(ovlp_dpc,master,spaceComm,ierr)
-
- !$if (my_rank==master) then
- !$ msg=' Writing overlap matrix s^-1 on file '//TRIM(BS_files%exovl)
- !$ call wrtout(std_out,msg,"PERS")
-
- !$ ovlp_unt = get_unit()
- !$ open(unit=ovlp_unt,file=BS_files%exovl,form='unformatted',iostat=ios)
-
- !$ write(ovlp_unt) nh2
- !$ do mi=1,nh2 ! write overlap matrix s^-1(mi,:)
- !$ write(ovlp_unt) CMPLX(ovlp_dpc(mi,:),kind=dpc)
- !$ end do
- !$ close(ovlp_unt)
- !$end if
+ !%allocate(ovlp_dpc(nh2,nh2), STAT=istat)
+ !%ABI_CHECK(istat==0,'out of memory ovlp_dpc')
+ !%ovlp_dpc = czero
+
+ !%call slk_matrix_to_global_dpc_2D(Slk_mat,"All",ovlp_dpc)
+ !%call xsum_master(ovlp_dpc,master,spaceComm,ierr)
+
+ !%if (my_rank==master) then
+ !% msg=' Writing overlap matrix s^-1 on file '//TRIM(BS_files%exovl)
+ !% call wrtout(std_out,msg,"PERS")
+
+ !% ovlp_unt = get_unit()
+ !% open(unit=ovlp_unt,file=BS_files%exovl,form='unformatted',iostat=ios)
+
+ !% write(ovlp_unt) nh2
+ !% do mi=1,nh2 ! write overlap matrix s^-1(mi,:)
+ !% write(ovlp_unt) CMPLX(ovlp_dpc(mi,:),kind=dpc)
+ !% end do
+ !% close(ovlp_unt)
+ !%end if
- !$deallocate(ovlp_dpc)
+ !%deallocate(ovlp_dpc)
! Use MPI-IO
! Write distributed matrix on file tmp_fname using streams instead of Fortran records.
diff -Naur abinit-6.4.2.bak/src/69_bse/setup_bse.F90 abinit-6.4.2/src/69_bse/setup_bse.F90
--- src/69_bse/setup_bse.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/69_bse/setup_bse.F90 2011-01-05 16:50:53.000000000 +0000
@@ -362,7 +362,7 @@
CASE (2)
msg= " Model dielectric function not yet coded"
MSG_ERROR(msg)
- !$BSp%wtype = 'wmodel'
+ !%BSp%wtype = 'wmodel'
CASE DEFAULT
write(msg,'(a,i0)')" Wrong bs_coulomb_term: ",Dtset%bs_coulomb_term
MSG_ERROR(msg)
@@ -715,7 +715,7 @@
!TODO call update_occ here
! Occupancies might be zero if NSCF
- !$call update_occ(KS_BSt,fixmom,stmbias,Dtset%prtvol)
+ !%call update_occ(KS_BSt,fixmom,stmbias,Dtset%prtvol)
call print_bandstructure(KS_BSt,"Band structure read from the KSS file",unit=std_out,prtvol=Dtset%prtvol)
diff -Naur abinit-6.4.2.bak/src/77_ddb/eliashberg_1d.F90 abinit-6.4.2/src/77_ddb/eliashberg_1d.F90
--- src/77_ddb/eliashberg_1d.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/77_ddb/eliashberg_1d.F90 2011-01-05 09:36:08.000000000 +0000
@@ -108,10 +108,10 @@
!
!1) use linearized Eliashberg equation to find Tc
-!$ \sum_j \mathbf{M}_{ij} \Delta_j = \zeta \cdot \Delta_i $ $i,j = 1 .. n_{\mathrm{Matsubara}}$
-!$\zeta = 1$ gives T$_c$ $\beta = \frac{1}{\mathrm{T}}$ $\omega_i = (2 i + 1) \pi \mathrm{T}$
-!$ \mathbf{M}_{ij} = \frac{\pi}{\beta} \frac{\lambda (\omega_i - \omega_j)}{Z (\omega_i)}$
-!$ Z (\omega_i) = 1 + \frac{\pi}{\beta \omega_i} \sum_j \lambda(\omega_i - \omega_j) \mathrm{sgn}(\omega_j)$
+!%$ \sum_j \mathbf{M}_{ij} \Delta_j = \zeta \cdot \Delta_i $ $i,j = 1 .. n_{\mathrm{Matsubara}}$
+!%$\zeta = 1$ gives T$_c$ $\beta = \frac{1}{\mathrm{T}}$ $\omega_i = (2 i + 1) \pi \mathrm{T}$
+!%$ \mathbf{M}_{ij} = \frac{\pi}{\beta} \frac{\lambda (\omega_i - \omega_j)}{Z (\omega_i)}$
+!%$ Z (\omega_i) = 1 + \frac{\pi}{\beta \omega_i} \sum_j \lambda(\omega_i - \omega_j) \mathrm{sgn}(\omega_j)$
!
!initial guess for T$_c$ in Hartree (1Ha =3.067e5 K)
diff -Naur abinit-6.4.2.bak/src/77_ddb/m_eph.F90 abinit-6.4.2/src/77_ddb/m_eph.F90
--- src/77_ddb/m_eph.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/77_ddb/m_eph.F90 2011-01-05 09:34:59.000000000 +0000
@@ -233,10 +233,10 @@
public :: nullify_fermi_surface
public :: destroy_fermi_surface
- !$public :: init_fermi_surface
- !$public :: wannier_interpolate_fermi_surface
- !$public :: get_fs_ibz
- !$public :: bxsf_write_fermi_surface
+ !%public :: init_fermi_surface
+ !%public :: wannier_interpolate_fermi_surface
+ !%public :: get_fs_ibz
+ !%public :: bxsf_write_fermi_surface
! example:
!type(fermi_surface_type),allocatable :: Fsurf(:)
@@ -325,9 +325,9 @@
! Bound Methods:
public :: nullify_gkk
public :: destroy_gkk
- !$ init_gkk
- !$ read_gkk_from_file
- !$ get_gkk_full_fsbz ! complete gkk on the full FS BZ.
+ !% init_gkk
+ !% read_gkk_from_file
+ !% get_gkk_full_fsbz ! complete gkk on the full FS BZ.
interface nullify_gkk
module procedure nullify_gkk_0D
@@ -379,9 +379,9 @@
! Bound Methods:
public :: nullify_gkk_handler
public :: destroy_gkk_handler
- !$init_gkk_handler(Gkk,FSurf,Cryst,Cryst,qpt,fname)
- !$get_gammaq
- !$symmetrize_gkk_over_perts
+ !%init_gkk_handler(Gkk,FSurf,Cryst,Cryst,qpt,fname)
+ !%get_gammaq
+ !%symmetrize_gkk_over_perts
interface nullify_gkk_handler
module procedure nullify_gkk_handler_0D
diff -Naur abinit-6.4.2.bak/src/77_suscep/prtsusd.F90 abinit-6.4.2/src/77_suscep/prtsusd.F90
--- src/77_suscep/prtsusd.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/77_suscep/prtsusd.F90 2011-01-05 08:58:59.000000000 +0000
@@ -86,7 +86,7 @@
allocate(sus_poly(npw_tiny))
!Scaling for e-e interaction energy
-!$-1/2\pi$ [fluctuation-dissipation theorem] * $4\pi$ [Coulomb interaction] = -2
+!% $-1/2\pi$ [fluctuation-dissipation theorem] * $4\pi$ [Coulomb interaction] = -2
scalefactor=-2._dp ! -1/2pi[fluctuation-dissipation theorem] * 4pi[Coulomb interaction]
!Directional extrapolation followed by spatial average for G=0 term, using polynomial
diff -Naur abinit-6.4.2.bak/src/95_drive/bethe_salpeter.F90 abinit-6.4.2/src/95_drive/bethe_salpeter.F90
--- src/95_drive/bethe_salpeter.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/95_drive/bethe_salpeter.F90 2011-01-05 09:03:45.000000000 +0000
@@ -567,7 +567,7 @@
!TODO this has to be done in a better way, moreover wont work for PAW
!Check Vcp!
-!$ call cutoff_density(ngfftf,Dtset%nspden,Dtset%nsppol,Vcp,ks_rhor,MPI_enreg)
+!% call cutoff_density(ngfftf,Dtset%nspden,Dtset%nsppol,Vcp,ks_rhor,MPI_enreg)
!
!=== Additional computation for PAW ===
if (Dtset%usepaw==1) then
diff -Naur abinit-6.4.2.bak/src/95_drive/gw_driver.F90 abinit-6.4.2/src/95_drive/gw_driver.F90
--- src/95_drive/gw_driver.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/95_drive/gw_driver.F90 2011-01-05 09:22:30.000000000 +0000
@@ -171,7 +171,7 @@
if (read_qps1/=0) then ! Change the default.
Dtfil%fnameabi_qps=filqps_it1
else ! Save the IT1 name for GW0 runs
- !$filqps_it1=TRIM(filnam_ds(3))//'_QPS'
+ !%filqps_it1=TRIM(filnam_ds(3))//'_QPS'
filqps_it1=Dtfil%fnameabi_qps
end if
!
@@ -182,7 +182,7 @@
if (read_scr1/=0) then ! Change the default.
Dtfil%fnameabi_scr=filscr_it1
else ! Save the IT1 name for GW0 runs
- !$filscr_it1=TRIM(filnam_ds(3))//'_SCR'
+ !%filscr_it1=TRIM(filnam_ds(3))//'_SCR'
filscr_it1=Dtfil%fnameabi_scr
end if
!
@@ -193,7 +193,7 @@
if (read_sus1/=0) then ! Change the default.
Dtfil%fnameabi_sus=filchi0_it1
else ! Save the IT1 name for GW0 runs
- !$filchi0_it1=TRIM(filnam_ds(3))//'_SUS'
+ !%filchi0_it1=TRIM(filnam_ds(3))//'_SUS'
filchi0_it1 =Dtfil%fnameabi_sus
end if
end if
diff -Naur abinit-6.4.2.bak/src/95_drive/iofn1.F90 abinit-6.4.2/src/95_drive/iofn1.F90
--- src/95_drive/iofn1.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/95_drive/iofn1.F90 2011-01-05 09:17:55.000000000 +0000
@@ -197,10 +197,10 @@
call filnam_comm(5,filnam,mpi_enreg)
!MG TODO
-!$call xbarrier_mpi(comm_world)
-!$call timab(48,1,tsec)
-!$call xcast_mpi(filnam,0,comm_world,ierr)
-!$call timab(48,2,tsec)
+!%call xbarrier_mpi(comm_world)
+!%call timab(48,1,tsec)
+!%call xcast_mpi(filnam,0,comm_world,ierr)
+!%call timab(48,2,tsec)
!Create a name for the status file, based on filnam(5)
filstat=trim(filnam(5))//'_STATUS'
diff -Naur abinit-6.4.2.bak/src/95_drive/sigma.F90 abinit-6.4.2/src/95_drive/sigma.F90
--- src/95_drive/sigma.F90 2010-12-01 19:47:18.000000000 +0000
+++ src/95_drive/sigma.F90 2011-01-05 09:17:02.000000000 +0000
@@ -1505,12 +1505,12 @@
!pass it to the setup_ppmodel
!* It would be possible to calculate rho(G) using Paw_pwff, though. Maybe faster but
!results will depend on the expression used for the matrix elements. This approach is safer.
-!$ if (Psps%usepaw==1.and.Ppm%needs_rhog>0) then
-!$ allocate(ks_rhor_paw(nfftf,Dtset%nspden))
-!$ call denfgr(Cryst%natom,Dtset%nspden,ks_nhat,Cryst%ntypat,Pawfgr,Pawfgrtab,Pawrad,KS_pawrhoij,Pawtab,&
-!$& ks_rhor,ks_rhor_paw,Psps,Cryst%typat)
-!$ deallocate(ks_rhor_paw)
-!$ end if
+!% if (Psps%usepaw==1.and.Ppm%needs_rhog>0) then
+!% allocate(ks_rhor_paw(nfftf,Dtset%nspden))
+!% call denfgr(Cryst%natom,Dtset%nspden,ks_nhat,Cryst%ntypat,Pawfgr,Pawfgrtab,Pawrad,KS_pawrhoij,Pawtab,&
+!%& ks_rhor,ks_rhor_paw,Psps,Cryst%typat)
+!% deallocate(ks_rhor_paw)
+!% end if
call timab(409,2,tsec) ! getW
!
|