Advertisement
Guest User

Untitled

a guest
Jan 28th, 2015
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. !program WAVEFUNCTION
  2. ! The purpose of this program is to determine the radial distribution functions of
  3. ! the 1s, 2s, and 2p (hydrogenic) orbitals. The result will then be normalized
  4. ! such that the maximum value for each RDF is 1. User input is required to determine
  5. ! which orbital's wavefunction should be calculated. Subroutines are used.
  6.  
  7. implicit real (a,b,d-h,o-z)
  8. real,allocatable::RDFA(:)
  9.  
  10. ! "RDFA" is the Radial Distribution Function Array value, all values calculated through
  11. ! the RDF function will be stored in this array.
  12.  
  13. print*,'Enter the atomic number. Ex: "1" for a hydrogenic orbital calculation:'
  14. read*,iz
  15.  
  16. ! "iz" is an integer variable for the atomic number.
  17.  
  18. print*,'Enter the values of the first two quantum numbers you want to calculate the RDF for:'
  19. read*,nl
  20.  
  21. ! "nl" is the set of quantum numbers used to call a given function.
  22.  
  23. do J=0,50
  24. r= J/20.
  25. if (nl .EQ. 10) then
  26. RDFA(J)= R10(iz,r)
  27. else if (nl .EQ. 20) then
  28. RDFA(J)= R20(iz,r)
  29. else if (nl .EQ. 21) then
  30. RDFA(J)= R21(iz,r)
  31. endif
  32. end do
  33.  
  34. end program
  35.  
  36. real function R10(iz,r)
  37. implicit real (a,b,d-h,o-z)
  38. R10= iz**(3./2.)*exp(-1*iz*r)
  39. return
  40. end
  41.  
  42. real function R20(iz,r)
  43. implicit real (a,b,d-h,o-z)
  44. R20= (iz/2.)**(3./2.)*(1-iz*r/2)*exp(-1*iz*r/2)
  45. return
  46. end
  47.  
  48. real function R21(iz,r)
  49. implicit real (a,b,d-h,o-z)
  50. R21= (iz/2.)**(3./2.)*(iz*r)*exp(-1*z*r/2)
  51. return
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement