±±¾©Ê¯ÓÍ»¯¹¤Ñ§Ôº2026ÄêÑо¿ÉúÕÐÉú½ÓÊÕµ÷¼Á¹«¸æ
²é¿´: 1565  |  »Ø¸´: 1

astringent

Í­³æ (ÖøÃûдÊÖ)

[½»Á÷] ¡¾ÇóÖú¡¿ÔËÐгö´í ÒÑÓÐ1È˲ÎÓë

Çë´ó¼Ò°ïæ¿´¿´£¬ÎªÊ²Ã´ÔËÐÐʱ»á³öÏÖÕâ¸ö´íÎó£¿
At line 111 of file readmd.f90 (unit = 20, file = 'TRAJ1')
Fortran runtime error: I/O past end of record on unformatted file
ÁíÍâdo istep=1£¬nstepÕâ¸öÑ­»·ÓÐÎÊÌ⣬µ±nstep=1ʱÄÜÔËÐУ¬µ«µ±nstep=2ʱ¾Í³öÏÖÉÏÃæµÄ´íÎóÁË¡£ÏÂÃæÊÇÖ÷³ÌÐò
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)" avgnhb
          close(nout)
         end
»Ø¸´´ËÂ¥
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

astringent

Í­³æ (ÖøÃûдÊÖ)

ÏÂÃæÊǸ÷¸ö×Ó³ÌÐò
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)


      end subroutine read_pdb
2Â¥2010-11-16 03:21:38
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ astringent µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼²©] É격ÇóÖú +3 Reee1Llll 2026-04-01 3/150 2026-04-02 22:29 by ÕâÊÇÒ»¸öÎÞÁĵÄê
[»ù½ðÉêÇë] ÇëÎʹ²Í¬Í¨Ñ¶ºÍ¹²Í¬Ò»×÷µÄÈϿɶÈÎÊÌâ 10+4 psa1234 2026-04-01 9/450 2026-04-02 22:03 by god_tian
[¿¼ÑÐ] 295Çóµ÷¼Á +6 Ô¸ÂÃ;ÓÀԶ̹Ȼ 2026-04-02 6/300 2026-04-02 21:57 by macy2011
[¿¼ÑÐ] 342Çóµ÷¼Á +16 Mary Keen 2026-03-28 17/850 2026-04-02 21:14 by 690616278
[¿¼ÑÐ] 301Çóµ÷¼Á +4 ϸ°ûÏà¹Øµ°°× 2026-04-02 8/400 2026-04-02 16:30 by 271179835
[¿¼ÑÐ] ũѧ¿¼ÑÐÇóµ÷¼Á +3 dkdkxm 2026-04-01 3/150 2026-04-02 16:04 by wangjagri
[¿¼ÑÐ] Ò»Ö¾Ô¸085600ÖпÆÔºÄþ²¨Ëù276·ÖÇóµ÷¼Á +26 ²ÄÁÏѧ257Çóµ÷¼Á 2026-03-28 27/1350 2026-04-02 15:15 by chyhaha
[¿¼ÑÐ] 08¹¤¿ÆÇóµ÷¼Á290·Ö +5 1314Åõ»¨ 2026-04-02 8/400 2026-04-02 13:16 by ÇÇßÕßÕßÕ
[¿¼ÑÐ] 329Çóµ÷¼Á +8 miaodesi 2026-04-02 10/500 2026-04-02 10:24 by ²»³Ôô~µÄ؈
[¿¼ÑÐ] Ò»Ö¾Ô¸9³õÊÔ366 ±¾Ë«·ÇÇóµ÷¼Á +4 ÔËÆøÀ´µÃÈôÓÐËÆÎ 2026-04-02 4/200 2026-04-02 09:56 by guanxin1001
[¿¼ÑÐ] 295²ÄÁϹ¤³Ìר˶Çóµ÷¼Á +19 1428151015 2026-03-27 19/950 2026-04-01 22:34 by peike
[¿¼ÑÐ] 273Çóµ÷¼Á +19 ÀîÜÆÐÂ1 2026-03-31 19/950 2026-04-01 21:49 by chyhaha
[¿¼ÑÐ] Ò»Ö¾Ô¸ ÄϾ©º½¿Õº½Ìì´óѧ £¬080500²ÄÁÏ¿ÆÑ§Ó빤³Ìѧ˶ +7 @taotao 2026-03-30 7/350 2026-04-01 14:30 by chenqifeng666
[¿¼ÑÐ] ¡¾µ÷¼Á¡¿Ò»Ö¾Ô¸ÏôóÉúÎïÓëÒ½Ò©µ÷¼Á +3 EchoϺÃ× 2026-03-31 3/150 2026-04-01 08:40 by JourneyLucky
[¿¼ÑÐ] 353Çóµ÷¼Á +3 ½­ÉÏ·ã_26 2026-03-28 3/150 2026-03-31 15:53 by jp9609
[¿¼ÑÐ] 085404 22408 315·Ö +5 zhuangyan123 2026-03-31 6/300 2026-03-31 13:48 by limeifeng
[¿¼ÑÐ] 269Çóµ÷¼Á +4 ÎÒÏë¶ÁÑÐ11 2026-03-31 4/200 2026-03-31 10:04 by cal0306
[¿¼ÑÐ] 322Çóµ÷¼Á +10 ËÎÃ÷ÐÀ 2026-03-27 10/500 2026-03-30 18:47 by 544594351
[¿¼ÑÐ] 296Çóµ÷¼Á +10 ±Ë°¶t 2026-03-29 10/500 2026-03-30 10:50 by ̽123
[¿¼ÑÐ] µ÷¼Á¿¼ÑÐ +3 Íõ½ÜÒ» 2026-03-29 3/150 2026-03-29 08:09 by fmesaito
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û