Author Topic: Error like The electrode has N-1 atoms defined while center contain N atoms  (Read 4696 times)

0 Members and 1 Guest are viewing this topic.

Offline mwu3

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: cn
  • Reputation: 0
    • View Profile
Sorry to bother you a question of ATK-VNL on transmission calculations.    I always encounter errors like below:

NL.ComputerScienceUtilities.Exceptions.NLValueError:
An electrode-like region in the central-region in a two-probe system may not contain
atoms not present in the corresponding electrode. The right electrode has 11 atoms defined,
while the right electrode-like region in the central-region contains 12 atoms.
.

However there are 12 atoms defined in electrode shown in beginning of *log file. I first build electrode and repeat more than 3 units towards the central region to build up the device, but such error happens again and again.    The py and log  file  (part deleted for size limit)   is attached, could you help me on this problem? Thank you so much for your help!
With best regards

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5405
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
This has nothing to do with the electrodes, but the part of the central region that is a copy of the electrode. For consistency reasons, this region may not contain any other atoms, and your original configuration does not (else you could not even construct the device geometry). But during the relaxation, atoms may move, and this is what happens. To avoid this, you should constrain the atoms closest to the "electrode copy", in your case try to constrain atoms 50 and 51.

Another tip is to check your geometry in the X direction - all the atoms in the left electrode etc are far outside the cell (x coordinates are -23 Å). ATK will wrap for you, but plotting may look weird.

Also, are you sure you can use such a short electrode? I think you need to double them, see http://quantumwise.com/publications/tutorials/item/115-how-to-set-up-the-electrodes-properly-in-a-two-probe-system!

Offline mwu3

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: cn
  • Reputation: 0
    • View Profile
Thank you very much for your help!
I have constrained  the atoms in electrode and around the electrode, doubled the electrode size and wrap the cell. But as the files attached, it still ended with the same error:
The right electrode has 23 atoms defined,
while the right electrode-like region in the central-region contains 24 atoms.

I have constrained all 24 atoms in right electrode initially, I don't know how can 1 atom move out of the electrode under constrain
Could you help me on this problem again?   Thank you so much!
With best regards

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5405
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
You didn't quite understand my point. The atoms you have constrained (the electrode copy) are already constrained automatically. The problem is the next few atoms, closest to the electrode copy, in your case atoms 34-39.

Offline mwu3

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: cn
  • Reputation: 0
    • View Profile
Thank you very much, but after I constrain the atoms close to the electrode copy (the files are attached),  I encounter the same error:
 An electrode-like region in the central-region in a two-probe system may not contain
atoms not present in the corresponding electrode. The right electrode has 23 atoms defined,
while the right electrode-like region in the central-region contains 24 atoms.

Does the number 23 atoms really mean that 1 of 24 atoms in electrode moves out of electrode cell during optimization?     Sorry for trouble again and thank you in advance.
With best regards

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5405
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Ok, there are a few things going on here. I'm not actually sure why it says the right electrode has 23 atoms, it's a bit odd. But the bigger problem is that have forgotten to use k-point sampling the y direction. I think this is the reason why your system in the end goes crazy - in fact in the last iteration you have no electrons anymore in the central region, and then all kinds of odd things can happen, like you get very large forces (look at the Forces report in the log file!) and atoms move to weird positions.

But, I also don't quite understand the line "Forces step = 107" - did you cut only part of the log file?

Offline Umberto Martinez

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 479
  • Country: dk
  • Reputation: 26
    • View Profile
Indeed, use k-points along Y direction.
Let me just add that  you can also set the trajectory_filename in OptimizeGeometry.
This is in general a good idea since you can monitor your optimization by actually seeing what is going on.
In your case you could have seen that already after a few steps the geometry was going crazy + SCF were actually not converging.

Offline mwu3

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: cn
  • Reputation: 0
    • View Profile
Thank you very much!  After I use kpoints in Y this error never happens again.
However, I still wonder whether I make every parameters correct, since I got the conductance in transmission spectrum=0--------even for the tunnel junction Fe-MgO-Fe in example, the conductance is around magnitude of 10e-6;      as the files attached, even I calculate the transmission of pure grapheme---I still get absolute zero. Could you help me on this problem?  Thank you very much in advance!
With best regards

Offline Umberto Martinez

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 479
  • Country: dk
  • Reputation: 26
    • View Profile
see here http://quantumwise.com/publications/tutorials/item/505-transmission-spectrum-of-perfect-sheets-of-graphene-and-mos2
please, check convergence of TS with respect of k-points (specified in the TransmissionSpectrum analysis).