Beispiel #1
0
def iron():
    energy_range = list(linspace(-400.0, -200.0, 200)) \
        + list(linspace(-200.0, -30.0, 200)) \
        + list(linspace(-30.0, -5.0, 400)) \
        + list(linspace(-5.0, -0.0000001, 400)) \
    # equidistant grid, use larger grid for heavy atoms
              
    Z = 26
    Nelec = 26
    atomdft = PseudoAtomDFT(Z,Nelec,numerov_conv,en_conv=1.0e-4, grid_spacing="exponential", damping=0.6)    
    # iron has the electron configuration: [Ar] 3d^(6) 4s^2
    occupation = [occ for occ in occupation_numbers(Nelec)]
    assert occupation[-1] == (8,3-1,2) # 8e in 3d
    occupation[-1] = (6,3-1,2)     # put 6e in 3d
    occupation.append( (2,4-1,0) ) # and 2e in 4s
    atomdft.setOccupation(occupation)

    atomdft.setRadialGrid(0.0000004, 16.0, 6000)
    try:
        from free_pseudo_atoms import fe
        atomdft.initialDensityGuess((fe.r, fe.radial_density))
    except ImportError:
        atomdft.initialDensityGuess()
    atomdft.setEnergyRange(energy_range)
    atomdft.solveKohnSham()
    fh = open(orbdir + "fe.py", "w")
    atomdft.saveSolution(fh)
    fh.close()
Beispiel #2
0
def silver():
    energy_range = list(linspace(-1500.0, -800.0, 100)) \
        + list(linspace(-800.0, -200.0, 200)) \
        + list(linspace(-200.0, -30.0, 200)) \
        + list(linspace(-30.0, -5.0, 400)) \
        + list(linspace(-5.0, -0.0000001, 400)) \
    # equidistant grid, use larger grid for heavy atoms
              
    Z = 47
    Nelec = 47
    atomdft = PseudoAtomDFT(Z,Nelec,numerov_conv,en_conv=1.0e-4, grid_spacing="exponential", damping=0.6)
    # In silver the 5s is filled before 4f: [Kr] 4d^(10) 5s^1
    occupation = [occ for occ in occupation_numbers(Nelec)]
    assert occupation[-1] == (1,4-1,3)
    occupation[-1] = (1,5-1,0)
    atomdft.setOccupation(occupation)
    # I would like to include unoccupied f orbitals in minimal basis but 
    # sofar no Slater rules exist for f orbitals. So include 5p
    atomdft.setValenceOrbitals(["4d", "5s","5p"], format="spectroscopic")    
    atomdft.setRadialGrid(0.000000001, 14.0, 20000)
    try:
        from free_pseudo_atoms import ag
        atomdft.initialDensityGuess((ag.r, ag.radial_density))
    except ImportError:
        atomdft.initialDensityGuess()
    atomdft.setEnergyRange(energy_range)
    atomdft.solveKohnSham()
    fh = open(orbdir + "ag.py", "w")
    atomdft.saveSolution(fh)
    fh.close()
Beispiel #3
0
def scandium():
    energy_range = list(linspace(-400.0, -200.0, 200)) \
        + list(linspace(-200.0, -30.0, 200)) \
        + list(linspace(-30.0, -5.0, 400)) \
        + list(linspace(-5.0, -0.0000001, 400)) \
    # equidistant grid, use larger grid for heavy atoms
              
    Z = 21
    Nelec = 21
    atomdft = PseudoAtomDFT(Z,Nelec,numerov_conv,en_conv, grid_spacing="exponential") #, damping=0.6)    
    # scandium has the electron configuration: [Ar] 3d^1 4s^2
    occupation = [occ for occ in occupation_numbers(Nelec)]
    assert occupation[-1] == (3,3-1,2) # 3e in 3d
    occupation[-1] = (1,3-1,2)     # put 1e in 3d
    occupation.append( (2,4-1,0) ) # and 2e in 4s
    atomdft.setOccupation(occupation)

    atomdft.setValenceOrbitals(["3d", "4s"], format="spectroscopic")
    atomdft.setRadialGrid(0.0000004, 16.0, 6000)
    try:
        from free_pseudo_atoms import sc
        atomdft.initialDensityGuess((sc.r, sc.radial_density))
        #from free_pseudo_atoms import ti
        # load density of titanium and scale it
        #atomdft.initialDensityGuess((ti.r, ti.radial_density * float(Nelec)/float(ti.Nelec)))
    except ImportError:
        atomdft.initialDensityGuess()
    atomdft.setEnergyRange(energy_range)
    atomdft.solveKohnSham()
    fh = open(orbdir + "sc.py", "w")
    atomdft.saveSolution(fh)
    fh.close()
