VMC-HF: Problem with f shell

General discussion of the Cambridge quantum Monte Carlo code CASINO; how to install and setup; how to use it; what it does; applications.
Post Reply
Eike Caldeweyher
Posts: 7
Joined: Thu Aug 22, 2013 5:16 pm

VMC-HF: Problem with f shell

Post by Eike Caldeweyher »

Dear community,

when performing a VMC-HF calculation using a HF wavefunction generated with CRYSTAL09 (TiO2 bulk, basis set contains one f shell), I get the following error message:

Code: Select all

ERROR : READGW
 Invalid shell type specified in basis (s,sp,p,d only in CRYSTAL9X

 CASINO internal traceback:
  Problem detected at SETUP
  Called from MAIN
When I explicitly remove the f shell from the crystal input everything works as expected. The error message seems to indicate that CASINO 'thinks' that the wavefunction was generated with CRYSTAL98 or earlier - might that be the problem?
Thanks in advance for any suggestions!
Regards Eike
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: VMC-HF: Problem with f shell

Post by Mike Towler »

Hi Eike,

That's a lovely bug. Well spotted.

Basically, CASINO knows that f Gaussians were introduced in CRYSTAL2003; before that only s, sp, p, d were available. So the test in the code reads:

Code: Select all

if(trim(adjustl(code))=='CRYSTAL2003')then
Of course, that should read 'if CRYSTAL2003 *or later*' and we forgot to update the test when CRYSTAL2006 and CRYSTAL2009 were released. In ten years you're the first person to notice this!

So I've made the change in the current_beta version of CASINO available from the website. If you want to make the change manually yourself, search for the word CRYSTAL2003 in CASINO/src/gaussians.f90 in the developer version (renamed CASINO/src/AAU.f90 in the standard version). Replace the above line with:

Code: Select all

 if(trim(adjustl(code))=='CRYSTAL2003'.or.trim(adjustl(code))=='CRYSTAL2006'&
    &.or.trim(adjustl(code))=='CRYSTAL2009')then
Sorry about that!

Mike
Eike Caldeweyher
Posts: 7
Joined: Thu Aug 22, 2013 5:16 pm

Re: VMC-HF: Problem with f shell

Post by Eike Caldeweyher »

Hi Mike,

thanks for the quick answer!
Just for the record the given codeline appears in AAV.f90. While 'greping' through the file another question arises from line 117:

Code: Select all

if(trim(code)=='CRYSTAL2003')bohr_to_angstrom=0.529177249d0
The variable bohr_to_angstrom is set to the value 0.529177249d0, albeit the same variable is set in AAG.f90 to the value 0.52917715d0.
Only in case of using CRYSTAL03 the variable gets overwritten. Is it possible that this value is also important for CRYSTAL06/CRYSTAL09?
Regards Eike
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: VMC-HF: Problem with f shell

Post by Mike Towler »

Well spotted! I'll fix it in the distribution..

If you need a programming job, send me a CV.. You're doing much better than us! ;)

M.
Eike Caldeweyher
Posts: 7
Joined: Thu Aug 22, 2013 5:16 pm

Re: VMC-HF: Problem with f shell

Post by Eike Caldeweyher »

Hi Mike,

I applied the changes you described in the code and compiled CASINO again. Now another error appears:

Code: Select all

ERROR : READGW
 Gaussian f and g functions not yet implemented in CASINO for periodic systems.

 CASINO internal traceback:
  Problem detected at SETUP
  Called from MAIN
Is this by any chance easy to fix?
Regards Eike
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: VMC-HF: Problem with f shell

Post by Mike Towler »

No - that error message is actually true! You can only use f and g functions in CASINO in the atomic/molecular case.

Fixing it is not trivial, but it should only take a day or two for someone who knew what they were doing.. I'll try to find time to add f functions for periodic systems sometime soon (there's no point in adding g functions, since CRYSTAL can't do them).

M.
Eike Caldeweyher
Posts: 7
Joined: Thu Aug 22, 2013 5:16 pm

Re: VMC-HF: Problem with f shell

Post by Eike Caldeweyher »

Thanks for the information, we will continue without it.
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: VMC-HF: Problem with f shell

Post by Mike Towler »

Dear Eike,

I have now added support for Gaussian f functions in periodic systems into CASINO.

Best wishes,
Mike
Eike Caldeweyher
Posts: 7
Joined: Thu Aug 22, 2013 5:16 pm

Re: VMC-HF: Problem with f shell

Post by Eike Caldeweyher »

Dear Mike,

thank you very much. We will try it next week.

Regards Eike
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: VMC-HF: Problem with f shell

Post by Mike Towler »

Hi Eike,

Good - you can test it for me! The formulae you get when you take second derivatives to get the Laplacian of higher angular momentum Gaussians get very complicated very quickly. I take a great deal of solace in the lack of g functions in CRYSTAL.

M.
Post Reply