QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: marmotte on September 18, 2012, 11:32

Title: HOMO-LUMO plots
Post by: marmotte on September 18, 2012, 11:32
Dear ATK team,

Thank you for your support. I'm making a good progress.

I have a question about HOMO-LUMO isosurface, I have a big system of more than 300 atoms ( nanoparticles). I would like to have their HOMO-LUMO. Following the tutorials, we should calculate the eigen state for a special quantum number. is it possible to have a script to have the quantum number of HOMO or LUMO  ?

Thx
Title: Re: HOMO-LUMO plots
Post by: Anders Blom on September 18, 2012, 13:26
Good question - good Python exercise :)

Here's how to do it for water (any molecule is the same, just different coordinates and elements):

Code: python
# Water
elements = [Oxygen, Hydrogen, Hydrogen]
cartesian_coordinates = [[ -7.00000000e-06,  -1.70000000e-05,   1.20198000e-01],
                         [  0.00000000e+00,   7.59572000e-01,  -4.86714000e-01],
                         [ -2.00000000e-06,  -7.59606000e-01,  -4.86721000e-01]]*Angstrom
molecule_configuration = MoleculeConfiguration(
    elements=elements,
    cartesian_coordinates=cartesian_coordinates
    )

# Default DFT model
molecule_configuration.setCalculator(LCAOCalculator())
molecule_configuration.update()

# Calculate spectrum
spectrum = MolecularEnergySpectrum(molecule_configuration)
lumo_index = numpy.where(spectrum.evaluate() < 0*eV)[0][-1]
nlprint("LUMO: %s" % spectrum.evaluate()[lumo_index])
nlprint("HOMO: %s" % spectrum.evaluate()[lumo_index+1])