Theory class#

class AaronTools.theory.Theory(charge=0, multiplicity=1, method=None, basis=None, ecp=None, empirical_dispersion=None, grid=None, high_method=None, medium_method=None, low_method=None, high_ecp=None, medium_ecp=None, low_ecp=None, high_basis=None, medium_basis=None, low_basis=None, **kwargs)#

A Theory object can be used to create an input file for different QM software. The creation of a Theory object does not depend on the specific QM software that is determined when the file is written

attribute names are the same as initialization keywords (with the exception of ecp, which is added to the basis attribute) valid initialization keywords are:

  • geometry - AaronTools Geometry

  • charge - total charge

  • multiplicity - electronic multiplicity

  • job_type - JobType or list(JobType)

  • method - Method object (or str - Method instance will be created) or list(Method) for ONIOM

  • basis - BasisSet object (or str - will be set to BasisSet(Basis(keyword)))

  • ecp - str parsable by BasisSet.parse_basis_str

  • empirical_dispersion - EmpiricalDispersion object (or str)

  • grid - IntegrationGrid object (or str)

  • solvent - ImplicitSolvent object

  • memory - int - allocated memory (GB)

  • processors - int - allocated cores

__init__(charge=0, multiplicity=1, method=None, basis=None, ecp=None, empirical_dispersion=None, grid=None, high_method=None, medium_method=None, low_method=None, high_ecp=None, medium_ecp=None, low_ecp=None, high_basis=None, medium_basis=None, low_basis=None, **kwargs)#
add_kwargs(**kwargs)#

add kwargs to the theory

remove_kwargs(**kwargs)#

remove kwargs from the theory

make_header(geom=None, style='gaussian', conditional_kwargs=None, sanity_check_method=False, **kwargs)#
Parameters:
  • geom (Geometry) – structure

  • style (str) – file format (e.g. gaussian, orca, psi4, oniom, or sqm)

  • conditional_kwargs (dict) –

    keys are ORCA_*, PSI4_*, or GAUSSIAN_*

    items in conditional_kwargs will only be added to the input if they would otherwise be preset. For example, if self.job_type is FrequencyJob and a Gaussian input file is being written, conditional_kwargs = {GAUSSIAN_ROUTE:{‘opt’:[‘noeigentest’]}} will not add opt=noeigentest to the route but if it’s an OptimizationJob, it will add opt=noeigentest

  • sanity_check_method (bool) – check if method is available in recent version of the target software package (Psi4 checks when its footer is created)

  • kwargs (dict) – see AaronTools.theory parameters for more details

make_molecule(geom=None, style='gaussian', conditional_kwargs=None, **kwargs)#
Parameters:
  • geom (Geometry) – structure

  • style (str) – gaussian, psi4, or sqm

  • conditional_kwargs (dict) – theory parameters, which will only be added if the corresponding section is used elsewhere

  • kwargs (dict) – see AaronTools.theory parameters for more details

Parameters:
  • geom (Geometry) – structure

  • style (str) – program name

  • conditional_kwargs (dict) – see Theory.make_header

  • sanity_check_method (bool) – check if method is available in recent version of the target software package (Psi4 only)

  • kwargs (dict) – see AaronTools.theory parameters for more details

get_gaussian_header(return_warnings=False, conditional_kwargs=None, **other_kw_dict)#

write Gaussian09/16 input file header (up to charge mult)

other_kw_dict is a dictionary with file positions (using GAUSSIAN_*) corresponding to options/keywords

returns warnings if a certain feature is not available in Gaussian

get_gaussian_molecule(return_warnings=False, conditional_kwargs=None, **other_kw_dict)#

get molecule specification for gaussian input files

write footer of gaussian input file

get_orca_header(return_warnings=False, conditional_kwargs=None, **other_kw_dict)#

get ORCA input file header

other_kw_dict is a dictionary with file positions (using ORCA_*) corresponding to options/keywords

if return_warnings==True, returns file content and warnings

e.g. if a certain feature is not available in ORCA

else, returns str of header content

get ORCA input file header

other_kw_dict is a dictionary with file positions (using ORCA_*) corresponding to options/keywords

get_psi4_header(return_warnings=False, conditional_kwargs=None, **other_kw_dict)#

write Psi4 input file

other_kw_dict is a dictionary with file positions (using PSI4_*) corresponding to options/keywords

get_psi4_molecule(return_warnings=False, conditional_kwargs=None, **other_kw_dict)#

get molecule specification for psi4 input files

get psi4 footer

get_xtb_cmdline(config)#

Uses the config and job type to set command line options for xtb and crest jobs

Returns a dictionary of option=val pairs; val is None when option doesn’t take an argument. This dict should be parsed by the caller into the command line string.

get_sqm_header(return_warnings=False, conditional_kwargs=None, **other_kw_dict)#

retruns header, warnings_list for sqm job

get_sqm_molecule(**kwargs)#

returns molecule specification for sqm input

get_qchem_header(return_warnings=False, conditional_kwargs=None, **other_kw_dict)#

write QChem input file header (up to charge mult)

other_kw_dict is a dictionary with file positions (using QCHEM_*) corresponding to options/keywords

returns warnings if a certain feature is not available in QChem