{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Comparison To Gaussian Orbitals\n", "In this notebook, we will compare a calculation using the BigDFT code which is based on wavelets to a calculation from a code which is based on gaussian orbitals. As our representative gaussian code, we will use [PySCF](https://sunqm.github.io/pyscf/).\n", "\n", "To do the comparison, we are going to look at a molecule composed of two fragments connected by a single bond. We will then rotate one fragment along that bond, computing the energy at each step. We will do this calculation using different basis sets, and see how the energy values converge and compare.\n", "\n", "First, we will load in the system." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from BigDFT.IO import XYZReader\n", "from BigDFT.Systems import System\n", "from BigDFT.Fragments import Fragment\n", "\n", "geom = \"CH3SH\"\n", "\n", "sys = System()\n", "sys[\"FRA:0\"] = Fragment()\n", "sys[\"FRA:1\"] = Fragment()\n", "\n", "with XYZReader(geom) as ifile:\n", " for i, at in enumerate(ifile):\n", " if i == 0 or i == 3 or i == 4 or i == 5:\n", " sys[\"FRA:0\"] += Fragment([at])\n", " else:\n", " sys[\"FRA:1\"] += Fragment([at])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can visualize the molecule to verify that we have properly broken it into two fragments." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "application/3dmoljs_load.v0": "
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