This documents how to convert basis sets as output by Dave Fellers
gbasis program in nwchem format into NWCHEM library format.


The most time consuming steps cannot be automated since
they require assesment of the correctness of the contents.
A useful command is
  
   egrep '^BASIS|^END|^Effec' NWCHEM.BSLIB

1) Remove duplicate basis sets 

2) Look for obvious errors in data from Dave

3) Ensure that all basis sets are terminated with END
   (if not it could be a problem in data from Dave. 
   DFT basis sets seem to be an exception)
   a) use "./end2end.pl NWCHEM.BSLIB" to identify
   b) fix by hand (emacs/vi).

4) Ensure ECPs are present where they should be and that in 
   a basis set family that they appear AFTER the corresponding
   basis sets (introduced with 'Effective core potentials').

5) Replace '! #' with '#' (ECPs only?).
   a) cp NWCHEM.BSLIB stuff
   b) cat stuff | sed -e s'/\! #/#/g' > NWCHEM.BSLIB

6) nawk -f bas.awk < NWCHEM.BSLIB > library

7) look at the output
    a) do it!
    b) do it again!!


**********************   csh script grepsort does 8-13

8) egrep 'basis|ecp' ../library > list.old
   egrep 'basis|ecp' library > list.new

9) wc list.*  new should be equal or greater?

10) cat list.old | sort > sort.old 
    cat list.new | sort > sort.new

11) cat list.old | sort -u > sort.u.old 
    cat list.new | sort -u > sort.u.new

12) wc sort.* should identify redundancy in sets.

13) diff -b sort.u.old sort.u.new  shows the differences

names with < are in the old library but missing from the new library
names with > are new so keep them

14) make libcheck in the basis directory and run in the convert directory


I have a set of scripts that will eventually run calculations for all
of the basis sets and ECPs for all atoms.  This is not yet finished.

Robert


15) make compare in the basis directory and run in the convert directory
    the code assumes that your new library is called library.new and the
    previous basis set library is called library.

16) run "gen_liblist.pl library" to generate an updated library.list,
    library.fam and library.tex (tex file for use in user manual).

Bert
