{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# QCFractal\n", "\n", "Full [QCFractal documentation](http://docs.qcarchive.molssi.org/projects/QCFractal) is available.\n", "\n", "\n", "This tutorial will go over general QCFractal usage to give a feel for the ecosystem. \n", "In this tutorial, we employ Snowflake, a simple QCFractal stack which runs on a local machine \n", "for demonstration and exploration purposes.\n", "\n", "## Installation\n", "\n", "To begin this quickstart tutorial, first install the QCArchive Snowflake environment from conda:\n", "\n", "```\n", "conda env create qcarchive/qcf-snowflake -n snowflake\n", "conda activate snowflake\n", "```\n", "\n", "If you have a pre-existing environment with `qcfractal`, ensure that `rdkit` and `geometric` are installed from the `conda-forge` channel and `psi4` from the `psi4` channel. It should be noted that QCFractal does not come with any compute backend by default and they must be installed individually.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Importing QCFractal\n", "\n", "First let us import two items from the ecosystem:\n", "\n", "\n", " * [FractalSnowflakeHandler](http://docs.qcarchive.molssi.org/projects/qcfractal/en/latest/api/qcfractal.FractalSnowflakeHandler.html?highlight=FractalSnowflakeHandler) - This is a [FractalServer](http://docs.qcarchive.molssi.org/projects/QCFractal/en/stable/setup_quickstart.html) that is temporary and is used for trying out new things.\n", "\n", " * `qcfractal.interface` is the [QCPortal](https://github.com/MolSSI/QCPortal) module, but if using QCFractal it is best to import it locally.\n", " \n", "Typically we alias `qcportal` as `ptl`. We will do the same for `qcfractal.interface` so that the code can be used anywhere." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from qcfractal import FractalSnowflakeHandler\n", "import qcfractal.interface as ptl" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can now build a temporary server which acts just like a normal server, but we have a bit more direct control of it.\n", "\n", "**Warning!** All data is lost when this notebook shuts down! This is for demonstration purposes only!\n", "For information about how to setup a permanent QCFractal server, see the [Setup Quickstart Guide](http://docs.qcarchive.molssi.org/projects/QCFractal/en/stable/setup_quickstart.html). " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n jupyter labextension install jupyterlab_3dmol
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
\n",
" jupyter labextension install jupyterlab_3dmol
\n", " | \n", " | tagline | \n", "
---|---|---|
collection | \n", "name | \n", "\n", " |
ReactionDataset | \n", "My IE Dataset | \n", "None | \n", "
\n", " | \n", " | \n", " | \n", " | \n", " | stoichiometry | \n", "
---|---|---|---|---|---|
driver | \n", "program | \n", "method | \n", "basis | \n", "keywords | \n", "\n", " |
energy | \n", "psi4 | \n", "b3lyp | \n", "def2-svp | \n", "None | \n", "default | \n", "
b3lyp-d3 | \n", "def2-svp | \n", "None | \n", "default | \n", "||
pbe | \n", "def2-svp | \n", "None | \n", "default | \n", "||
pbe-d3 | \n", "def2-svp | \n", "None | \n", "default | \n", "
\n", " | driver | \n", "program | \n", "method | \n", "basis | \n", "keywords | \n", "stoichiometry | \n", "name | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "energy | \n", "psi4 | \n", "b3lyp | \n", "def2-svp | \n", "NaN | \n", "default | \n", "B3LYP/def2-svp | \n", "
1 | \n", "energy | \n", "psi4 | \n", "b3lyp-d3 | \n", "def2-svp | \n", "NaN | \n", "default | \n", "B3LYP-D3/def2-svp | \n", "
2 | \n", "energy | \n", "psi4 | \n", "pbe | \n", "def2-svp | \n", "NaN | \n", "default | \n", "PBE/def2-svp | \n", "
3 | \n", "energy | \n", "psi4 | \n", "pbe-d3 | \n", "def2-svp | \n", "NaN | \n", "default | \n", "PBE-D3/def2-svp | \n", "
\n", " | B3LYP/def2-svp | \n", "B3LYP-D3/def2-svp | \n", "PBE/def2-svp | \n", "PBE-D3/def2-svp | \n", "
---|---|---|---|---|
water dimer | \n", "-4.751916 | \n", "-5.577718 | \n", "-5.115871 | \n", "-5.632224 | \n", "
helium dimer | \n", "-0.000346 | \n", "-0.000848 | \n", "-0.000387 | \n", "-0.000864 | \n", "