Author Topic: How to generate zigzag edge GNR with nanoribbon function?  (Read 13298 times)

0 Members and 1 Guest are viewing this topic.

Offline minkowsky

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: us
  • Reputation: 0
    • View Profile
the document tells nothing about this function and shows a wrong example.
I need to generate large among of GNRs with different width. I don't want to use mouse to do hundreds of times VNL operation. I know ribbon = NanoRibbon(10,0,Carbon,Carbon) can generate 10 atom armchair GNR. But how could I generate zigzag edge GNR with nanoribbon function? And how to generate the GNR and passivate the edge with desired atom? Could anyone provide a right document for this function? Really disappointed to the documents.
« Last Edit: November 30, 2012, 02:36 by minkowsky »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5410
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: How to generate zigzag edge GNR with nanoribbon function?
« Reply #1 on: November 30, 2012, 12:07 »
I apologize for the confusion. We decided some time ago to not really support the function NanoRibbon, since it's so easy now to build graphene nanoribbons in the graphical interface, in the Builder in VNL. But fortunately it still works, and for a zigzag edge you would just do NanoRibbon(10,10) for instance. The example in the manual is, however, indeed wrong for the passivation. Here is how you need to do it now:
Code: python
from NL.CommonConcepts.Configurations.Passivate import passivate
ribbon = NanoRibbon(10,10)
ribbon = passivate(ribbon,selection=[True]*len(ribbon))

Offline minkowsky

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: us
  • Reputation: 0
    • View Profile
Re: How to generate zigzag edge GNR with nanoribbon function?
« Reply #2 on: November 30, 2012, 23:40 »
Thanks a lot.

What't the Methods to replace any atoms in one BulkConfiguration of ribbon?

Offline minkowsky

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: us
  • Reputation: 0
    • View Profile
Re: How to generate zigzag edge GNR with nanoribbon function?
« Reply #3 on: December 1, 2012, 02:36 »
Could you provide me the document for all the function in VNL? Thanks
I apologize for the confusion. We decided some time ago to not really support the function NanoRibbon, since it's so easy now to build graphene nanoribbons in the graphical interface, in the Builder in VNL. But fortunately it still works, and for a zigzag edge you would just do NanoRibbon(10,10) for instance. The example in the manual is, however, indeed wrong for the passivation. Here is how you need to do it now:
Code: python
from NL.CommonConcepts.Configurations.Passivate import passivate
ribbon = NanoRibbon(10,10)
ribbon = passivate(ribbon,selection=[True]*len(ribbon))

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5410
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: How to generate zigzag edge GNR with nanoribbon function?
« Reply #4 on: December 3, 2012, 05:41 »
There is a complete description of the public API in the Reference Manual. However, in addition to that there is also a "secret" API which we use internally, which contains hundreds of useful functions. The reason these are publicly documented is mostly because we want to be free to change them as we like and need - and if they are public and people start using them, you get into issues with backwards compatibility. Since most of the framework is object-oriented, the easiest way to find some of the "hidden" functionality is to query the objects. If you start "atkpython" in an interactive session, you can for instance type
Code: python
dir(BulkConfiguration)
and find the method you are looking for in this case: the private (and thus undocumented) "_changeAtoms". To access the doc-string for that, type
Code: python
help BulkConfiguration._changeAtoms
which at least shows which arguments you need to provide. So to change atom numbers 4,5 and 10 (first atom has index 0) to Ruthenium, you can do
Code: python
my_system = NanoRibbon(10,10)
my_system._changeAtoms(indices=[4,5,10], elements=[Ruthenium,]*3)
nlprint(my_system)
And so on ;)

Offline minkowsky

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: us
  • Reputation: 0
    • View Profile
Re: How to generate zigzag edge GNR with nanoribbon function?
« Reply #5 on: December 5, 2012, 04:24 »
Thanks a lot.

How can I find the functions under NL.CommonConcepts.Configurations? And how can I use the molecular in database?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5410
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: How to generate zigzag edge GNR with nanoribbon function?
« Reply #6 on: December 5, 2012, 16:18 »
As I mentioned above, you are not really supposed to have access to all functions in NL.something, since it's not part of the open API. Maybe later we can provide some deeper insight into this for Python experts, but we don't have any such material to share right now. We can help with specific questions, however.

I didn't understand the question on molecules. You can open the Database from the Builder and click "+" to add the selected molecule to the Stash, and then use it from there to modify it, add it to other structures, etc.