PROGRAM makelist2 c Makes list of points for molecular averaging PARAMETER aa = 197.17, bb = 127.03, cc = 134.18, beta = 97.64 PARAMETER nx = 240, ny = 144, nz = 160 !2.8 Ang output PARAMETER mx = 400, my = 256, mz = 270 !2.8 Ang input REAL orth(3,3) /191.99193, 0.0 , -47.64826, 1 0.0 , 127.03, 0.0 , 2 44.88991, 0.0 , 125.43491/ INTEGER*2 ix, iy, iz c Enter radius of sphere about origin WRITE (6, 1000) ' Enter radius of sphere around origin:' 1000 FORMAT (a) READ (5, 1001) rad WRITE (6, 1001) rad 1001 FORMAT (f10.4) c Loop through hemisphere nxl = nx*rad/aa+1 nyl = ny*rad/bb+1 nzl = nz*rad/cc+1 WRITE (6, 1002) nxl, nyl, nzl 1002 FORMAT (' Grid limits:', 3i5) rad = rad*rad npts = 0 OPEN (unit=1, status='NEW', form='UNFORMATTED', 1 file='POINT28.LIST') DO iy = -nyl,nyl fy = FLOAT(iy)/ny DO ix = -nxl,nxl fx = FLOAT(ix)/nx DO iz = 0, nzl fz = FLOAT(iz)/nz c Calculate distances x = fx*orth(1,1) + fy*orth(2,1) + fz*orth(3,1) y = fx*orth(1,2) + fy*orth(2,2) + fz*orth(3,2) z = fx*orth(1,3) + fy*orth(2,3) + fz*orth(3,3) d = x*x + y*y + z*z IF (d .LE. rad) THEN WRITE (1) ix, iy, iz, fx, fy, fz npts = npts + 1 endIF endDO endDO endDO CLOSE unit=1 WRITE (6, 1003) npts 1003 FORMAT (2i8) end