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

astringent

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


[½»Á÷] ¡¾ÇóÖú¡¿×Ó³ÌÐò´«Öµ³ö´í

ÎÒÔÚÖ÷³ÌÐòÖе÷ÓÃÁËÒ»¸ö×Ó³ÌÐòtest£¬È»ºóÔÙ×Ó³ÌÐòÖÐÓÖµ÷ÓÃÁËÒ»¸ö×Ó³ÌÐòtest1.ÔÚ×Ó³ÌÐòÖеÄwriteÓï¾ä¶¼Äܵõ½ihbnum=1£¬¿ÉÊÇÖ÷³ÌÐòwriteÓï¾äµÄihbnumÈ¥µÈÓÚ0£¬Çë´ó¼Ò°ïæ¿´¿´£¬ÏÈлÁË
program main
--
call test£¨a1,a2,----ihbnum1£©
write (*,*) ihbnum1
enddo
×Ó³ÌÐòΪ£º
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)
      character*3 resname(nattot)

      integer iat

      ia = 0

      do iat=1, nattot
             if((resname(iat).eq.'DC5'.or.resname(iat).eq.'DC ').and.&
               (atomname(iat).eq.' N1 '.or.atomname(iat).eq.' N4 '.or.&
               atomname(iat).eq.' N3 '.or.atomname(iat).eq.' O2 ')then
               call test1 &
                   (io,ih,iat,xxx,yyy,zzz,nattot,cell,ihbnum)
               if(ihbnum.eq.1)  then
               ia=iat
               write(21,*) 'test',ihbnum,ia
             endif
      enddo
      
      return
      end

subroutine test1 &
          (io,ih,iat,xxx,yyy,zzz,nattot,cell,ihbnum)
-------
            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*pi/180.0) then
                      call bondcalculation &
                         (ih,iat,xxx,yyy,zzz,nattot,cell,dx2,dy2,dz2,r2)
                        if (r2.lt.rhamax) then
                              ihbnum = 1
                        write(21,*) 'find',ihbnum,iat
                        endif
                   endif
           endif
                 
      return
      end
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:

» ÇÀ½ð±ÒÀ²£¡»ØÌû¾Í¿ÉÒԵõ½:

²é¿´È«²¿É¢½ðÌù

ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ykwang

½ð³æ (ÕýʽдÊÖ)


¡ï
astringent(½ð±Ò+1):лл²ÎÓë
astringent(½ð±Ò+5): 2010-11-23 06:21:13
astringent(½ð±Ò+5): 2010-11-29 15:55:59
Ö÷³ÌÐòwriteÓï¾äµÄihbnumµÈÓÚ0ÊÇÒòΪ×Ó³ÌÐòtestÔÚ×îºóÒ»²½Ñ­»·Öе÷ÓÃtest1ʱihbnumµÄ·µ»ØÖµÎª0¡£Èç¹ûÔÚ×Ó³ÌÐòtestÖÐ
   write(21,*) 'test',ihbnum,ia
ϼÓÉÏÏÂÁÐÌõ¼þ·µ»ØÓï¾ä
   IF(ihbnum.eq.1)THEN
        RETURN
    ENDIF
ÔòÖ÷³ÌÐòÖÐwriteÓï¾äµÄihbnum¾Í»áµÈÓÚ1¡£
2Â¥2010-11-23 06:06:52
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

astringent

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


ÔÙÎÊһϣ¬¶ÔÓÚ×Ó³ÌÐò£¬ÕâÁ½¸öwriteÓï¾äÊä³öµÄihbnumµÄÖµÊDz»ÊÇwrite£¨20£©ihbnum=1£¬¶øwrite£¨21£©µÄihbnum=0£¿
subroutine test1 &
          (io,ih,iat,xxx,yyy,zzz,nattot,cell,ihbnum)
-------
            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*pi/180.0) then
                      call bondcalculation &
                         (ih,iat,xxx,yyy,zzz,nattot,cell,dx2,dy2,dz2,r2)
                        if (r2.lt.rhamax) then
                              ihbnum = 1
                        write(20,*) 'find',ihbnum
                        endif
                   endif
           endif
          write(21,*) 'find',ihbnum     
      return
      end
3Â¥2010-11-23 06:32:40
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

ykwang

½ð³æ (ÕýʽдÊÖ)


