| 查看: 2730 | 回复: 6 | |||
astringent铜虫 (著名写手)
|
[交流]
【求助】在编译时出错已有5人参与
|
|
when i execute the program, the following error appear: At line 111 of file readmd.f90 (unit = 20, file = 'TRAJ1') Fortran runtime error: I/O past end of record on unformatted file How can solve this, please help me, thanks. |
» 猜你喜欢
博士读完未来一定会好吗
已经有24人回复
导师想让我从独立一作变成了共一第一
已经有9人回复
到新单位后,换了新的研究方向,没有团队,持续积累2区以上论文,能申请到面上吗
已经有11人回复
读博
已经有4人回复
JMPT 期刊投稿流程
已经有4人回复
心脉受损
已经有5人回复
Springer期刊投稿求助
已经有4人回复
小论文投稿
已经有3人回复
申请2026年博士
已经有6人回复
» 本主题相关价值贴推荐,对您同样有帮助:
msi2lmp导入MS模型进入lammps时出错“bash: msi2lmp.exe: command not found”
已经有0人回复
VASP5.2编译出错求助 恳请指点!不胜感激~
已经有2人回复
【求助】紧急求助FORTRAN运行问题
已经有2人回复
【求助】Siesta安装报错
已经有3人回复
【求助】VASP计算出错--新年第一帖
已经有1人回复
【求助】molden编译出错,求指点
已经有1人回复
【求助】科研需要,请人编两个关于一维radial distribution function matlab小程序
已经有1人回复
【求助】请教一个赋值的问题【已完结】
已经有3人回复
【求助】编译Abinit6.4.1出错
已经有5人回复
【求助】linux系统下编制程序后,在链接生成可执行文件时出错怎么回事?
已经有1人回复
【整理】《提问的智慧》——献给那些不会提问的人
已经有78人回复
【求助】FORTRAN中增加计算区域后出错,
已经有5人回复
【求助】VASP编译出错
已经有5人回复
【求助】vasp安装问题
已经有27人回复
【求助】mkl+ifort+openmpi+siesta3.并行安装出错
已经有8人回复
【neweroica个人文集】最新版vaspmo (v0.1) ――可视化VASP分子轨道
已经有103人回复

