我做的是金属间化合物的表面催化裂解,表面取得是111,构建7层原子和真空层后需要用VASP进行弛豫,以取得稳定结构,但遇到的难题是如何将生成的CONCAR导入到MS中,好像可以用Compaq Visual Fortran这个编译器实现,但由于没学过Fortan语言,不会编程,找到的一些编好的程序也看不懂,下面贴出程序以及CONCAR,还请大师们帮我解释下程序的大致内容,以及那些需要修改的地方,不胜感激!!!
MODULE PREC
INTEGER, PARAMETER :: q =SELECTED_REAL_KIND(10)
INTEGER, PARAMETER :: qs=SELECTED_REAL_KIND(5)
END MODULE
program constucture_of_supercell
USE PREC
real(q) deta_d(151)
real(q) pos(151,3),pos_extend(151,3),pos1(151,3)
real(q) a1,a2,a3,b1,b2,b3,c1,c2,c3,a,x,y,z
integer atom_num,supercellnum_a,supercellnum_b,supercellnum_c
integer pos_num,flag
integer atom_num1,atom_num2,atom_num3,atom_num4,atom_begin,
& atom_end
character*10 temp,temp_Coordination
supercellnum_a=1
supercellnum_b=1
supercellnum_c=1
pos_num=1
flag=1
open(1,file='4.txt',status='old')
open(2,file='visions-2.xyz',status='unknown')
open(3,file='deta.out',status='unknown')
write(*,*) "dasafa"
read(1,*) temp
read(1,*) a
read(1,*) a1,a2,a3
read(1,*) b1,b2,b3
read(1,*) c1,c2,c3
! read(1,*) temp
read(1,*) atom_num1,atom_num2,atom_num3 !,atom_num4
read(1,*) temp_Coordination
write(*,*) "2dasafa"
atom_num=atom_num1+atom_num2+atom_num3+atom_num4
write(2,*) (atom_num*supercellnum_a*supercellnum_b*
& supercellnum_c)
write(*,*) "3dasafa"
write(2,*) "nomame"
do i=1,atom_num
read(1,*) x,y,z
write(*,*) x,y,z,i
pos(i,1)=x
pos(i,2)=y
pos(i,3)=z
pos1(i,1)=x
pos1(i,2)=y
pos1(i,3)=z
enddo
do i=1,atom_num-1
deta_d(i)=(pos(atom_num-i+1,3)*8-pos(atom_num-i,3)*8-
&8.574929257125441E-002)/8.574929257125441E-002
enddo
if((temp_Coordination(1:1).EQ.'D').OR.
& (temp_Coordination(1:1).EQ.'d'))then
write(*,*) "This points denote by direct coordinates!"
write(*,*) "convert to cartsian:"
do i=1,atom_num
pos1(i,1)=pos(i,1)*a1+pos(i,2)*b1+pos(i,3)*c1
pos1(i,2)=pos(i,1)*a2+pos(i,2)*b2+pos(i,3)*c2
pos1(i,3)=pos(i,1)*a3+pos(i,2)*b3+pos(i,3)*c3
write(*,*) pos1(i,1)/1.5,pos1(i,2)/1.5,pos1(i,3)/1.5,0
write(3,*) pos1(i,3)/1.5,0
write(3,*) pos1(i,3)/1.5,1
write(3,*) 0.0,0
enddo
endif
! do i=1,atom_num
! write(2,*) "cu",pos(i,1),pos(i,2),pos(i,3),pos_num,flag
! pos_num=pos_num+1
! enddo
do jb=0,supercellnum_b-1
do ja=0,supercellnum_a-1
do jc=0,supercellnum_c-1
atom_begin=1
atom_end=atom_num1
do i=atom_begin,atom_end
pos_extend(i,1)=pos1(i,1)+a1*ja+b1*jb+c1*jc
pos_extend(i,2)=pos1(i,2)+a2*ja+b2*jb+c2*jc
pos_extend(i,3)=pos1(i,3)+a3*ja+b3*jb+c3*jc
write(8,*) pos_extend(i,1),pos_extend(i,2),pos_extend(i,3),"T T T"
pos_extend(i,1)=pos_extend(i,1)*a
pos_extend(i,2)=pos_extend(i,2)*a
pos_extend(i,3)=pos_extend(i,3)*a
write(2,*) "Au",pos_extend(i,1),pos_extend(i,2),pos_extend(i,3)
write(31,*) pos_extend(i,1)/a,pos_extend(i,2)/a,pos_extend(i,3)/a
pos_num=pos_num+1
enddo
atom_begin=atom_num1+1
atom_end=atom_num2+atom_num1
do i=atom_begin,atom_end
pos_extend(i,1)=pos1(i,1)+a1*ja+b1*jb+c1*jc
pos_extend(i,2)=pos1(i,2)+a2*ja+b2*jb+c2*jc
pos_extend(i,3)=pos1(i,3)+a3*ja+b3*jb+c3*jc
write(8,*) pos_extend(i,1),pos_extend(i,2),pos_extend(i,3),"T T T"
pos_extend(i,1)=pos_extend(i,1)*a
pos_extend(i,2)=pos_extend(i,2)*a
pos_extend(i,3)=pos_extend(i,3)*a
write(2,*) "C",pos_extend(i,1),pos_extend(i,2),pos_extend(i,3)
write(31,*) pos_extend(i,1)/a,pos_extend(i,2)/a,pos_extend(i,3)/a
pos_num=pos_num+1
enddo
atom_begin=atom_num2+atom_num1+1
atom_end=atom_num3+atom_num2+atom_num1
do i=atom_begin,atom_end
pos_extend(i,1)=pos1(i,1)+a1*ja+b1*jb+c1*jc
pos_extend(i,2)=pos1(i,2)+a2*ja+b2*jb+c2*jc
pos_extend(i,3)=pos1(i,3)+a3*ja+b3*jb+c3*jc
write(8,*) pos_extend(i,1),pos_extend(i,2),pos_extend(i,3),"T T T"
pos_extend(i,1)=pos_extend(i,1)*a
pos_extend(i,2)=pos_extend(i,2)*a
pos_extend(i,3)=pos_extend(i,3)*a
write(2,*) "O",pos_extend(i,1),pos_extend(i,2),pos_extend(i,3)
write(31,*) pos_extend(i,1)/a,pos_extend(i,2)/a,pos_extend(i,3)/a
pos_num=pos_num+1
enddo
atom_begin=atom_num3+atom_num2+atom_num1+1
atom_end=atom_num
do i=atom_begin,atom_end
pos_extend(i,1)=pos1(i,1)+a1*ja+b1*jb+c1*jc
pos_extend(i,2)=pos1(i,2)+a2*ja+b2*jb+c2*jc
pos_extend(i,3)=pos1(i,3)+a3*ja+b3*jb+c3*jc
write(8,*) pos_extend(i,1),pos_extend(i,2),pos_extend(i,3),"T T T"
pos_extend(i,1)=pos_extend(i,1)*a
pos_extend(i,2)=pos_extend(i,2)*a
pos_extend(i,3)=pos_extend(i,3)*a
write(2,*) "Ag",pos_extend(i,1),pos_extend(i,2),pos_extend(i,3)
pos_num=pos_num+1
enddo
enddo
enddo
enddo
write(*,*) "the task finished"
do i=1,atom_num-1
write(*,*) "deta_d",i,i+1,"=",deta_d(i)
! write(3,'(A6,I2.2,I2.2,A6,E)') "deta_d",i,i+1,"=",deta_d(i)
! write(*,'(A6,I2.2,I2.2,A6,E)') "deta_d",i,i+1,"=",deta_d(i)
enddo
end
CONCAR
Ni3Fe-111
1.000000000000000
4.327023630626480 -2.498208257932070 0.000000000000001
0.000000000000000 4.996416515864140 0.000000000000000
0.000000000000000 0.000000000000000 24.238671006281699
21 7 0
Direct
0.0000000000000000 0.5000000000000000 0.0000000000000001 F F F
0.6666666666666670 0.8333333333333330 0.0841538919571259 F F F
0.3333333333333330 0.1666666666666670 0.1683077839142520 F F F
-0.0000000000000000 0.4999999999999999 0.2524616758713780 T T T
0.6666666666666670 0.8333333333333330 0.3366155678285030 T T T
0.3333333333333330 0.1666666666666670 0.4207694597856290 T T T
-0.0000000000000001 0.5000000000000000 0.5049233517427550 T T T
0.5000000000000000 0.5000000000000000 0.0000000000000001 F F F
0.1666666666666670 0.8333333333333329 0.0841538919571259 F F F
0.8333333333333330 0.1666666666666671 0.1683077839142520 F F F
0.5000000000000000 0.5000000000000000 0.2524616758713780 T T T
0.1666666666666670 0.8333333333333329 0.3366155678285030 T T T
0.8333333333333330 0.1666666666666660 0.4207694597856290 T T T
0.5000000000000000 0.5000000000000000 0.5049233517427550 T T T
0.5000000000000000 0.0000000000000001 0.0000000000000001 F F F
0.1666666666666670 0.3333333333333329 0.0841538919571258 F F F
0.8333333333333330 0.6666666666666670 0.1683077839142520 F F F
0.5000000000000000 -0.0000000000000000 0.2524616758713780 T T T
0.1666666666666670 0.3333333333333329 0.3366155678285030 T T T
0.8333333333333330 0.6666666666666670 0.4207694597856290 T T T
0.5000000000000000 -0.0000000000000001 0.5049233517427550 T T T
0.0000000000000001 0.0000000000000002 -0.0000000000000000 F F F
0.6666666666666661 0.3333333333333330 0.0841538919571259 F F F
0.3333333333333330 0.6666666666666670 0.1683077839142520 F F F
-0.0000000000000000 0.0000000000000000 0.2524616758713780 T T T
0.6666666666666670 0.3333333333333330 0.3366155678285030 T T T
0.3333333333333330 0.6666666666666670 0.4207694597856290 T T T
-0.0000000000000002 -0.0000000000000001 0.5049233517427550 T T T |