´ÓÕâ¶Î³ÌÐò¿´£¬write(20,###)ÖÐдÈëµÄÒ»¶¨ÊÇihbnum=1£¬µ«write(21,###)ÖÐдÈëµÄihbnum³ýÁËihbnum=0Í⻹ÓÐihbnum=1¡£
4Â¥2010-11-23 06:42:52
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

astringent

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


ÒýÓûØÌû:
Originally posted by ykwang at 2010-11-23 06:06:52:
Ö÷³ÌÐòwriteÓï¾äµÄihbnumµÈÓÚ0ÊÇÒòΪ×Ó³ÌÐòtestÔÚ×îºóÒ»²½Ñ­»·Öе÷ÓÃtest1ʱihbnumµÄ·µ»ØÖµÎª0¡£Èç¹ûÔÚ×Ó³ÌÐòtestÖÐ
   write(21,*) 'test',ihbnum,ia
ÏÂ ...

i have tried use the return, but it does not work, how can i solve this?
6Â¥2010-11-23 19:20:11
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
¼òµ¥»Ø¸´
2010-11-23 08:02   »Ø¸´  
astringent(½ð±Ò+1):лл²ÎÓë
nono2009:×¨ÒµÇøÇëÎð¹àË®¡£Ð»Ð»£¡ 2010-11-25 07:35:16
astringent(½ð±Ò+3): 2010-11-29 15:56:24
×£¸£×£¸£
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ astringent µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] ¼ÆËã»úѧ˶£¬11408¿¼272·Ö£¬Çóµ÷¼Á£¬ÇëÎÊ»¹Äܵ÷¼Áµ½AÇøµÄ¼ÆËã»úѧ˶Â𣿠+3 ¾Ó´«Õñ 2026-03-20 3/150 2026-03-27 15:06 by nihaoar
[¿¼ÑÐ] 085600£¬²ÄÁÏÓ뻯¹¤321·Öµ÷¼Á +4 ´ó²öС×Ó 2026-03-27 6/300 2026-03-27 14:11 by ËÉ»¨¸×1201
[²ÄÁϹ¤³Ì] Ò»Ö¾Ô¸C9²ÄÁÏÓ뻯¹¤×¨Òµ×Ü·Ö300Çóµ÷¼Á +7 Âü111 2026-03-24 8/400 2026-03-27 13:53 by ÑîÑîÑî×Ï
[¿¼ÑÐ] Ò»Ö¾Ô¸±±¾©»¯¹¤´óѧ²ÄÁÏÓ뻯¹¤ 264·Ö¸÷¿Æ¹ýAÇø¹ú¼ÒÏß +10 ¹þ¹þ157349 2026-03-21 10/500 2026-03-27 13:06 by zzll406
[¿¼ÑÐ] 329Çóµ÷¼Á +4 ÐÇÒ°? 2026-03-26 4/200 2026-03-27 12:00 by ²»³Ôô~µÄ؈
[¿¼ÑÐ] ¿¼Ñе÷¼Á +10 ºôºô£¿~+123456 2026-03-24 10/500 2026-03-27 11:46 by wangjy2002
[¿¼ÑÐ] 0856²ÄÁÏ»¯¹¤µ÷¼Á ×Ü·Ö330 +8 zhubinhao 2026-03-27 8/400 2026-03-27 11:46 by Wushiqi17
[¿¼ÑÐ] ²ÄÁÏÓ뻯¹¤¿¼Ñе÷¼Á +16 ‹üÈA 2026-03-22 16/800 2026-03-27 11:23 by ÍõЦÓîÒ»¶¨ÊÇÑо
[ÂÛÎÄͶ¸å] Journal of Mechanical Science and Technology +3 Russ_ss 2026-03-25 5/250 2026-03-27 10:49 by ½С¹û»­´ó±ý
[¿¼ÑÐ] 0703»¯Ñ§338Çóµ÷¼Á£¡ +6 Zuhui0306 2026-03-26 7/350 2026-03-27 10:35 by shangxh
[¿¼ÑÐ] Çóµ÷¼Á +8 Auroracx 2026-03-22 8/400 2026-03-26 19:55 by ²»³Ôô~µÄ؈
[¿¼ÑÐ] 085602 289·ÖÇóµ÷¼Á +8 WWWÎ÷Î÷¸¥Ë¹ 2026-03-24 8/400 2026-03-26 16:33 by ²»³Ôô~µÄ؈
[¿¼ÑÐ] ²ÄÁÏÓ뻯¹¤304ÇóBÇøµ÷¼Á +3 Çñgl 2026-03-25 3/150 2026-03-25 19:03 by Ainin_
[¿¼ÑÐ] ÍøÂç¿Õ¼ä°²È«0839Õе÷¼Á +4 w320357296 2026-03-25 6/300 2026-03-25 17:59 by 255671
[¿¼ÑÐ] Ò»Ö¾Ô¸¼ªÁÖ´óѧ²ÄÁÏÓ뻯¹¤303·ÖÇóµ÷¼Á +4 Ϊѧ666 2026-03-24 4/200 2026-03-25 11:27 by BruceLiu320
[¿¼ÑÐ] 086003ʳƷ¹¤³ÌÇóµ÷¼Á +6 íµíµ111 2026-03-24 6/300 2026-03-25 10:29 by 3Strings
[¿¼ÑÐ] 318Çóµ÷¼Á +5 plumÀî×Ó 2026-03-21 8/400 2026-03-25 09:26 by aa331100
[¿¼ÑÐ] Çóµ÷¼Á +7 Ê®Èý¼ÓÓÍ 2026-03-21 7/350 2026-03-23 23:48 by ÈÈÇéɳĮ
[¿¼ÑÐ] 361Çóµ÷¼Á +3 Glack 2026-03-22 3/150 2026-03-23 22:03 by fuyu_
[¿¼ÑÐ] ÉúÎïѧµ÷¼Á +5 Surekei 2026-03-21 5/250 2026-03-22 14:39 by tcx007
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û