Author Topic: Could ATK calculate the "bond population" ?  (Read 11279 times)

0 Members and 1 Guest are viewing this topic.

Offline fangyongxinxi

  • QuantumATK Guru
  • ****
  • Posts: 143
  • Reputation: 0
    • View Profile
Could ATK calculate the "bond population" ?
« on: January 11, 2010, 09:01 »
Dear Sir,

ATK could calculate the mulli-population on atoms,
I wonder it could calculate the "bond population " or not ?
or can we use the atom-population to do something about the "bond population" ?
Thank you.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Could ATK calculate the "bond population" ?
« Reply #1 on: January 12, 2010, 13:18 »
I made a script once which could compute the Mulliken overlap populations. Not exactly the same thing as bond order, but it gives a similar picture. It's quite complex to use, however, and even more to plot the results (the computed quantity is a matrix, with pairs of all atoms...). I used Matlab to make the plot attached. If this is of interest, I can publish the script too, but I think I need to polish it a bit first...

Offline fangyongxinxi

  • QuantumATK Guru
  • ****
  • Posts: 143
  • Reputation: 0
    • View Profile
Re: Could ATK calculate the "bond population" ?
« Reply #2 on: January 13, 2010, 01:52 »
Looking forward

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Could ATK calculate the "bond population" ?
« Reply #3 on: January 19, 2010, 09:20 »
The three attached scripts were, essentially, used to produce the figure in the previous post, in Matlab.

To use them (after downloading and saving in a suitable directory):

1) Edit the script calculate_overlap_populations.py. Probably you only need to change line 4, to give the correct name of the checkpoint file
2) Run the script, and pipe the output to a file, say "op.out"
3) In Matlab, edit the script op_plot.m, in particular line 4 to point to the relevant output file (op.out), and run it. You probably will need to play around with the parameters on lines 6-14 to get a nice plot

Hope it works for you! In the future, this should be possible to do in VNL.

Offline perfetti

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: us
  • Reputation: 2
    • View Profile
Re: Could ATK calculate the "bond population" ?
« Reply #4 on: October 11, 2012, 17:14 »
Hi every one,
    I want to calculate the Mulliken overlap populations. And I found this old post. However, the script is not compatible with the VNL 12.2.0 I am using. Typical error is like this: 
 
from ATK.TwoProbe import *
ImportError: No module named ATK.TwoProbe
   

I think I need to rewrite the script but I am not good at coding. Can anyone help me out with the coding, or tell me there's a way to calculate the MOP in vnl 12.2.0?
 
Best regards.


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Could ATK calculate the "bond population" ?
« Reply #5 on: October 11, 2012, 21:07 »
Very simple :)
Code: python
m = MullikenPopulation(configuration)
print m.bond(5,18)
gives you the Mulliken overlap population betweens atoms 5 and 18. And so on. See http://quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.mullikenpopulation.html

Offline perfetti

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: us
  • Reputation: 2
    • View Profile
Re: Could ATK calculate the "bond population" ?
« Reply #6 on: October 11, 2012, 23:25 »
Thanks Dr. Blom.

But if there are many atoms in my device, could it just generate the MOP bonds between each other atoms at one time?

I also want to get the plot as showed in this post, is there any easy way to do it?

Thanks.

BR.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Could ATK calculate the "bond population" ?
« Reply #7 on: October 11, 2012, 23:31 »
For multiple atoms you would of course loop over all pairs of atoms, the function is fast anyway.

The plot is highly non-trivial, it was made with Matlab a long time ago. I have no alternative solution today, but VNL 13.2 is being engineered towards making such plots possible.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Could ATK calculate the "bond population" ?
« Reply #8 on: October 12, 2012, 11:03 »
Turns out I had a JMol version for an ancient ATK version. I modernized it to work with the new ATK. You need both files.

You need to edit the filename in the script to make it find your NC file with the converged calculation. Running the script as

atkpython mulliken_jmol_script.py

produces two files: an ".xyz" file and a ".jmol" file. Drop the ".xyz" file on JMol, then the ".jmol" file and then open File>Script Editor and click "Run"

Many plot options can be tuned, and are explained in the file. One may need to experiment with these a bit to get a good picture.

Offline perfetti

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: us
  • Reputation: 2
    • View Profile
Re: Could ATK calculate the "bond population" ?
« Reply #9 on: October 12, 2012, 17:31 »
1)I generated the two files, and throw them to Jmol as you said, then I opened File>Script Editor and click "Run",
but nothing happened.

2)What's the colormap.py for?
   So this time it has no relation with Matlab, only Jmol itself could get the final plot?

Thank you.


Turns out I had a JMol version for an ancient ATK version. I modernized it to work with the new ATK. You need both files.

You need to edit the filename in the script to make it find your NC file with the converged calculation. Running the script as

atkpython mulliken_jmol_script.py

produces two files: an ".xyz" file and a ".jmol" file. Drop the ".xyz" file on JMol, then the ".jmol" file and then open File>Script Editor and click "Run"

Many plot options can be tuned, and are explained in the file. One may need to experiment with these a bit to get a good picture.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Could ATK calculate the "bond population" ?
« Reply #10 on: October 13, 2012, 14:47 »
1. More info needed. Do you at least see the structure when dropping the XYZ file? Is the XYZ file correct?

2. No Matlab needed, I just encoded the Matlab colormaps into Python. Guess I could have used the colormaps from Matplotlib instead, but I didn't feel like rewriting this class right now.

Offline perfetti

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: us
  • Reputation: 2
    • View Profile
Re: Could ATK calculate the "bond population" ?
« Reply #11 on: October 15, 2012, 15:35 »
I was experimenting with a H2O molecule.
When I throw the xyz file into Jmol, it appears as the first pic,
after I throw the jmol file into it, it appears as the second pic.

Then I clicked  the run button, and no change appeared. It shaked once, and then stayed the same.
I don't know what should happen cause I never used Jmol before.


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Could ATK calculate the "bond population" ?
« Reply #12 on: October 15, 2012, 15:46 »
So, it looks good. This is precisely what it's supposed to do.

Offline perfetti

  • QuantumATK Guru
  • ****
  • Posts: 103
  • Country: us
  • Reputation: 2
    • View Profile
Re: Could ATK calculate the "bond population" ?
« Reply #13 on: December 7, 2012, 19:44 »
Dear Dr. Blom and everyone,
       I am using your method to plot the mulliken population, it works well, but I have a few questions:
       1) does the generated bond thickness indicate the strength of the bond?
       2) If so, I got very thin bond in some area, but when I try to use the picture, the bond is too thin to be visible especially after shrank. Could one find a way to manipulate the thickness of the bond,( in scale), and thus it apppears in good looking?
       I am attatching the two files (.xyz, and .jmol) I got for reference.
      Best regards.
« Last Edit: December 7, 2012, 21:04 by perfetti »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Could ATK calculate the "bond population" ?
« Reply #14 on: December 7, 2012, 20:03 »
In the Python file is a parameter called "cylinder_scaling". You can increase this.

The overlap population doesn't immediately indicate the absolute bond strength, but there is a correlation since a double bond is generally stronger than a single bond. So you could say it is a measure of the bond strength, however to actually compute the bond strength you need to do more work.