12.07.2015 Views

Ab initio molecular dynamics: Theory and Implementation

Ab initio molecular dynamics: Theory and Implementation

Ab initio molecular dynamics: Theory and Implementation

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MODULE Densityrho(1:N x ,1:N y ,1:N z ) = 0FOR i=1:N b ,2scr(1:N x ,1:N y ,1:N z ) = 0FOR j=1:N PWscr(ipg(1,i),ipg(2,i),ipg(3,i)) = c(j,i) + I * c(j,i+1)scr(img(1,i),img(2,i),img(3,i)) = CONJG[c(j,i) + I * c(j,i+1)]ENDCALL FFT3D("INV",scr)rho(1:N x ,1:N y ,1:N z ) = rho(1:N x ,1:N y ,1:N z ) + && REAL[scr(1:N x ,1:N y ,1:N z )]**2 + IMAG[scr(1:N x ,1:N y ,1:N z )]**2ENDMODULE VPSIFOR i=1:N b ,2scr(1:N x ,1:N y ,1:N z ) = 0FOR j=1:N PWscr(ipg(1,i),ipg(2,i),ipg(3,i)) = c(j,i) + I * c(j,i+1)scr(img(1,i),img(2,i),img(3,i)) = CONJG[c(j,i) + I * c(j,i+1)]ENDCALL FFT3D("INV",scr)scr(1:N x ,1:N y ,1:N z ) = scr(1:N x ,1:N y ,1:N z ) * && vpot(1:N x ,1:N y ,1:N z )CALL FFT3D("FW",scr)FOR j=1:N PWFP = scr(ipg(1,i),ipg(2,i),ipg(3,i)) && + scr(img(1,i),img(2,i),img(3,i))FM = scr(ipg(1,i),ipg(2,i),ipg(3,i)) && - scr(img(1,i),img(2,i),img(3,i))fc(j,i) = f(i) * CMPLX[REAL[FP],IMAG[FM]]fc(j,i+1) = f(i+1) * CMPLX[IMAG[FP],-REAL[FM]]ENDEND3.9 Parallel Computing3.9.1 Introduction<strong>Ab</strong> <strong>initio</strong> <strong>molecular</strong> <strong>dynamics</strong> calculation need large computer resources. Memory<strong>and</strong> cpu time requirement make it necessary to run projects on the biggest computersavailable. It is exclusively parallel computers that provide these resourcestoday. There are many different types of parallel computers available. Computersdiffer in their memory access system <strong>and</strong> their communication system. Widelydifferent performances are seen for b<strong>and</strong>width <strong>and</strong> latency. In addition, differentprogramming paradigms are supported. In order to have a portable code that canbe used on most of the current computer architectures, CPMD was programmed us-82

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!