Generacion de nanotubos de nitruro de boro utilizando fortran

Solo disponible en BuenasTareas
  • Páginas : 4 (965 palabras )
  • Descarga(s) : 0
  • Publicado : 5 de enero de 2011
Leer documento completo
Vista previa del texto
A-1 PROGRAMA EN FORTRAN PARA GENERAR LAS COORDENADAS DE
NANOTUBOS DE NITRURO DE BORO DE UNA PARED TIP0 ARMCHAIR.

parameter (acc=1.44)
parameter (nk=1300)
dimensionx(nk),y(nk),z(nk)
real L
integer P
character*1 name0
character*2 name1
character*8 filename0
character*10 filename1
write(*,*) 'Nanotubo armchair (n,n), escribe n'read(*,*) n
write(*,*) 'Nanotubo armchair (n,n), escribe H'
read(*,*) H
if(n.lt.10) then
write(name0,"(I1)") n
filename0='c'//name0//'x'//name0//'.xyz'open(60,file=filename0)
elseif(n.ge.10) then
write(name1,"(I2)") n
filename1='c'//name1//'x'//name1//'.xyz'
open(60,file=filename1)
endif
sq3=sqrt(3.0)pi=4.0*atan(1.0)
a=sq3*acc
L=3.0*float(n)*acc
r=L/(2.0*pi)
write(*,*) 'r=',r
do j2=1,P
do j1=1,H
x(1*j2+((4*j1*j2*n)-(4*n)))=r*j2y(1*j2+((4*j1*j2*n)-(4*n)))=0.0
z(1*j2+((4*j1*j2*n)-(4*n)))= ((j1-1)*a)+(- a/2)
c x(1+4*n)=r
c y(1+4*n)=0.0
c z(1+4*n)=0.5*a
j=0
do i=2,2*n*j2
j=j+1+mod(i,2)d=float(j)*acc
x(i*j2+((4*j1*j2*n)-(4*n)))=r*j2*cos(d*2.*pi/L)
z(i*j2+((4*j1*j2*n)-(4*n)))=((j1-1)*a)+(- a/2)
y(i*j2+((4*j1*j2*n)-(4*n)))=r*sin(d*2.*pi/L)
c x(i+4*n)=r*cos(d*2.*pi/L)
cz(i+4*n)=a*0.5
c y(i+4*n)=r*sin(d*2.*pi/L)
enddo
x(1+2*n*j2+((4*j1*j2*n)-(4*n)))=r*j2*cos(1.5*acc*2.*pi/L)
y(1+2*n*j2+((4*j1*j2*n)-(4*n)))=r*sin(1.5*acc*2.*pi/L)z(1+2*n*j2+((4*j1*j2*n)-(4*n)))= (j1-1)*a
d0=1.5
do i=2,2*n*j2
d0=d0+1.0+float(mod(i,2))
d=d0*acc
x(i+2*n*j2+((4*j1*j2*n)-(4*n)))=r*j2*cos(d*2.*pi/L)z(i+2*n*j2+((4*j1*j2*n)-(4*n)))=(j1-1)*a
y(i+2*n*j2+((4*j1*j2*n)-(4*n)))=r*sin(d*2.*pi/L)
enddo
enddo
enddo
117 format('N',3f10.5)
118 format('B' ,3f10.5)
do j2=1,P...
tracking img