Author Topic: Dynamicalmatrix huge matrix size  (Read 6256 times)

0 Members and 1 Guest are viewing this topic.

Offline korand

  • Regular QuantumATK user
  • **
  • Posts: 13
  • Country: us
  • Reputation: 0
    • View Profile
Dynamicalmatrix huge matrix size
« on: June 20, 2021, 08:56 »
   I am trying to calculate Bi2Se3 "dielectric tensor" with ATK2020.9. I have reviewed manuals and webinars precisely and I found that I should apply "Forcefield" calculator to evaluate "dynamicalmatrix", and "LCAO" to calculate other modules like "optical spectrum, Born charge effects and dielectric tensor".
I found that the reason for this setting might be due the huge computational work in "dynamical matrix". So, exerting "forcefield" calculation will reduce the amount of cpu and ram usage for such module. However, selected configuration of Bi2Se3 is not compatible with "forcefield and semiEmprical" calculators.
Instead of that using LCAO for dynamicalmatrix, after few hours, the simulation stops in the first force calculation because of matrix large size. I tried to set basis with low precision; however, the results does not have enough accuracy like what is mentioned in dynamicalmatrix manual documents.

In the following I have attached the log and the python code.
I will appreciate it if you give advice to solve this issue.

Best regards,
Korand

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Dynamicalmatrix huge matrix size
« Reply #1 on: June 21, 2021, 08:06 »
There are a few things here and there that could be finetuned, but the most important thing you should fix first is that the automatically detected repetitions for the system is 9x9x3. Since this is a 2D sheet, you really want this to be 9x9x1, or, to run a smaller test calculation, perhaps just 5x5x1 or 7x7x1. You could make the Automatic repetition return 1 in C by including more vacuum, but 28 Å is probably enough.

So, instead, simply set the repetitions manually instead of using the Automatic keyword, and the calculation will use much, much less memory. Since there are 15 atoms in the original cell, currently you are running calculations with 9*9*3*15=3645 atom, which is very heavy, and completely unnecessary, since it should just have been 9*9*15 in the most accurate case. Still 1200 atoms or so, but that is much more manageable. I would however suggest first running 5x5x1 (375 atoms) and then 7x7x1 (735 atoms). If these results are similar, that should be accurate enough.

And finally, you are running on a single machine, so yes, these calculations will take time. If you have any chance to run in parallel on multiple nodes, that will speed things up essentially linearly by the number of additional computers you use.
« Last Edit: June 21, 2021, 08:09 by Anders Blom »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Dynamicalmatrix huge matrix size
« Reply #2 on: June 21, 2021, 08:41 »
Btw, there are forcefields for Bi2Te3, such as

Qiu, B.; Ruan, X. L. Molecular dynamics simulations of lattice thermal conductivity of bismuth telluride using two-body interatomic potentials Phys. Rev. B 2009, 80, 165203
Huang, B. L.; Kaviany, M. Ab initio and molecular dynamics predictions for electron and phonon transport in bismuth telluride Phys. Rev. B 2008, 77, 125209

But I could not find one for Bi2Se3... Maybe a case for our new machine-learned Moment Tensor Potentials...!

Offline korand

  • Regular QuantumATK user
  • **
  • Posts: 13
  • Country: us
  • Reputation: 0
    • View Profile
Re: Dynamicalmatrix huge matrix size
« Reply #3 on: June 21, 2021, 11:02 »
There are a few things here and there that could be finetuned, but the most important thing you should fix first is that the automatically detected repetitions for the system is 9x9x3. Since this is a 2D sheet, you really want this to be 9x9x1, or, to run a smaller test calculation, perhaps just 5x5x1 or 7x7x1. You could make the Automatic repetition return 1 in C by including more vacuum, but 28 Å is probably enough.

So, instead, simply set the repetitions manually instead of using the Automatic keyword, and the calculation will use much, much less memory. Since there are 15 atoms in the original cell, currently you are running calculations with 9*9*3*15=3645 atom, which is very heavy, and completely unnecessary, since it should just have been 9*9*15 in the most accurate case. Still 1200 atoms or so, but that is much more manageable. I would however suggest first running 5x5x1 (375 atoms) and then 7x7x1 (735 atoms). If these results are similar, that should be accurate enough.

