### Initialize and Install with uv Source: https://github.com/acellera/moleculekit/blob/main/doc/source/installation.rst Initializes a new project directory with uv, installs MoleculeKit and ipython, and runs ipython within the managed environment. ```bash uv init myproject cd myproject uv add moleculekit ipython uv run ipython ``` -------------------------------- ### Install MoleculeKit with Conda Source: https://github.com/acellera/moleculekit/blob/main/doc/source/installation.rst Installs MoleculeKit using conda from the specified channels. ```bash conda install moleculekit -c acellera -c conda-forge ``` -------------------------------- ### Load Pyodide and MoleculeKit Source: https://github.com/acellera/moleculekit/blob/main/test_wasm/index_repl.html Initializes Pyodide, loads the micropip package, and installs the MoleculeKit wheel from a local server. This sets up the Python environment in the browser. ```javascript "use strict"; function sleep(s) { return new Promise((resolve) => setTimeout(resolve, s)); } async function main() { let term; globalThis.pyodide = await loadPyodide({ stdin: () => { let result = prompt(); echo(result); return result; }, }); let namespace = pyodide.globals.get("dict")(); await pyodide.loadPackage("micropip"); await pyodide.runPythonAsync(` import micropip await micropip.install('http://0.0.0.0:8000/moleculekit-1.3.5-cp310-cp310-emscripten_3_1_14_wasm32.whl') `); ``` -------------------------------- ### Install MoleculeKit with Pip Source: https://github.com/acellera/moleculekit/blob/main/doc/source/installation.rst Installs MoleculeKit using pip after setting the Python version to 3.10. ```bash conda install python=3.10 pip install moleculekit ``` -------------------------------- ### Create Conda Environment Source: https://github.com/acellera/moleculekit/blob/main/doc/source/installation.rst Creates a new conda environment named 'moleculekit' for isolating the installation. ```bash conda create -n moleculekit ``` -------------------------------- ### Build MoleculeKit for WebAssembly Source: https://github.com/acellera/moleculekit/blob/main/molkitten/README.md Provides instructions for building MoleculeKit for WebAssembly using Pyodide, including environment setup and build commands. ```bash conda create -n pyodide-build conda activate pyodide-build conda install python=3.11 pip install pyodide-build==0.25.1 # Activate the emscripten environment cd ../emsdk ./emsdk install 3.1.46 ./emsdk activate 3.1.46 source emsdk_env.sh cd - # Build the package export PYO3_CROSS_INCLUDE_DIR="HACK" export PYO3_CROSS_LIB_DIR="HACK" rm -rf .pyodide-xbuildenv pyodide build -o dist_pyodide cp dist_pyodide/*.whl test_wasm/wheels/ cd test_wasm python3 -m http.server ``` -------------------------------- ### Build MoleculeKit for WebAssembly Source: https://github.com/acellera/moleculekit/blob/main/README.md Provides instructions for building MoleculeKit for WebAssembly using Pyodide, including environment setup and build commands. ```bash conda create -n pyodide-build conda activate pyodide-build conda install python=3.11 pip install pyodide-build==0.25.1 # Activate the emscripten environment cd ../emsdk ./emsdk install 3.1.46 ./emsdk activate 3.1.46 source emsdk_env.sh cd - # Build the package export PYO3_CROSS_INCLUDE_DIR="HACK" export PYO3_CROSS_LIB_DIR="HACK" rm -rf .pyodide-xbuildenv pyodide build -o dist_pyodide cp dist_pyodide/*.whl test_wasm/wheels/ cd test_wasm python3 -m http.server ``` -------------------------------- ### Activate Conda Environment Source: https://github.com/acellera/moleculekit/blob/main/doc/source/installation.rst Activates the 'moleculekit' conda environment, ensuring subsequent installations are isolated. ```bash conda activate moleculekit ``` -------------------------------- ### Install MoleculeKit with Pip Source: https://github.com/acellera/moleculekit/blob/main/molkitten/README.md Installs the MoleculeKit library using pip, the Python package installer. ```bash pip install moleculekit ``` -------------------------------- ### Install IPython Source: https://github.com/acellera/moleculekit/blob/main/README.md Installs IPython, an enhanced interactive Python shell, which is useful for using MoleculeKit. ```bash pip install ipython ``` -------------------------------- ### Initialize Pyodide Console and Utilities Source: https://github.com/acellera/moleculekit/blob/main/test_wasm/index_repl.html Configures the Pyodide console, including setting up a custom banner, handling asynchronous operations, and defining utility functions for Python interaction within the JavaScript environment. ```javascript pyodide.runPython( ` import sys from pyodide.ffi import to_js from pyodide.console import PyodideConsole, repr_shorten, BANNER import __main__ BANNER = "Welcome to the Pyodide terminal emulator 🐍\n" + BANNER pyconsole = PyodideConsole(__main__.__dict__) import builtins async def await_fut(fut): res = await fut if res is not None: builtins._ = res return to_js([res], depth=1) def clear_console(): pyconsole.buffer = [] `, { globals: namespace } ); let repr_shorten = namespace.get("repr_shorten"); let banner = namespace.get("BANNER"); let await_fut = namespace.get("await_fut"); let pyconsole = namespace.get("pyconsole"); let clear_console = namespace.get("clear_console"); ``` -------------------------------- ### Install IPython Source: https://github.com/acellera/moleculekit/blob/main/molkitten/README.md Installs IPython, an enhanced interactive Python shell, which is useful for using MoleculeKit. ```bash pip install ipython ``` -------------------------------- ### Install MoleculeKit with Pip Source: https://github.com/acellera/moleculekit/blob/main/README.md Installs the MoleculeKit library using pip, the Python package installer. ```bash pip install moleculekit ``` -------------------------------- ### Load Pyodide and Install Packages Source: https://github.com/acellera/moleculekit/blob/main/test_wasm/index.html Loads the Pyodide runtime and installs a list of specified Python packages, including MoleculeKit and its dependencies, along with pyodide-http and requests for network operations. ```javascript async function main() { let pyodide = await loadPyodide(); await pyodide.loadPackage([ "wheels/decorator-5.1.1-py3-none-any.whl", "wheels/setuptools-67.6.1-py3-none-any.whl", "wheels/pyparsing-3.0.9-py3-none-any.whl", "wheels/matplotlib-3.5.2-cp311-cp311-emscripten_3_1_46_wasm32.whl", "wheels/matplotlib_pyodide-0.2.0-py3-none-any.whl", "wheels/cycler-0.11.0-py3-none-any.whl", "wheels/fonttools-4.39.3-py3-none-any.whl", "wheels/kiwisolver-1.4.4-cp311-cp311-emscripten_3_1_46_wasm32.whl", "wheels/msgpack-1.0.5-cp311-cp311-emscripten_3_1_46_wasm32.whl", "wheels/six-1.9.0-py2.py3-none-any.whl", "wheels/pytz-2023.3-py2.py3-none-any.whl", "wheels/tqdm-4.9.0-py2.py3-none-any.whl", "wheels/tzdata-2023.3-py2.py3-none-any.whl", "wheels/python_dateutil-2.8.2-py2.py3-none-any.whl", "wheels/networkx-3.1-py3-none-any.whl", "wheels/numpy-1.26.4-cp311-cp311-emscripten_3_1_46_wasm32.whl", "wheels/pandas-1.5.3-cp311-cp311-emscripten_3_1_46_wasm32.whl", "wheels/moleculekit-1.9.4-cp311-cp311-emscripten_3_1_46_wasm32.whl", ]); await pyodide.loadPackage("micropip"); const micropip = pyodide.pyimport("micropip"); await micropip.install('pyodide-http'); await micropip.install('requests'); // ... rest of the code } ``` -------------------------------- ### Create Molecule Object from PDB String Source: https://github.com/acellera/moleculekit/blob/main/test_wasm/index_repl.html Fetches a PDB file from a server, reads its content, and then uses Pyodide to execute Python code that creates a MoleculeKit Molecule object from the PDB data. ```javascript const echo = (msg, ...opts) => term.echo( msg .replaceAll("]]", "]]") .replaceAll("[[", "[["), ...opts ); namespace.destroy(); const filedata = await fetch('/3ptb.pdb') let pdbtxt = await filedata.text(); pdbtxt = pdbtxt.replace(/\n/g, "\\n"); // Creating a Molecule object from a PDB string pyodide.runPython(` from io import StringIO stxt = StringIO("${pdbtxt}") from moleculekit.molecule import Molecule mol = Molecule(stxt, type="pdb") `) ``` -------------------------------- ### Pyodide Error Handling and Console Output (JavaScript) Source: https://github.com/acellera/moleculekit/blob/main/test_wasm/index_repl.html Configures callbacks for Pyodide's standard output and error streams, and defines a handler for fatal Pyodide errors. It also manages the terminal's ready state and cursor blinking. ```javascript window.term = term; pyconsole.stdout_callback = (s) => echo(s, { newline: false }); pyconsole.stderr_callback = (s) => { term.error(s.trimEnd()); }; term.ready = Promise.resolve(); pyodide._api.on_fatal = async (e) => { term.error( "Pyodide has suffered a fatal error. Please report this to the Pyodide maintainers." ); term.error("The cause of the fatal error was:"); term.error(e); term.error("Look in the browser console for more details."); await term.ready; term.pause(); await sleep(15); term.pause(); }; const searchParams = new URLSearchParams(window.location.search); if (searchParams.has("noblink")) { $(".cmd-cursor").addClass("noblink"); } } window.console_ready = main(); ``` -------------------------------- ### Terminal Keyboard Event Handling (JavaScript) Source: https://github.com/acellera/moleculekit/blob/main/test_wasm/index_repl.html Handles keyboard events for the terminal, including CTRL+C for interrupt and TAB for command completion. It manages console clearing, command setting, and prompt restoration. ```javascript ap: { "CTRL+C": async function (event, original) { clear_console(); term.enter(); echo("KeyboardInterrupt"); term.set_command(""); term.set_prompt(ps1); }, TAB: (event, original) => { const command = term.before_cursor(); // Disable completion for whitespaces. if (command.trim() === "") { term.insert("\t"); return false; } return original(event); }, }, }); ``` -------------------------------- ### Create Molecule Object from JavaScript Arrays Source: https://github.com/acellera/moleculekit/blob/main/test_wasm/index_repl.html Defines molecular data (atom names, residue info, coordinates) in JavaScript and registers it as a module for Pyodide. It then uses this module to create another MoleculeKit Molecule object. ```javascript let my_js_namespace = { name : ["N", "CA", "C"], resname: ["ALA", "ALA", "ALA"], resid: new Int32Array([1, 1, 1]), chain: ["A", "A", "A"], element: ["N", "C", "C"], coords: [[0, 1.5, 3], [-3.1, 2, 7.1], [1.46, 1.0, 2.74]] }; pyodide.registerJsModule("my_js_namespace", my_js_namespace); pyodide.runPython(` from my_js_namespace import name, resname, resid, chain, element, coords import numpy as np mol2 = Molecule().empty(len(name)) mol2.name[:] = np.array(name.to_py()) mol2.resname[:] = np.array(resname.to_py()) mol2.resid[:] = np.array(resid.to_py()) mol2.chain[:] = np.array(chain.to_py()) mol2.element[:] = np.array(element.to_py()) mol2.coords = np.array(coords.to_py(), dtype=np.float32)[:, :, None].copy() `); let mol2 = pyodide.globals.get("mol2") console.log(mol2.atomselect("name CA").toJs()) ``` -------------------------------- ### Debug Segmentation Faults in Cython Source: https://github.com/acellera/moleculekit/blob/main/molkitten/README.md Guides on debugging segmentation faults in the Cython parts of MoleculeKit by recompiling with debug flags and using GDB. ```bash python setup.py build_ext --inplace gdb --args python segfault.py run bt 10 ``` -------------------------------- ### Terminal Interpreter for Pyodide Commands Source: https://github.com/acellera/moleculekit/blob/main/test_wasm/index_repl.html Sets up a terminal interface using jQuery Terminal. The interpreter function processes user commands, executes them using Pyodide's Python console, and displays results or errors, handling multi-line input and Python syntax checking. ```javascript let ps1 = ">>> ", ps2 = "... "; async function lock() { let resolve; let ready = term.ready; term.ready = new Promise((res) => (resolve = res)); await ready; return resolve; } async function interpreter(command) { let unlock = await lock(); term.pause(); // multiline should be split (useful when pasting) for (const c of command.split("\n")) { let fut = pyconsole.push(c); term.set_prompt(fut.syntax_check === "incomplete" ? ps2 : ps1); switch (fut.syntax_check) { case "syntax-error": term.error(fut.formatted_error.trimEnd()); continue; case "incomplete": continue; case "complete": break; default: throw new Error(`Unexpected type ${ty}`); } // In JavaScript, await automatically also awaits any results of // awaits, so if an async function returns a future, it will await // the inner future too. This is not what we want so we // temporarily put it into a list to protect it. let wrapped = await_fut(fut); // complete case, get result / error and print it. try { let [value] = await wrapped; if (value !== undefined) { echo( repr_shorten.callKwargs(value, { separator: "\n\n", }) ); } if (pyodide.isPyProxy(value)) { value.destroy(); } } catch (e) { if (e.constructor.name === "PythonError") { const message = fut.formatted_error || e.message; term.error(message.trimEnd()); } else { throw e; } } finally { fut.destroy(); wrapped.destroy(); } } term.resume(); await sleep(10); unlock(); } term = $("body").terminal(interpreter, { greetings: banner, prompt: ps1, completionEscape: false, completion: function (command, callback) { callback(pyconsole.complete(command).toJs()[0]); }, keym ``` -------------------------------- ### Debug Segmentation Faults in Cython Source: https://github.com/acellera/moleculekit/blob/main/README.md Guides on debugging segmentation faults in the Cython parts of MoleculeKit by recompiling with debug flags and using GDB. ```bash python setup.py build_ext --inplace gdb --args python segfault.py run bt 10 ``` -------------------------------- ### Define a Simple PyTorch 3D Convolutional Model Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Defines a basic PyTorch neural network model featuring two 3D convolutional layers with ReLU activation functions. This serves as an example for processing the reshaped voxel data. ```pytorch class Model(nn.Module): def __init__(self): super(Model, self).__init__() self.conv1 = nn.Conv3d(nchannels, 20, 5) # (in_channels, out_channels, kernel_size) self.conv2 = nn.Conv3d(20, 20, 5) def forward(self, x): x = F.relu(self.conv1(x)) return F.relu(self.conv2(x)) ``` -------------------------------- ### Build MoleculeKit Docker Container Source: https://github.com/acellera/moleculekit/blob/main/docker/recipe/README.md Builds the Docker container with the tag 'moleculekit'. This is the initial step to create the environment for running MoleculeKit. ```bash docker build --tag moleculekit . ``` -------------------------------- ### Instantiate and Run PyTorch Model Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Creates an instance of the defined PyTorch model and passes the reshaped ligand voxel data through it. It then prints the shape of the output tensor. ```pytorch model = Model() results = model.forward(lig_vox_t) print(results.shape) ``` -------------------------------- ### Load Protein and Ligand Structures Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Reads protein and ligand molecular structures from PDB and MOL2 files respectively using MoleculeKit's Molecule and SmallMol classes. ```python # First let's read our two favourite protein and ligand structures tut_data = 'test-voxeldescriptors' prot = Molecule(os.path.join(tut_data, '3PTB.pdb')) slig = SmallMol(os.path.join(tut_data, 'benzamidine.mol2')) ``` -------------------------------- ### Import Necessary Libraries Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Imports core classes and functions from MoleculeKit for handling molecules and voxel descriptors, along with standard Python libraries for file path manipulation. ```python from moleculekit.molecule import Molecule from moleculekit.tools.voxeldescriptors import getVoxelDescriptors, viewVoxelFeatures from moleculekit.tools.atomtyper import prepareProteinForAtomtyping from moleculekit.smallmol.smallmol import SmallMol import os ``` -------------------------------- ### Import PyTorch Libraries Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Imports the necessary PyTorch libraries for building and training neural networks, including modules for neural network layers and tensor operations. ```python import torch import torch.nn as nn import torch.nn.functional as F import numpy as np ``` -------------------------------- ### Voxelization with SmallMolStack Source: https://github.com/acellera/moleculekit/blob/main/moleculekit/smallmol/README.md Demonstrates how to create a molecule stack from an SDF file and generate a voxel generator for processing molecules in batches. This is useful for preparing molecular data for machine learning models. ```python from moleculekit.smallmol.smallmol import SmallMol, SmallMolStack ms = SmallMolStack("/path/to/my/file/x.sdf") # Generate Molecule stack my_gen = ms.voxel_generator(batch_size=32, n_jobs=10) # Make a Voxel generator for voxellist in my_gen: # Iterate over the elements pass # Do something with it. ``` -------------------------------- ### Prepare Protein for Atom Typing Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Prepares a protein molecule for atom typing by adding hydrogens, guessing bonds, and handling non-protein atoms. This step is crucial if the initial protein structure lacks complete bond information or hydrogens. ```python # If your structure is fully protonated and contains all bond information in prot.bonds skip this step! prot = prepareProteinForAtomtyping(prot) # We would suggest visualizing the results with prot.view(guessBonds=False) to show only the bonds # already stored in the Molecule. prot.view(guessBonds=False) ``` -------------------------------- ### Tautomer Generation and Filtering Source: https://github.com/acellera/moleculekit/blob/main/moleculekit/smallmol/README.md Shows how to generate tautomers for a given molecule, optionally with associated scores. It also demonstrates filtering tautomers based on a score threshold. ```python from moleculekit.smallmol.smallmol import SmallMol # input smile string / .mol2 file / rdkit molecule my_mol = SmallMol("/path/to/some/file/mf.mol2") tautomers, scores = my_mol.getTautomers(returnScores=True) # Return filtered list of SmallMol objects tautomers, scores = my_mol.getTautomers(returnScores=True, filterTauts=2) ``` -------------------------------- ### Calculate and Visualize Ligand Voxel Features Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Calculates voxel descriptors for a ligand molecule with a specified voxel size (0.5 A) and visualizes these features. This allows for higher resolution analysis of smaller molecules. ```python # For the ligand since it's small we could increase the voxel resolution if we so desire to 0.5 A instead of the default 1 A. lig_vox, lig_centers, lig_N = getVoxelDescriptors(slig, voxelsize=0.5, buffer=1) slig.view(guessBonds=False) viewVoxelFeatures(lig_vox, lig_centers, lig_N) ``` -------------------------------- ### Basic MoleculeKit Usage in IPython Source: https://github.com/acellera/moleculekit/blob/main/molkitten/README.md Demonstrates how to import and use the Molecule class from MoleculeKit within an IPython console. ```python from moleculekit.molecule import Molecule mol = Molecule('3ptb') mol.view() ``` -------------------------------- ### Basic MoleculeKit Usage in IPython Source: https://github.com/acellera/moleculekit/blob/main/README.md Demonstrates how to import and use the Molecule class from MoleculeKit within an IPython console. ```python from moleculekit.molecule import Molecule mol = Molecule('3ptb') mol.view() ``` -------------------------------- ### Compile C++ Extensions for Development Source: https://github.com/acellera/moleculekit/blob/main/molkitten/README.md Compiles the C++ extensions for MoleculeKit in-place, typically used when developing the library. ```bash python setup.py build_ext --inplace ``` -------------------------------- ### Calculate Voxel Descriptors for Protein Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Computes voxel descriptors for a protein molecule. It grids the molecule's bounding box and calculates properties within these voxels, including a buffer space around the protein. ```python prot_vox, prot_centers, prot_N = getVoxelDescriptors(prot, buffer=1) ``` -------------------------------- ### MoleculeKit Python Integration with JavaScript Data Source: https://github.com/acellera/moleculekit/blob/main/test_wasm/index.html Demonstrates registering a JavaScript namespace with Pyodide and executing Python code to create and manipulate a Molecule object using data from JavaScript. It includes patching libraries for HTTP requests and selecting atoms. ```javascript let my_js_namespace = { name : ["N", "CA", "C"], resname: ["ALA", "ALA", "ALA"], resid: new Int32Array([1, 1, 1]), chain: ["A", "A", "A"], element: ["N", "C", "C"], coords: [[0, 1.5, 3], [-3.1, 2, 7.1], [1.46, 1.0, 2.74]] }; pyodide.registerJsModule("my_js_namespace", my_js_namespace); pyodide.runPython(` import pyodide_http pyodide_http.patch_all() from moleculekit.molecule import Molecule from my_js_namespace import name, resname, resid, chain, element, coords import numpy as np mol = Molecule('3ptb') print(mol) mol = Molecule().empty(len(name)) mol.name[:] = np.array(name.to_py()) mol.resname[:] = np.array(resname.to_py()) mol.resid[:] = np.array(resid.to_py()) mol.chain[:] = np.array(chain.to_py()) mol.element[:] = np.array(element.to_py()) mol.coords = np.array(coords.to_py(), dtype=np.float32)[:, :, None].copy() `); let mol = pyodide.globals.get("mol"); console.log(mol.atomselect("name CA").toJs()); ``` -------------------------------- ### Compile C++ Extensions for Development Source: https://github.com/acellera/moleculekit/blob/main/README.md Compiles the C++ extensions for MoleculeKit in-place, typically used when developing the library. ```bash python setup.py build_ext --inplace ``` -------------------------------- ### Visualize Protein Voxel Features Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Visualizes the calculated voxel features for the protein. Each voxel channel is displayed as a separate molecule in VMD, allowing for detailed inspection using IsoSurface representations. ```python prot.view(guessBonds=False) viewVoxelFeatures(prot_vox, prot_centers, prot_N) ``` -------------------------------- ### Python Package Dependencies for MoleculeKit Source: https://github.com/acellera/moleculekit/blob/main/extra_requirements.txt This snippet lists the core Python packages and their version constraints required to run the MoleculeKit project. These dependencies cover functionalities for progress bars, plotting, cheminformatics, molecular dynamics, protein preparation, and general utilities. ```python tqdm matplotlib-base rdkit>=2020.09.5 mdtraj pdb2pqr>=3.5.2+18 propka openbabel>=3.1.1 requests numpy>=1.23.5 ``` -------------------------------- ### Execute Python Scripts in MoleculeKit Container Source: https://github.com/acellera/moleculekit/blob/main/docker/recipe/README.md Executes a Python script inside the MoleculeKit Docker container. It uses a volume mount to make the current directory accessible within the container at '/workdir/'. Scripts should write output to this mounted directory. ```bash docker run -it --rm --mount type=bind,source="$(pwd)",target=/workdir/ moleculekit python /workdir/test.py ``` -------------------------------- ### Reshape Voxel Data for PyTorch Source: https://github.com/acellera/moleculekit/blob/main/tutorials/voxelization_tutorial.ipynb Reshapes the voxel descriptor data from a (N, C) format to a (Nsamples, Nchannels, D, H, W) format suitable for 3D convolutional layers in PyTorch. It also converts the data to a PyTorch tensor with float32 type. ```pytorch nchannels = prot_vox.shape[1] prot_vox_t = prot_vox.transpose().reshape([1, nchannels, prot_N[0], prot_N[1], prot_N[2]]) prot_vox_t = torch.tensor(prot_vox_t.astype(np.float32)) lig_vox_t = lig_vox.transpose().reshape([1, nchannels, lig_N[0], lig_N[1], lig_N[2]]) lig_vox_t = torch.tensor(lig_vox_t.astype(np.float32)) ``` -------------------------------- ### MoleculeKit Projection Classes Source: https://github.com/acellera/moleculekit/blob/main/doc/source/projections.rst This section lists and describes various projection classes available in the MoleculeKit library. These classes are used to compute specific molecular features or projections for each conformation within a Molecule object. ```python from moleculekit.projections import MetricCoordinate # xyz coordinate projection from moleculekit.projections import MetricDihedral # dihedral angles projection from moleculekit.projections import MetricDistance # atom distances/contacts projection from moleculekit.projections import MetricFluctuation # atom position fluctuations from moleculekit.projections import MetricPlumed2 # support for Plumed2 projections from moleculekit.projections import MetricRmsd # root mean square deviation of structures to a reference from moleculekit.projections import MetricSasa # solvent accessible surface area projection from moleculekit.projections import MetricSecondaryStructure # protein secondary structure projection from moleculekit.projections import MetricShell # density of atoms in shells around other atoms from moleculekit.projections import MetricSphericalCoordinate # spherical coordinates of two COMs from moleculekit.projections import MetricTMscore # TMscore projection ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.