{ "cells": [ { "cell_type": "markdown", "id": "90e5b4f1", "metadata": {}, "source": [ "# TMol How-To Guide — Metals and Nucleic Acids\n", "\n", "[](https://colab.research.google.com/github/RosettaCommons/tmol/blob/main/docs/tutorial/03_metals_and_nucleic_acids.ipynb)" ] }, { "cell_type": "markdown", "id": "3b1d67bf", "metadata": {}, "source": [ "## 3. Metals and Nucleic Acids" ] }, { "cell_type": "markdown", "id": "ff851d1b", "metadata": {}, "source": [ "Metal ions and nucleic acids both score correctly with no special setup -- this notebook is mostly worked examples confirming that. It assumes the basics from [tmol_how_to_guide.ipynb](01_tmol_how_to_guide.ipynb) and scoring/relax from [02_scoring_and_optimization.ipynb](02_scoring_and_optimization.ipynb)." ] }, { "cell_type": "markdown", "id": "dee83c2c", "metadata": {}, "source": [ "### Setup" ] }, { "cell_type": "markdown", "id": "caef9b13", "metadata": {}, "source": [ "Wheel install, imports, seeding, and device selection live in [notebook_setup.py](https://github.com/RosettaCommons/tmol/blob/main/docs/tutorial/notebook_setup.py)." ] }, { "cell_type": "code", "execution_count": 1, "id": "b36860f6", "metadata": { "execution": { "iopub.execute_input": "2026-10-20T01:35:04.669883Z", "iopub.status.busy": "2026-10-20T01:35:04.669733Z", "iopub.status.idle": "2026-10-20T01:35:11.080209Z", "shell.execute_reply": "2026-10-20T01:35:11.079326Z" }, "tags": [ "collapse-code" ] }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Environment variable CCD_MIRROR_PATH not set. Will not be able to use function requiring this variable. To set it you may:\n", " (1) add the line 'export VAR_NAME=path/to/variable' to your .bashrc or .zshrc file\n", " (2) set it in your current shell with 'export VAR_NAME=path/to/variable'\n", " (3) write it to a .env file in the root of the atomworks.io repository\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Environment variable PDB_MIRROR_PATH not set. Will not be able to use function requiring this variable. To set it you may:\n", " (1) add the line 'export VAR_NAME=path/to/variable' to your .bashrc or .zshrc file\n", " (2) set it in your current shell with 'export VAR_NAME=path/to/variable'\n", " (3) write it to a .env file in the root of the atomworks.io repository\n" ] } ], "source": [ "try:\n", " import google.colab # noqa: F401\n", "except ImportError:\n", " IN_COLAB = False\n", "else:\n", " IN_COLAB = True\n", "\n", "if IN_COLAB:\n", " from urllib.request import urlretrieve\n", "\n", " urlretrieve(\n", " \"https://raw.githubusercontent.com/RosettaCommons/tmol/\"\n", " \"main/docs/tutorial/notebook_setup.py\",\n", " \"notebook_setup.py\",\n", " )\n", "\n", "from notebook_setup import * # noqa: F401,F403\n", "\n", "device, param_db = setup()\n" ] }, { "cell_type": "markdown", "id": "e27082f6", "metadata": {}, "source": [ "### Metals" ] }, { "cell_type": "markdown", "id": "502eca81", "metadata": {}, "source": [ "#### Handled by default" ] }, { "cell_type": "markdown", "id": "3f5462a1", "metadata": {}, "source": [ "Metal ions (ZN, CA, MG, FE, ...) are ordinary residue types in the default chemical database, not ligands -- detecting a metal ion and building its coordinating bonds needs no `prepare_ligands` flag. A `MetalCoordination` energy term scoring that geometry is included in `beta2016_score_function` by default, at weight 1.0." ] }, { "cell_type": "markdown", "id": "4b2a863b", "metadata": {}, "source": [ "We use a small curated fixture from TMol's own test suite -- a tetrahedral zinc site from [3KS3](https://www.rcsb.org/structure/3KS3) (carbonic anhydrase II) -- rather than fetching the full deposited structure, since it's already cropped to the site of interest." ] }, { "cell_type": "code", "execution_count": 2, "id": "0e6ddef6", "metadata": { "execution": { "iopub.execute_input": "2026-10-20T01:35:11.082807Z", "iopub.status.busy": "2026-10-20T01:35:11.082420Z", "iopub.status.idle": "2026-10-20T01:35:16.538453Z", "shell.execute_reply": "2026-10-20T01:35:16.537862Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "HIS is seen only at a chain terminus and N, ND1, NE2 could each carry its other connection; it is read as the conventional backbone through N. A copy of the residue in a chain would settle it.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Unrecognized 3lc GOL\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "n_poses=1, max_n_blocks=258\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/runner/work/tmol/tmol/.venv/lib/python3.12/site-packages/biotite/structure/io/pdb/file.py:629: DeprecationWarning: The chararray class is deprecated and will be removed in a future release. Use an ndarray with a string or bytes dtype instead.\n", " record = np.char.array(np.where(array.hetero, \"HETATM\", \"ATOM\"))\n" ] }, { "data": { "application/3dmoljs_load.v0": "
3Dmol.js failed to load for some reason. Please check your browser console for error messages.
3Dmol.js failed to load for some reason. Please check your browser console for error messages.
3Dmol.js failed to load for some reason. Please check your browser console for error messages.
3Dmol.js failed to load for some reason. Please check your browser console for error messages.
3Dmol.js failed to load for some reason. Please check your browser console for error messages.
3Dmol.js failed to load for some reason. Please check your browser console for error messages.
3Dmol.js failed to load for some reason. Please check your browser console for error messages.
3Dmol.js failed to load for some reason. Please check your browser console for error messages.