relaxationlecture - Declarations program to relax a vacancy...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Declarations ! program to relax a vacancy in a LJ solid IMPLICIT NONE INTEGER, PARAMETER :: nn=4 INTEGER, PARAMETER :: Prec14=SELECTED_REAL_KIND(14) REAL(KIND=Prec14), PARAMETER :: L=2.0d0**(2.0d0/3.0d0)*nn,ftol=0.1d0 INTEGER, PARAMETER :: natoms=4*nn**3-1,ndim=3*natoms ! Add a vacancy INTEGER, PARAMETER :: nx=nn,ny=nn,nz=nn,nrmax=50,nrmax2=10,nstep=20 INTEGER :: i,j,ix,iy,iz,mu,nu,m,n,matz,m1,n1,ierr,nr,nr2 REAL(KIND=Prec14), PARAMETER :: sigma=1.0d0,epsilon=1.0d0 REAL(KIND=Prec14), PARAMETER :: dt=0.000002d0 REAL(KIND=Prec14), PARAMETER :: rcut=3.0d0*sigma REAL(KIND=Prec14) :: epot,dvdr,dvdr2,pi,fac,lambda,gamma,denom,num,alpha REAL(KIND=Prec14) :: sxij,syij,szij,rij,sovr,mag REAL(KIND=Prec14), DIMENSION(4) :: r1,r2,r3 REAL(KIND=Prec14), DIMENSION(3) :: s REAL(KIND=Prec14), DIMENSION(natoms) :: rx,ry,rz REAL(KIND=Prec14), DIMENSION(ndim,ndim) :: hess REAL(KIND=Prec14), DIMENSION(ndim) :: g,h,b,u,grad REAL(KIND=Prec14), PARAMETER :: mass=39.948d0,eps=120.0d0,sar=3.4d0
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Generate the crystal lattice ! now construct lattice n=0 do ix=1,nx do iy=1,ny do iz=1,nz do i=1,4 n=n+1 if(n.le.natoms) then ! last atom not placed, vacancy site rx(n)=(r1(i)+dble(ix-1))*sigma ry(n)=(r2(i)+dble(iy-1))*sigma rz(n)=(r3(i)+dble(iz-1))*sigma endif enddo enddo enddo enddo ! scale lengths by box size rx=rx/nx ry=ry/ny rz=rz/nz
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/08/2011 for the course PHZ 5156 taught by Professor Johnson,m during the Fall '08 term at University of Central Florida.

Page1 / 15

relaxationlecture - Declarations program to relax a vacancy...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online