{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Testing software requirements\n", "\n", "```\n", "Author : Alessandra Villa and Christian Blau with updates from Thor Wikfeldt\n", "Goal : Check that software required for tutorials are installed and runs from jupyter notebook\n", "Time : 10 minutes reading time, no computation wait time\n", "Prerequisites : executing jupyter notebooks\n", "References :\n", "``` " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Softwares required for workshop tutorials" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To perform the GROMACS tutorials, you need to have already installed on your computer the following softwares:\n", "- Python packages `matplotlib`, `nglview`, `notebook`, `numpy`, `requests`, `pandas` and `seaborn`\n", "- [GROMACS](http://manual.gromacs.org/) (version 2020.4),\n", "- Visualization tools [VMD](https://www.ks.uiuc.edu/Research/vmd/),\n", "- [Xmgrace](https://plasma-gate.weizmann.ac.il/Grace/) plotting tool.\n", "\n", "Depending on the operating system you are using (e.i Linux, Mac), you might already find those softwares available in your system distribution. The softwares are listed in order of priority: it is fundamental that GROMACS is installed to run the workshop's tutorial. For help on GROMACS installation, see also [GROMACS forum](http://gromacs.bioexcel.eu/)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Checking that the current GROMACS version is installed." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%capture gromacs_version_output\n", "!gmx --version" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If you installed another GROMACS version, replace the major and minor versions below. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import re\n", "\n", "gromacs_expected_major = \"2020\"\n", "gromacs_expected_minor = \"4\"\n", "gromacs_expected_version = \"{}.{}\".format(gromacs_expected_major, gromacs_expected_minor)\n", "\n", "pattern = re.compile(r\"GROMACS version: *(\\d{4})\\.?(\\d*)\")\n", "(gromacs_actual_major, gromacs_actual_minor) = pattern.search(gromacs_version_output.stdout).group(1, 2)\n", "\n", "print (\"Expecting GROMACS version \" + gromacs_expected_version)\n", "if gromacs_actual_major!=gromacs_expected_major:\n", " print(\"Your GROMACS major version is {}, \"\n", " \"which needs to match for the tutorials to be sure to work.\"\n", " .format(gromacs_actual_major))\n", "else:\n", " if not gromacs_actual_minor:\n", " print(\"Your version is {}, which is earlier than that used in the tutorials. \" \n", " \"Tutorials will most likely work, but you might experience some minor issues.\"\n", " .format(gromacs_actual_major))\n", " elif int(gromacs_actual_minor) < int(gromacs_expected_minor):\n", " print(\"Your GROMACS major release version is OK, but the patch release version \"\n", " \"{}.{} is smaller than that used in the tutorials. \" \n", " \"Tutorials will most likely work, but you might experience some minor issues.\"\n", " .format(gromacs_actual_major, gromacs_actual_minor))\n", " else:\n", " print(\"You're good to go!\")\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Checking that VMD is running from jupyter notebook" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You might need to replace \"vmd\" with the full path of your installed VMD binary (e.g. on MacOS, replace with `!/Applications/VMD\\ 1.9.4a51-x86_64-Rev9.app/Contents/vmd/vmd_MACOSXX86_64`)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!vmd" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "An VMD empty (black) window togehter with a menu should appear. Close the VMD window to continue." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Checking that Xmgrace is running from jupyter notebook" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "!xmgrace" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A Xmgrace window (empty plot) should pop-up. Close the window to continue" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Required Python packages" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "try:\n", " import matplotlib\n", "except ImportError:\n", " print(\"Matplotlib is not found, you will miss out on some things in the tutorials\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "try:\n", " import pandas\n", "except ImportError:\n", " print(\"Pandas is not found, you will miss out on some things in the tutorials\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "try:\n", " import nglview\n", "except ImportError:\n", " print(\"Nglview is not found, you will miss out on some things in the tutorials\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "try:\n", " import requests\n", "except ImportError:\n", " print(\"Requests is not found, you will miss out on some things in the tutorials\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "try:\n", " import seaborn\n", "except ImportError:\n", " print(\"Seaborn is not found, you will miss out on some things in the tutorials\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "anaconda-cloud": {}, "kernelspec": { "display_name": "Python 3", "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.9.1" } }, "nbformat": 4, "nbformat_minor": 2 }