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µÄ»ØÌû

snoopyzhao

ÖÁ×ðľ³æ (Ö°Òµ×÷¼Ò)

¡ï
ÓàÔó³É(½ð±Ò+1): лл²ÎÓëÓ¦Öú£¡ 2012-03-11 23:28:34
ÒýÓûØÌû:
18Â¥: Originally posted by zhaohuxian at 2012-03-09 10:48:48:
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.


±àÒëÊÇͨ¹ýÁË£¬µ«ÊÇÔËÐеÄʱºò³öÏÖÁËÕâ¸ödebugÐÅÏ¢ ...

ÕâÊÇÄã±àÒëÆ÷µÄÎÊÌâ°É£¬ÖÁÉÙÔÚÎÒÕâÀïûÓÐÈκÎÎÊÌ⣬µ±È»£¬ÎÒûÓа취ÔËÓÃËü£¬±ÏÒâȱÉÙ±ØÒªµÄÊäÈëÎļþ¡­¡­
19Â¥2012-03-09 12:14:43
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢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µÄ»ØÌû
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 284Çóµ÷¼Á +10 archer.. 2026-04-10 10/500 2026-04-10 18:26 by 1005715100
[¿¼ÑÐ] 311Çóµ÷¼Á +11 xypÏë¶ÁÊé 2026-04-10 12/600 2026-04-10 15:15 by solbeg
[¿¼ÑÐ] Ò»Ö¾Ô¸Î÷½»»úеר˶Çóµ÷¼Á +8 ÇóÉϰ¶µÄСÍõ 2026-04-10 8/400 2026-04-10 15:09 by hemengdong
[¿¼ÑÐ] һ־Ը³¶«´óѧ071000ÉúÎïѧѧ˶³õÊÔ·ÖÊý276Çóµ÷¼Á +20 Ľ¾øcc 2026-04-09 24/1200 2026-04-10 10:22 by xujun0624
[¿¼ÑÐ] 301Çóµ÷¼Á +4 XYPLR 2026-04-05 6/300 2026-04-10 09:17 by Delta2012
[¿¼ÑÐ] 275Çóµ÷¼Á +6 1624447980 2026-04-08 7/350 2026-04-10 08:06 by ̽123
[¿¼ÑÐ] 0703µ÷¼Á +18 ʰ¾ÁÒ¼ 2026-04-04 20/1000 2026-04-09 20:53 by zhouxiaoyu
[¿¼ÑÐ] µ÷¼Á +19 2261744733 2026-04-08 19/950 2026-04-09 19:11 by vgtyfty
[¿¼ÑÐ] 312Çóµ÷¼Á +3 Àîºè·É·É 2026-04-06 3/150 2026-04-09 17:32 by wp06
[¿¼ÑÐ] ÉúÎïѧѧ˶£¬³õÊÔ351·Ö£¬Çóµ÷¼Á +4 ¡­¡«¡¢Íõ¡­¡« 2026-04-08 5/250 2026-04-08 21:49 by limeifeng
[¿¼ÑÐ] 307·Ö²ÄÁÏרҵÇóµ÷¼Á +12 Hllºú 2026-04-05 12/600 2026-04-08 16:33 by luoyongfeng
[¿¼ÑÐ] »¯Ñ§0703-Ò»Ö¾Ô¸211-338·ÖÇóµ÷¼Á +10 vants 2026-04-05 11/550 2026-04-08 16:02 by screening
[¿¼ÑÐ] ũѧ£¬Çóµ÷¼Á£¬314·Ö +4 ·Ã¿Í¼Ç¼¿É°® 2026-04-04 4/200 2026-04-07 21:07 by µÈ°¶
[¿¼ÑÐ] 334·Ö»úеר˶Çóµ÷¼Á +3 µ°»¨×ϲËÌÀ 2026-04-03 3/150 2026-04-07 14:49 by åÐÒ£cocoa
[¿¼ÑÐ] 307Çóµ÷¼Á +3 Youth@@ 2026-04-07 3/150 2026-04-07 09:25 by СºÚ²»ÅÂÄÑ
[¿¼ÑÐ] »¯Ñ§357·Ö£¬¿¼Ñе÷¼Á +11 .Starry. 2026-04-04 12/600 2026-04-06 06:28 by houyaoxu
[¿¼ÑÐ] 326Çóµ÷¼Á +3 ¹ËÈô¸¡Éú 2026-04-05 3/150 2026-04-05 18:32 by À¶ÔÆË¼Óê
[¿¼ÑÐ] ÉúÎïѧ308·ÖÇóµ÷¼Á£¨Ò»Ö¾Ô¸»ª¶«Ê¦´ó£© +8 ÏàÐűػá¹ââÍòÕ 2026-04-05 10/500 2026-04-05 12:19 by Hdyxbekcb
[¿¼ÑÐ] ²ÄÁϵ÷¼Á +7 dxyµ÷¼Á 2026-04-04 7/350 2026-04-05 09:15 by İÇï26
[¿¼ÑÐ] 283·ÖÇóµ÷¼Á +7 СÄô°®Ñ§Ï° 2026-04-03 7/350 2026-04-04 21:51 by hemengdong
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û