QChASM / AaronTools.py

Python tools for automating routine tasks encountered when running quantum chemistry computations.
https://aarontools.readthedocs.io/en/latest/
GNU General Public License v3.0
43 stars 8 forks source link

basis/ecp #17

Open joegair opened 1 year ago

joegair commented 1 year ago

Part 1:

basis = BasisSet(
                [Basis(def2-svp, ['all', '!Ru']),
                 Basis('sdd', 'tm')], 
                [ECP("sdd", 'tm')])

for Gaussian files gives,

C H N O 0
6-31g*
****
Ru 0
sdd
****

Ru 0
sdd

and for ORCA files gives,

%basis
    newGTO            Ru "sdd" end
    newECP            Ru "sdd" end
end

This works for the Gaussian job, but ORCA will error out with Error: Pure ECPs not allowed in GTO definition

The ORCA job will work with

! b3lyp 6-31G*
%basis
    newECP            Ru "sdd" end
    newGTO            Ru "def2-svp" end
end

or with

! b3lyp def2-svp
%basis
    newECP            Ru "sdd" end
end

Part 2

basis = BasisSet(
                [Basis(def2-svp, AnyNonTransitionMetal),
                 Basis('lanl2dz', 'tm')], 
                [ECP("lanl2dz", 'tm')])

gives an error

File ~/anaconda3/envs/python/lib/python3.10/site-packages/AaronTools/theory/basis.py:149, in Basis.__init__(self, name, elements, aux_type, user_defined, oniom_layer, atoms)
    146     ele = ele.lstrip("!")
    147     not_any = True
--> 149 if ele.lower() == "all":
    150     if not_any:
    151         not_anys.append(AnyTransitionMetal())

AttributeError: type object 'AnyNonTransitionMetal' has no attribute 'lower'

The same problem arrises for AnyTransitionMetal


Part 3 (not important to me, but thought it would be worth reporting)

basis = BasisSet(
                [Basis(def2-svp, ['all', '!Ru']),
                 Basis('lanl2dz', 'tm')], 
                [ECP("lanl2dz", 'tm')])

for Gaussian files gives,

C H N O 0
6-31g*
****
Ru 0
lanl2dz
****

Ru 0
lanl2dz

and the orca file gives

%basis
    newGTO            Ru "lanl2dz" end
    newECP            Ru "lanl2dz" end
end

This works for the Gaussian file, but fails for ORCA with Unknown ECP requested! Please consult the manual for available ECPs. The ORCA job will run with,

%basis
    newGTO            Ru "lanl2dz" end
    newECP            Ru "HayWadt" end
end
ajs99778 commented 1 year ago

Thanks for reporting these.

I think the main issue in part 1 is Gaussian and ORCA differing on whether their "SDD" keyword includes valence basis functions. Gaussian adds a particular valence basis set when you use "SDD" as a basis set and an ECP when you use it in the ECP section, but ORCA only includes the ECP, which is why they don't accept it for the newGTO.

For part 2, this was a bug and is now fixed.

For part 3, I'll have to look more into this, but it's looking like another case where Gaussian and ORCA disagree on what lanl2dz is (at least when it's in the %basis block).