| 3 | 1/1 | 返回列表 |
| 查看: 1340 | 回復(fù): 2 | |||
damao4361556鐵蟲 (正式寫手)
|
[交流]
PWSCF 算完能帶 和 dos 后的數(shù)據(jù) 如何轉(zhuǎn)換成origin 能打開的 格式? 已有1人參與
|
|
PWSCF 算完能帶 和 dos 后的數(shù)據(jù) 如何轉(zhuǎn)換成origin 能打開的 格式? 求分享 有關(guān)的小代碼 自帶的 plotband.x 等 感覺 不好用。 |
|
dos算完的結(jié)果是可以直接導(dǎo)入origin的,band算完的程序要用一個(gè)小程序轉(zhuǎn)換下。下面這個(gè)程序是我從小木蟲找到的。我改了下,有兩個(gè)輸入文件一個(gè)band.dat,還有一個(gè)ev寫費(fèi)米能級。 program prog real, allocatable :: e(:, ![]() real, allocatable :: k(:, ,dk( ,x(![]() real, dimension(3) ::k0,a real ev character(len=32):: xx, yy, zz,evv integer :: nbands, i, j, n, nk open(10, file='band.dat', status='old') open(22, file='ev', status='old') read(10,*) xx, yy, nbands, zz, nk read(22,*) evv read(evv,*) ev write(*,*)"nk=",nk allocate(k(nk,3)) allocate(e(nk,nbands)) allocate(dk(0:nk)) allocate(x(1:nk)) open(11,file='phoband.dat') do i=1,nk read(10,*) (k(i,j),j=1,3) read(10,*) (e(i,n),n=1,nbands) enddo do n=1,nk dk(0)=0 if (n.eq.1) then k0=k(n, endif a=k(n, -k0 dk(n)=dk(n-1)+sqrt(dot_product(a,a)) x(n)=dk(n) k0=k(n, enddo do i=1,nk write(11, 8888) x(i), (e(i,j)-ev,j=1,nbands) enddo 8888 format (1x, f9.4, 2x ,1000(f12.6,2x)) end program prog |
鐵蟲 (正式寫手)
|
你好 非常感謝您的回復(fù) 請問 為什么我這個(gè) 編譯總出錯(cuò)呢? 是直接 編譯 gfortran ***.f 嗎? [wl_903@hpc-login3 band]$ gfortran Getband.f Getband.f:1.2: program prog 1 Error: Non-numeric character in statement label at (1) Getband.f:1.2: program prog 1 Error: Unclassifiable statement at (1) Getband.f:2.31: real, allocatable :: e(:, 1 Error: Missing ')' in statement at or before (1) Getband.f:3.42: real, allocatable :: k(:, ,dk( ,x( 1 Error: Missing ')' in statement at or before (1) Getband.f:14.18: allocate(k(nk,3)) 1 Error: Syntax error in ALLOCATE statement at (1) Getband.f:15.18: allocate(e(nk,nbands)) 1 Error: Syntax error in ALLOCATE statement at (1) Getband.f:16.19: allocate(dk(0:nk)) 1 Error: Syntax error in ALLOCATE statement at (1) Getband.f:17.18: allocate(x(1:nk)) 1 Error: Syntax error in ALLOCATE statement at (1) Getband.f:20.16: read(10,*) (k(i,j),j=1,3) 1 Error: Expected variable in READ statement at (1) Getband.f:21.16: read(10,*) (e(i,n),n=1,nbands) 1 Error: Expected variable in READ statement at (1) Getband.f:26.11: dk(0)=0 1 Error: Unclassifiable statement at (1) Getband.f:28.72: k0=k(n, 1 Error: Syntax error in argument list at (1) Getband.f:30.72: a=k(n,-k0 1 Error: Syntax error in argument list at (1) Getband.f:31.12: dk(n)=dk(n-1)+sqrt(dot_product(a,a)) 1 Error: Statement function at (1) is recursive Getband.f:32.72: x(n)=dk(n) 1 Error: Unexpected STATEMENT FUNCTION statement at (1) Getband.f:33.72: k0=k(n, 1 Error: Syntax error in argument list at (1) Getband.f:38.6: 8888 format (1x, f9.4, 2x ,1000(f12.6,2x)) 1 Error: Bad continuation line at (1) Getband.f:38.6: 8888 format (1x, f9.4, 2x ,1000(f12.6,2x)) 1 Error: Unclassifiable statement at (1) Getband.f:39.22: end program prog 1 Error: Syntax error in END PROGRAM statement at (1) Error: Unexpected end of file in 'Getband.f' 需要當(dāng)前目錄存在兩個(gè)文件是嗎? 一個(gè) 是ev 里面的數(shù)據(jù)是費(fèi)米能級 另外一個(gè)是 band.dat 里面的內(nèi)容是 QE 算能帶后得到的? |
| 3 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 332求調(diào)劑 +6 | 蕉蕉123 2026-03-28 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 085701求調(diào)劑初試286分 +4 | secret0328 2026-03-28 | 4/200 |
|
|
[考研] 0856材料化工調(diào)劑 總分330 +11 | zhubinhao 2026-03-27 | 11/550 |
|
|
[考研] 一志愿北化085600材料專碩275|有文章專利|求調(diào)劑 +7 | Micky11223 2026-03-25 | 7/350 |
|
|
[考研] 329求調(diào)劑 +6 | 星野? 2026-03-26 | 6/300 |
|
|
[考研] 291求調(diào)劑 +15 | hhhhxn.. 2026-03-23 | 21/1050 |
|
|
[考研] 【求調(diào)劑】085601材料工程專碩 | 總分272 | +6 | 腳滑的守法公民 2026-03-27 | 6/300 |
|
|
[考研] 一志愿南京航空航天大學(xué)材料學(xué)碩求調(diào)劑 +3 | @taotao 2026-03-28 | 3/150 |
|
|
[考研] 266分求材料化工冶金礦業(yè)等專業(yè)的調(diào)劑 +4 | 哇呼哼呼哼 2026-03-26 | 4/200 |
|
|
[考研] 279 分 求調(diào)劑 +4 | 睡個(gè)好覺_16 2026-03-24 | 4/200 |
|
|
[考研] 085600,材料與化工321分,求調(diào)劑 +9 | 大饞小子 2026-03-27 | 9/450 |
|
|
[考研] 08開頭275求調(diào)劑 +4 | 拉誰不重要 2026-03-26 | 4/200 |
|
|
[考研] 298調(diào)劑 +3 | jiyingjie123 2026-03-27 | 3/150 |
|
|
[考研] 315調(diào)劑 +4 | 0860求調(diào)劑 2026-03-26 | 5/250 |
|
|
[考研] 351求調(diào)劑 +4 | 麥克阿磊 2026-03-24 | 4/200 |
|
|
[考研] 0703化學(xué)求調(diào)劑 +3 | 丹青奶蓋 2026-03-26 | 5/250 |
|
|
[考研] 一志愿河工大 081700 276求調(diào)劑 +4 | 地球繞著太陽轉(zhuǎn) 2026-03-23 | 4/200 |
|
|
[考研] 材料與化工328分調(diào)劑 +6 | 。,。,。,。i 2026-03-23 | 6/300 |
|
|
[考研] 機(jī)械學(xué)碩總分317求調(diào)劑。。。 +4 | Acaciad 2026-03-25 | 4/200 |
|
|
[考研] 一志愿武理085500機(jī)械專業(yè)總分300求調(diào)劑 +3 | an10101 2026-03-24 | 7/350 |
|