Author Topic: How can I print Hamiltonian and overlap matrix for a molecular junction device?  (Read 1854 times)

0 Members and 1 Guest are viewing this topic.

Offline sumitn60

  • Regular QuantumATK user
  • **
  • Posts: 14
  • Country: de
  • Reputation: 0
  • ATK User
    • View Profile
Hi,

While doing device NEGF-DFT calculation, is it possible to print the Hamiltonian and Overlap matrices?

Please suggest how to print/extract them from a converged NEGF-DFT calculation.

I really appreciate any help you can provide.

Sumit
« Last Edit: April 4, 2022, 17:22 by sumitn60 »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys

Offline sumitn60

  • Regular QuantumATK user
  • **
  • Posts: 14
  • Country: de
  • Reputation: 0
  • ATK User
    • View Profile
Hi Anders,

Thank you for your response.

I tried to print those matrices for simple molecule_configuration (Benzene), but I didn't find anything. I have attached the input file; please suggest where I'm making a mistake.

Thanks

Sumit

Offline sumitn60

  • Regular QuantumATK user
  • **
  • Posts: 14
  • Country: de
  • Reputation: 0
  • ATK User
    • View Profile
Hi Anders,

Adding:

print('Hamiltonian : ', hamiltonian)
print('Overlap : ', overlap)
print('')

I'm able to print the Hamiltonian and Overlap for each SCF cycle. I have added the output below.

Thank You

Sumit



| Calculation Converged in 13 steps                                            |
|                                                                              |
| Fermi Level  = -3.889050 eV                                                  |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                                                                              |
| DFT Calculation  [Finished Wed Apr  6 12:59:52 2022]                         |
|                                                                              |
+------------------------------------------------------------------------------+


Hamiltonian :  [[-3.59032220e-01-1.29056719e-20j  3.46412440e-12-1.21667632e-12j
   8.17982219e-02+1.44061808e-20j ... -7.19852035e-08-4.70211730e-09j
   8.39974836e-02-1.84622872e-09j  9.38259570e-08+3.90192286e-09j]
 [ 3.46412440e-12+1.21667632e-12j -3.59029030e-01+1.29056719e-20j
   4.45180078e-12+1.09713035e-12j ... -7.54532144e-02-4.43759714e-09j
  -9.37885388e-08+3.89844158e-09j  8.39971402e-02+1.84622872e-09j]
 [ 8.17982219e-02-1.44061808e-20j  4.45180078e-12-1.09713035e-12j
   4.59094866e-01-6.82920960e-21j ...  1.76589278e-07+1.09730678e-08j
  -9.22280117e-03-9.46961721e-09j -6.39674337e-08-1.41767968e-09j]
 ...
 [-7.19852035e-08+4.70211730e-09j -7.54532144e-02+4.43759714e-09j
   1.76589278e-07-1.09730678e-08j ... -4.35606266e-02-2.56545139e-24j
  -6.43143228e-07-6.79178074e-10j -1.48253265e-03-3.49468552e-08j]
 [ 8.39974836e-02+1.84622872e-09j -9.37885388e-08-3.89844158e-09j
  -9.22280117e-03+9.46961721e-09j ... -6.43143228e-07+6.79178074e-10j
   1.46149708e-01-3.67281117e-22j -1.01890544e-12-6.57268857e-13j]
 [ 9.38259570e-08-3.90192286e-09j  8.39971402e-02-1.84622872e-09j
  -6.39674337e-08+1.41767968e-09j ... -1.48253265e-03+3.49468552e-08j
  -1.01890544e-12+6.57268857e-13j  1.46155125e-01+3.67281117e-22j]] Hartree
