Skip to content

Overview

Sierra provides a variety of electronic structure and machine learning methods for evaluation of energy, wavefunction, and properties of a molecule, including:

There are two ways to create an energy method object:

  • Using the constructor for the specific method (e.g. method=XTBMethod(model="GFN1")). This is the recommended approach.
  • Using a dictionary that contains a kind field to specify the type of method and additional fields for the details of the method (e.g. method={"kind": "xtb", "model": "GFN1"}).

In addition, implicit solvation effects can be incorporated in compatible energy methods via the solvation field.

Example

The following examples demonstrate how to create and run an energy method.

import sierra
from sierra.inputs import *

# Create a water molecule from pubchem (internet connection required)
water = Molecule(pubchem="water")

# Create an `XTBMethod` based on GFN1-xTB and perform a single-point calculation
xtb_input = SingleInput(molecule=water, method=XTBMethod(model="GFN1"))
xtb_result = sierra.run(xtb_input)
print(f"GFN1-xTB energy: {xtb_result.energy:.6f} Hartree")
#> GFN1-xTB energy: -5.768441 Hartree

# Alternatively, we can use a dictionary to specify the energy method
xtb_input_2 = SingleInput(
    molecule=water, method={"kind": "xtb", "model": "GFN1"}
)
xtb_result_2 = sierra.run(xtb_input_2)
print(f"GFN1-xTB energy: {xtb_result_2.energy:.6f} Hartree")
#> GFN1-xTB energy: -5.768441 Hartree


# Include implicit solvation in the GFN1-xTB energy calculation
xtb_sol_input = SingleInput(
    molecule=water,
    method=XTBMethod(model="GFN1", solvation={"solvent": "water"}),
)
xtb_sol_result = sierra.run(xtb_sol_input)
print(f"GFN1-xTB (with solvation) energy: {xtb_sol_result.energy:.6f} Hartree")
#> GFN1-xTB (with solvation) energy: -5.780343 Hartree

Method Fields

All Methods within the Entos ecosystem contain the following fields

solvation

Include effects of solvation through a continuum model.

details
Details relating to the given method