{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "from htmd.ui import *" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Molecular dynamics protocols in HTMD" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "Summary: How to equilibrate and prepare a system for productive simulations" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Build a sample system" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false, "slideshow": { "slide_type": "-" } }, "outputs": [], "source": [ "tryp = Molecule(\"3PTB\")\n", "tryp.remove(\"resname BEN\")\n", "tryp_op = proteinPrepare(tryp)\n", "tryp_seg = autoSegment(tryp_op)\n", "tryp_solv = solvate(tryp_seg,pad=10)\n", "#tryp_amber = amber.build(tryp_solv, param= [\"frcmod.ionslrcm_cm_tip3p\"], outdir='build-amber')\n", "tryp_charmm = charmm.build(tryp_solv, outdir='build-charmm')" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Equilibration protocol" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "from htmd.protocols.equilibration_v2 import Equilibration" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "md = Equilibration()\n", "md.runtime = 1000\n", "md.timeunits = 'fs'\n", "md.temperature = 300\n", "md.useconstantratio = False # only for membrane sims\n", "# this is only needed for setting the flatbottom potential, otherwise remove it\n", "# md.fb_reference = 'protein and resid 293'\n", "# md.fb_selection = 'segname L and noh'\n", "# md.fb_box = [-25, 25, -25, 25, 43, 45]\n", "# md.fb_k = 5\n", "md.write('./build-charmm/','./equil')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%ls equil/" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Run the equilibration" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "local = LocalGPUQueue()\n", "local.submit('./equil/')\n", "local.wait()" ] }, { "cell_type": "markdown", "metadata": { "collapsed": false, "slideshow": { "slide_type": "slide" } }, "source": [ "## Production protocol" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from htmd.protocols.production_v4 import Production" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "md = Production()\n", "md.runtime = 10\n", "md.timeunits = 'ns'\n", "md.temperature = 300\n", "md.acemd.bincoordinates = 'output.coor'\n", "md.acemd.extendedsystem = 'output.xsc'\n", "md.write('equil','prod')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Run the production" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "local = LocalGPUQueue()\n", "local.submit('./prod/')\n", "local.wait()" ] } ], "metadata": { "anaconda-cloud": {}, "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Python [default]", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3.0 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 0 }