Changeset 708
- Timestamp:
- 04/26/12 20:47:17 (13 months ago)
- Files:
-
- 2 edited
-
branches/1.1.x/src/ps_io.F90 (modified) (3 diffs)
-
trunk/src/ps_io.F90 (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1.x/src/ps_io.F90
r604 r708 917 917 integer :: values(8), i, ir, max_l 918 918 real(R8) :: xmin, zmesh 919 character(4) :: shortname 920 character(20) :: longname 919 921 920 922 !Info … … 954 956 write(unit,'(A5,T24,A)') "NC", "Norm - Conserving pseudopotential" 955 957 write(unit,'(L5,T24,A)') info%nlcc, "Nonlinear Core Correction" 956 write(unit,'(A22,T24,"Exchange-Correlation functional")') trim(ixc_to_espresso(info%ixc)) 958 call ixc_to_espresso(info%ixc, longname, shortname) 959 write(unit,'(A,T24,A4," Exchange-Correlation functional")') longname, shortname 957 960 write(unit,'(F17.11,T24,A)') info%z_val, "Z valence" 958 961 write(unit,'(F17.11,T24,A)') 0.0, "Total energy" … … 1110 1113 end function ixc_description 1111 1114 1112 function ixc_to_espresso(ixc)1115 subroutine ixc_to_espresso(ixc, longname, shortname) 1113 1116 !-----------------------------------------------------------------------! 1114 1117 ! Returns a label to identify the xc model compatible with the codes ! 1115 1118 ! in the Quantum Espresso package. ! 1116 1119 !-----------------------------------------------------------------------! 1117 integer, intent(in) :: ixc 1118 character(22) :: ixc_to_espresso 1119 1120 integer, intent(in) :: ixc 1121 character(4), intent(out) :: shortname 1122 character(20), intent(out) :: longname 1123 1124 character(4) :: exch, corr, gradx, gradc 1125 1126 select case (ixc - (ixc/1000)*1000) 1127 case (0) 1128 exch = "NOX " 1129 gradx = "NOGX" 1130 case (XC_LDA_X) 1131 exch = "SLA " 1132 gradx = "NOGX" 1133 case (XC_GGA_X_B88) 1134 exch = "SLA " 1135 gradx = "B88 " 1136 case (XC_GGA_X_PW91) 1137 exch = "SLA " 1138 gradx = "GGX " 1139 case (XC_GGA_X_PBE) 1140 exch = "SLA " 1141 gradx = "PBX " 1142 case (XC_GGA_X_PBE_SOL) 1143 corr = "PW " 1144 gradc = "PSX " 1145 case (XC_GGA_X_PBE_R) 1146 exch = "SLA " 1147 gradx = "RPB " 1148 case (XC_GGA_X_WC) 1149 exch = "SLA " 1150 gradx = "WCX " 1151 case (XC_MGGA_X_TPSS) 1152 exch = "SLA " 1153 gradx = "TPSS" 1154 case default 1155 exch = " " 1156 gradx = " " 1157 end select 1158 1159 select case (ixc/1000) 1160 case (0) 1161 corr = "NOC " 1162 gradc = "NOGC" 1163 case (XC_LDA_C_PZ) 1164 corr = "PZ " 1165 gradc = "NOGC" 1166 case (XC_LDA_C_VWN) 1167 corr = "VWN " 1168 gradc = "NOGC" 1169 case (XC_LDA_C_PW) 1170 corr = "PW " 1171 gradc = "NOGC" 1172 case (XC_LDA_C_WIGNER) 1173 corr = "WIG " 1174 gradc = "NOGC" 1175 case (XC_LDA_C_HL) 1176 corr = "HL " 1177 gradc = "NOGC" 1178 case (XC_LDA_C_OB_PZ) 1179 corr = "OBZ " 1180 gradc = "NOGC" 1181 case (XC_LDA_C_OB_PW) 1182 corr = "OBW " 1183 gradc = "NOGC" 1184 case (XC_LDA_C_GL) 1185 corr = "GL " 1186 gradc = "NOGC" 1187 case (XC_GGA_C_PW91) 1188 corr = "PW " 1189 gradc = "GGC " 1190 case (XC_GGA_C_PBE) 1191 corr = "PW " 1192 gradc = "PBC " 1193 case (XC_GGA_C_P86) 1194 corr = "PZ " 1195 gradc = "P86 " 1196 case (XC_GGA_C_PBE_SOL) 1197 corr = "PW " 1198 gradc = "PSC " 1199 case (XC_MGGA_C_TPSS) 1200 corr = "PW " 1201 gradc = "TPSS" 1202 case default 1203 corr = " " 1204 gradc = " " 1205 end select 1206 1207 !Shorname 1120 1208 select case (ixc) 1121 case (XC_LDA_X + XC_LDA_C_PZ*1000) 1122 ixc_to_espresso = "SLA PZ NOGX NOGC" 1123 case (XC_LDA_X + XC_LDA_C_PW*1000) 1124 ixc_to_espresso = "SLA PW NOGX NOGC" 1209 case (XC_LDA_X) 1210 shortname = corr 1125 1211 case (XC_GGA_X_PBE + XC_GGA_C_PBE*1000) 1126 ixc_to_espresso = "SLA PW PBX PBC" 1212 shortname = "PBE" 1213 case (XC_GGA_X_B88 + XC_LDA_C_PZ*1000) 1214 shortname = "B88" 1215 case (XC_GGA_X_B88 + XC_GGA_C_P86*1000) 1216 shortname = "BP" 1217 case (XC_GGA_X_WC + XC_GGA_C_PBE*1000) 1218 shortname = "WC" 1219 case (XC_MGGA_X_TPSS + XC_MGGA_C_TPSS*1000) 1220 shortname = "TPSS" 1127 1221 case default 1128 ixc_to_espresso = " " 1129 end select 1130 1131 end function ixc_to_espresso 1222 shortname = " " 1223 end select 1224 1225 !Longname 1226 write(longname,'(4A5)') exch, corr, gradx, gradc 1227 1228 end subroutine ixc_to_espresso 1132 1229 1133 1230 end module ps_io -
trunk/src/ps_io.F90
r631 r708 932 932 integer :: values(8), i, ir, max_l 933 933 real(R8) :: xmin, zmesh 934 character(4) :: shortname 935 character(20) :: longname 934 936 935 937 call push_sub("upf_save") … … 971 973 write(unit,'(A5,T24,A)') "NC", "Norm - Conserving pseudopotential" 972 974 write(unit,'(L5,T24,A)') info%nlcc, "Nonlinear Core Correction" 973 write(unit,'(A22,T24,"Exchange-Correlation functional")') trim(ixc_to_espresso(info%ixc)) 975 call ixc_to_espresso(info%ixc, longname, shortname) 976 write(unit,'(A,T24,A4," Exchange-Correlation functional")') longname, shortname 974 977 write(unit,'(F17.11,T24,A)') info%z_val, "Z valence" 975 978 write(unit,'(F17.11,T24,A)') 0.0, "Total energy" … … 1131 1134 end function ixc_description 1132 1135 1133 function ixc_to_espresso(ixc)1136 subroutine ixc_to_espresso(ixc, longname, shortname) 1134 1137 !-----------------------------------------------------------------------! 1135 1138 ! Returns a label to identify the xc model compatible with the codes ! 1136 1139 ! in the Quantum Espresso package. ! 1137 1140 !-----------------------------------------------------------------------! 1138 integer, intent(in) :: ixc 1139 character(22) :: ixc_to_espresso 1140 1141 integer, intent(in) :: ixc 1142 character(4), intent(out) :: shortname 1143 character(20), intent(out) :: longname 1144 1145 character(4) :: exch, corr, gradx, gradc 1146 1147 select case (ixc - (ixc/1000)*1000) 1148 case (0) 1149 exch = "NOX " 1150 gradx = "NOGX" 1151 case (XC_LDA_X) 1152 exch = "SLA " 1153 gradx = "NOGX" 1154 case (XC_GGA_X_B88) 1155 exch = "SLA " 1156 gradx = "B88 " 1157 case (XC_GGA_X_PW91) 1158 exch = "SLA " 1159 gradx = "GGX " 1160 case (XC_GGA_X_PBE) 1161 exch = "SLA " 1162 gradx = "PBX " 1163 case (XC_GGA_X_PBE_SOL) 1164 corr = "PW " 1165 gradc = "PSX " 1166 case (XC_GGA_X_PBE_R) 1167 exch = "SLA " 1168 gradx = "RPB " 1169 case (XC_GGA_X_WC) 1170 exch = "SLA " 1171 gradx = "WCX " 1172 case (XC_MGGA_X_TPSS) 1173 exch = "SLA " 1174 gradx = "TPSS" 1175 case default 1176 exch = " " 1177 gradx = " " 1178 end select 1179 1180 select case (ixc/1000) 1181 case (0) 1182 corr = "NOC " 1183 gradc = "NOGC" 1184 case (XC_LDA_C_PZ) 1185 corr = "PZ " 1186 gradc = "NOGC" 1187 case (XC_LDA_C_VWN) 1188 corr = "VWN " 1189 gradc = "NOGC" 1190 case (XC_LDA_C_PW) 1191 corr = "PW " 1192 gradc = "NOGC" 1193 case (XC_LDA_C_WIGNER) 1194 corr = "WIG " 1195 gradc = "NOGC" 1196 case (XC_LDA_C_HL) 1197 corr = "HL " 1198 gradc = "NOGC" 1199 case (XC_LDA_C_OB_PZ) 1200 corr = "OBZ " 1201 gradc = "NOGC" 1202 case (XC_LDA_C_OB_PW) 1203 corr = "OBW " 1204 gradc = "NOGC" 1205 case (XC_LDA_C_GL) 1206 corr = "GL " 1207 gradc = "NOGC" 1208 case (XC_GGA_C_PW91) 1209 corr = "PW " 1210 gradc = "GGC " 1211 case (XC_GGA_C_PBE) 1212 corr = "PW " 1213 gradc = "PBC " 1214 case (XC_GGA_C_P86) 1215 corr = "PZ " 1216 gradc = "P86 " 1217 case (XC_GGA_C_PBE_SOL) 1218 corr = "PW " 1219 gradc = "PSC " 1220 case (XC_MGGA_C_TPSS) 1221 corr = "PW " 1222 gradc = "TPSS" 1223 case default 1224 corr = " " 1225 gradc = " " 1226 end select 1227 1228 !Shorname 1141 1229 select case (ixc) 1142 case (XC_LDA_X + XC_LDA_C_PZ*1000) 1143 ixc_to_espresso = "SLA PZ NOGX NOGC" 1144 case (XC_LDA_X + XC_LDA_C_PW*1000) 1145 ixc_to_espresso = "SLA PW NOGX NOGC" 1230 case (XC_LDA_X) 1231 shortname = corr 1146 1232 case (XC_GGA_X_PBE + XC_GGA_C_PBE*1000) 1147 ixc_to_espresso = "SLA PW PBX PBC" 1233 shortname = "PBE" 1234 case (XC_GGA_X_B88 + XC_LDA_C_PZ*1000) 1235 shortname = "B88" 1236 case (XC_GGA_X_B88 + XC_GGA_C_P86*1000) 1237 shortname = "BP" 1238 case (XC_GGA_X_WC + XC_GGA_C_PBE*1000) 1239 shortname = "WC" 1240 case (XC_MGGA_X_TPSS + XC_MGGA_C_TPSS*1000) 1241 shortname = "TPSS" 1148 1242 case default 1149 ixc_to_espresso = ""1243 shortname = " " 1150 1244 end select 1151 1245 1152 end function ixc_to_espresso 1246 !Longname 1247 write(longname,'(4A5)') exch, corr, gradx, gradc 1248 1249 end subroutine ixc_to_espresso 1153 1250 1154 1251 end module ps_io_m
Note: See TracChangeset
for help on using the changeset viewer.