qsimulate-open / bagel

Brilliantly Advanced General Electronic-structure Library
GNU General Public License v3.0
98 stars 43 forks source link

Hessian calculation using CASSCF method #180

Closed valievrashid closed 5 years ago

valievrashid commented 5 years ago

Hello! Previously we tried to use BAGEL for the CASPT2 transition state and had a problem. Now I tried to use the CASSCF hessian calculation and have a problem, too. The input file is attached. I can see the gradient calculation finished and then “the Segmentation fault” error appeared. I attached the h2o.out file, too. Previously we had a similar problem with the hessian calculation at CASPT2 level of theory. How can solve this problem?

valievrashid commented 5 years ago

I can't attach files. So this is input {"bagel" :[ { "title" : "molecule", "basis" : "tzvpp", "angstrom": "true", "df_basis" : "tzvpp-jkfit", "geometry" : [ { "atom" : "O", "xyz" : [ -0.507583898, 0.000000000, -1.491839780 ] }, { "atom" : "H", "xyz" : [ -0.507583898, 0.759337000, -0.895796780 ] }, { "atom" : "H", "xyz" : [ -0.507583898, -0.759337000, -0.895796780 ] }]

},

{ "title" : "hessian",

"nproc": 1, "method" :[{ "title" : "casscf", "nstate" : 1, "nact" : 6, "nclosed" : 2, "active" : [3, 4, 5, 6, 7, 8]

}] }, { "title" : "print", "file" : "orbitals.molden", "orbitals" : true },

{ "title" : "print", "file" : "freq.molden", "vibration" : true }

]}


This is output

shiozaki commented 5 years ago

@bessvlai Hi Bess, do you have any ideas as to what is going on? Hope you are well!

shiozaki commented 5 years ago

@jwpk1201 Hi Jae Woo, further inspection with Bess indicates this bug may have been introduced by your commit f5db2e6590c4bf607968ead1b0300cf3f452f36c. It could be wrong, but want to get your attention. Bess says she reproduced the error with 1-state CASSCF calc (please ask her if you cannot reproduce the problem).

https://github.com/nubakery/bagel/commit/f5db2e6590c4bf607968ead1b0300cf3f452f36c#diff-871ab7c2a74079e22a0c2209ab6a79e5

PS: I am not too comfortable with

const int npass = natom * 3 / ncomm + 1;

This should be the following, isn't it?

const int npass = (natom * 3 - 1) / ncomm + 1;
jwpk1201 commented 5 years ago

Hi Toru, Bess, and Rashid,

Hope you are well! I will take a look while I am traveling (until the end of the next week).

Sincerely, Jae Woo

shiozaki commented 5 years ago

Hi Jae Woo,

There is another bug report on GitHub #183 that is to do with your edits on embarrassingly parallel mode. Could you take a look?

Toru

On Sep 21, 2019, at 6:43 AM, Jae Woo Park notifications@github.com wrote:

Hi Toru, Bess, and Rashid,

Hope you are well! I will take a look while I am traveling (until the end of the next week).

Sincerely, Jae Woo

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nubakery/bagel/issues/180?email_source=notifications&email_token=AAKDMIXGSTM2XLF7Q6YUFXDQKX3GHA5CNFSM4IWW2MKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7IPIRA#issuecomment-533787716, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKDMISZAMLGEKQVNNBPQALQKX3GHANCNFSM4IWW2MKA.

jwpk1201 commented 5 years ago

Hi Toru,

OK, I will take a look. Probably line 53 should be placed after if (ncolor != 0) statements for that.

Jae Woo

shiozaki commented 5 years ago

More reasonable fix is to change that to

const int npass = (natom * 3 - 1) / ncomm + 1;

kind of things - in that way you will never have ncolor = 0. This happens in many places including this. You have to subtract 1 inside the bracket and add 1 afterwords.

(see my comment above)

jwpk1201 commented 5 years ago

Hi Toru,

OK, I will fix all of those, and then test using Bess' input.

Jae Woo

shiozaki commented 5 years ago

This has been fixed by 05ae88b108a372b5ef7e7290dc0e03f528c05367