MolSSI-BSE / basis_set_exchange

A repository for quantum chemistry basis sets
https://molssi-bse.github.io/basis_set_exchange/
BSD 3-Clause "New" or "Revised" License
157 stars 46 forks source link

Readers and writers for NWChem system library format #169

Open susilehtola opened 3 years ago

susilehtola commented 3 years ago

Basis sets in NWChem format don't work with NWChem.

If you look at the NWChem manual https://nwchemgit.github.io/Basis.html#how-to-use-basis-files-from-httpswwwbasissetexchangeorg-new-in-2019

there's actually several things wrong at present. At the bare minimum

For instance, this is what BSE gives as cc-pVDZ for H and He

BASIS "ao basis" PRINT
#BASIS SET: (4s,1p) -> [2s,1p]
H    S
      1.301000E+01           1.968500E-02           0.000000E+00
      1.962000E+00           1.379770E-01           0.000000E+00
      4.446000E-01           4.781480E-01           0.000000E+00
      1.220000E-01           5.012400E-01           1.000000E+00
H    P
      7.270000E-01           1.0000000
#BASIS SET: (4s,1p) -> [2s,1p]
He    S
      3.836000E+01           2.380900E-02           0.000000E+00
      5.770000E+00           1.548910E-01           0.000000E+00
      1.240000E+00           4.699870E-01           0.000000E+00
      2.976000E-01           5.130270E-01           1.000000E+00
He    P
      1.275000E+00           1.0000000
END

In contrast, what NWChem expects is

basis "H_cc-pvdz" 
#basis SET: (4s,1p) -> [2s,1p]
H    S
      1.301000E+01           1.968500E-02
      1.962000E+00           1.379770E-01
      4.446000E-01           4.781480E-01
H    S
      1.220000E-01           1.000000E+00
H    P
      7.270000E-01           1.0000000
end
basis "He_cc-pvdz" 
#basis SET: (4s,1p) -> [2s,1p]
He    S
      3.836000E+01           2.380900E-02
      5.770000E+00           1.548910E-01
      1.240000E+00           4.699870E-01
He    S
      2.976000E-01           1.000000E+00
He    P
      1.275000E+00           1.0000000
end

Note especially that the basis set is defined separately for each atom; there's an end between all the entries and a new basis statement for each element.

susilehtola commented 3 years ago

NWChem doesn't run with the basis sets BSE now gives; it gives an error about a string being too long. After this, generally contracted sets will give a huge number of warnings about zero coefficients...

susilehtola commented 3 years ago

Looks like we need another set of parsers and writers for NWChem, since the system library format is incompatible with the input format :clown_face:

bennybp commented 3 years ago

hmm is this due to some (semi) recent change to NWChem? And do we now have to version parsers/writers?

twindus commented 3 years ago

I am pretty sure that you do not need to put each individual element into it's own basis set block. Just tried it on the latest development version and it works without that (haven't tried the latest release). I am not sure about the general contractions, but I would suspect that this is true. One would have to try it.

susilehtola commented 3 years ago

It works in the input, but not if you read the basis set from file.

twindus commented 3 years ago

OK. I didn't try from the file. Sorry about that confusion.