# Pastebin sfy0C9ML { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Load a PDB file and visualize it" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Set up the AMBER paths." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "(setf (logical-pathname-translations \"amber\") \n", " (list (list \"**;*.*\" (concatenate 'string (ext:getenv \"AMBERHOME\") \"/**/*.*\"))))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "(leap.core:clear-path)\n", "(leap.core:add-path \"amber:dat;leap;prep;\")\n", "(leap.core:add-path \"amber:dat;leap;lib;\")\n", "(leap.core:add-path \"amber:dat;leap;parm;\")\n", "(leap.core:add-path \"amber:dat;leap;cmd;\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Cando reads Leap scripts." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "(source #P\"leaprc.protein.ff14SB\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Load a PDB file - warn if there are any unbuilt heavy atoms and unbuilt hydrogens. Put the result in the global variable \\*pdb\\*." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "(:= *pdb* (load-pdb \"data/pdbload/5t6o.pdb\"))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Use a simple builder that builds unbuilt atoms by building them a random direction and 1A away from their bonded neighbor." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "(simple-build-unbuilt-atoms *pdb*)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "(count-unbuilt-atoms *pdb*)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Show the structure. Rotate using the left mouse button, scale using two finger dragging." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "(nglv:show-aggregate *pdb*)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "cando", "language": "lisp", "name": "cando" }, "language_info": { "codemirror_mode": "text/x-common-lisp", "file_extension": ".lisp", "mimetype": "text/x-common-lisp", "name": "common-lisp", "pygments_lexer": "common-lisp", "version": "X3J13" } }, "nbformat": 4, "nbformat_minor": 2 }