{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Visualizing QM/MM systems\n", "\n", "Once the method object has been initialized with the corresponding potential file, which describes the surroundings, the geometry of the full system can be visualized by using the ``show_pe`` function. Note that all visualizations requires installation of the ``py3dmol`` package." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import penguin\n", "import veloxchem as vlx\n", "\n", "molecule = penguin.get_molecule(\"\"\"\n", " C 0.997930 -0.087600 -0.014220\n", " O 2.222560 -0.087600 -0.014220\n", " H 0.410270 -0.803000 0.582940\n", " H 0.410270 0.6278000 -0.611380\"\"\"\n", ")\n", "\n", "basis = penguin.get_molecular_basis(molecule, \"cc-pVDZ\")\n", "\n", "scf_drv = vlx.ScfRestrictedDriver()\n", "\n", "pe_dict = {'potfile': '../../data/potfiles/50water.pot'}\n", "scf_drv.update_settings({},method_dict=pe_dict)\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)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/3dmoljs_load.v0": "
\n

3Dmol.js failed to load for some reason. Please check your browser console for error messages.

\n
\n", "text/html": [ "
\n", "

3Dmol.js failed to load for some reason. Please check your browser console for error messages.

\n", "
\n", "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ccsd_drv = penguin.CCSD()\n", "settings_dict = {\n", " 'reference_state': ref_state,\n", "}\n", "ccsd_drv.update_settings(settings_dict,pe_dict=pe_dict)\n", "\n", "ccsd_drv.show_pe()" ] } ], "metadata": { "kernelspec": { "display_name": "penguin_env_dev", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.9" } }, "nbformat": 4, "nbformat_minor": 2 }