Overlap :  [[ 9.99999999e-01+0.j  0.00000000e+00+0.j -8.47863236e-10+0.j ...
   0.00000000e+00+0.j -1.51349581e-01+0.j  0.00000000e+00+0.j]
 [ 0.00000000e+00+0.j  9.99999999e-01+0.j  0.00000000e+00+0.j ...
   8.94296345e-02+0.j  0.00000000e+00+0.j -1.51349581e-01+0.j]
 [-8.47863236e-10+0.j  0.00000000e+00+0.j  1.00000000e+00+0.j ...
   0.00000000e+00+0.j  1.89803809e-01+0.j  0.00000000e+00+0.j]
 ...
 [ 0.00000000e+00+0.j  8.94296345e-02+0.j  0.00000000e+00+0.j ...
   9.99999997e-01+0.j  0.00000000e+00+0.j  0.00000000e+00+0.j]
 [-1.51349581e-01+0.j  0.00000000e+00+0.j  1.89803809e-01+0.j ...
   0.00000000e+00+0.j  9.99999997e-01+0.j  0.00000000e+00+0.j]
 [ 0.00000000e+00+0.j -1.51349581e-01+0.j  0.00000000e+00+0.j ...
   0.00000000e+00+0.j  0.00000000e+00+0.j  9.99999997e-01+0.j]]

......................................

Hamiltonian :  [[-3.59032220e-01-1.29056719e-20j  3.46412440e-12-1.21667632e-12j
   8.17982219e-02+1.44061808e-20j ... -7.19852035e-08-4.70211730e-09j
   8.39974836e-02-1.84622872e-09j  9.38259570e-08+3.90192286e-09j]
 [ 3.46412440e-12+1.21667632e-12j -3.59029030e-01+1.29056719e-20j
   4.45180078e-12+1.09713035e-12j ... -7.54532144e-02-4.43759714e-09j
  -9.37885388e-08+3.89844158e-09j  8.39971402e-02+1.84622872e-09j]
 [ 8.17982219e-02-1.44061808e-20j  4.45180078e-12-1.09713035e-12j
   4.59094866e-01-6.82920960e-21j ...  1.76589278e-07+1.09730678e-08j
  -9.22280117e-03-9.46961721e-09j -6.39674337e-08-1.41767968e-09j]
 ...
 [-7.19852035e-08+4.70211730e-09j -7.54532144e-02+4.43759714e-09j
   1.76589278e-07-1.09730678e-08j ... -4.35606266e-02-2.56545139e-24j
  -6.43143228e-07-6.79178074e-10j -1.48253265e-03-3.49468552e-08j]
 [ 8.39974836e-02+1.84622872e-09j -9.37885388e-08-3.89844158e-09j
  -9.22280117e-03+9.46961721e-09j ... -6.43143228e-07+6.79178074e-10j
   1.46149708e-01-3.67281117e-22j -1.01890544e-12-6.57268857e-13j]
 [ 9.38259570e-08-3.90192286e-09j  8.39971402e-02-1.84622872e-09j
  -6.39674337e-08+1.41767968e-09j ... -1.48253265e-03+3.49468552e-08j
  -1.01890544e-12+6.57268857e-13j  1.46155125e-01+3.67281117e-22j]] Hartree
Overlap :  [[ 9.99999999e-01+0.j  0.00000000e+00+0.j -8.47863236e-10+0.j ...
   0.00000000e+00+0.j -1.51349581e-01+0.j  0.00000000e+00+0.j]
 [ 0.00000000e+00+0.j  9.99999999e-01+0.j  0.00000000e+00+0.j ...
   8.94296345e-02+0.j  0.00000000e+00+0.j -1.51349581e-01+0.j]
 [-8.47863236e-10+0.j  0.00000000e+00+0.j  1.00000000e+00+0.j ...
   0.00000000e+00+0.j  1.89803809e-01+0.j  0.00000000e+00+0.j]
 ...
 [ 0.00000000e+00+0.j  8.94296345e-02+0.j  0.00000000e+00+0.j ...
   9.99999997e-01+0.j  0.00000000e+00+0.j  0.00000000e+00+0.j]
 [-1.51349581e-01+0.j  0.00000000e+00+0.j  1.89803809e-01+0.j ...
   0.00000000e+00+0.j  9.99999997e-01+0.j  0.00000000e+00+0.j]
 [ 0.00000000e+00+0.j -1.51349581e-01+0.j  0.00000000e+00+0.j ...
   0.00000000e+00+0.j  0.00000000e+00+0.j  9.99999997e-01+0.j]]

