{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Installation\n", "\n", "OOMMF Calculator (OOMMFC) can be used on all major operating systems, but requires an installation of OOMMF to function. Alternatively, OOMMFC can interface with Docker (https://www.docker.com/) to run OOMMF. The installation procedure is to:\n", "\n", "1. Install OOMMF:\n", " - a) Either by installing Docker from https://www.docker.com/products/overview (with Docker, OOMMFC will download the OOMMF software automatically).\n", " - b) Or by installing OOMMF directly on your computer.\n", "2. Install OOMMFC\n", "\n", "For further instructions, refer to the section for the operating system you use.\n", "\n", "## Windows\n", "\n", "### OOMMF\n", "\n", "Note that you do not need to install OOMMF directly (following the next steps) if you install Docker instead. OOMMFC must be installed either way.\n", "\n", "1. First, you need to install `tcl` on your machine. To do this, download the `.exe` file from http://www.activestate.com/activetcl/downloads appropriate for your Windows operating system (32-bit or 64-bit). After the download is complete, run the downloaded file and follow the instructions.\n", "\n", "2. From http://math.nist.gov/oommf/software-12.html download the `.zip` file for the latest OOMMF version which is appropriate for your Windows OS (32-bit or 64-bit). After the download is complete, unzip (extract) this file. Locate among the the unzipped files `oommf.tcl` and remember its location. We are going to need it in step 3.\n", "\n", "3. In order to help `oommfc` find where `oommf.tcl` is, we need to set the value of environment variable `OOMMFTCL`. To do this, in Control Panel, select System -> Advanced system settings (tab Advanced) -> Environment variables. In User variables select `New...` and type `OOMMFTCL` for Variable name and `C:\\path\\you\\remembered\\from\\step2\\oommf.tcl` to Variable value.\n", "\n", "### OOMMFC\n", "\n", "1. On Windows, before we install `oommfc`, we need to install `Python3` Anaconda distribution. Therefore, download \"Graphical Installer\" for `Python3` (or \"Command-line installer\" for `Python3` if you are confident with command prompt) from https://www.continuum.io/downloads#windows. After download is complete, run the `.exe` file and follow the instructions to install `Anaconda3`.\n", "\n", "2. If you're experienced with Anaconda, you may want to create a new environment. If you do, run `conda install numpy scipy matplotlib` inside this environment. If you don't know about conda environments, skip this step.\n", "\n", "3. Now we have everything required to install `oommfc`. Run in Command Prompt:\n", "```\n", "pip install oommfc\n", "```\n", "\n", "## MacOS\n", "\n", "### OOMMF\n", "\n", "Note that you do not need to install OOMMF directly (following the next steps) if you install Docker instead. OOMMFC must be installed either way.\n", "\n", "1. To compile OOMMF on MacOS, make sure you have `XCode` (installed from the AppStore) and `git` (https://git-scm.com/download/mac) installed.\n", "\n", "2. clone the repository by typing\n", "```\n", "git clone https://github.com/fangohr/oommf.git\n", "```\n", "in your terminal.\n", "\n", "3. To compile OOMMF, change the directory (`cd oommf`) and simply run:\n", "```\n", "make build-with-dmi-extension-all\n", "```\n", "\n", "This command, apart from building OOMMF, will download and compile Dzyaloshinkii-Moriya extensions as well. For more information, please refer to the OOMMF [reporsitory](https://github.com/fangohr/oommf).\n", "\n", "4. Finally, we have to set the environment variable `OOMMFTCL`, so that previously installed `oommfc` knows where to find OOMMF. Consequently, in your home directory, add the path to `oommf.tcl` file to the end of the `.bash_profile` file. More specifically, the line at the end of your file should look like:\n", "```\n", "export OOMMFTCL=\"/path/to/your/compiled/oommf.tcl\"\n", "```\n", "**Please note that after editing `.bashrc` file, you need to refresh your environment variables**\n", "```\n", "source ~/.bashrc\n", "```\n", "**or simply by opening a new Terminal window.**\n", "\n", "### OOMMFC\n", "\n", "1. On MacOS, before we install `oommfc`, we need to install `Python3` Anaconda distribution. Therefore, download \"Graphical Installer\" for `Python3` (or \"Command-line installer\" for `Python3` if you feel confident with terminal) from https://www.continuum.io/downloads#osx. After the download is completed, run the `.pkg` file and follow the instructions to install `Anaconda3`.\n", "\n", "2. Now we have everything required to install `oommfc`. Therefore, run in terminal:\n", "```\n", "python3 -m pip install oommfc\n", "```\n", "\n", "## Linux (Ubuntu)\n", "\n", "### OOMMF\n", "\n", "Note that you do not need to install OOMMF directly if you install Docker instead. OOMMFC must be installed either way.\n", "\n", "1. You can compile OOMMF on your machine by firstly installing required packages:\n", "```\n", "apt-get install git tcl-dev tk-dev\n", "```\n", "\n", "2. Clone the repository:\n", "```\n", "git clone https://github.com/fangohr/oommf.git\n", "```\n", "\n", "3. To compile OOMMF, change the directory (`cd oommf`) and simply run:\n", "```\n", "make build-with-dmi-extension-all\n", "```\n", "\n", "This command, apart from building OOMMF, will download and compile Dzyaloshinkii-Moriya extensions as well. For more information, please refer to the OOMMF [reporsitory](https://github.com/fangohr/oommf).\n", "\n", "4. Finally, we have to set the environment variable `OOMMFTCL`, so that previously installed `oommfc` knows where to find OOMMF. Consequently, in your home directory, add the path to `oommf.tcl` file to the end of the `.bashrc` file. More specifically, the line at the emd of your file should look like:\n", "```\n", "export OOMMFTCL=\"/path/to/your/oommf.tcl\"\n", "```\n", "\n", "**Please note that after editing `.bashrc` file, you need to refresh your environment variables**\n", "```\n", "source ~/.bashrc\n", "```\n", "**or simply by opening a new Terminal window.**\n", "\n", "### OOMMFC\n", "\n", "1. To install OOMMFC, we first have to make sure you have `pip` installed. **Please note that this command requires root privileges (sudo).**\n", "```\n", "apt-get install python3-pip\n", "```\n", "\n", "2. Now, we can install `oommfc`\n", "\n", "```\n", "python3 -m pip install oommfc\n", "```" ] } ], "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.6.5" } }, "nbformat": 4, "nbformat_minor": 1 }