Znn3bq.jpeg
²é¿´: 2199  |  »Ø¸´: 18
µ±Ç°Ö»ÏÔʾÂú×ãÖ¸¶¨Ìõ¼þµÄ»ØÌû£¬µã»÷ÕâÀï²é¿´±¾»°ÌâµÄËùÓлØÌû

zhaohuxian

ľ³æ (ÕýʽдÊÖ)

[ÇóÖú] Çë´óÏÀ°ïæ¿´Ò»ÏÂÏÂÃæµÄ ³ÌÐò

program angle

        !Define the parameters

      implicit real*8(a-h,o-z)
      parameter (x=10000)
      parameter (y=10000)
      parameter (radtodeg=57.29577951d0)

        integer i, j, atomkind, lower, upper
        integer iatom(x)


      dimension rv(3,3),temp(6)
      dimension dx(x,y), dy(x,y), dz(x,y)

      character(len=132) line, system
      character*4 lable(x), latom(x,y)

      double precision lattice

      logical eof, con, out

        eof=.false.
        con=.false.
        out=.false.

        ! Check the required files
       
        inquire(file='OUTCAR',exist=out)
        inquire(file='CONTCAR',exist=con)

        if (.not. out) then
        print *, "OUTCAR: file not exist."
        stop
        end if

        if (.not. con) then
        print *, "CONTCAR: file not exist."
        stop
        end if

        ! Read the species in OUTCAR

        open(unit=out,file='OUTCAR',status='OLD')
        atomkind=0
        do while(.not.eof)
          read(out,*,end=10) line
          if(index(line,'VRHFIN').ne.0) then
            atomkind=atomkind+1
            upper=index(line,':')-1
            lower=index(line,'=')+1
            lable(atomkind)=line(lower:upper)
          end if
        end do
        close(out)
10        continue

      ! Read POSCAR to process lattice information and amount of each kind

        open(unit=con,file='CONTCAR',status='OLD')
        read(con,*,end=20) system
        read(con,*,end=20) lattice
        read(con,*,end=20) rv(1,1), rv(2,1), rv(3,1)
        read(con,*,end=20) rv(1,2), rv(2,2), rv(3,2)
        read(con,*,end=20) rv(1,3), rv(2,3), rv(3,3)
        read(con,*,end=20), (iatom(i), i=1,atomkind)

        ! Process the label list
        do i=1,atomkind
          do j=1,iatom(i)
             latom(j,i)=lable(i)
          end do
        end do

        do i=1,3
          temp(i)=0.0
          do j=1,3
            temp(i)=temp(i)+rv(j,i)**2
          end do
          temp(i)=sqrt(temp(i))
        end do
        a=temp(1)
        b=temp(2)
        c=temp(3)

        do i=1,3
          temp(3+i)=0.0
        end do

        do j=1,3
          temp(4)=temp(4)+rv(j,2)*rv(j,3)
          temp(5)=temp(5)+rv(j,1)*rv(j,3)
          temp(6)=temp(6)+rv(j,1)*rv(j,2)
        end do
        temp(4)=temp(4)/(temp(2)*tem(3))
        temp(5)=temp(5)/(temp(1)*tem(3))
        temp(6)=temp(6)/(temp(1)*tem(2))

        alpha=radtodeg*acos(temp(4))
        beta=radtodeg*acos(temp(5))
        gamma=radtodeg*acos(temp(6))

20    continue
      
      ! Open file for record, and write

        open (11,file=opsition)
        write(11,300) system
        write(11,300) "lattice lengths: "
        write(11,300) "a=", a
        write(11,300) "b=", b
        write(11,300) "c=", c
        write(11,300) "lattice angles: "
        write(11,300) "alpha=", alpha
        write(11,300) "beta=", beta
        write(11,300) "gamma=", gamma

        close(con)


        ! Read OUTCAR to process the coordinates

        open(unit=out,file='OUTCAR',status='OLD')
        do while(.not.eof)
          read(out,*,end=30) line
          if (index(line,'POSITION').ne.0) then
          read(out,*,end=30) line
          
            do i=1,atomkind
              do j=1,iatom(i)
                read(out,*,end=30) dx(j,i), dy(j,i), dz(j,i)
                write(11,300) latom(j,i), dx(j,i), dy(j,i), dz(j,i)
              end do
            end do

          end if
        end do
        close(out)
