Setting up calculations

After creating a System, you need to set up the calculation to which you wish to subject it. This is done with the spycci.engines and spycci.wrappers submodules.

Both engines and wrappers submodules contains a series of program-specific classes and functions for interfacing with external code and carrying out calculations on System objects. The distinction between the two and the philosophy behind them is as follows:

  • an engine carries out calculations on a System for computing properties. For example, geometry optimizations, single point energies, frequencies, etc.

  • a wrapper carries out calculations on a System for obtaining other, “processed” System objects. For example, conformer/tautomer searches, building of solvation boxes, etc.

The programs currently implemented as engines are:

The programs currently implemented as wrappers are:

Note

To function with the library, the external programs need to be already installed and available to the system from command line!

These general-purpose engines are implemented as <Program>Input classes in the corresponding submodules. To initialise an engine, you need to import it from its submodule and then create an instance of it:

from spycci.engines.xtb import XtbInput
from spycci.engines.dftbplus import DFTBInput
from spycci.engines.orca import OrcaInput

xtb = XtbInput()
dftb = DFTBInput()
orca = OrcaInput()

If you do not specify anything, some default options are chosen automatically for level of theory, basis set, solvation, etc. Please refer to the API section for a complete list of options and default values.

As an example, let us set up a calculation with Orca, using the B3LYP functional, with the def2-TZVP basis set and def2/J auxiliary basis set, using the SMD implicit solvation model for water, and including Grimme’s D3BJ dispersion corrections:

from spycci.engines.orca import OrcaInput

b3lyp = OrcaInput(
    method = "B3LYP",
    basis_set = "def2-TZVP",
    aux_basis = "def2/J",
    solvent = "water",
    optionals = "D3BJ",
)

For wrappers, you just need to import the corresponding wrapper submodule or any of the specific functions you wish to use:

from spycci.wrappers.crest import tautomer_search

mol = System("water.xyz")
tautomers_list = tautomer_search(mol)