;ò
óFc           @   sv   d  Z  d k l Z d e f d     YZ [ d k l Z d e f d     YZ [ d k l Z d f  d	     YZ	 d
 S(   sK   Atomic energy levels.

$Id: atomic.py,v 1.2 2007/03/08 23:22:35 eddy Exp $
(   s
   Polynomials   Laguerrec           B   sU   t  Z e i Z d k l Z d k l Z e e d  Z [ [ e d d  d  Z	 RS(   N(   s   hcf(   s	   factorialc   	      C   s  | d j  p0 | | j p# | t |  j p | t |  j o t d | |   n d g | } | | | d |  | | d f \ } } } xD | | j o6 | d } | | | <| | | d | | | } q W| d j p t	  |  i t t | t |   d  |   d  S(   Ni    s5   Laguerre(n, b) is defined for natural n, b with n > bi   c         C   s   |  | S(   N(   s   xs   e(   s   xs   e(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   <lambda>   s    (   s   bs   ns   ints
   ValueErrors   fs   plings   js   lasts   Ls   AssertionErrors   selfs   _Laguerre__upinits   maps   applys   hcfs   tuple(	   s   selfs   ns   bs   hcfs   plings   lasts   fs   js   L(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   __init__   s    @. 

#i    i   c         C   s   |  | d i d Sd  S(   Ni   f0.5(   s   selfs   linears   Gamma(   s   selfs   igs   linear(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   _lazy_get_scale_   s    (
   s   __name__s
   __module__s
   Polynomials   __init__s   _Laguerre__upinits   study.maths.naturals   hcfs   study.maths.Pascals	   factorials   _lazy_get_scale_(    (    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   Laguerre   s   	(   s   Lazys   Radialc           B   s,   t  Z d   Z d   Z d   Z d   Z RS(   Nc         C   s>   t  | |  | d | f \ |  _ |  _ d | d |  _ d  S(   Nf1.0i   i   (   s   Laguerres   ns   bs   Zs   selfs   _Radial__polys   _Radial__fracs
   degeneracy(   s   selfs   ns   bs   Z(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   __init__$   s    )c         C   s   |  i i d |  i d Sd  S(   Ni   f1.5(   s   selfs   _Radial__polys   scales   _Radial__frac(   s   selfs   ig(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   _lazy_get_scale_(   s    c         C   s   |  i d Sd  S(   Ni   (   s   selfs   _Radial__frac(   s   selfs   ig(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   _lazy_get_Energy_+   s    c         C   s0   | |  i } |  i d |  | i |  i Sd  S(   Ni   (   s   rs   selfs   _Radial__fracs   _Radial__polys   exps   scale(   s   selfs   r(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   __call__.   s    (   s   __name__s
   __module__s   __init__s   _lazy_get_scale_s   _lazy_get_Energy_s   __call__(    (    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   Radial#   s   			(   s	   Sphericals   Orbitc           B   s&   t  Z d d  Z d   Z d   Z RS(   Ni   c         C   s   | d j p | t |  j o t d |   n t | | |  |  _ t | |  |  _
 | | | | f \ |  _ |  _ |  _	 |  _  d S(   sï  Initialize a dimensionless quantum orbit in a Coulomb field.

        Required parameters:
          n - shell number; natural
          b - total angular momentum number; natural < n
          j - angular momentum component about coordinate axis; integer between
              minus b and b.
        Optional argument:
          Z - atomic number of atom (charge on nucleus); positive integer.

        Describes a potential orbit of a lone electron about a nucleus of atomic
        number Z.
i    s*   Atomic number should be a positive integerN(   s   Zs   ints
   ValueErrors   Radials   ns   bs   selfs   _Orbit__radials	   Sphericals   js   _Orbit__angulars   l(   s   selfs   ns   bs   js   Z(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   __init__8   s      c         C   s   |  i i Sd S(   s   In units of the Rydberg energyN(   s   selfs   _Orbit__radials   Energy(   s   selfs   ig(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   _lazy_get_Energy_O   s     c         C   s!   |  i | |  |  i |  Sd S(   sÖ  Returns dimensionless field probability at specified location.

        The radial co-ordinate, r, should be a dimensionless Quantity() obtained
        by dividing true radius by the Bohr radius, hbar / (mass * alpha * c)
        where the mass should really be a reduced mass, given by 1/mass =
        1/electron.mass + 1/nucleus.mass.  The returned field value should be
        divided by a factor of this Bohr radius to the power 1.5 to get a
        quantity whose squared modulus, when integrated over a volume, yields
        the probability of finding the electron in that volume.  Alternatively,
        skip that scaling and do your integration in co-ordinates which use the
        Bohr radius as unit of length.
N(   s   selfs   _Orbit__angulars   phis   thetas   _Orbit__radials   r(   s   selfs   rs   phis   theta(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   __call__S   s     (   s   __name__s
   __module__s   __init__s   _lazy_get_Energy_s   __call__(    (    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   Orbit7   s   	N(
   s   __doc__s   study.maths.polynomials
   Polynomials   Laguerres   study.value.lazys   Lazys   Radials   study.maths.Legendres	   Sphericals   Orbit(   s	   Sphericals   Lazys   Laguerres   Orbits   Radials
   Polynomial(    (    s(   /home/eddy/.sys/py/study/chemy/atomic.pys   ?   s   