Hamiltonian :  [[-3.59032220e-01-1.29056719e-20j  3.46412440e-12-1.21667632e-12j
   8.17982219e-02+1.44061808e-20j ... -7.19852035e-08-4.70211730e-09j
   8.39974836e-02-1.84622872e-09j  9.38259570e-08+3.90192286e-09j]
 [ 3.46412440e-12+1.21667632e-12j -3.59029030e-01+1.29056719e-20j
   4.45180078e-12+1.09713035e-12j ... -7.54532144e-02-4.43759714e-09j
  -9.37885388e-08+3.89844158e-09j  8.39971402e-02+1.84622872e-09j]
 [ 8.17982219e-02-1.44061808e-20j  4.45180078e-12-1.09713035e-12j
   4.59094866e-01-6.82920960e-21j ...  1.76589278e-07+1.09730678e-08j
  -9.22280117e-03-9.46961721e-09j -6.39674337e-08-1.41767968e-09j]
 ...
 [-7.19852035e-08+4.70211730e-09j -7.54532144e-02+4.43759714e-09j
   1.76589278e-07-1.09730678e-08j ... -4.35606266e-02-2.56545139e-24j
  -6.43143228e-07-6.79178074e-10j -1.48253265e-03-3.49468552e-08j]
 [ 8.39974836e-02+1.84622872e-09j -9.37885388e-08-3.89844158e-09j
  -9.22280117e-03+9.46961721e-09j ... -6.43143228e-07+6.79178074e-10j
   1.46149708e-01-3.67281117e-22j -1.01890544e-12-6.57268857e-13j]
 [ 9.38259570e-08-3.90192286e-09j  8.39971402e-02-1.84622872e-09j
  -6.39674337e-08+1.41767968e-09j ... -1.48253265e-03+3.49468552e-08j
  -1.01890544e-12+6.57268857e-13j  1.46155125e-01+3.67281117e-22j]] Hartree
Overlap :  [[ 9.99999999e-01+0.j  0.00000000e+00+0.j -8.47863236e-10+0.j ...
   0.00000000e+00+0.j -1.51349581e-01+0.j  0.00000000e+00+0.j]
 [ 0.00000000e+00+0.j  9.99999999e-01+0.j  0.00000000e+00+0.j ...
   8.94296345e-02+0.j  0.00000000e+00+0.j -1.51349581e-01+0.j]
 [-8.47863236e-10+0.j  0.00000000e+00+0.j  1.00000000e+00+0.j ...
   0.00000000e+00+0.j  1.89803809e-01+0.j  0.00000000e+00+0.j]
 ...
 [ 0.00000000e+00+0.j  8.94296345e-02+0.j  0.00000000e+00+0.j ...
   9.99999997e-01+0.j  0.00000000e+00+0.j  0.00000000e+00+0.j]
 [-1.51349581e-01+0.j  0.00000000e+00+0.j  1.89803809e-01+0.j ...
   0.00000000e+00+0.j  9.99999997e-01+0.j  0.00000000e+00+0.j]
 [ 0.00000000e+00+0.j -1.51349581e-01+0.j  0.00000000e+00+0.j ...
   0.00000000e+00+0.j  0.00000000e+00+0.j  9.99999997e-01+0.j]]