Beispiel #4
0
def potassium():
    energy_range = list(linspace(-135.0, -40.00, 100)) \
                  +list(linspace(-40, -13.0, 50)) \
                  +list(linspace(-13.0, -1.0, 200)) \
                  +list(linspace(-1.0, -0.0001, 200))

    Z = 19
    Nelec = 19
    atomdft = PseudoAtomDFT(Z,Nelec,numerov_conv,en_conv, grid_spacing="exponential")
    # in potassium 4s is filled before 3d: [Ar] 4s^1
    occupation = [occ for occ in occupation_numbers(Nelec)]
    assert occupation[-1] == (1, 3-1, 2) # 1e in 3d
    occupation[-1] = (1,4-1,0) # 1e in 4s
    atomdft.setOccupation(occupation)
    atomdft.setRadialGrid(rmin, rmax_4th_row, Npts_4th_row)
    try:
        from free_pseudo_atoms import k
        atomdft.initialDensityGuess((k.r, k.radial_density))
    except ImportError:
        atomdft.initialDensityGuess()
    atomdft.setEnergyRange(energy_range)
    atomdft.solveKohnSham()
    fh = open(orbdir + "k.py", "w")
    atomdft.saveSolution(fh)
    fh.close()
def titanium():
    energy_range = list(linspace(-400.0, -200.0, 200)) \
        + list(linspace(-200.0, -30.0, 200)) \
        + list(linspace(-30.0, -5.0, 400)) \
        + list(linspace(-5.0, 5.0, 200)) \
    # equidistant grid, use larger grid for heavy atoms

    Z = 22
    Nelec = 22
    atomdft = PseudoAtomDFT(Z,
                            Nelec,
                            numerov_conv,
                            100 * en_conv,
                            grid_spacing="exponential",
                            r0=confinement_radii_byZ[Z])
    # titanium has the electron configuration: [Ar] 3d^2 4s^2
    occupation = [occ for occ in occupation_numbers(Nelec)]
    assert occupation[-1] == (4, 3 - 1, 2)  # 4e in 3d
    occupation[-1] = (2, 3 - 1, 2)  # put 2e in 3d
    occupation.append((2, 4 - 1, 0))  # and 2e in 4s
    atomdft.setOccupation(occupation)
    atomdft.setRadialGrid(0.0000004, 16.0, 6000)

    try:
        from confined_pseudo_atoms import ti
        atomdft.initialDensityGuess((ti.r, ti.radial_density))
    except ImportError:
        atomdft.initialDensityGuess()
    atomdft.setEnergyRange(energy_range)
    atomdft.solveKohnSham()
    fh = open(orbdir + "ti.py", "w")
    atomdft.saveSolution(fh)
    fh.close()
