program lattice * This program multiplies the Kenway coordinates by the appropriate * lattice vectors. It also converts the atomic symbol Al and O to * 13 and 8. * Also, it multiplies each coordinate by 10--to obtain the units of * Angstroms. implicit double precision (a-h,o-z) character name*3 dimension x(500), y(500), z(500), iname(500) character name(500)*3 5 format(i3,3(4x,f12.8)) 6 format(a,3(4x,f12.8)) open (unit=10, file='unrelax', status='old') read(10,*) m read(10,*) do 100 i=1,m read(10,6) name(i), x(i), y(i), z(i) 100 continue close (unit=10) c=0.4819 b=2.3982 a=2.6712 open (unit=20, file='unrelax.xyz', status='new') write(20,*) m write(20,*) do 200 j=1,m x(j)=x(j)*a*10.0 y(j)=y(j)*b*10.0 z(j)=z(j)*c*10.0 if (name(j).eq.' Al') then iname(j)=13 end if if (name(j).eq.' O '.or.name(j).eq.' o ') then iname(j)=8 end if write(20,5) iname(j), x(j), y(j), z(j) 200 continue close (unit=20) end