{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Configuration of siman" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can use siman in IPython as shown in tutorials. \n", "However, in our opinion it is more convinient to use Advanced code editor. We use Sublime Text 3. It has many cool features, including building the project right from your window with code. See here how to setup ST https://wiki.storion.ru/start/siman\n", "\n", "If you choose the latter case we suggest to download this [project template](https://github.com/dimonaks/siman/tree/master/project_template). It contains three python files. In main.py you make all your calculations. In project_conf.py you put all your control parameters. In project_sets.py you create new calculation sets. \n", "\n", "\n", "Global configuration can be provided in \"~/simanrc.py\" file, which has the same parameters as project_conf.py and should be read before project_conf.py (see main.py). " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Description of main.py" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This is the main file, where all calculations are performed. In the first block the following actions are performed:\n", " \n", " - modules are imported\n", " - the database file with all calculation results is read\n", " - user sets are read from project_set.py\n", " - configuration parameters for siman are initialized\n", " - frequently used parameters are updated\n", "\n", "In the second block all calculations are performed.\n", "\n", "In the third block the session is closed and all calculations are saved in a user database.\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Description of project_conf.py" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Cluster description\n", "Find the code below and provide your address, your homepath, your schedule system (from 'PBS', 'SLURM', SGE),\n", "number of cores, required modules, and vasp_command - path to vasp binary on cluster, etc." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "username = 'username' # user name at cluster\n", "CLUSTERS['mag'] = {\n", "'address':username+'@10.30.16.168',\n", "'vasp_com':'mpirun vasp_std',\n", "'gaussian_command':'g16',\n", "'homepath':'/home/'+username+'/',\n", "'schedule':'SLURM',\n", "'corenum':4,\n", "'memory':24, #GB, \n", "'partition':'AMG-medium',\n", "# 'any_command':['--nodelist=node-amg01,node-amg02,node-amg03,node-amg09,node-amg12'],\n", "'modules':'module load Compiler/Intel/16u4 Q-Ch/VASP/5.4.4 ScriptLang/python/3.6i_2018u3; \\nulimit -s unlimited\\n' \n", "}\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Attention! You should set up **passwordless** access to cluster. See here http://www.linuxproblem.org/art_9.html\n", "\n", "If you use some other schedule system on your cluster, use different ssh port, please ask developer." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Required parameters:\n", "\n", "DEFAULT_CLUSTER = 'mag' # key from CLUSTERS dictionary described above\n", "\n", "PATH2PROJECT = 'my_project' # path to project on cluster relative to home folder\n", "\n", "PATH2POTENTIALS = '/path/to/potentials' # path to folder with VASP potentials on local machine\n", "\n", "### Optional parameters:\n", "\n", "PATH2JMOL = 'jmol' # executable for jmol\n", "\n", "PATH2PHONOPY = 'phonopy' # executable for phonopy\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. Description of project_sets.py" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A *set* is a list of calculation parameters used by a scientifc program. E.g. INCAR in case of VASP.\n", "\n", "In this file user put information about his sets in list *user_vasp_sets*. Each entry of this list creates new set based on any existing set, allowing to change one or more parameters according to the syntax described below. The new set is created only once and then saved in a user database. If you change the entry nothing will happen. It is done on purpurse to protect already created sets from being changed on accident. If you really need to update the set, use *over* = 'over' to update the particular set. Another option is to use\n", "*override_global* in *read_vasp_sets* in main.py\n", "\n", "\n", "List of user VASP sets obtained on inheritance principle, see user_vasp_sets\n", "Syntax: (\"set_new\", \"set_old\", {\"param1\":value1, \"param2\":value2, ...}, over)\n", " - set_new (str) - name of new set\n", " - set_old (str) - name of base set used for creating new set\n", " - {} (dict) - dictionary of parameters to be updated in set_new\n", " - over (str) - by default is '', if 'over' then set_new is reinitializied (override), otherwise it is protected" ] } ], "metadata": { "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.8.6" } }, "nbformat": 4, "nbformat_minor": 1 }