{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# System building: Protein with Ligand" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "In this tutorial, we will showcase how to build a protein-ligand system for simulating ligand binding. The sample system is Trypsin (the protein) and benzamidine (the ligand).\n", "\n", "Let's start with some helpful imports and definitions:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "slideshow": { "slide_type": "-" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2024-06-11 14:58:30,793 - numexpr.utils - INFO - Note: NumExpr detected 20 cores but \"NUMEXPR_MAX_THREADS\" not set, so enforcing safe limit of 8.\n", "2024-06-11 14:58:30,794 - numexpr.utils - INFO - NumExpr defaulting to 8 threads.\n", "2024-06-11 14:58:30,900 - rdkit - INFO - Enabling RDKit 2022.09.1 jupyter extensions\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "Please cite HTMD: Doerr et al.(2016)JCTC,12,1845. https://dx.doi.org/10.1021/acs.jctc.6b00049\n", "HTMD Documentation at: https://software.acellera.com/htmd/\n", "\n", "You are on the latest HTMD version (2.3.28+0.g1f64e666d.dirty).\n", "\n" ] } ], "source": [ "from htmd.ui import *\n", "from htmd.home import home\n", "from os.path import join\n", "from moleculekit.config import config\n", "\n", "config(viewer='webgl')\n", "datadir = home(dataDir='building-protein-ligand')" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Load the protein-ligand complex" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "One can obtain the protein-ligand complex from the PDB database (ID:3PTB)." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# One can download it directly from the RCSB servers simply by providing the PDB code\n", "prot = Molecule('3PTB')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9ba389883e454c0ab8e188dcfab23cf4", "version_major": 2, "version_minor": 0 }, "text/plain": [] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b87aee501c764e2c9f4e4d4a6c1ed250", "version_major": 2, "version_minor": 0 }, "text/plain": [ "NGLWidget()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "prot.view()" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Clean the structures" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "The PDB crystal structure contains the protein as well as water molecules, a calcium ion and a ligand. Here we will start by removing the ligand from the protein Molecule as we will add it later to manipulate it separately." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2024-06-11 14:58:34,227 - moleculekit.molecule - INFO - Removed 9 atoms. 1692 atoms remaining in the molecule.\n" ] }, { "data": { "text/plain": [ "array([1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638], dtype=int32)" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "prot.remove('resname BEN')" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Preparing the protein" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this step, we prepare the protein for simulation by adding hydrogens, setting the protonation states, and optimizing the protein (more details on the protein preparation tutorial):" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2024-06-11 14:58:34,332 - moleculekit.tools.preparation - WARNING - Both chains and segments are defined in Molecule.chain / Molecule.segid, however they are inconsistent. Protein preparation will use the chain information.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "---- Molecule chain report ----\n", "Chain A:\n", " First residue: ILE 16 \n", " Final residue: HOH 809 \n", "---- End of chain report ----\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2024-06-11 14:58:35,888 - moleculekit.tools.preparation - WARNING - The following residues have not been optimized: CA\n", "2024-06-11 14:58:35,968 - moleculekit.tools.preparation - INFO - Modified residue CYS 22 A to CYX\n", "2024-06-11 14:58:35,969 - moleculekit.tools.preparation - INFO - Modified residue HIS 40 A to HIE\n", "2024-06-11 14:58:35,969 - moleculekit.tools.preparation - INFO - Modified residue CYS 42 A to CYX\n", "2024-06-11 14:58:35,970 - moleculekit.tools.preparation - INFO - Modified residue HIS 57 A to HIP\n", "2024-06-11 14:58:35,970 - moleculekit.tools.preparation - INFO - Modified residue CYS 58 A to CYX\n", "2024-06-11 14:58:35,971 - moleculekit.tools.preparation - INFO - Modified residue HIS 91 A to HID\n", "2024-06-11 14:58:35,971 - moleculekit.tools.preparation - INFO - Modified residue CYS 128 A to CYX\n", "2024-06-11 14:58:35,971 - moleculekit.tools.preparation - INFO - Modified residue CYS 136 A to CYX\n", "2024-06-11 14:58:35,972 - moleculekit.tools.preparation - INFO - Modified residue CYS 157 A to CYX\n", "2024-06-11 14:58:35,972 - moleculekit.tools.preparation - INFO - Modified residue CYS 168 A to CYX\n", "2024-06-11 14:58:35,972 - moleculekit.tools.preparation - INFO - Modified residue CYS 182 A to CYX\n", "2024-06-11 14:58:35,973 - moleculekit.tools.preparation - INFO - Modified residue CYS 191 A to CYX\n", "2024-06-11 14:58:35,973 - moleculekit.tools.preparation - INFO - Modified residue CYS 201 A to CYX\n", "2024-06-11 14:58:35,974 - moleculekit.tools.preparation - INFO - Modified residue CYS 220 A to CYX\n", "2024-06-11 14:58:35,974 - moleculekit.tools.preparation - INFO - Modified residue CYS 232 A to CYX\n", "2024-06-11 14:58:35,976 - moleculekit.tools.preparation - WARNING - Dubious protonation state: the pKa of 3 residues is within 1.0 units of pH 7.4.\n", "2024-06-11 14:58:35,977 - moleculekit.tools.preparation - WARNING - Dubious protonation state: TYR 39 A (pKa= 8.24)\n", "2024-06-11 14:58:35,977 - moleculekit.tools.preparation - WARNING - Dubious protonation state: HIS 57 A (pKa= 7.46)\n", "2024-06-11 14:58:35,978 - moleculekit.tools.preparation - WARNING - Dubious protonation state: ASP 189 A (pKa= 6.49)\n" ] } ], "source": [ "prot = systemPrepare(prot, pH=7.4)" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Define segments" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "To build a system in HTMD, we need to separate the chemical molecules into separate segments. This prevents the builder from accidentally bonding different chemical molecules and allows us to add caps to them." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2024-06-11 14:58:36,020 - moleculekit.tools.autosegment - INFO - Created segment P0 between resid 16 and 245.\n" ] } ], "source": [ "prot = autoSegment(prot, sel='protein')\n", "prot.set('segid', 'W', sel='water')\n", "prot.set('segid', 'CA', sel='resname CA')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Center the protein to the origin" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "prot.center()" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Let's work on the ligand!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Load the ligand from the HTMD data directory. Normally to perform this step you will first need to parameterize your ligand for the AMBER forcefield with a tool like Parameterize (available on [PlayMolecule](open.playmolecule.org)) which produces a topology (cif/mol2) and a parameter (frcmod) file. Here for the sake of the tutorial we provide both files in your HTMD installation." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "ligand = Molecule(join(datadir, 'BEN.cif'))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's center the ligand and visualize it:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7041805dab88458bb37811bf05b8dd35", "version_major": 2, "version_minor": 0 }, "text/plain": [ "NGLWidget()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ligand.center()\n", "ligand.view()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "# We can give a convenient segid and resname to the ligand\n", "# The resname should be BEN to match the parameters in the\n", "# rtf and prm files.\n", "ligand.set('segid','L')\n", "ligand.set('resname','BEN')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "But the ligand is now located inside the protein...\n", "We would like the ligand to be:\n", "\n", "* At a certain distance from the protein\n", "* Rotated randomly, to provide different starting conditions" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Let's randomize the ligand position" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "ligand.rotateBy(uniformRandomRotation())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This took care of the ligand rotation around its own center. \n", "We still need to position it far from the protein.\n", "First, find out the radius of the protein:\n", "\n", "![maxdist](img/maxdist.png)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "28.830551\n" ] } ], "source": [ "from moleculekit.util import maxDistance\n", "D = maxDistance(prot, 'all')\n", "print(D)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "D += 10\n", "# Move the ligand 10 Angstrom away from the furthest protein atom in X dimension\n", "ligand.moveBy([D, 0, 0]) \n", "# rotateBy rotates by default around [0, 0, 0]. Since the ligand has been moved\n", "# away from the center it will be rotated in a sphere of radius D+10 around [0, 0, 0]\n", "ligand.rotateBy(uniformRandomRotation())" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Mix it all together" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "87e521ff366845168f16817462e0e32f", "version_major": 2, "version_minor": 0 }, "text/plain": [ "NGLWidget()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "mol = Molecule(name='combo')\n", "mol.append(prot)\n", "mol.append(ligand)\n", "mol.reps.add(sel='protein', style='NewCartoon', color='Secondary Structure')\n", "mol.reps.add(sel='resname BEN', style='Licorice')\n", "mol.view()" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Solvate" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "-" } }, "source": [ "> Water is the driving force of all nature. --Leonardo da Vinci\n", "\n", "![waterbox](http://pub.htmd.org/tutorials/system-building-protein-ligand/waterbox.png)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "scrolled": true, "slideshow": { "slide_type": "slide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2024-06-11 14:58:36,251 - htmd.builder.solvate - INFO - Using water pdb file at: /home/sdoerr/Work/htmd/htmd/share/solvate/wat.pdb\n", "2024-06-11 14:58:36,587 - htmd.builder.solvate - INFO - Replicating 8 water segments, 2 by 2 by 2\n", "Solvating: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:02<00:00, 3.05it/s]\n", "2024-06-11 14:58:39,744 - htmd.builder.solvate - INFO - 20145 water molecules were added to the system.\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "5fcf54cc4eb74279b9f6a6a0f9469849", "version_major": 2, "version_minor": 0 }, "text/plain": [ "NGLWidget()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# We solvate with a larger cubic box to fully solvate the ligand\n", "DW = D + 5\n", "smol = solvate(mol, minmax=[[-DW, -DW, -DW], [DW, DW, DW]])\n", "smol.reps.add(sel='water', style='Lines')\n", "smol.view()" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Build the System with a specific forcefield" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "HTMD aims to be force-field agnostic. After you have a built system, you can either build it in Amber or CHARMM. The following sections work on the same previously solvated system and can be interconverted. However due to licensing issues we are not able to provide CHARMM support and recommend using the AMBER forcefield.\n", "\n", "Special care must be taken care in this case due to the use of benzamidine, which is not present by default on the respective forcefields." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### CHARMM forcefield" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "---- Topologies files list: /home/sdoerr/Work/htmd/htmd/share/builder/charmmfiles/top/ ----\n", "/top/top_all22_prot.rtf\n", "/top/top_all22star_prot.rtf\n", "/top/top_all35_ethers.rtf\n", "/top/top_all36_carb.rtf\n", "/top/top_all36_cgenff.rtf\n", "/top/top_all36_lipid.rtf\n", "/top/top_all36_lipid_ljpme.rtf\n", "/top/top_all36_na.rtf\n", "/top/top_all36_prot.rtf\n", "/top/top_water_ions.rtf\n", "---- Parameters files list: /home/sdoerr/Work/htmd/htmd/share/builder/charmmfiles/par/ ----\n", "/par/par_all22_prot.prm\n", "/par/par_all22star_prot.prm\n", "/par/par_all35_ethers.prm\n", "/par/par_all36_carb.prm\n", "/par/par_all36_cgenff.prm\n", "/par/par_all36_lipid.prm\n", "/par/par_all36_lipid_ljpme.prm\n", "/par/par_all36_na.prm\n", "/par/par_all36m_prot.prm\n", "/par/par_water_ions.prm\n", "---- Stream files list: /home/sdoerr/Work/htmd/htmd/share/builder/charmmfiles/str/ ----\n", "/str/carb/toppar_all36_carb_glycolipid.str\n", "/str/carb/toppar_all36_carb_glycopeptide.str\n", "/str/carb/toppar_all36_carb_imlab.str\n", "/str/carb/toppar_all36_carb_lignin.str\n", "/str/carb/toppar_all36_carb_model.str\n", "/str/cphmd/protpatch_protein_toppar36.str\n", "/str/lipid/toppar_all36_lipid_bacterial.str\n", "/str/lipid/toppar_all36_lipid_bacterial_ljpme.str\n", "/str/lipid/toppar_all36_lipid_cardiolipin.str\n", "/str/lipid/toppar_all36_lipid_cationpi_wyf.str\n", "/str/lipid/toppar_all36_lipid_cholesterol.str\n", "/str/lipid/toppar_all36_lipid_cholesterol_model_1.str\n", "/str/lipid/toppar_all36_lipid_detergent.str\n", "/str/lipid/toppar_all36_lipid_ether.str\n", "/str/lipid/toppar_all36_lipid_ether_ljpme.str\n", "/str/lipid/toppar_all36_lipid_inositol.str\n", "/str/lipid/toppar_all36_lipid_list.str\n", "/str/lipid/toppar_all36_lipid_lps.str\n", "/str/lipid/toppar_all36_lipid_miscellaneous.str\n", "/str/lipid/toppar_all36_lipid_miscellaneous_ljpme.str\n", "/str/lipid/toppar_all36_lipid_model.str\n", "/str/lipid/toppar_all36_lipid_prot.str\n", "/str/lipid/toppar_all36_lipid_sphingo.str\n", "/str/lipid/toppar_all36_lipid_yeast.str\n", "/str/lipid/toppar_all36_lipid_yeast_ljpme.str\n", "/str/misc/toppar_amines.str\n", "/str/misc/toppar_cgenff_misc.str\n", "/str/misc/toppar_dum_noble_gases.str\n", "/str/misc/toppar_hbond.str\n", "/str/misc/toppar_ions_won.str\n", "/str/na/toppar_all36_na_model.str\n", "/str/na/toppar_all36_na_modifications.str\n", "/str/na/toppar_all36_na_nad_ppi.str\n", "/str/na/toppar_all36_na_reactive_rna.str\n", "/str/na/toppar_all36_na_rna_modified.str\n", "/str/na/toppar_all36_na_rna_modified_for_new_psf_gen_code_2022.str\n", "/str/prot/toppar_all36_prot_aldehydes.str\n", "/str/prot/toppar_all36_prot_arg0.str\n", "/str/prot/toppar_all36_prot_c36m_d_aminoacids.str\n", "/str/prot/toppar_all36_prot_fluoro_alkanes.str\n", "/str/prot/toppar_all36_prot_heme.str\n", "/str/prot/toppar_all36_prot_heme_for_new_psf_gen_code_2022.str\n", "/str/prot/toppar_all36_prot_model.str\n", "/str/prot/toppar_all36_prot_modify_res.str\n", "/str/prot/toppar_all36_prot_na_combined.str\n", "/str/prot/toppar_all36_prot_pyridines.str\n", "/str/prot/toppar_all36_prot_retinol.str\n" ] } ], "source": [ "charmm.listFiles()" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Build and ionize using CHARMM" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true, "slideshow": { "slide_type": "-" } }, "outputs": [], "source": [ "topos_charmm = charmm.defaultTopo() + [join(datadir, 'BEN.rtf')]\n", "# Parameter files (e.g. those returned by charmm.listFiles() and BEN.prm)\n", "# must be copied into the simulation directory afterwards - charmm.build\n", "# doesn't stage parameter files for you.\n", "\n", "# bmol_charmm = charmm.build(smol, topo=topos_charmm, outdir='./build_charmm')" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### AMBER forcefield" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "---- Forcefield files list: /home/sdoerr/miniforge3/envs/htmd/dat/leap/cmd/ ----\n", "leaprc.amberdyes\n", "leaprc.conste\n", "leaprc.constph\n", "leaprc.DNA.bsc1\n", "leaprc.DNA.OL15\n", "leaprc.ffAM1\n", "leaprc.ffPM3\n", "leaprc.fluorine.ff15ipq\n", "leaprc.gaff\n", "leaprc.gaff2\n", "leaprc.GLYCAM_06EPb\n", "leaprc.GLYCAM_06j-1\n", "leaprc.lipid21\n", "leaprc.mimetic.ff15ipq\n", "leaprc.modrna08\n", "leaprc.music\n", "leaprc.phosaa10\n", "leaprc.phosaa14SB\n", "leaprc.phosaa19SB\n", "leaprc.protein.fb15\n", "leaprc.protein.ff03.r1\n", "leaprc.protein.ff03ua\n", "leaprc.protein.ff14SB\n", "leaprc.protein.ff14SB_modAA\n", "leaprc.protein.ff14SBonlysc\n", "leaprc.protein.ff15ipq\n", "leaprc.protein.ff15ipq-vac\n", "leaprc.protein.ff19ipq\n", "leaprc.protein.ff19SB\n", "leaprc.protein.ff19SB_modAA\n", "leaprc.RNA.LJbb\n", "leaprc.RNA.OL3\n", "leaprc.RNA.ROC\n", "leaprc.RNA.Shaw\n", "leaprc.RNA.YIL\n", "leaprc.water.fb3\n", "leaprc.water.fb4\n", "leaprc.water.opc\n", "leaprc.water.opc3\n", "leaprc.water.opc3pol\n", "leaprc.water.spce\n", "leaprc.water.spceb\n", "leaprc.water.tip3p\n", "leaprc.water.tip4pd\n", "leaprc.water.tip4pd-a99SBdisp\n", "leaprc.water.tip4pew\n", "leaprc.xFPchromophores\n", "---- OLD Forcefield files list: /home/sdoerr/miniforge3/envs/htmd/dat/leap/cmd/ ----\n", "oldff/leaprc.DNA.bsc0\n", "oldff/leaprc.ff02\n", "oldff/leaprc.ff02pol.r0\n", "oldff/leaprc.ff02pol.r1\n", "oldff/leaprc.ff02polEP.r0\n", "oldff/leaprc.ff02polEP.r1\n", "oldff/leaprc.ff03\n", "oldff/leaprc.ff10\n", "oldff/leaprc.ff14ipq\n", "oldff/leaprc.ff14SB\n", "oldff/leaprc.ff14SB.redq\n", "oldff/leaprc.ff84\n", "oldff/leaprc.ff86\n", "oldff/leaprc.ff94\n", "oldff/leaprc.ff94.nmr\n", "oldff/leaprc.ff96\n", "oldff/leaprc.ff98\n", "oldff/leaprc.ff99\n", "oldff/leaprc.ff99bsc0\n", "oldff/leaprc.ff99SB\n", "oldff/leaprc.ff99SBildn\n", "oldff/leaprc.ff99SBnmr\n", "oldff/leaprc.GLYCAM_04\n", "oldff/leaprc.GLYCAM_06\n", "oldff/leaprc.GLYCAM_06EP\n", "oldff/leaprc.GLYCAM_06h\n", "oldff/leaprc.GLYCAM_06h-1\n", "oldff/leaprc.GLYCAM_06h-12SB\n", "oldff/leaprc.GLYCAM_06j_10\n", "oldff/leaprc.lipid11\n", "oldff/leaprc.lipid14\n", "oldff/leaprc.lipid17\n", "oldff/leaprc.parmbsc0_chiOL4_ezOL1\n", "oldff/leaprc.rna.ff02\n", "oldff/leaprc.rna.ff02EP\n", "oldff/leaprc.rna.ff84\n", "oldff/leaprc.rna.ff94\n", "oldff/leaprc.rna.ff98\n", "oldff/leaprc.rna.ff99\n", "oldff/leaprc.toyrna\n", "---- Topology files list: /home/sdoerr/miniforge3/envs/htmd/dat/leap/prep/ ----\n", "all_amino03.in\n", "all_aminoct03.in\n", "all_aminont03.in\n", "amino10.in\n", "amino12.in\n", "aminoct10.in\n", "aminoct12.in\n", "aminont10.in\n", "aminont12.in\n", "chcl3.in\n", "dna_nuc94-bsc0_chiOl4-ezOL1.in\n", "epACE.prepin\n", "epALA.prepin\n", "epARG.prepin\n", "epASN.prepin\n", "epASP.prepin\n", "epCYS.prepin\n", "epGLN.prepin\n", "epGLU.prepin\n", "epGLY.prepin\n", "epHID.prepin\n", "epHIE.prepin\n", "epILE.prepin\n", "epLEU.prepin\n", "epLYS.prepin\n", "epMET.prepin\n", "epNME.prepin\n", "epPHE.prepin\n", "epSER.prepin\n", "epTHR.prepin\n", "epTRP.prepin\n", "epTYR.prepin\n", "epVAL.prepin\n", "GLYCAM_06EPb.prep\n", "GLYCAM_06j-1.prep\n", "GLYCAM_lipids_06h.prep\n", "meoh.in\n", "nma.in\n", "nucleic10.in\n", "toyrna.in\n", "uni_amino03.in\n", "uni_aminoct03.in\n", "uni_aminont03.in\n", "---- Parameter files list: /home/sdoerr/miniforge3/envs/htmd/dat/leap/parm/ ----\n", "frcmod.chcl3\n", "frcmod.chiOL4\n", "frcmod.conste\n", "frcmod.constph\n", "frcmod.dc4\n", "frcmod.DNA.OL15\n", "frcmod.fb15\n", "frcmod.ff02pol.r1\n", "frcmod.ff03\n", "frcmod.ff03ua\n", "frcmod.ff12SB\n", "frcmod.ff14SB\n", "frcmod.ff14SBmodAA\n", "frcmod.ff15ipq-19F\n", "frcmod.ff15ipq-m\n", "frcmod.ff19SB\n", "frcmod.ff19SB_XXX\n", "frcmod.ff19SBmodAA\n", "frcmod.ff99bsc0CG\n", "frcmod.ff99SB\n", "frcmod.ff99SB14\n", "frcmod.ff99SBildn\n", "frcmod.ff99SBnmr\n", "frcmod.ff99SP\n", "frcmod.ions1lm_1264_spce\n", "frcmod.ions1lm_1264_tip3p\n", "frcmod.ions1lm_1264_tip4pew\n", "frcmod.ions1lm_126_spce\n", "frcmod.ions1lm_126_tip3p\n", "frcmod.ions1lm_126_tip4pew\n", "frcmod.ions1lm_iod\n", "frcmod.ions234lm_1264_spce\n", "frcmod.ions234lm_1264_tip3p\n", "frcmod.ions234lm_1264_tip4pew\n", "frcmod.ions234lm_126_spce\n", "frcmod.ions234lm_126_tip3p\n", "frcmod.ions234lm_126_tip4pew\n", "frcmod.ions234lm_hfe_spce\n", "frcmod.ions234lm_hfe_tip3p\n", "frcmod.ions234lm_hfe_tip4pew\n", "frcmod.ions234lm_iod_spce\n", "frcmod.ions234lm_iod_tip3p\n", "frcmod.ions234lm_iod_tip4pew\n", "frcmod.ions_charmm22\n", "frcmod.ionsff99_tip3p\n", "frcmod.ionsjc_spce\n", "frcmod.ionsjc_tip3p\n", "frcmod.ionsjc_tip4pew\n", "frcmod.ionslm_1264_fb3\n", "frcmod.ionslm_1264_fb4\n", "frcmod.ionslm_1264_opc\n", "frcmod.ionslm_1264_opc3\n", "frcmod.ionslm_126_fb3\n", "frcmod.ionslm_126_fb4\n", "frcmod.ionslm_126_opc\n", "frcmod.ionslm_126_opc3\n", "frcmod.ionslm_hfe_fb3\n", "frcmod.ionslm_hfe_fb4\n", "frcmod.ionslm_hfe_opc\n", "frcmod.ionslm_hfe_opc3\n", "frcmod.ionslm_iod_fb3\n", "frcmod.ionslm_iod_fb4\n", "frcmod.ionslm_iod_opc\n", "frcmod.ionslm_iod_opc3\n", "frcmod.meoh\n", "frcmod.nma\n", "frcmod.opc\n", "frcmod.opc3\n", "frcmod.opc3pol\n", "frcmod.opc3pol_HMR4fs\n", "frcmod.parmbsc0\n", "frcmod.parmbsc0_ezOL1\n", "frcmod.parmbsc1\n", "frcmod.parmCHI_YIL\n", "frcmod.phmd\n", "frcmod.phosaa10\n", "frcmod.phosaa14SB\n", "frcmod.phosaa19SB\n", "frcmod.pol3\n", "frcmod.protonated_nucleic\n", "frcmod.qspcfw\n", "frcmod.RNA.LJbb\n", "frcmod.ROC-RNA\n", "frcmod.ROC-RNA_const\n", "frcmod.shaw\n", "frcmod.spce\n", "frcmod.spceb\n", "frcmod.spcfw\n", "frcmod.tip3p\n", "frcmod.tip3pf\n", "frcmod.tip3pfb\n", "frcmod.tip4p\n", "frcmod.tip4pd\n", "frcmod.tip4pd-a99SB-disp\n", "frcmod.tip4pew\n", "frcmod.tip4pfb\n", "frcmod.tip5p\n", "frcmod.urea\n", "frcmod.vdWall\n", "frcmod.xFPchromophores\n", "frcmod.xFPchromophores.2016\n", "frcmod.xFPchromophores.2022\n", "---- Extra forcefield files list: /home/sdoerr/Work/htmd/htmd/share/builder/amberfiles/ ----\n", "ff-nucleic-OL15/leaprc.ff-nucleic-OL15\n", "---- Extra topology files list: /home/sdoerr/Work/htmd/htmd/share/builder/amberfiles/ ----\n", "cofactors/cofactors.in\n", "ff-ncaa/ffncaa.in\n", "ff-nucleic-OL15/leap-ff-nucleic-OL15.in\n", "ff-ptm/ffptm.in\n", "---- Extra parameter files list: /home/sdoerr/Work/htmd/htmd/share/builder/amberfiles/ ----\n", "cofactors/ADP.frcmod\n", "cofactors/AMP.frcmod\n", "cofactors/ATP.frcmod\n", "cofactors/FMN.frcmod\n", "cofactors/GDP.frcmod\n", "cofactors/GTP.frcmod\n", "cofactors/HEM.frcmod\n", "cofactors/NAD.frcmod\n", "cofactors/NAI.frcmod\n", "cofactors/NAP.frcmod\n", "ff-ncaa/004.frcmod\n", "ff-ncaa/03Y.frcmod\n", "ff-ncaa/0A1.frcmod\n", "ff-ncaa/0BN.frcmod\n", "ff-ncaa/1MH.frcmod\n", "ff-ncaa/2AS.frcmod\n", "ff-ncaa/2GX.frcmod\n", "ff-ncaa/2ML.frcmod\n", "ff-ncaa/4IN.frcmod\n", "ff-ncaa/4PH.frcmod\n", "ff-ncaa/5JP.frcmod\n", "ff-ncaa/AA4.frcmod\n", "ff-ncaa/ABA.frcmod\n", "ff-ncaa/AHP.frcmod\n", "ff-ncaa/ALC.frcmod\n", "ff-ncaa/ALN.frcmod\n", "ff-ncaa/APD.frcmod\n", "ff-ncaa/BB8.frcmod\n", "ff-ncaa/BCS.frcmod\n", "ff-ncaa/CCS.frcmod\n", "ff-ncaa/CSA.frcmod\n", "ff-ncaa/D4P.frcmod\n", "ff-ncaa/DAB.frcmod\n", "ff-ncaa/DPP.frcmod\n", "ff-ncaa/ESC.frcmod\n", "ff-ncaa/FGL.frcmod\n", "ff-ncaa/GHG.frcmod\n", "ff-ncaa/GME.frcmod\n", "ff-ncaa/GNC.frcmod\n", "ff-ncaa/HHK.frcmod\n", "ff-ncaa/HLU.frcmod\n", "ff-ncaa/HLX.frcmod\n", "ff-ncaa/HOX.frcmod\n", "ff-ncaa/HPE.frcmod\n", "ff-ncaa/HQA.frcmod\n", "ff-ncaa/HTR.frcmod\n", "ff-ncaa/I2M.frcmod\n", "ff-ncaa/IGL.frcmod\n", "ff-ncaa/IIL.frcmod\n", "ff-ncaa/IML.frcmod\n", "ff-ncaa/KYN.frcmod\n", "ff-ncaa/LME.frcmod\n", "ff-ncaa/LMQ.frcmod\n", "ff-ncaa/ME0.frcmod\n", "ff-ncaa/MEA.frcmod\n", "ff-ncaa/MEN.frcmod\n", "ff-ncaa/MEQ.frcmod\n", "ff-ncaa/MLE.frcmod\n", "ff-ncaa/MLZ.frcmod\n", "ff-ncaa/MME.frcmod\n", "ff-ncaa/MMO.frcmod\n", "ff-ncaa/MVA.frcmod\n", "ff-ncaa/NAL.frcmod\n", "ff-ncaa/NCY.frcmod\n", "ff-ncaa/NLE.frcmod\n", "ff-ncaa/NVA.frcmod\n", "ff-ncaa/NZC.frcmod\n", "ff-ncaa/OCY.frcmod\n", "ff-ncaa/OMX.frcmod\n", "ff-ncaa/ONL.frcmod\n", "ff-ncaa/TRO.frcmod\n", "ff-ncaa/TY2.frcmod\n", "ff-ncaa/TYQ.frcmod\n", "ff-ncaa/YCM.frcmod\n", "ff-ncaa/YNM.frcmod\n", "ff-nucleic-OL15/ff-nucleic-OL15.frcmod\n", "ff-ptm/0AF.frcmod\n", "ff-ptm/2MR.frcmod\n", "ff-ptm/4PQ.frcmod\n", "ff-ptm/ALY.frcmod\n", "ff-ptm/BTK.frcmod\n", "ff-ptm/CGU.frcmod\n", "ff-ptm/CSO.frcmod\n", "ff-ptm/CSP.frcmod\n", "ff-ptm/CSS.frcmod\n", "ff-ptm/DA2.frcmod\n", "ff-ptm/DAH.frcmod\n", "ff-ptm/HY3.frcmod\n", "ff-ptm/HYP.frcmod\n", "ff-ptm/LYZ.frcmod\n", "ff-ptm/M3L.frcmod\n", "ff-ptm/MLY.frcmod\n", "ff-ptm/ORM.frcmod\n", "ff-ptm/P1L.frcmod\n", "ff-ptm/PCA.frcmod\n", "ff-ptm/PRK.frcmod\n", "ff-ptm/PTR.frcmod\n", "ff-ptm/SEP.frcmod\n", "ff-ptm/TPO.frcmod\n" ] } ], "source": [ "amber.listFiles()" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Build and ionize using Amber" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "topos_amber = amber.defaultTopo() + [join(datadir, 'BEN.cif')]\n", "frcmods_amber = amber.defaultParam() + [join(datadir, 'BEN.frcmod')]" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2024-06-11 14:58:44,189 - htmd.builder.amber - INFO - Detecting disulfide bonds.\n", "2024-06-11 14:58:44,197 - htmd.builder.builder - INFO - 6 disulfide bonds were added\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Disulfide Bond between: UniqueResidueID\n", " and: UniqueResidueID\n", "\n", "Disulfide Bond between: UniqueResidueID\n", " and: UniqueResidueID\n", "\n", "Disulfide Bond between: UniqueResidueID\n", " and: UniqueResidueID\n", "\n", "Disulfide Bond between: UniqueResidueID\n", " and: UniqueResidueID\n", "\n", "Disulfide Bond between: UniqueResidueID\n", " and: UniqueResidueID\n", "\n", "Disulfide Bond between: UniqueResidueID\n", " and: UniqueResidueID\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2024-06-11 14:58:45,604 - htmd.builder.amber - INFO - Starting the build.\n", "2024-06-11 14:58:48,790 - htmd.builder.amber - INFO - Finished building.\n", "2024-06-11 14:58:49,566 - moleculekit.writers - WARNING - Field \"resid\" of PDB overflows. Your data will be truncated to 4 characters.\n", "2024-06-11 14:58:54,542 - htmd.builder.ionize - INFO - Adding 10 anions + 0 cations for neutralizing and 0 ions for the given salt concentration 0 M.\n", "2024-06-11 14:58:57,279 - htmd.builder.amber - INFO - Starting the build.\n", "2024-06-11 14:59:00,594 - htmd.builder.amber - INFO - Finished building.\n", "2024-06-11 14:59:01,416 - moleculekit.writers - WARNING - Field \"resid\" of PDB overflows. Your data will be truncated to 4 characters.\n", "2024-06-11 14:59:05,984 - py.warnings - WARNING - /home/sdoerr/miniforge3/envs/htmd/lib/python3.10/site-packages/Bio/pairwise2.py:278: BiopythonDeprecationWarning: Bio.pairwise2 has been deprecated, and we intend to remove it in a future release of Biopython. As an alternative, please consider using Bio.Align.PairwiseAligner as a replacement, and contact the Biopython developers if you still need the Bio.pairwise2 module.\n", " warnings.warn(\n", "\n", "2024-06-11 14:59:08,752 - moleculekit.tools.sequencestructuralalignment - INFO - Alignment #0 was done on 223 residues: 2-224\n" ] } ], "source": [ "bmol_amber = amber.build(smol, topo=topos_amber, param=frcmods_amber, outdir='./build_amber', saltconc=0.15)" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Visualize" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The built system can be visualized (with waters hidden to be able to visualize the inserted ions):" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2024-06-11 14:59:09,148 - moleculekit.writers - WARNING - Field \"resid\" of PDB overflows. Your data will be truncated to 4 characters.\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0bec5907beef459792cc01644da14c9f", "version_major": 2, "version_minor": 0 }, "text/plain": [ "NGLWidget()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "bmol_amber.view(sel='not water') # visualize the charmm built system\n", "# bmol_amber.view(sel='not water') # uncomment to visualize the amber built system" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The `bmol_charmm` and `bmol_amber` are `Molecule` objects that contain the built system, but the full contents to run a simulation are located in the `outdir` (`./build` in this case)." ] } ], "metadata": { "anaconda-cloud": {}, "celltoolbar": "Slideshow", "kernelspec": { "display_name": "Python 3 (ipykernel)", "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.10.13" }, "widgets": { "state": { "0a178ab50dc445f7924510f91887f5fc": { "views": [ { "cell_index": 15 } ] }, "25c1755bbe564dbab74cd85ab64fd1a9": { "views": [ { "cell_index": 25 } ] }, "2b9fe15c349d4639adf691ce9756fdae": { "views": [ { "cell_index": 28 } ] }, "574684028db242379374737dca9fbb19": { "views": [ { "cell_index": 25 } ] }, "5c49905aacd04d71b82425f44ae9e531": { "views": [ { "cell_index": 28 } ] }, "5fec83d14a08443fa1f8a9e24092a958": { "views": [ { "cell_index": 34 } ] }, "62600751c0694125afa73b13bfbd1957": { "views": [ { "cell_index": 15 } ] }, "d4bbcf3b9c59484aac9988a2f2ff1056": { "views": [ { "cell_index": 34 } ] } }, "version": "1.2.0" } }, "nbformat": 4, "nbformat_minor": 4 }