Author Topic: BSSE & Possible ATK Bug  (Read 1978 times)

0 Members and 1 Guest are viewing this topic.

Offline AsifShah

  • QuantumATK Guru
  • ****
  • Posts: 144
  • Country: in
  • Reputation: 2
    • View Profile
BSSE & Possible ATK Bug
« on: September 27, 2022, 12:13 »
Q1. How to use BSSE correction for three parts of a system such as A-B-C with two interfaces between AB & BC?

Normally we have for single interface as:
CounterpoiseCorrectedLCAOCalculator = counterpoiseCorrected(
    LCAOCalculator,
    tag_list=['Left', 'Right'],
    )


For two interfaces should it be as? :
CounterpoiseCorrectedLCAOCalculator = counterpoiseCorrected(
    LCAOCalculator,
    tag_list=['Left', 'Middle', 'Right'],
    )

where left, middle, right are adjacent & comprise of full system.

Q2. In the QuantumATK version released in 2022, I see when I use BSSE correction (inbuilt) & the set K point sampling to some value say (7x7x1). I have found that in the saved .py file it always shows 2x2x1 as k point sampling. Is this some internal error with QuantumATK?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: BSSE & Possible ATK Bug
« Reply #1 on: September 28, 2022, 23:48 »
A1. If A and C are not interacting much, maybe you can just do B as one part and AC as the other?
A2: Are you sure you are not looking at the sampling density?

Offline AsifShah

  • QuantumATK Guru
  • ****
  • Posts: 144
  • Country: in
  • Reputation: 2
    • View Profile
Re: BSSE & Possible ATK Bug
« Reply #2 on: September 30, 2022, 12:20 »
Q1. No, what I am saying is I need to take BSSE at AB interface & BC interface. I am not taking AC interaction. How to do between AB & BC interface simultaneously?
Q2. yes i am sure its K points sampling (not density) that comes automatically na=2, nb=2 when saving the file after including BSSE.


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: BSSE & Possible ATK Bug
« Reply #3 on: September 30, 2022, 19:43 »
I can't reproduce the problem in Q2, see attached. What version do you use? I am on T-2022.03-SP1

For Q1, I have not tried thus myself but according to the tutorial and manual the way you suggested originally should work. I did not however mean that A and C interact, in fact the opposite. My idea was to group them together and letting them interact collectively with B. If you think about what the BSSE does, it will then compute B where AC are ghost, and AC where B is ghost, and I think that should work. It would not work, however if A and C interact.

Offline AsifShah

  • QuantumATK Guru
  • ****
  • Posts: 144
  • Country: in
  • Reputation: 2
    • View Profile
Re: BSSE & Possible ATK Bug
« Reply #4 on: September 30, 2022, 21:10 »
Q2. I have attached a screenshot below. (It shows default 3x3x1 in saved file.py though i choose to keep 5x5x1) You can test on graphene maybe as: Set k sampling , then choose DFTD2 for vDw then tick BSSE counterpoise, when you get back you see k sampling has already changed then change again to desired and save. The saved file has again default. I use same version that of yours.

Q1. Thanks for the hack. Will try it.
« Last Edit: September 30, 2022, 21:17 by AsifShah »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: BSSE & Possible ATK Bug
« Reply #5 on: September 30, 2022, 22:33 »
I confirm the bug.

Btw, what else did you change to end up with the message that it cannot preview the number of k-points? I don't see that but it indicates a potential additional problem

Offline AsifShah

  • QuantumATK Guru
  • ****
  • Posts: 144
  • Country: in
  • Reputation: 2
    • View Profile
Re: BSSE & Possible ATK Bug
« Reply #6 on: October 1, 2022, 08:03 »
This issue happens only when we tick counterpoise for BSSE. Otherwise, I never faced this issue.
It also concerns me whether this only happens with K point sampling or other parameters also. Nevertheless, I always check file content post saving.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: BSSE & Possible ATK Bug
« Reply #7 on: October 3, 2022, 07:46 »
I have no idea why this is happening but for sure I will report it, thanks for letting us know.
Note that the Script Generator will probably look a bit different in the next release!

Offline AsifShah

  • QuantumATK Guru
  • ****
  • Posts: 144
  • Country: in
  • Reputation: 2
    • View Profile
Re: BSSE & Possible ATK Bug
« Reply #8 on: October 3, 2022, 11:58 »
You are welcome.
Also, with regard to Q1. I had a question. For a structure ABC with two interfaces AB & BC, if we include BSSE during optimization the computational time increases crazily for a big system since each BSSE calculation requires 5 internal optimizations making it a total of 10 optimization calculations per structure which is computationally very expensive.

Therefore, I was thinking instead of using BSSE during optimization how about the following:
1. Optimize ABC without BSSE.
2. Use optimized structure from step 1, put A as rigid, B as rigid & C as rigid then perform BSSE optimization again.

Since here we are interested in estimating the interfacial distance accurately, would this method be the correct one (given I understand it is a crude method)?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: BSSE & Possible ATK Bug
« Reply #9 on: October 3, 2022, 19:28 »
Yes, this works, and it's not even really a serious approximation because you are not interested in how the atoms rearrange in the XY-plane or relative each other, they should be bound by symmetry. In fact, you can even do it simpler by computing the BSSE-corrected total energy for a series of interface layer distances and find the energy minimum by fitting a parabola. That way are you not reliant on the optimization convergence criterion.
« Last Edit: October 4, 2022, 02:20 by Anders Blom »

Offline AsifShah

  • QuantumATK Guru
  • ****
  • Posts: 144
  • Country: in
  • Reputation: 2
    • View Profile
Re: BSSE & Possible ATK Bug
« Reply #10 on: October 3, 2022, 20:42 »
Thanks Anders Blom.
This was helpful.