Author Topic: Python Files in VNL  (Read 6642 times)

0 Members and 1 Guest are viewing this topic.

Offline sergio

  • Heavy QuantumATK user
  • ***
  • Posts: 56
  • Reputation: 0
    • View Profile
Python Files in VNL
« on: July 28, 2009, 23:05 »
Hi,

I am using VNL. I have edited python files and added some lines into them to get some specific two probe systems. However when I drag and drop this python file directly to atomic manipulator, somehow the system configured in the python file has some modifications, it is deteriorating. Also in the atomic manipulator on the left panel repetition tab comes out instead of surface tab. Is this because of not exporting the python file to vnl file? If it is so, how can I export the python file to vnl file in VNL?

Many Thanks for your help,

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: Python Files in VNL
« Reply #1 on: July 29, 2009, 06:53 »
Also in the atomic manipulator on the left panel repetition tab comes out instead of surface tab. Is this because of not exporting the python file to vnl file?
It is normal. This is because you dragged the script file of a completed two-probe system  into the "Atomic Manipulator".  If you drag the script file of a bulk system, the "Surface" tab will appear on the left panel.

Quote
how can I export the python file to vnl file in VNL?

When you use "Nanolanguage Scripter" to edit your script file, you should specify the filename  in the "Analysis" tab to save the configuration and results into a '.vnl' file and then run this script file.

When you use the "Atomic Manipulator" to build your two-probe system, you can export it into a '.vnl' file.


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Python Files in VNL
« Reply #2 on: July 29, 2009, 10:00 »
If you have the geometry already defined in the Python script, there isn't really any need to save it as a VNL file, you can just drag the geometry directly to the NanoLanguage Scripter, as ZH mentions. Having the geometry in a VNL file can however be convenient if you want to reuse it several times, or import it into another script, without having to drag along the original Python code. Thus, if you're anyway playing with the Python code, you can just add a few lines of code to generate a VNL file:
Code
f = VNLFile("/home/user/my_geometry.vnl")
f.addToSample(my_configuration,"My nice geometry")
(obviously you have to change the filename and variable name, and the label, to match your specific script and conditions).

Offline sergio

  • Heavy QuantumATK user
  • ***
  • Posts: 56
  • Reputation: 0
    • View Profile
Re: Python Files in VNL
« Reply #3 on: July 29, 2009, 12:54 »
Thanks for your replies. In this way I can make some calculations. Actually the main reason that I have asked this question is that, when I drop the python file, without producing .vnl file,  to atomic manipulator there are some changes in the geometry(expecially in coordinates) of the system. For example there can be shift in the sample placed in the central region of the two probe system. In addtion to that even if I introduced surface layers in the python file, in the left panel of the atomic manipulator surface layers get zero value. Is this because of completed two-probe system in the python file as ZH indicated?

Thanks

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Python Files in VNL
« Reply #4 on: July 29, 2009, 12:59 »
The concepts of surface layers are a bit different from the respective perspectives of the Python configuration and the Atomic Manipulator, so this is nothing to worry too much about.

If the geometry becomes distorted, it might however be an indication that it's not entirely correctly set up. In particular, pay special attention to the "alignment atoms". One way to check is to instead drop the Python file on the Nanosope. If it also looks weird there, then you can be quite sure there is some error in the setup.

Offline sergio

  • Heavy QuantumATK user
  • ***
  • Posts: 56
  • Reputation: 0
    • View Profile
Re: Python Files in VNL
« Reply #5 on: July 29, 2009, 14:48 »
Dr. Blom,

Thanks for your reply. I will check the system in Nanoscope as well.