30    continue
      
300        format(a4,1x,3f15.9,1x,a4,1x,i4,2(1x,a2),1x,f8.4,1x,i4)

        stop
      end

±àÒëͨ¹ýÁË£¬µ«ÊÇÔÆÐĵÄʱºò±¨´í£º

--------------------Configuration: adf - Win32 Debug--------------------
Linking...
main.obj : error LNK2001: unresolved external symbol _TEM@4
Debug/adf.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

ÀàËÆµÄÁíÍâÒ»¸ö³ÌÐòÔËÐÐûÓÐÎÊÌâ
»Ø¸´´ËÂ¥

» ²ÂÄãϲ»¶

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

sxf2012

ľ³æ (ÕýʽдÊÖ)

ÉùÃ÷x,yΪÕûÊýÀàÐÍ
integer,parameter :: x = 1000
integer,parameter :: y = 1000
12Â¥2012-03-09 08:58:31
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
²é¿´È«²¿ 19 ¸ö»Ø´ð

lurencyj

ľ³æ (ÖøÃûдÊÖ)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï ¡ï
¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
jjdg(½ð±Ò+1): ¸ÐлӦÖú 2012-03-08 01:56:17
zhaohuxian(½ð±Ò+30): ¡ïÓаïÖú 2 2012-03-08 09:01:51
²»ÖªµÀÂ¥Ö÷ÊÇÔõôдµÄ³ÌÐò£¬gfortran±àÒ룬һ´ó¶ÑError£¡
ºÜÅ®×Ӻܹ­Ëä´ó
2Â¥2012-03-07 21:23:48
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

zhaohuxian

ľ³æ (ÕýʽдÊÖ)

ÒýÓûØÌû:
Â¥: Originally posted by lurencyj at 2012-03-07 21:23:48:
²»ÖªµÀÂ¥Ö÷ÊÇÔõôдµÄ³ÌÐò£¬gfortran±àÒ룬һ´ó¶ÑError£¡

²»ºÃÒâ˼£¬ÎÒÒ²ÊǵÚÒ»´Îд³ÌÐò£¬ÎÒÊÇÓÃCVF 6.5±àÒëͨ¹ýµÄ
²»ÖªµÀÄÄÀïÓÐÎÊÌ⣬лл
3Â¥2012-03-07 21:29:07
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

uboat

Òø³æ (³õÈëÎÄ̳)

¡¾´ð°¸¡¿Ó¦Öú»ØÌû

¡ï
¸Ðл²ÎÓ룬ӦÖúÖ¸Êý +1
jjdg(½ð±Ò+1): ¸ÐлӦÖú 2012-03-08 01:56:28
temp(4)=temp(4)/(temp(2)*tem(3))
        temp(5)=temp(5)/(temp(1)*tem(3))
        temp(6)=temp(6)/(temp(1)*tem(2))

