| 5 | 1/1 | 返回列表 |
| 查看: 3511 | 回復(fù): 11 | ||
| 當(dāng)前只顯示滿足指定條件的回帖,點(diǎn)擊這里查看本話題的所有回帖 | ||
[求助]
fortran編譯 read出錯(cuò) 完畢
|
||
|
錯(cuò)誤提示 POSITION.F(31): error #6358: Constants and expressions are invalid in read-only I/O lists. [MSP] read(15,*) (msp(i),i=1,10) 前面msp有定義 character msp(10) read(15,*) (msp(i),i=1,10) 語法有問題嗎? 一下是全部程序 program getpos ccccccccc 12 is SPPARKS OUTPUT cccccccc ccccccccc 15 is the molecure ccccccccc ccccccccc 13 is OUTPUT ccccccccccc integer mnum nsp real coord(2000,3) real species(10,3) integer nsp(10) real x y z character tile cellp cella cellb cellz msp(10) open(12,file='POSCAR',status='old') open(15,file='POSCAR',status='old') open(13,file='CONTCAR',status='new') ccccccccccccccccccc sys param a b c cccccccccccccc read(12,*) tile write(13,*) tile read(12,*) cellp write(13,*) cellp read(12,*) cella ; write(13,*) cella read(12,*) cellb ; write(13,*) cellb read(12,*) cellc ; write(13,*) cellc read(15,*); read(15,*); read(15,*); read(15,*); read(15,*); cccccccccccccccccccc atom char ccccccccccccccccccccccc read(15,*) (msp(i),i=1,10) write(13,*) (msp(i),i=1,10) read(12,*); cccccccccccccccccccc atom num cccccccccccccccccccccccc read(12,*) mnum read(15,*) (nsp(i),i=1,10) DO i=1, 10 N_anum=mnum*nsp(i) write(13,N_anum) END DO read(12,*) read(15,*) write(13,*) 'R' cccccccccccccccc read molecue coord cccccccccccc DO i=1, mnum read(12,*) (coord(i,j),j=1,13) ENDDO close(12) cc DO j=1, 10 !!! species cyc !!!!!! DO i=1, nsp(j) !!! the j atom cyc !!!!!! read(15,*) x y z !!!!!!!!!!!!!!!!!!!!!!!! molecure coord !!!!!!!!!!!!! DO k=1, mnum nx=x+coord(k,1) ny=y+coord(k,2) nz=z+coord(k,3) write(13,*) nx ,ny ,nz ENDDO ENDDO ENDDO close(15) close(13) END [ Last edited by 賀儀 on 2011-8-23 at 14:53 ] |

至尊木蟲 (職業(yè)作家)
至尊木蟲 (職業(yè)作家)

至尊木蟲 (職業(yè)作家)
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 材料,紡織,生物(0856、0710),化學(xué)招生啦 +3 | Eember. 2026-03-17 | 9/450 |
|
|---|---|---|---|---|
|
[考研] 307求調(diào)劑 +3 | 冷笙123 2026-03-17 | 3/150 |
|
|
[考研] 302求調(diào)劑 +9 | 呼呼呼。。。。 2026-03-17 | 9/450 |
|
|
[考研] 274求調(diào)劑0856材料化工 +13 | z2839474511 2026-03-11 | 14/700 |
|
|
[考研] 290求調(diào)劑 +3 | p asserby. 2026-03-15 | 4/200 |
|
|
[考博] 26申博 +4 | 八旬速覽 2026-03-16 | 4/200 |
|
|
[考研] 289求調(diào)劑 +6 | 步川酷紫123 2026-03-11 | 6/300 |
|
|
[考研]
|
zhouzhen654 2026-03-16 | 3/150 |
|
|
[考研] 機(jī)械專碩325,尋找調(diào)劑院校 +3 | y9999 2026-03-15 | 5/250 |
|
|
[考研] 0703一志愿211 285分求調(diào)劑 +5 | ly3471z 2026-03-13 | 5/250 |
|
|
[考研] 一志愿華中師范071000,325求調(diào)劑 +6 | RuitingC 2026-03-12 | 6/300 |
|
|
[考研] 070305求調(diào)劑 +3 | mlpqaz03 2026-03-14 | 4/200 |
|
|
[考研] 材料與化工(0856)304求B區(qū)調(diào)劑 +6 | 邱gl 2026-03-12 | 7/350 |
|
|
[考研] [0860]321分求調(diào)劑,ab區(qū)皆可 +4 | 寶貴熱 2026-03-13 | 4/200 |
|
|
[考研] (081700)化學(xué)工程與技術(shù)-298分求調(diào)劑 +12 | 11啦啦啦 2026-03-11 | 35/1750 |
|
|
[考研] 281求調(diào)劑 +9 | Koxui 2026-03-12 | 11/550 |
|
|
[考研] 311求調(diào)劑 +3 | 冬十三 2026-03-13 | 3/150 |
|
|
[考研] 求調(diào)劑 +3 | 程雨杭 2026-03-12 | 3/150 |
|
|
[考研] 一志愿山大07化學(xué) 332分 四六級(jí)已過 本科山東雙非 求調(diào)劑! +3 | 不想理你 2026-03-12 | 3/150 |
|
|
[考研] 333求調(diào)劑 +3 | 152697 2026-03-12 | 4/200 |
|