| 3 | 1/1 | 返回列表 |
| 查看: 1342 | 回復(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)米能級(jí)。 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ù) 請(qǐng)問 為什么我這個(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)米能級(jí) 另外一個(gè)是 band.dat 里面的內(nèi)容是 QE 算能帶后得到的? |
| 3 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 349求調(diào)劑 +6 | 李木子啊哈哈 2026-03-25 | 6/300 |
|
|---|---|---|---|---|
|
[考研] 2026年華南師范大學(xué)歡迎化學(xué),化工,生物,生醫(yī)工等專業(yè)優(yōu)秀學(xué)子加入! +3 | llss0711 2026-03-28 | 6/300 |
|
|
[考研] 0856求調(diào)劑 +13 | zhn03 2026-03-25 | 14/700 |
|
|
[碩博家園] 招收生物學(xué)/細(xì)胞生物學(xué)調(diào)劑 +4 | IceGuo 2026-03-26 | 5/250 |
|
|
[考研] 289求調(diào)劑 +13 | 新時(shí)代材料 2026-03-27 | 13/650 |
|
|
[考研] 0703化學(xué)調(diào)劑,求導(dǎo)師收 +9 | 天天好運(yùn)來上岸?/a> 2026-03-24 | 10/500 |
|
|
[考研] 346求調(diào)劑 一志愿070303有機(jī)化學(xué) +3 | 蘿卜燉青菜 2026-03-28 | 3/150 |
|
|
[考研] 299求調(diào)劑 +7 | 嗯嗯嗯嗯2 2026-03-27 | 7/350 |
|
|
[考研] 291求調(diào)劑 +15 | hhhhxn.. 2026-03-23 | 21/1050 |
|
|
[考研] 材料求調(diào)劑 一志愿哈工大總分298分,前三科223分 +5 | dongfang59 2026-03-27 | 5/250 |
|
|
[考研] 330一志愿中國海洋大學(xué) 化學(xué)工程 085602 有讀博意愿 求調(diào)劑 +3 | wywy.. 2026-03-27 | 4/200 |
|
|
[考研] 070300化學(xué)求調(diào)劑 +4 | 起個(gè)名咋這么難 2026-03-27 | 4/200 |
|
|
[考研] 283求調(diào)劑(080500) +4 | A child 2026-03-27 | 4/200 |
|
|
[碩博家園] 北京林業(yè)大學(xué)碩導(dǎo)招生廣告 +6 | kongweilin 2026-03-26 | 8/400 |
|
|
[考研] 284求調(diào)劑 +11 | junqihahaha 2026-03-26 | 12/600 |
|
|
[考研] 325求調(diào)劑 +5 | 李嘉圖·S·路 2026-03-23 | 5/250 |
|
|
[考研] 341求調(diào)劑 +7 | 青檸檬1 2026-03-26 | 7/350 |
|
|
[考研] 材料考研求調(diào)劑 +3 | Dendel 2026-03-23 | 6/300 |
|
|
[考研] 機(jī)械學(xué)碩總分317求調(diào)劑!。! +4 | Acaciad 2026-03-25 | 4/200 |
|
|
[考研] 一志愿河北工業(yè)大學(xué)0817化工278分求調(diào)劑 +7 | jhybd 2026-03-23 | 12/600 |
|