¿´×îºóµÄ´íÎóÌáʾ Ó¦¸ÃÊÇÕâÀïµÄ´íÎó
ÀïÃæÃ»Óж¨ÒåtemµÄ±äÁ¿
Â¥Ö÷ºÃºÃµÄ¿´¿´
4Â¥2012-03-07 22:25:17
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] ÖпÆÔº×Ü·Ö315Çóµ÷¼Á +7 lallalh 2026-04-09 7/350 2026-04-10 15:07 by Kilig0317
[¿¼ÑÐ] 347²ÄÁÏר˶Çóµ÷¼Á +19 zj8215216 2026-04-06 19/950 2026-04-10 09:36 by 690616278
[¿¼ÑÐ] 0703»¯Ñ§ +31 ÄÝÄÝninicgb 2026-04-04 35/1750 2026-04-09 21:06 by zhouxiaoyu
[¿¼ÑÐ] 289Çóµ÷¼Á +4 L1ttleTiger 2026-04-04 4/200 2026-04-09 19:53 by xiayizhi
[¿¼ÑÐ] 085600²ÄÁÏÓ뻯¹¤301·ÖÇóµ÷¼ÁԺУ +33 ´ÌÍ´jk 2026-04-06 34/1700 2026-04-09 18:31 by hy861222
[¿¼ÑÐ] Ò»Ö¾Ô¸Öйú¿ÆÑ§ÔºÉϺ£ÓлúËù£¬Óлú»¯Ñ§356·ÖÕÒµ÷¼Á +11 Nadiums 2026-04-09 11/550 2026-04-09 18:04 by lijunpoly
[¿¼ÑÐ] 348Çóµ÷¼Á +3 candyyyi 2026-04-09 3/150 2026-04-09 17:20 by ¶ÎΰÑÞ
[¿¼ÑÐ] 070300»¯Ñ§Ñ§Ë¶311·ÖÇóµ÷¼Á +18 Áº¸»¹óÏÕÖÐÇó 2026-04-04 20/1000 2026-04-09 11:18 by ßÕßÕßÕßÉßÉßÉ
[¿¼ÑÐ] Çóµ÷¼Á +8 ³Ô¿Ú±ù¼¤Áè 2026-04-07 8/400 2026-04-09 08:03 by 5268321
[¿¼ÑÐ] »¯Ñ§0703-Ò»Ö¾Ô¸211-338·ÖÇóµ÷¼Á +10 vants 2026-04-05 11/550 2026-04-08 16:02 by screening
[¿¼ÑÐ] 285Çóµ÷¼Á +7 ¶ñ·¨´ó¶þµÄÆøÎ¶ß 2026-04-05 10/500 2026-04-08 14:34 by zhq0425
[¿¼ÑÐ] 277¡¢Ñ§Ë¶£¬Çóµ÷¼Á ÊýÒ»104£¬ +11 Æ¿×ÓPZ 2026-04-07 12/600 2026-04-07 23:30 by Ò»Ö»ºÃ¹û×Ó?
[¿¼ÑÐ] 323Çóµ÷¼Á +3 ÁÖzlu 2026-04-07 4/200 2026-04-07 23:21 by lbsjt
[¿¼ÑÐ] ÉúÎ﹤³ÌÇóµ÷¼Á +13 ϲ»¶»¹ÊDz»¸ÊÐÄ 2026-04-05 13/650 2026-04-07 16:55 by Ecowxq666£¡
[¿¼ÑÐ] 081700£¬311£¬Çóµ÷¼Á +17 ¶¬Ê®Èý 2026-04-04 18/900 2026-04-07 12:50 by Sammy2
[¿¼ÑÐ] 327¿¼Ñе÷¼ÁÍÆ¼ö +6 ÎØÎØÎØÎØÄØ 2026-04-06 6/300 2026-04-06 21:39 by à£à£à£0119
[¿¼ÑÐ] 085405Èí¼þ¹¤³Ì301·ÖÇóµ÷¼Á£¬×¨Ë¶¿É¿çרҵ£¬ËÄÁù¼¶Òѹý +3 ¾²¾²ÏëÏë 2026-04-05 3/150 2026-04-06 15:23 by nepu_uu
[¿¼ÑÐ] Ò»Ö¾Ô¸°²»Õij211 0703»¯Ñ§×Ü·Ö339Çóµ÷¼Á +7 Íí·ç²»Íí 2026-04-04 7/350 2026-04-06 14:06 by houyaoxu
[¿¼ÑÐ] 331Çóµ÷¼Á +8 ÓÚÕ÷yz 2026-04-05 8/400 2026-04-06 00:54 by fmesaito
[¿¼ÑÐ] 288Çóµ÷¼Á£¬Ò»Ö¾Ô¸»ªÄÏÀí¹¤´óѧ071005 +6 ioodiiij 2026-04-04 6/300 2026-04-05 10:09 by guoweigw
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û