Author Topic: confused by how to set the distance between molecule and electrode again :'(  (Read 5736 times)

0 Members and 1 Guest are viewing this topic.

Offline fanjiaping

  • Heavy QuantumATK user
  • ***
  • Posts: 67
  • Reputation: 0
    • View Profile
   Dear
   I have learned the method about how to obtain the distance by calculating the total energy of the bulk (or we can call it as molecule-extend). That is to say, the distance could be obtained when the lowest total energy is reached. Unfortunately, the calculated energy can’t reach the lowest one point, and instead of that several points on a line are obtained. Therefore, I cannot get the exact distance between the certain molecule and the gold electrode. I am confused by the phenomenon and wonder how I can get the right distance. Could you give me some advices? Additionally, the script and the table of the total energy versus distance are in the attachment.
Thank you!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
The method is right. Just get more decimals on the numbers, then you should hopefully see the real minimum!

Offline fanjiaping

  • Heavy QuantumATK user
  • ***
  • Posts: 67
  • Reputation: 0
    • View Profile
       Thank you for your reply. but I don't still understand what is your meaning! How can I get more decimals on the numbers?  could you show more details about how to operate ?(the distance given by paper was 2.39 angstrom)
« Last Edit: October 21, 2010, 14:33 by fanjiaping »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
The Excel sheet you include only shows numbers without decimals. One of those numbers is actually the smallest one (probably), but you can only see this if you see the decimals, either by increasing the number of decimals shown in Excel, or just go to the source data and look at the numbers.

Offline fanjiaping

  • Heavy QuantumATK user
  • ***
  • Posts: 67
  • Reputation: 0
    • View Profile
thank you ! I understand your meaning! thank you very much!
« Last Edit: October 21, 2010, 14:58 by fanjiaping »

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
   but the .nc file also have't the decimals about total energy ? where can I find the decimals in total energy? or plus Exchange correlation and kinetic and so on?

Do you read the values from VNL or from atkpython?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Probably you are reading the NC file with VNL? That gives just a few decimals, if any, yes. You can use a small script instead. Let's fist imagine we have only one NC file (I know, you have many, but let's take it step by step :) ). We can then read the total energy from the NC file, and print it, using a few lines of code
Code: python
total_energy = nlread("file.nc",TotalEnergy)[0]
print "%.10f" % float(total_energy.evaluate())
This prints the total energy with a lot of decimals! Now, what to do if we have more than one file? Python to the rescue - specifically the module "glob"! Assuming we want all the NC files in the current directory:
Code: python
import glob
list_of_files = glob.glob("*.nc")
for file in list_of_files:
    total_energy = nlread(file,TotalEnergy)[0]
    print "%s\t%.10f" % (file,float(total_energy.evaluate()))
If you just want some files, just create a suitable file mask instead of "*.nc", like if your files are "abc_2.1.nc", "abc_2.2.nc", "abc_2.3.nc", and so on, use "abc*.nc". Have fun!

Offline fanjiaping

  • Heavy QuantumATK user
  • ***
  • Posts: 67
  • Reputation: 0
    • View Profile
     thank you for your kindly reply. I find I love the ATK software due to we can do what we want by using python language!