def ruthenium():
    energy_range = list(linspace(-1500.0, -800.0, 100)) \
        + list(linspace(-800.0, -200.0, 200)) \
        + list(linspace(-200.0, -30.0, 200)) \
        + list(linspace(-30.0, -5.0, 400)) \
        + list(linspace(-5.0, 5.0, 400)) \
    # equidistant grid, use larger grid for heavy atoms

    Z = 44
    Nelec = 44
    atomdft = PseudoAtomDFT(Z,
                            Nelec,
                            numerov_conv,
                            en_conv,
                            grid_spacing="exponential",
                            r0=confinement_radii_byZ[Z],
                            damping=0.6)
    # The electron configuration of ruthenium is  [Kr] 4d^(7) 5s^(1)
    occupation = [occ for occ in occupation_numbers(Nelec)]
    # `occupation` is a list of tuples
    #   (nr.electrons, quantum number n + 1, quantum number l)
    # that describe the occupied shells.
    # In the default occupation, ruthenium would have the electronic configuration [Kr] 4d^(8).
    assert occupation[-1] == (8, 4 - 1, 2)
    # The default occupation is not correct, so we need to adjust it by
    # removing one electron from 4d shell,
    occupation[-1] = (7, 4 - 1, 2)
    # and adding a 5s shell with 1 electron.
    occupation.append((1, 5 - 1, 0))
    # The new occupation is now [Kr] 4d^(7) 5s^(1)

    atomdft.setOccupation(occupation)
    atomdft.setValenceOrbitals(["4d", "5s"], format="spectroscopic")
    atomdft.setRadialGrid(0.000000001, 14.0, 20000)
    try:
        """
        # If no initial density is available for Ru, we can take the density from silver 
        # and scale it, so that it integrates to the number of electrons in ruthenium. 
        from confined_pseudo_atoms import ag
        atomdft.initialDensityGuess((ag.r, float(Nelec)/float(ag.Nelec) * ag.radial_density))
        """
        # If an initial density is available for Ru, we use that one
        from confined_pseudo_atoms import ru
        atomdft.initialDensityGuess(
            (ru.r, float(Nelec) / float(ru.Nelec) * ru.radial_density))
    except ImportError:
        atomdft.initialDensityGuess()
    atomdft.setEnergyRange(energy_range)
    atomdft.solveKohnSham()
    fh = open(orbdir + "ru.py", "w")
    atomdft.saveSolution(fh)
    fh.close()
def ruthenium_2plus():
    energy_range = list(linspace(-1500.0, -800.0, 100)) \
        + list(linspace(-800.0, -200.0, 200)) \
        + list(linspace(-200.0, -30.0, 200)) \
        + list(linspace(-30.0, -5.0, 400)) \
        + list(linspace(-5.0, 5.0, 400)) \
    # equidistant grid, use larger grid for heavy atoms

    Z = 44
    Nelec = 42  # Ru^(2+)
    atomdft = PseudoAtomDFT(Z,
                            Nelec,
                            numerov_conv,
                            en_conv,
                            grid_spacing="exponential",
                            r0=confinement_radii_byZ[Z],
                            damping=0.6)
    # The electron configuration of Ru^(2+) is  [Kr] 4d^(6)
    occupation = [occ for occ in occupation_numbers(Nelec)]
    # `occupation` is a list of tuples
    #   (nr.electrons, quantum number n + 1, quantum number l)
    # that describe the occupied shells.
    # In the default occupation, ruthenium would have the electronic configuration [Kr] 4d^(6),
    # which is correct.
    assert occupation[-1] == (6, 4 - 1, 2)

    atomdft.setOccupation(occupation)
    atomdft.setValenceOrbitals(["4d", "5s"], format="spectroscopic")
    atomdft.setRadialGrid(0.000000001, 14.0, 20000)
    try:
        # If no initial density is available for Ru^(2+), we can take the density from silver
        # and scale it, so that it integrates to the number of electrons in ruthenium 2+.
        from confined_pseudo_atoms import ag
        atomdft.initialDensityGuess(
            (ag.r, float(Nelec) / float(ag.Nelec) * ag.radial_density))
        """
        # If an initial density is available for Ru^(2+), we use that one
        from confined_pseudo_atoms import ru
        atomdft.initialDensityGuess((ru.r, ru.radial_density))
        """
    except ImportError:
        atomdft.initialDensityGuess()
    atomdft.setEnergyRange(energy_range)
    atomdft.solveKohnSham()
    # Although we have calculated Ru^(2+), the pseudoorbitals still have to be saved under the name 'ru.py'.
    # Only one oxidation state can be used for any atom at the same time.
    fh = open(orbdir + "ru.py", "w")
    atomdft.saveSolution(fh)
    fh.close()