And finally, you are running on a single machine, so yes, these calculations will take time. If you have any chance to run in parallel on multiple nodes, that will speed things up essentially linearly by the number of additional computers you use.

Dear Dr Blom

I appreciate the time you spent to help me.

I precisely follow the instruction and user manual of quantumATK and in the webinars I found that for 2D material I need one repetition. However, my configuration is not 2D and actually it is a bulk configuration. Therefore I should at least set 3 repetitions in C direction. In this example for next simulation I will test 5x5x3 repetitions in Dynamicalmatrix and also set potentials to lower levels of accuracy.

Dear Dr Blom, I had a hard work to install ATK2020 on the HPC server, since it needs GPU, just launch on the a normal windows 10, does not match with remote desktop. My personal 2Core server does not have GPU and other professional accessible HPC server does support batch and ATK is not compatible with its terminal environment. Thus, I installed this version on a workstation.
« Last Edit: June 21, 2021, 11:07 by korand »

Offline korand

  • Regular QuantumATK user
  • **
  • Posts: 13
  • Country: us
  • Reputation: 0
    • View Profile
Re: Dynamicalmatrix huge matrix size
« Reply #4 on: June 21, 2021, 11:02 »
Btw, there are forcefields for Bi2Te3, such as

Qiu, B.; Ruan, X. L. Molecular dynamics simulations of lattice thermal conductivity of bismuth telluride using two-body interatomic potentials Phys. Rev. B 2009, 80, 165203
Huang, B. L.; Kaviany, M. Ab initio and molecular dynamics predictions for electron and phonon transport in bismuth telluride Phys. Rev. B 2008, 77, 125209

But I could not find one for Bi2Se3... Maybe a case for our new machine-learned Moment Tensor Potentials...!

Dear Dr Blom

Bi2Se3 and Bi2Te3 have completely opposite feature in the terms of electrical behavior as far as I know.
That's true, I found that yours new machine-learned potentials would be useful in this case. However, I do not have access to this version.  I will ask my question about this issue in the webinar at Jun 22 from lecturers.

Thanks in advance
Korand
« Last Edit: June 21, 2021, 11:08 by korand »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Dynamicalmatrix huge matrix size
« Reply #5 on: June 21, 2021, 21:29 »
Oh yes, sorry - I was misled by the long cell size in C, but of course a topological insulator needs that! (I have recently looked into 2D topological insulators, so I think that's where my mind went.)

Still, 5x5 or 7x7 will be significantly easier to run than 9x9!

To run on the HPC, you don't need to run the GUI (NanoLab) there, only  the calculations, and those do not require any GPU. The simplest approach is just to copy your input Python file to the cluster and run it manually from the command line, but you can also set up the Job Manager to submit jobs into the queue (if you have one) on the HPC directly from NanoLab running on your Windows machine. If you need help to set that up, let us know, but first see https://docs.quantumatk.com/tutorials/job_manager_remote/job_manager_remote.html

MTP for topological insulators would be so cool - we will also do a separate webinar on that in August (I mean MTP, not for topological insulators specifically).

Offline Tue Gunst

  • Heavy QuantumATK user
  • ***
  • Posts: 46
  • Country: dk
  • Reputation: 3
    • View Profile
Re: Dynamicalmatrix huge matrix size
« Reply #6 on: July 2, 2021, 13:18 »
Hi,
Important here: Notice that the DielectricTensor only depends on and uses on the q=0 (long wavelength) phonons.
If you have a well-converged DFT calculator in terms of k-point sampling one will obtain the correct q=0 vibrations with repetitions=(1,1,1).
This should solve your memory problem.
I would still recommend to use repetitions for checking/validating the phonon band structures but if your setup does not allow for that then doing repetitions=(1,1,1) gives correct results for the dielectric tensor.
Tue