Hamiltonian :  [[-3.59032220e-01-1.29056719e-20j  3.46412440e-12-1.21667632e-12j
   8.17982219e-02+1.44061808e-20j ... -7.19852035e-08-4.70211730e-09j
   8.39974836e-02-1.84622872e-09j  9.38259570e-08+3.90192286e-09j]
 [ 3.46412440e-12+1.21667632e-12j -3.59029030e-01+1.29056719e-20j
   4.45180078e-12+1.09713035e-12j ... -7.54532144e-02-4.43759714e-09j
  -9.37885388e-08+3.89844158e-09j  8.39971402e-02+1.84622872e-09j]
 [ 8.17982219e-02-1.44061808e-20j  4.45180078e-12-1.09713035e-12j
   4.59094866e-01-6.82920960e-21j ...  1.76589278e-07+1.09730678e-08j
  -9.22280117e-03-9.46961721e-09j -6.39674337e-08-1.41767968e-09j]
 ...
 [-7.19852035e-08+4.70211730e-09j -7.54532144e-02+4.43759714e-09j
   1.76589278e-07-1.09730678e-08j ... -4.35606266e-02-2.56545139e-24j
  -6.43143228e-07-6.79178074e-10j -1.48253265e-03-3.49468552e-08j]
 [ 8.39974836e-02+1.84622872e-09j -9.37885388e-08-3.89844158e-09j
  -9.22280117e-03+9.46961721e-09j ... -6.43143228e-07+6.79178074e-10j
   1.46149708e-01-3.67281117e-22j -1.01890544e-12-6.57268857e-13j]
 [ 9.38259570e-08-3.90192286e-09j  8.39971402e-02-1.84622872e-09j
  -6.39674337e-08+1.41767968e-09j ... -1.48253265e-03+3.49468552e-08j
  -1.01890544e-12+6.57268857e-13j  1.46155125e-01+3.67281117e-22j]] Hartree
Overlap :  [[ 9.99999999e-01+0.j  0.00000000e+00+0.j -8.47863236e-10+0.j ...
   0.00000000e+00+0.j -1.51349581e-01+0.j  0.00000000e+00+0.j]
 [ 0.00000000e+00+0.j  9.99999999e-01+0.j  0.00000000e+00+0.j ...
   8.94296345e-02+0.j  0.00000000e+00+0.j -1.51349581e-01+0.j]
 [-8.47863236e-10+0.j  0.00000000e+00+0.j  1.00000000e+00+0.j ...
   0.00000000e+00+0.j  1.89803809e-01+0.j  0.00000000e+00+0.j]
 ...
 [ 0.00000000e+00+0.j  8.94296345e-02+0.j  0.00000000e+00+0.j ...
   9.99999997e-01+0.j  0.00000000e+00+0.j  0.00000000e+00+0.j]
 [-1.51349581e-01+0.j  0.00000000e+00+0.j  1.89803809e-01+0.j ...
   0.00000000e+00+0.j  9.99999997e-01+0.j  0.00000000e+00+0.j]
 [ 0.00000000e+00+0.j -1.51349581e-01+0.j  0.00000000e+00+0.j ...
   0.00000000e+00+0.j  0.00000000e+00+0.j  9.99999997e-01+0.j]]

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Looks like you got it to work. Now the main question of course is what to use this for :-)

The ordering of the matrix follows that of the MullikenPopulation output, and also note that we use cubic harmonics, not spherical ones, so for d-shells the basis functions are
 xy     zy  zz-rr     zx  xx-yy
and for p the ordering is not xyz but rather
y  z  x


Offline sumitn60

  • Regular QuantumATK user
  • **
  • Posts: 14
  • Country: de
  • Reputation: 0
  • ATK User
    • View Profile
Hi,

I wanted to plot the Im(H), which will sufficiently modify with spin-orbit calculations ( I mean, there will be more non-trivial terms at the off-diagonal, including spin-orbit interactions)...

I needed the whole matrix, but the format is not so straightforward; I want the matrix in square form. Is there some way to do that? Any help is very much appreciated.

Thank you

Sumit

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
The matrix should be square already