Author Topic: How to make a loop for a interlayer distance scan?  (Read 3626 times)

0 Members and 1 Guest are viewing this topic.

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Dear all,

I constructed a hetero-bilayer using the "Interface" plugin, as seen in attached .py file. However, since there is no  potentials preseted for optimizing the interlayer distance of the two layers, I want to get the value by calculating the total energy of the bilayer system with various interlayer distance values. I tried to follow the tutorial "Carbon Nanotube Junctions" where there is a script dealing with different distance between two graphene nanotubes. However, because of my limited knowledge about python script, there are so many errors with my script that I'm shamed to post it here.   

What I want to do is to make a loop with various interlayer diatance. There are two layers in the bulk configuration: each of them is signed a tag named "Left_layer" and "Right_layer", respectively. Based on an original bulk configuration, each time, I want to change the distance a between these two layers a little to form a new configuration, and then calculate the total energy of this new configuration. By observing the total energy vs. interlayer distance curve, I can get the idea which value of interlayer distance is the optimum one.

There is another question: if the van der Waals interaction is not considered, can I get the right figure of the total energy of the system? Can I get the correct value of interlayer distance by a scan without considering the van der Waals interaction? I tried to follow the tutorial "DFT-D and basis-set superposition error", however, it took me too long the time that I don't want to use it any more.

Thanks a lot for anyone who is willing to help me!

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: How to make a loop for a interlayer distance scan?
« Reply #1 on: May 15, 2017, 21:43 »
Attached is the .py file for the hetero-bilayer system.

Thanks!

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: How to make a loop for a interlayer distance scan?
« Reply #2 on: May 15, 2017, 22:53 »
I tried to write a script about the interlayer distance scan, seen as the attached .py fil. Can anybody here tell me if anything wrong with my script? Thank very much!

Offline Daniele Stradi

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 286
  • Country: dk
  • Reputation: 3
    • View Profile
Re: How to make a loop for a interlayer distance scan?
« Reply #3 on: May 16, 2017, 10:15 »
Looks OK and does the job  :D

Offline lknife

  • QuantumATK Guru
  • ****
  • Posts: 214
  • Country: us
  • Reputation: 1
    • View Profile
Re: How to make a loop for a interlayer distance scan?
« Reply #4 on: May 16, 2017, 15:24 »
Dear DAniele Stradi,

Thank you for your kind reply! I have run the script and there's just a minor error: I forgot to add a code line "import pylab" at the beginning of the script. However, it did work.

Since the calculated minimum interlayer distance was 6.884 angstrom, a little bit larger than some literatures, I am not sure if it is reasonable. In terms of the other question, "if the van der Waals interaction is not considered, can I get the right figure of the total energy of the system? Can I get the correct value of interlayer distance by a scan without considering the van der Waals interaction?", I am also looking forward to your valuable comments.

By the way, the total energy of the system was calculated using DFT-GGA method without consideration of van der Waals interaction.

Thank you again for your time!

lknife