Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !program WAVEFUNCTION
- ! The purpose of this program is to determine the radial distribution functions of
- ! the 1s, 2s, and 2p (hydrogenic) orbitals. The result will then be normalized
- ! such that the maximum value for each RDF is 1. User input is required to determine
- ! which orbital's wavefunction should be calculated. Subroutines are used.
- implicit real (a,b,d-h,o-z)
- real,allocatable::RDFA(:)
- ! "RDFA" is the Radial Distribution Function Array value, all values calculated through
- ! the RDF function will be stored in this array.
- print*,'Enter the atomic number. Ex: "1" for a hydrogenic orbital calculation:'
- read*,iz
- ! "iz" is an integer variable for the atomic number.
- print*,'Enter the values of the first two quantum numbers you want to calculate the RDF for:'
- read*,nl
- ! "nl" is the set of quantum numbers used to call a given function.
- do J=0,50
- r= J/20.
- if (nl .EQ. 10) then
- RDFA(J)= R10(iz,r)
- else if (nl .EQ. 20) then
- RDFA(J)= R20(iz,r)
- else if (nl .EQ. 21) then
- RDFA(J)= R21(iz,r)
- endif
- end do
- end program
- real function R10(iz,r)
- implicit real (a,b,d-h,o-z)
- R10= iz**(3./2.)*exp(-1*iz*r)
- return
- end
- real function R20(iz,r)
- implicit real (a,b,d-h,o-z)
- R20= (iz/2.)**(3./2.)*(1-iz*r/2)*exp(-1*iz*r/2)
- return
- end
- real function R21(iz,r)
- implicit real (a,b,d-h,o-z)
- R21= (iz/2.)**(3./2.)*(iz*r)*exp(-1*z*r/2)
- return
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement