Basis Set classes#
- class AaronTools.theory.Basis(name, elements=None, aux_type=None, user_defined=False, oniom_layer=None, atoms=None)#
- Has attributes:
name - same as initialization keyword
elements - same as initialization keyword
aux_type - same as initialization keyword
elements - list of element symbols for elements this basis applies to updated with Basis.refresh_elements
Basis.refresh_elements is called when writing an input file
ele_selection - list of finders used to determine which elements this basis applies to
not_anys - list of finders used to determine which elements this basis does not apply to
ONIOM-only attributes:
oniom_layer - same as initialization keyword
atom_selection - list of finders used to determine which atoms this basis applies to
atoms - list of atoms this basis applies to updated with Bases.refresh_atoms
default_notany_atoms - finder for atoms that are not in the given layer
- __init__(name, elements=None, aux_type=None, user_defined=False, oniom_layer=None, atoms=None)#
- Parameters:
name (str) – basis set base name (e.g. 6-31G)
elements (list(str)) – list of element symbols or finders to determine the basis set applies to elements may also be ‘tm’ or ‘all’ to indicate any transition metal and all elements, respectively elements may start with ‘!’ to exclude that element from the basis for example, elements=’!H’ will apply to default elements, minus H
aux_type (str|None) –
ORCA: one of BasisSet.ORCA_AUX
Psi4: one of BasisSet.PSI4_AUX
user_defined (str|bool) – path to file containing basis info from basissetexchange.org or similar False for builtin basis sets
ONIOM-only:
- Parameters:
oniom_layer (str|None) – must be ‘H’, ‘M’, or ‘L’ if not None
atoms – list of finders or ‘tm’ to determine what atoms the basis set applies to
- refresh_elements(geometry)#
sets self’s elements for the geometry
- refresh_atoms(geometry)#
sets self’s atoms for the geometry
- static sanity_check_basis(name, program)#
checks the basis set name against a list of basis sets that are built-in to the specified program
- Parameters:
name (str) – keyword of basis set (e.g. def2SVP)
program (str) – program name (gaussian, psi4, etc.)
- static get_gaussian(name)#
returns the Gaussian09/16 name of the basis set currently just removes the hyphen from the Karlsruhe def2 ones
- static get_orca(name)#
returns the ORCA name of the basis set currently just adds hyphen to Karlsruhe basis if it isn’t there
- static get_psi4(name)#
returns the Psi4 name of the basis set currently just adds hyphen to Karlsruhe basis if it isn’t there
- static get_qchem(name)#
returns the Q-Chem name of the basis set currently just adds hyphen to Karlsruhe basis if it isn’t there
- class AaronTools.theory.ECP(*args, **kw)#
ECP - aux info will be ignored
- __init__(*args, **kw)#
- Parameters:
name (str) – basis set base name (e.g. 6-31G)
elements (list(str)) – list of element symbols or finders to determine the basis set applies to elements may also be ‘tm’ or ‘all’ to indicate any transition metal and all elements, respectively elements may start with ‘!’ to exclude that element from the basis for example, elements=’!H’ will apply to default elements, minus H
aux_type (str|None) –
ORCA: one of BasisSet.ORCA_AUX
Psi4: one of BasisSet.PSI4_AUX
user_defined (str|bool) – path to file containing basis info from basissetexchange.org or similar False for builtin basis sets
ONIOM-only:
- Parameters:
oniom_layer (str|None) – must be ‘H’, ‘M’, or ‘L’ if not None
atoms – list of finders or ‘tm’ to determine what atoms the basis set applies to
- static sanity_check_basis(name, program)#
checks the basis set name against a list of basis sets that are built-in to the specified program
- Parameters:
name (str) – keyword of basis set (e.g. def2SVP)
program (str) – program name (gaussian, psi4, etc.)
- class AaronTools.theory.BasisSet(basis=None, ecp=None, angular_momentum_type=None)#
used to more easily get basis set info for writing input files
- __init__(basis=None, ecp=None, angular_momentum_type=None)#
basis: list(Basis), Basis, str, or None ecp: list(ECP) or None angular_momentum_type: pure, cartesian, or None
- property elements_in_basis#
returns a list of elements in self’s basis
- property atoms_in_basis#
returns a list of atoms in self’s basis
- static parse_basis_str(basis_str, cls=<class 'AaronTools.theory.basis.Basis'>)#
parse basis set specification string and returns list(cls)
cls should be Basis or ECP (or subclasses of these)
basis info should have:
a list of elements before basis set name (e.g. C H N O)
other element keywords are ‘tm’ (transition metals) and ‘all’ (all elements)
can also put “!” before an element to exclude it from the basis set
auxilliary type before basis name (e.g. auxilliary C)
basis set name
- path to basis set file right after basis set name if the basis is not builtin
path cannot contain spaces
- ONIOM only:
high, medium, or low to describe the ONIOM layer before the list of atoms
a list of atoms that can be all, tm, or ! to exclude those. automatically excludes atoms outside of layer
Example:
“!H !tm def2-SVPD /home/CoolUser/basis_sets/def2svpd.gbs H def2-SVP Ir SDD
- add_ecp(ecp)#
add ecp to this BasisSet ecp - ECP
- add_basis(basis)#
add basis to this BasisSet basis - Basis
- refresh_elements(geometry)#
evaluate element specifications for each basis and ecp to make them compatible with the supplied geometry
- refresh_atoms(geometry)#
evaluate atom specification for each basis to make them compatible with the specified geometry
- get_gaussian_basis_info()#
returns dict used by get_gaussian_header/footer with basis info
- get_orca_basis_info()#
return dict for get_orca_header
- get_psi4_basis_info(sapt=False)#
- Parameters:
sapt (bool) – use df_basis_sapt instead of df_basis_scf for jk basis
- Returns:
dict for get_psi4_header
- check_for_elements(geometry, count_ecps=False)#
checks to make sure each element is in a basis set
- get_qchem_basis_info(geom)#
returns dict used by get_qchem_header with basis info