2楼2010-11-15 22:02:38
astringent
铜虫 (著名写手)
- 应助: 16 (小学生)
- 金币: 2210.7
- 散金: 1233
- 红花: 4
- 帖子: 1180
- 在线: 354.8小时
- 虫号: 900839
- 注册: 2009-11-12
- 专业: 理论和计算化学
|
这个是源文件 open(nin,file='TRAJ1',status='old',form & ='unformatted') open(nout,file='csbw.out') do istep=1, nstep call readmdinit (mdtype,nin) call readmd & (mdtype,nattot,nin,atomname,xxx,yyy,zzz,cell) ! loop over all waters do i=1, nattot if (('atomname'.eq.'O').and.('resname'.eq.'WAT')) then io = i ih1 = io+1 ih2 = io+2 call test & (io,ih1,ia1,xxx,yyy,zzz,nattot,cell,atomname,resname,ihbnum) if (ihbnum.eq.1) then acc(j)=ia1 call test & (io,ih2,ia2,xxx,yyy,zzz,nattot,cell, & atomname,resname,ihbnum) if (ihbnum.eq.1) then if (resindex(ia1).eq.resindex(ia2)+1 & .or. resindex(ia1).eq. resindex(ia2)-1) then write(*,*) 'not find a cswb' else write(*,*) 'find a cswb' nhb=nhb+1 endif endif endif endif enddo sum=sum+nhb do j=1,nattot write (nout,"('acceptor is',i2)" acc(j)enddo enddo avgnhb=sum/nstep write (nout,"('avergaed number is',i2)" avgnhbclose(nout) end |
3楼2010-11-16 03:01:44
astringent
铜虫 (著名写手)
- 应助: 16 (小学生)
- 金币: 2210.7
- 散金: 1233
- 红花: 4
- 帖子: 1180
- 在线: 354.8小时
- 虫号: 900839
- 注册: 2009-11-12
- 专业: 理论和计算化学
|
astringent 新虫 (小有名气) 程序强帖: 0 金币: 72.5 帖子: 112 在线: 14.9小时 虫号: 900839 注册: 2009-11-12 状态: 在线 下面是各个子程序 subroutine findhbond & (io,ih,iat,xxx,yyy,zzz,nattot,cell,ihbnum) implicit none include 'constants.h' integer io,ih,iat,nattot,ihbnum double precision xxx(nattot),yyy(nattot),zzz(nattot) double precision cell(3) double precision theta,thetamax,roamax,rhamax double precision dx0,dy0,dz0,r0 double precision dx1,dy1,dz1,r1 double precision dx2,dy2,dz2,r2 thetamax = 30.d0 roamax = 3.5d0 rhamax = 2.45d0 ihbnum = 0 call bondcalculation(io,ih,xxx,yyy,zzz,nattot,cell,dx0,dy0,dz0,r0) call bondcalculation(io,iat,xxx,yyy,zzz,nattot,cell,dx1,dy1,dz1,r1) if (r1.lt.roamax) then theta = dacos(dx0*dx1+dy0*dy1+dz0*dz1) if(theta.lt.thetamax) then call bondcalculation & (ih,iat,xxx,yyy,zzz,nattot,cell,dx2,dy2,dz2,r2) if (r2.lt.rhamax) then ihbnum = 1 endif endif endif return end subroutine test & (io,ih,ia,xxx,yyy,zzz,nattot,cell,atomname,resname,ihbnum) implicit none include 'constants.h' integer io,ih,ia,nattot,ihbnum double precision xxx(nattot),yyy(nattot),zzz(nattot) double precision cell(*) character*4 atomname(nattot),resname(nattot) integer iat ia = 0 ihbnum = 0 do iat=1, nattot if((('resname'.eq.'DC5').or.('resname'.eq.'DC')).and.& ('atomname'.eq.'N1'.or.'atomname'.eq.'N4'.or.'atomname'.eq.'N3'& &.or.'atomname'.eq.'O2')) then call findhbond & (io,ih,iat,xxx,yyy,zzz,nattot,cell,ihbnum) elseif (('resname'.eq.'DG3'.or.'resname'.eq.'DG').and.& &('atomname'.eq.'N9'.or.'atomname'.eq.'N7'.or.'atomname'.eq.& &'O6'.or.'atomname'.eq.'N1'.or.'atomname'.eq.'N2'& &.or.'atomname'.eq.'N3')) then call findhbond & (io,ih,iat,xxx,yyy,zzz,nattot,cell,ihbnum) elseif (('resname'.eq.'DA').and.('atomname'.eq.'N9'.or.& 'atomname'.eq.'N7'.or.'atomname'.eq. & 'N6'.or.'atomname'.eq.'N1'& &.or.'atomname'.eq.'N3')) then call findhbond & (io,ih,iat,xxx,yyy,zzz,nattot,cell,ihbnum) elseif (('resname'.eq.'DT').and.('atomname'.eq.'N1'.or. & 'atomname'.eq.'O4'.or.'atomname' & .eq.'N3'.or.'atomname'.eq.'O2')) then call findhbond & (io,ih,iat,xxx,yyy,zzz,nattot,cell,ihbnum) endif if (ihbnum.eq.1) then ia=iat endif enddo return end subroutine bondcalculation & (i1,i2,xxx,yyy,zzz,nattot,cell,dx,dy,dz,roh) implicit none integer i1,i2,nattot double precision xxx(nattot),yyy(nattot),zzz(nattot) double precision cell(3),dx,dy,dz double precision xo,yo,zo,xh,yh,zh,roh xo = xxx(i1) yo = yyy(i1) zo = zzz(i1) xh = xxx(i2) yh = yyy(i2) zh = zzz(i2) dx = xh - xo dy = yh - yo dz = zh - zo dx = dx - anint(dx/cell(1))*cell(1) dy = dy - anint(dy/cell(2))*cell(2) dz = dz - anint(dz/cell(3))*cell(3) roh = dsqrt(dx**2+dy**2+dz**2) dx = dx / roh dy = dy / roh dz = dz / roh return end subroutine readmd & (mdtype,nattot,nin,atomname,xxx,yyy,zzz,cell) implicit none integer mdtype,nattot,nin double precision :: xxx(nattot),yyy(nattot),zzz(nattot) real*4 :: x_dcd(nattot),y_dcd(nattot),z_dcd(nattot) double precision cell(3) character*4 atomname(nattot) integer iatm,i double precision xtable(6) integer ::npdb=70 if (mdtype.eq.0) then ! original TINKER read(nin,*) do iatm=1, nattot read(nin,'(i6,2x,a2,x,3f12.6)')i,atomname(iatm),xxx(iatm),& yyy(iatm),zzz(iatm) enddo elseif (mdtype.eq.1) then ! modified TINKER read(nin,*) read(nin,*) do iatm=1, nattot read(nin,'(a2,9x,6f12.4)')atomname(iatm),xxx(iatm), & yyy(iatm), zzz(iatm) enddo elseif ((mdtype.eq.2).or.(mdtype.eq.3)) then ! DLPOLY read(nin,*) read(nin,*) read(nin,*) read(nin,*) do iatm=1, nattot read(nin,'(a2,x,6f10.5)')atomname(iatm),xxx(iatm), & yyy(iatm), zzz(iatm) enddo elseif (mdtype.eq.4) then ! Orsay - FX COUDERT read(nin,*) read(nin,*) do iatm=1, nattot read(nin,'(2x,a2,6x,3f14.5)')atomname(iatm),xxx(iatm),& yyy(iatm),zzz(iatm) enddo elseif (mdtype.eq.5) then ! xyz read(nin,*) read(nin,*) do iatm=1, nattot read(nin,'(a2,8x,3f12.4)')atomname(iatm),xxx(iatm),& yyy(iatm),zzz(iatm) enddo elseif (mdtype.eq.6) then ! dcd binary read(nin) (xtable(i),i=1,6) read(nin) (x_dcd(i),i=1,nattot) read(nin) (y_dcd(i),i=1,nattot) read(nin) (z_dcd(i),i=1,nattot) cell(1)=xtable(1) cell(2)=xtable(3) cell(3)=xtable(6) OPEN(npdb,file='system.pdb',status='old') call read_pdb(atomname,npdb,nattot) CLOSE(npdb) ! send from single precision to double do i=1,nattot xxx(i)=x_dcd(i) yyy(i)=y_dcd(i) zzz(i)=z_dcd(i) enddo endif return end subroutine readmdinit(mdtype,nin) implicit none integer mdtype,nin ! local variables -------------- integer ntitle,nset,istart,icntrl(6),jcntrl(9) character*80 title(10) character*4 hdr double precision delta integer i,nfr,dfr,natms if (mdtype.eq.3) then read(nin,*) read(nin,*) elseif(mdtype.eq.6) then read(nin) hdr,nfr,istart,dfr,(icntrl(i),i=1,6),delta,(jcntrl(i) & ,i=1,9) read(nin) ntitle,(title(i),i=1,ntitle) read(nin) natms endif return end subroutine read_pdb(atomname,n,nattot) integer ::n,nattot character(len=4),dimension(nattot),intent(inout) ::atomname character(len=4),dimension(nattot) ::resname character(len=4),dimension(nattot) ::itmp integer,dimension(nattot) ::resindex,label !--- local variables ------------------- integer :: i do i=1,nattot read(n,1000,err=20,end=20) itmp,label(i),atomname(i),resname(i),& resindex(i) enddo 20 CONTINUE 1000 format(3x,a4,6x,i5,a4,x,a4,3x,i5) |
4楼2010-11-16 03:22:17
5楼2010-11-17 02:03:42

6楼2010-11-20 20:39:35
yangdafaok
铁杆木虫 (正式写手)
- 应助: 0 (幼儿园)
- 金币: 5636.3
- 散金: 365
- 红花: 10
- 帖子: 544
- 在线: 481.9小时
- 虫号: 957902
- 注册: 2010-02-28
- 性别: GG
- 专业: 可再生与替代能源利用中的

7楼2010-11-20 20:47:24













回复此楼
acc(j)