Single Compute

QCEngine’s primary purpose is to consume the MolSSI QCSchema and produce QCSchema results for a variety of quantum chemistry, semiempirical, and molecular mechanics programs. Single QCSchema representation comprises of a single energy, gradient, hessian, or properties evaluation.

Input Description

An input description has the following fields:

  • molecule - A QCSchema compliant dictionary or Molecule model.

  • driver - The energy, gradient, hessian, or properties option.

  • model - A description of the evaluation model. For quantum chemistry this is typically method and basis. However, non-quantum chemistry models are often a simple method as in method = 'UFF' for forcefield evaluation.

  • keywords - a dictionary of keywords to pass to the underlying program. These are program-specific keywords.

An example input is as follows:

>>> import qcengine as qcng
>>> import qcelemental as qcel

>>> mol = qcel.models.Molecule.from_data("""
>>>     O  0.0  0.000  -0.129
>>>     H  0.0 -1.494  1.027
>>>     H  0.0  1.494  1.027
>>>     """)

>>> inp = qcel.models.AtomicInput(
>>>     molecule=mol,
>>>     driver="energy",
>>>     model={"method": "SCF", "basis": "sto-3g"},
>>>     keywords={"scf_type": "df"}
>>>     )

Computation

A single computation can be evaluated with the compute function as follows:

>>> ret = qcng.compute(inp, "psi4")

By default the job is given resources relating to the compute environment it is in; however, these variables can be overridden:

>>> ret = qcng.compute(inp, "psi4", local_options={"memory": 2, "ncores": 3})

Results

The results contain a complete record of the computation:

>>> ret.return_result
-74.45994963230625

>>> ret.properties.scf_dipole_moment
[0.0, 0.0, 0.6635967188869244]

>>> ret.provenance.cpu
Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz

Input Fields

class qcelemental.models.AtomicInput[source]

The MolSSI Quantum Chemistry Schema

Parameters
  • id (str, Optional) – An optional ID of the ResultInput object.

  • schema_name (ConstrainedStrValue, Default: qcschema_input)

  • schema_version (int, Default: 1)

  • molecule (Molecule) – The molecule to use in the computation.

  • driver ({energy,gradient,hessian,properties}) – Allowed quantum chemistry driver values.

  • model (Model) – The quantum chemistry model specification for a given operation to compute against

  • keywords (Dict[str, Any], Default: {}) – The program specific keywords to be used.

  • protocols (AtomicResultProtocols, Optional) – Protocols regarding the manipulation of a Result output data.

  • extras (Dict[str, Any], Default: {}) – Extra fields that are not part of the schema.

  • provenance (Provenance, Optional) – Provenance information.

Returned Fields

class qcelemental.models.AtomicResult[source]
Parameters
  • id (str, Optional) – An optional ID of the ResultInput object.

  • schema_name (ConstrainedStrValue, Default: qcschema_output)

  • schema_version (int, Default: 1)

  • molecule (Molecule) – The molecule to use in the computation.

  • driver ({energy,gradient,hessian,properties}) – Allowed quantum chemistry driver values.

  • model (Model) – The quantum chemistry model specification for a given operation to compute against

  • keywords (Dict[str, Any], Default: {}) – The program specific keywords to be used.

  • protocols (AtomicResultProtocols, Optional) – Protocols regarding the manipulation of a Result output data.

  • extras (Dict[str, Any], Default: {}) – Extra fields that are not part of the schema.

  • provenance (Provenance) – Provenance information.

  • properties (AtomicResultProperties) – Named properties of quantum chemistry computations following the MolSSI QCSchema.

  • wavefunction (WavefunctionProperties, Optional) – None

  • return_result (Union[float, Array, Dict[str, Any]]) – The value requested by the ‘driver’ attribute.

  • stdout (str, Optional) – The standard output of the program.

  • stderr (str, Optional) – The standard error of the program.

  • success (bool) – The success of a given programs execution. If False, other fields may be blank.

  • error (ComputeError, Optional) – A complete description of the error.