Author Topic: How can we get the detailed MullikenPopulations after scf ?  (Read 4615 times)

0 Members and 1 Guest are viewing this topic.

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Hi ,every one
 ;D ;D ;D

I have finished the scf, and have the convergence .nc files,but I have not save the log files (I know we can get the detailed MullikenPopulations using verbosity level 10),so how can do to get  the detailed MullikenPopulations as (0 H q = 1.00000 [ s: 1.014, s: -0.014, y: 0.000, z: 0.000, x: 0.000 ),not the H 1.14273929774 by using calculateMullikenPopulation?

 May be we only need the scattering region elements's detailed MullikenPopulations ,so I  want to know why when I ues twoprobe_configuration.scattering_elements() is not right to print but the twoprobe_configuration.elements can implement to print, in this  I am confused  that twoprobe_configuration.elements represent the  scattering_elements or all the twoprobe configuration's elements?

By the way , I want to know how can we expertly use the RETURNED OBJECT METHODS in ATK ? Could someone show me the trick? ;) ;) ;)
« Last Edit: November 17, 2009, 15:26 by zdhlover »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: How can we get the detailed MullikenPopulations after scf ?
« Reply #1 on: November 17, 2009, 22:08 »
Actually the verbosity = 10 trick works also post-scf. So, you could just do
Code
from ATK.TwoProbe import *
import ATK
scf = restoreSelfConsistentCalculation('my_ncfile.nc')
ATK.setVerbosityLevel(10)
m = calculateMullikenPopulation(scf)
The returned objects from various "calculate..." functions are often quite "thin" and don't have so many methods. The object "m" returned in the example above only has one real method, "toArray" which will return the populations per atom. Others have a few more, and you can always see which by using the "dir()" function (like print dir(m) in the example above), or if you are running ATK interactively you can use the TAB key after writing "m." (note the ".") to expand the available methods. In case you want the orbital-resolved populations as an array, it's more tricky.

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: How can we get the detailed MullikenPopulations after scf ?
« Reply #2 on: November 19, 2009, 09:33 »
 ;D ;D ;D  Thanks your detailed reply, you are so kind and clever.

In the reply you have been mentioned "running ATK interactively ", I am very interested in this and I want to know how can I running ATK interactively ?

you also mentioned "it's more tricky about array" :P :P :P :P  I want to know what are they?

Thanks a lot

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: How can we get the detailed MullikenPopulations after scf ?
« Reply #3 on: November 19, 2009, 11:12 »
To run ATK interactively (like you can run regular Python interactively, or think about Matlab), just start "atk" without any arguments. Then you can type the same commands as you would enter into a script. The benefit of this is that you can try different things on the fly. It's also good for prototyping scripts. Remember to use the TAB key for command completion; this also works for methods etc, as mentioned in the previous post.

By array I meant, if we want the orbital-resolved Mulliken populations as an array which we can manipulate, it's a much harder task. We can easily get the atom-resolved ones, however.