{ "cells": [ { "cell_type": "markdown", "id": "fb7aca9f", "metadata": { "vscode": { "languageId": "plaintext" } }, "source": [ "## Visualization of the molecule\n", "\n", "Once the Penguin method has been initialized with the correct reference state, the geometry of the system can be visualized using the ``show_molecule`` function. Note that the ``py3dmol`` package must be installed for the visualization to function." ] }, { "cell_type": "code", "execution_count": null, "id": "3862bd1c", "metadata": {}, "outputs": [], "source": [ "import penguin\n", "import veloxchem as vlx\n", "\n", "molecule = penguin.get_molecule(\"\"\"\n", "C 0.95599 0.06333 0.04681\n", "C 2.29354 0.05656 0.06769\n", "C 3.05556 -0.32788 1.22931\n", "C 4.39328 -0.33355 1.25130\n", "H 0.42046 0.36019 -0.84979\n", "H 0.36291 -0.22212 0.90971\n", "H 2.83844 0.35260 -0.82619\n", "H 2.50976 -0.62488 2.12252\n", "H 4.98609 -0.04656 0.38874\n", "H 4.92835 -0.63028 2.14783\"\"\"\n", ")\n", "\n", "basis = penguin.get_molecular_basis(molecule, \"cc-pVDZ\")\n", "\n", "scf_drv = vlx.ScfRestrictedDriver()\n", "scf_drv.ostream.mute()\n", "\n", "scf_results = scf_drv.compute(molecule, basis)\n", "\n", "ref_state = penguin.create_reference_state(molecule, basis, scf_drv)\n", "\n", "mp2_drv = penguin.MP2()\n", "mp2_drv.update_settings({\n", " 'reference_state': ref_state,\n", "})\n", "\n", "mp2_drv.show_molecule()" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }