QChASM/AaronTools.py

Better consistency between ORCA and Gaussian inputs

Opened this issue · 10 comments

For ORCA inputs using "Gaussian's B3LYP", automatically include "NoCosx" keyword to more closely match Gaussian results (ORCA uses RIJCOSX by default).
Similarly, add option to do "ORCA's 6-31G*" that requests Gaussian use 6-31G(d) with 5d/7f rather than the default 6d/10f, and similar for other Pople-style basis sets.

The B3LYP one should be straightforward. The Method.get_orca() will basically just have to be changed to return a dictionary like what we do with xtb, and Theory.get_orca_X() will need to be changed accordingly.

For the basis set, maybe it would be better/more general to just make an option for pure vs Cartesian (possibly for individual shells). Of course, we would throw an error if you request Cartesian for ORCA and things like that.

the method half of this is done

Thanks Tony.

I've added angular_momentum_type to BasisSet. It should be either "pure" or "cartesian" to invoke the relevant keywords. The default is to not specify anything. There is no option for this on the makeInput cls at the moment.

I don't think it's worth doing pure/cartesian by angular momentum type, which I suggested. Q-Chem and Gaussian allow it, but it seems pretty niche to want something like pure G shells but Cartesian everywhere D, F, and H. At that point, the users might want to learn how to set those things themselves.

I see the updates to the basis.py to specify the angular momentum type, but it is not working as I expected. I'm not I'm not seeing 5D 7F in the route card when I use the following code. (I'm also not seeing the warning when I try to use "cartesian" in ORCA.

fun = Method("m062x")
basis_set = BasisSet(Basis("6-311+G**"), angular_momentum_type="pure")
int_grid = IntegrationGrid("UltraFine")
disp = EmpiricalDispersion(None)
solvent = ImplicitSolvent("SMD", "water")
charge = -2
multiplicity = 1
processors=16
memory=16

jobs = SinglePointJob()

m062x_6311plusgdp = Theory(
    method=fun, 
    basis=basis_set, 
    grid=int_grid, 
    empirical_dispersion=None, 
    job_type=jobs,
    charge=charge,
    multiplicity=multiplicity,
    processors=processors,
    memory=memory,
    solvent=solvent
)

geom.write(
    outfile=f"{name}.com", 
    theory=m062x_6311plusgdp,
    )

The resulting route card is #n m062x/6-311+G** SP Integral=(grid=UltraFine) scrf=(SMD,solvent=water)

This is a bug. When you create a Theory, it will create a copy of the BasisSet. When that happens, the angular_momentum_type reverts to the default (do not specify). Currently, you need to do

theory = Theory(
    stuff
)

theory.basis.angular_momentum_type = "cartesian"

To get the warning after this bug is patched, you will to include return_warnings=True ingeom.write

this should be fixed now

Thank you! Everything is working as expected now.

For what it is worth, I would prefer to have warnings on as the default. The warnings are a really nice feature and I didn't realize they were available based on the documentation alone.