{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# ESjob class - pt. 2 ePS job creation & run jobs\n", "12/02/22\n", "\n", "2nd demo for ESjob class, including host connection and job writing.\n", "\n", "For basic electronic structure file IO and creation of ePS jobs based on inputs (pt 1) see epsman_ESjob-class_demo_120222.ipynb. \n", "\n", "- Currently tested for Gamess and Molden IO only.\n", "- Uses [CCLIB on the backend](http://cclib.github.io/), so should be easily extendable to other CCLIB-supported cases." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imports" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Import main package\n", "# import epsman as em\n", "\n", "# For ePS job creation with electronic structure handling, use elecStructure.ESjob\n", "from epsman.elecStructure.ESjob import ESjob" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# For testing, set the module path and test file.\n", "import inspect\n", "from pathlib import Path\n", "\n", "modDir = Path(inspect.getfile(ESjob)).parent\n", "testFilePath = modDir/'fileTest' # Default module test files, these are included with Github repo." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Class creation with host\n", "\n", "Minimally this needs an IP, which can be a host name for known hosts. The user will be prompted for any other missing info when trying to connect.\n", "\n", "Note that the host machine *can be the same as the local machine*. Simply pass `host=` along with `IP = 'localhost'` in this case (a different hostname is required in this case since the local machine already sets `localhost` as a key name - this might change in future).\n", "\n", "TODO: update script and related paths to repo?" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Set host = None\n", "Set user = None\n", "Set IP = ePS-VM\n", "Set password = None\n", "Set mol = None\n", "Set orb = None\n", "Set batch = None\n", "Set jobNote = None\n", "Set elecStructure = None\n", "Set genFile = None\n", "Set jobSettings = None\n", "Set runScript = None\n", "Skipping setJobPaths() until job settings defined, run setJob() to set.\n", "Set elecStructure = xe_SPKrATZP_rel.log\n", "\n", "Set input file as /home/eps/github/epsman/epsman/elecStructure/fileTest/xe_SPKrATZP_rel.log, use self.setFiles to change.\n", "Set output file as /home/eps/github/epsman/epsman/elecStructure/fileTest/xe_SPKrATZP_rel.molden, use self.setMoldenFile to override.\n", "\n", "*** Read file /home/eps/github/epsman/epsman/elecStructure/fileTest/xe_SPKrATZP_rel.log with CCLIB, data set to self.data.\n", "Read 1 atoms and 68 MOs\n", "***Failed to get https://epolyscat.droppages.com/SymmetryLabels, setting symmetry labels from local file.\n", "***Warning: inconsistent dim mapping, some Gamess or ePS dims unmapped. Check PD table for details.\n", "***Failed to get https://epolyscat.droppages.com/SymmetryLabels, setting symmetry labels from local file.\n", "*** Set orbPD data to self.orbPD, set group data to self.orbGrps\n", "\n", "Found input file Point Group: {'Name': 'DNH', 'NAXIS': '8', 'ORDER': '32'}.\n", "Mapped PGs: Gamess (DNH, 8) > ePS (DAh) dim mapping.\n", "Found 68 orbitals, in 45 groups.\n", "Found 7 orb symmetries: ['A1g' 'A2u' 'E1u' 'E1g' 'E2g' 'E3u' 'E2u']\n", "Assigned 54 electrons to 27 orbitals/19 orbital groups.\n", "\n", "Occupied orbitals table:\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/home/eps/.conda/envs/epsman-demo/lib/python3.7/site-packages/numpy/core/numeric.py:2378: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison\n", " return bool(asarray(a1 == a2).all())\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
symsOccOccNdegenOrbGrpOccGamessePS
EiOrbGrpOrbN
-34724.87568111A1gTrue212A1GSG
-5506.00879522A1gTrue212A1GSG
-4937.33710733A2uTrue212A2UA2U
44E1uTrue224E1UPU
5E1uTrue224E1UPU
-1169.74941556A1gTrue212A1GSG
-981.23710367A2uTrue212A2UA2U
78E1uTrue224E1UPU
9E1uTrue224E1UPU
-700.203360910E1gTrue224E1GPG
11E1gTrue224E1GPG
812A1gTrue212A1GSG
1013E2gTrue224E2GDG
14E2gTrue224E2GDG
-229.2477561115A1gTrue212A1GSG
-166.8248381216A2uTrue212A2UA2U
1317E1uTrue224E1UPU
18E1uTrue224E1UPU
-72.5210621419A1gTrue212A1GSG
1520E1gTrue224E1GPG
21E1gTrue224E1GPG
1622E2gTrue224E2GDG
23E2gTrue224E2GDG
-27.4726141724A1gTrue212A1GSG
-12.4219971825A2uTrue212A2UA2U
1926E1uTrue224E1UPU
27E1uTrue224E1UPU
\n", "
" ], "text/plain": [ " syms Occ OccN degen OrbGrpOcc Gamess ePS\n", "E iOrbGrp OrbN \n", "-34724.875681 1 1 A1g True 2 1 2 A1G SG\n", "-5506.008795 2 2 A1g True 2 1 2 A1G SG\n", "-4937.337107 3 3 A2u True 2 1 2 A2U A2U\n", " 4 4 E1u True 2 2 4 E1U PU\n", " 5 E1u True 2 2 4 E1U PU\n", "-1169.749415 5 6 A1g True 2 1 2 A1G SG\n", "-981.237103 6 7 A2u True 2 1 2 A2U A2U\n", " 7 8 E1u True 2 2 4 E1U PU\n", " 9 E1u True 2 2 4 E1U PU\n", "-700.203360 9 10 E1g True 2 2 4 E1G PG\n", " 11 E1g True 2 2 4 E1G PG\n", " 8 12 A1g True 2 1 2 A1G SG\n", " 10 13 E2g True 2 2 4 E2G DG\n", " 14 E2g True 2 2 4 E2G DG\n", "-229.247756 11 15 A1g True 2 1 2 A1G SG\n", "-166.824838 12 16 A2u True 2 1 2 A2U A2U\n", " 13 17 E1u True 2 2 4 E1U PU\n", " 18 E1u True 2 2 4 E1U PU\n", "-72.521062 14 19 A1g True 2 1 2 A1G SG\n", " 15 20 E1g True 2 2 4 E1G PG\n", " 21 E1g True 2 2 4 E1G PG\n", " 16 22 E2g True 2 2 4 E2G DG\n", " 23 E2g True 2 2 4 E2G DG\n", "-27.472614 17 24 A1g True 2 1 2 A1G SG\n", "-12.421997 18 25 A2u True 2 1 2 A2U A2U\n", " 19 26 E1u True 2 2 4 E1U PU\n", " 27 E1u True 2 2 4 E1U PU" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# For ESjob class basic file handling for Gamess Log files is implemented.\n", "job = ESjob(fileName = 'xe_SPKrATZP_rel.log', fileBase = testFilePath,\n", " IP = 'ePS-VM')\n", "# host = 'ePS-VM', IP = 'ePS-VM')" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Connecting to machine: None at ePS-VM\n" ] }, { "name": "stdin", "output_type": "stream", "text": [ "User name for machine? eps\n", "Password for machine? ·········\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Testing connection...\n", "eps-VM\n", "Connected OK\n", "Command exited with status 0.\n", "=== stdout ===\n", "eps-VM\n", "\n", "(no stderr)\n", "\n", "\n", "Setting host dir tree.\n", "Found multiple ePS directories, please select working dir:\n", "0: ePS\n", "1: ePS_minimal_build_v3885d87.txt\n", "2: ePS_v3885d87_VM_build_notes\n" ] }, { "name": "stdin", "output_type": "stream", "text": [ "List item #: 0\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Set remote wrkdir: /home/eps/ePS\n", "\n", "***Default paths set\n", "{'IP': 'ePS-VM',\n", " 'condaEnv': 'base',\n", " 'condaPath': PosixPath('/home/eps/anaconda3/bin/activate'),\n", " 'ePSpath': PosixPath('/opt/ePolyScat.E3/bin/ePolyScat'),\n", " 'home': PosixPath('/home/eps'),\n", " 'host': 'eps-VM',\n", " 'jobComplete': PosixPath('/home/eps/ePS/jobs/completed'),\n", " 'jobPath': PosixPath('/home/eps/ePS/jobs'),\n", " 'repoScpPath': PosixPath('/home/eps/python/epsman/repo'),\n", " 'scpFile': PosixPath('/home/eps/github/epsman/epsman/shell/ePS_input_write_template_basic_noDefaults.sh'),\n", " 'scpdir': PosixPath('/home/eps/github/epsman/epsman/shell'),\n", " 'webDir': PosixPath('/home/eps/github/ePSdata'),\n", " 'webScpPath': PosixPath('/home/eps/python/epsman/web'),\n", " 'wrkdir': PosixPath('/home/eps/ePS')}\n", "\n", "***Checking bin dirs\n", "***ePolyScat bin not found\n", "***Anaconda bin not found\n" ] } ], "source": [ "# Connect to host\n", "job.initConnection()" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'localhost': {'host': 'jake',\n", " 'IP': '127.0.0.1',\n", " 'home': PosixPath('/home/eps'),\n", " 'wrkdir': PosixPath('/home/eps/ePS/epsman-demo/ESclasses'),\n", " 'webDir': PosixPath('/home/eps/github/ePSdata'),\n", " 'elecDir': PosixPath('/home/eps/github/epsman/epsman/elecStructure/fileTest'),\n", " 'elecFile': PosixPath('/home/eps/github/epsman/epsman/elecStructure/fileTest/xe_SPKrATZP_rel.log'),\n", " 'localSettings': PosixPath('/home/eps/python/epsman/localSettings')},\n", " 'eps-VM': {'host': 'eps-VM',\n", " 'IP': 'ePS-VM',\n", " 'home': PosixPath('/home/eps'),\n", " 'wrkdir': PosixPath('/home/eps/ePS'),\n", " 'scpdir': PosixPath('/home/eps/github/epsman/epsman/shell'),\n", " 'scpFile': PosixPath('/home/eps/github/epsman/epsman/shell/ePS_input_write_template_basic_noDefaults.sh'),\n", " 'jobPath': PosixPath('/home/eps/ePS/jobs'),\n", " 'jobComplete': PosixPath('/home/eps/ePS/jobs/completed'),\n", " 'ePSpath': PosixPath('/opt/ePolyScat.E3/bin/ePolyScat'),\n", " 'condaPath': PosixPath('/home/eps/anaconda3/bin/activate'),\n", " 'condaEnv': 'base',\n", " 'repoScpPath': PosixPath('/home/eps/python/epsman/repo'),\n", " 'webScpPath': PosixPath('/home/eps/python/epsman/web'),\n", " 'webDir': PosixPath('/home/eps/github/ePSdata')}}" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# All host definitions are set in job.hostDefn\n", "job.hostDefn" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'eps-VM'" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# The host name is set in self.host\n", "job.host" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "# All settings can be overwritten by passing a Path\n", "from pathlib import Path\n", "\n", "# Change script dir from default\n", "job.hostDefn[job.host]['scpdir'] = Path('~/github/epsman/shell')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Notes on paths\n", "\n", "Currently a bit of a mess... \n", "\n", "#### Default/base paths\n", "\n", "The default paths are set as follows:\n", "\n", "On local machine in `epsJob.__init__`:\n", "\n", "```\n", "self.hostDefn = {\n", " 'localhost':{'host':socket.gethostname(),\n", " 'IP':'127.0.0.1',\n", " 'home':Path.home(),\n", " 'wrkdir':Path.cwd(),\n", " 'webDir':Path(Path.home(), 'github/ePSdata')}\n", " }\n", "\n", "```\n", "\n", "Hence local files default to the current working directory.\n", "\n", "On remote, at connection, in `epsJob.initConnection()`:\n", "\n", "```\n", "# Build dir list if not already set\n", "if 'home' not in self.hostDefn[self.host].keys():\n", " print('\\n\\nSetting host dir tree.')\n", "\n", " if home is None:\n", " self.hostDefn[self.host]['home'] = Path(self.c.run('echo ~', hide = True).stdout.strip())\n", " else:\n", " self.hostDefn[self.host]['home'] = Path(home)\n", "\n", " # testwrkdir = self.c.run('ls -d eP*', hide = True).stdout.split()\n", " testwrkdir = self.c.run(f'cd {home}; ls -d eP*', hide = True, warn = True).stdout.split()\n", "\n", " if len(testwrkdir) > 1:\n", " print('Found multiple ePS directories, please select working dir:')\n", " # print(testwrkdir)\n", " for n, item in enumerate(testwrkdir):\n", " print(f'{n}: {item}')\n", "\n", " N = int(input('List item #: '))\n", " self.hostDefn[self.host]['wrkdir'] = Path(self.hostDefn[self.host]['home'], testwrkdir[N])\n", " elif testwrkdir:\n", " self.hostDefn[self.host]['wrkdir'] = Path(self.hostDefn[self.host]['home'], testwrkdir[0])\n", " else:\n", " print('No ePS* subdirs found, setting work dir as home dir.')\n", " self.hostDefn[self.host]['wrkdir'] = Path(self.hostDefn[self.host]['home'])\n", "\n", " print('Set remote wrkdir: ' + self.hostDefn[self.host]['wrkdir'].as_posix())\n", "\n", " # Set additional default paths for host.\n", " self.setPaths()\n", " \n", "```\n", "\n", "This will set `self.hostDefn[self.host]['wrkdir']` to an `ePS` directory if found, or to the user home directory. Or, pass `home='homeDir'` when running `initConnection()` to override.\n", "\n", "To reset the `wrkdir` and propage, after connection, use `self.setWrkDir(wrkdir='newWorkingDir')`.\n", "\n", "Other default paths are set by `self.setPaths()`, building from the currently set `wrkdir`.\n", "\n", "TODO:\n", "\n", "- Update `self.setPaths()`, has some redundant stuff currently (23/02/22).\n", "- Propagation from `self.setWrkDir` not complete?\n", "\n", "\n", "#### Job paths\n", "\n", "These cannot be set until a job has been initalised via `self.setJob()`. From this, `self.setJobPaths()` builds a set of job-specific dirs building from `self.hostDefn[host]['wrkdir']`.\n", "\n", "This uses the following schema:\n", "\n", "```\n", "self.hostDefn[host]['systemDir'] = Path(self.hostDefn[host]['wrkdir'], self.mol)\n", "self.hostDefn[host]['elecDir'] = Path(self.hostDefn[host]['systemDir'], 'electronic_structure')\n", "self.hostDefn[host]['genDir'] = Path(self.hostDefn[host]['systemDir'], 'generators')\n", "self.hostDefn[host]['genFile'] = Path(self.hostDefn[host]['genDir'], self.genFile)\n", "# self.hostDefn[host]['jobRoot'] = Path(self.hostDefn[host]['systemDir'], self.genFile.stem)\n", "if self.genFile is not None:\n", " # self.hostDefn[host]['jobRoot'] = Path(self.hostDefn[host]['systemDir'], Path(self.genFile.stem).stem) # This form will work for X.Y.conf and X.conf styles.\n", " self.hostDefn[host]['jobRoot'] = Path(self.hostDefn[host]['systemDir'], self.batch) # Just use mol/batch/orb to match dir tree creation?\n", "\n", "# self.hostDefn[host]['jobRoot'] = Path(self.hostDefn[host]['systemDir'], self.batch) # Use job type (batch) here\n", "self.hostDefn[host]['jobDir'] = Path(self.hostDefn[host]['jobRoot'], self.orb) # Definition here to match shell script. Possibly a bit redundant, but allows for multiple orbs per base job settings.\n", "\n", "self.hostDefn[host]['webSystemDir'] = Path(self.hostDefn[host]['webDir'], 'source', self.mol)\n", "\n", "```\n", "\n", "Hence \n", "\n", "- `/mol` is the base job directory, `systemDir`.\n", "- Generator files use `systemDir/generators`.\n", "- Electronic structure files `systemDir/electronic_structure`\n", "- subdirs per job as `systemDir/batch/orbital`.\n", "\n", "Note that `self.setJobPaths()` can be run directly, and is also called by `self.setGenFile()`." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Build ePS job\n", "\n", "With a host set, the full ePolyScat build process should complete." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "*** Set ionization from orbital/channel 18.\n", "Updated orb table...\n", "\n", "Occupied orbitals by group:\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
EOrbNsymsOccOccNdegenOrbGrpOccGamessePSOrbGrpOccFinal
iOrbGrp
1-34724.8756811A1gTrue212A1GSG2
2-5506.0087952A1gTrue212A1GSG2
3-4937.3371073A2uTrue212A2UA2U2
4-4937.3371074E1uTrue224E1UPU4
5-1169.7494156A1gTrue212A1GSG2
6-981.2371037A2uTrue212A2UA2U2
7-981.2371038E1uTrue224E1UPU4
9-700.20336010E1gTrue224E1GPG4
8-700.20336012A1gTrue212A1GSG2
10-700.20336013E2gTrue224E2GDG4
11-229.24775615A1gTrue212A1GSG2
12-166.82483816A2uTrue212A2UA2U2
13-166.82483817E1uTrue224E1UPU4
14-72.52106219A1gTrue212A1GSG2
15-72.52106220E1gTrue224E1GPG4
16-72.52106222E2gTrue224E2GDG4
17-27.47261424A1gTrue212A1GSG2
18-12.42199725A2uTrue212A2UA2U1
19-12.42199726E1uTrue224E1UPU4
\n", "
" ], "text/plain": [ " E OrbN syms Occ OccN degen OrbGrpOcc Gamess ePS \\\n", "iOrbGrp \n", "1 -34724.875681 1 A1g True 2 1 2 A1G SG \n", "2 -5506.008795 2 A1g True 2 1 2 A1G SG \n", "3 -4937.337107 3 A2u True 2 1 2 A2U A2U \n", "4 -4937.337107 4 E1u True 2 2 4 E1U PU \n", "5 -1169.749415 6 A1g True 2 1 2 A1G SG \n", "6 -981.237103 7 A2u True 2 1 2 A2U A2U \n", "7 -981.237103 8 E1u True 2 2 4 E1U PU \n", "9 -700.203360 10 E1g True 2 2 4 E1G PG \n", "8 -700.203360 12 A1g True 2 1 2 A1G SG \n", "10 -700.203360 13 E2g True 2 2 4 E2G DG \n", "11 -229.247756 15 A1g True 2 1 2 A1G SG \n", "12 -166.824838 16 A2u True 2 1 2 A2U A2U \n", "13 -166.824838 17 E1u True 2 2 4 E1U PU \n", "14 -72.521062 19 A1g True 2 1 2 A1G SG \n", "15 -72.521062 20 E1g True 2 2 4 E1G PG \n", "16 -72.521062 22 E2g True 2 2 4 E2G DG \n", "17 -27.472614 24 A1g True 2 1 2 A1G SG \n", "18 -12.421997 25 A2u True 2 1 2 A2U A2U \n", "19 -12.421997 26 E1u True 2 2 4 E1U PU \n", "\n", " OrbGrpOccFinal \n", "iOrbGrp \n", "1 2 \n", "2 2 \n", "3 2 \n", "4 4 \n", "5 2 \n", "6 2 \n", "7 4 \n", "9 4 \n", "8 2 \n", "10 4 \n", "11 2 \n", "12 2 \n", "13 4 \n", "14 2 \n", "15 4 \n", "16 4 \n", "17 2 \n", "18 1 \n", "19 4 " ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\n", "*** Building job mol, orb18 (A2U/DAh), batch: batch\n", "Set mol = mol\n", "Set orb = orb18_A2U\n", "Set batch = batch\n", "Generator file set: mol.batch.orb18_A2U.conf\n", "\n", "*** Job paths set in self.hostDefn['eps-VM']:\n", "\n", "{'IP': 'ePS-VM',\n", " 'condaEnv': 'base',\n", " 'condaPath': PosixPath('/home/eps/anaconda3/bin/activate'),\n", " 'ePSpath': PosixPath('/opt/ePolyScat.E3/bin/ePolyScat'),\n", " 'elecDir': PosixPath('/home/eps/ePS/mol/electronic_structure'),\n", " 'genDir': PosixPath('/home/eps/ePS/mol/generators'),\n", " 'genFile': PosixPath('/home/eps/ePS/mol/generators/mol.batch.orb18_A2U.conf'),\n", " 'home': PosixPath('/home/eps'),\n", " 'host': 'eps-VM',\n", " 'jobComplete': PosixPath('/home/eps/ePS/jobs/completed'),\n", " 'jobDir': PosixPath('/home/eps/ePS/mol/batch/orb18_A2U'),\n", " 'jobPath': PosixPath('/home/eps/ePS/jobs'),\n", " 'jobRoot': PosixPath('/home/eps/ePS/mol/batch'),\n", " 'repoScpPath': PosixPath('/home/eps/python/epsman/repo'),\n", " 'scpFile': PosixPath('/home/eps/github/epsman/epsman/shell/ePS_input_write_template_basic_noDefaults.sh'),\n", " 'scpdir': PosixPath('~/github/epsman/shell'),\n", " 'systemDir': PosixPath('/home/eps/ePS/mol'),\n", " 'webDir': PosixPath('/home/eps/github/ePSdata'),\n", " 'webScpPath': PosixPath('/home/eps/python/epsman/web'),\n", " 'webSystemDir': PosixPath('/home/eps/github/ePSdata/source/mol'),\n", " 'wrkdir': PosixPath('/home/eps/ePS')}\n", "self.symList not set, running for defaults (all symmetry species).\n", "Set self.ePSglobals for global job settings.\n", "{'LMax': 30, 'FegeEng': 12.422}\n", "Written local job conf file (working dir): /home/eps/ePS/epsman-demo/ESclasses/mol.batch.orb18_A2U.conf\n", "Dir tree built, /home/eps/ePS/mol\n", "\n", "*** Pushing file: mol.batch.orb18_A2U.conf to remote: /home/eps/ePS/mol/generators/mol.batch.orb18_A2U.conf\n" ] }, { "name": "stdin", "output_type": "stream", "text": [ "File /home/eps/ePS/mol/generators/mol.batch.orb18_A2U.conf already exists, overwrite? (y/n) y\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "bash: /home/eps/github/epsman/shell/ePS_input_write_template_basic_noDefaults.sh: No such file or directory\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Uploaded \n", "/home/eps/ePS/epsman-demo/ESclasses/mol.batch.orb18_A2U.conf\n", " to \n", "/home/eps/ePS/mol/generators/mol.batch.orb18_A2U.conf\n", "Set Estart = 1.0\n", "Set Estop = 1.0\n", "Set dE = 1.0\n", "Set EJob = None\n", "Set EJobRange = None\n", "Set precision = 2\n", "E = 1.0:1.0:1.0, 1 points total, 1/1 = 1 job files will be written.\n", "Writing input files on remote...\n", "\n", "\n", "*** Failed to build job at self.writeInp.\n", "Encountered a bad command exit code!\n", "\n", "Command: '~/github/epsman/shell/ePS_input_write_template_basic_noDefaults.sh 1.0 1.0 1 /home/eps/ePS/mol/generators/mol.batch.orb18_A2U.conf'\n", "\n", "Exit code: 127\n", "\n", "Stdout: already printed\n", "\n", "Stderr: already printed\n", "\n", "\n" ] }, { "data": { "text/plain": [ "False" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.buildePSjob(channel = 18)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Fix missing shell scripts" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If the script fails at `self.writeInp()` this is likely due to the shell scripts for job-writing missing on the host. This currently needs to be fixed manually.\n", "\n", "Example failure:\n", "\n", "```\n", "E = 1.0:1.0:1.0, 1 points total, 1/1 = 1 job files will be written.\n", "Writing input files on remote...\n", "\n", "\n", "*** Failed to build job at self.writeInp.\n", "Encountered a bad command exit code!\n", "\n", "Command: '~/github/epsman/shell/ePS_input_write_template_basic_noDefaults.sh 1.0 1.0 1 /home/eps/ePS/test/generators/test.orb18_A2U.conf'\n", "\n", "Exit code: 127\n", "\n", "Stdout: already printed\n", "\n", "Stderr: already printed\n", "\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**TODO: setup VM with scripts**\n", "\n", "Could push from local repo automatically?\n", "\n", "TODO: check/fix permissions on script." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "# Fix missing shell script\n", "\n", "# Set local path to package dir\n", "job.hostDefn['localhost']['scpdir'] = modDir.parent/'shell'\n", "\n", "# Ser remote path\n", "# job.hostDefn[job.host]['scpdir'] = Path('~/ePS/shell')\n", "job.hostDefn[job.host]['scpdir'] = Path('/home/eps/ePS/shell')" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'basic': 'ePS_input_write_template_basic.sh',\n", " 'basicNoDefaults': 'ePS_input_write_template_basic_noDefaults.sh',\n", " 'basic-heavy': 'ePS_input_write_template_basic-heavy.sh',\n", " 'wf-sph': 'ePS_input_write_template_wf_sph.sh',\n", " 'EDCS': 'ePS_input_write_template_basic-EDCS_noDefaults.sh',\n", " 'nb-tpl-JR-v1': 'ePSproc_epsman_template_dev_051119_JR-single.ipynb',\n", " 'nb-tpl-JR-v2': 'ePSproc_epsman_template_dev_051219_JR-single.ipynb',\n", " 'nb-tpl-JR-v3': 'ePSproc_epsman_template_tidy_100120_JR-single.ipynb',\n", " 'nb-tpl-JR-v4': 'ePSproc_epsman_template_tidy_120120_JR-single.ipynb',\n", " 'nb-tpl-JR-v5': 'ePSproc_epsman_template_tidy_300320_JR-single.ipynb',\n", " 'nb-tpl-JR-v4-EC': 'ePSproc_epsman_template_tidy_300320_JR-E-chunck.ipynb',\n", " 'nb-sh-JR': 'jr_epsProc_nb.sh'}" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Available scripts can be listed\n", "job.scrDefn" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "# Set dir on host if missing\n", "# Note this currently uses the low-level Fabric object, should be wrapped!\n", "# UPDATE - should now be cleaner with dir creation on pushFile() below if necessary\n", "# job.c.run('mkdir -p ' + job.hostDefn[job.host]['scpdir'].as_posix())" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "*** Pushing file: /home/eps/github/epsman/epsman/shell/ePS_input_write_template_basic.sh to remote: /home/eps/ePS/shell/ePS_input_write_template_basic.sh\n" ] }, { "name": "stdin", "output_type": "stream", "text": [ "File /home/eps/ePS/shell/ePS_input_write_template_basic.sh already exists, overwrite? (y/n) y\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Uploaded \n", "/home/eps/github/epsman/epsman/shell/ePS_input_write_template_basic.sh\n", " to \n", "/home/eps/ePS/shell/ePS_input_write_template_basic.sh\n" ] }, { "data": { "text/plain": [ "True" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# job.pushFile(job.hostDefn['localhost']['scpdir']/job.scrDefn['basicNoDefaults'], job.hostDefn[job.host]['scpdir'])\n", "job.pushFile(job.hostDefn['localhost']['scpdir']/job.scrDefn['basic'], job.hostDefn[job.host]['scpdir'])" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'basicNoDefaults'" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.writeScript" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "*** Syncing files /home/eps/github/epsman/epsman/shell/ePS_input_write_template_basic_noDefaults.sh\n", "\n", "\teps-VM: \t/home/eps/github/epsman/epsman/shell/ePS_input_write_template_basic_noDefaults.sh \tFalse\n", "\n", "*** Can't sync files, self.host or self.hostDefn[host][scpFile] not set.\n" ] }, { "data": { "text/plain": [ "[{'eps-VM': False, 'localhost': None}, None]" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# What about sync for this...?\n", "# This should now work (23/02/22), provided 'scpFile' is set on local machine (it's not set by default).\n", "job.syncFilesDict('scpFile')" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Writing input files on remote...\n", "\n", "%%%%%%%%\n", "Job: batch\n", "File: batch.orb18_A2U_E1.0_1_1.0eV\n", "Orb: orb18_A2U\n", "Note: mol, orb 18 (A2U/DAh) ionization, batch batch, None.\n", "%%%%%%%%\n", "Base directory: /home/eps/ePS/mol/batch\n", "Job dir: /home/eps/ePS/mol/batch/orb18_A2U\n", "MatE dir: /home/eps/ePS/mol/batch/orb18_A2U/idy\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch’: File exists\n", "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch/orb18_A2U’: File exists\n", "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch/orb18_A2U/idy’: File exists\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "%%%%%%%%\n", "Writing 1 energies to job file:\n", "batch.orb18_A2U_E1.0_1_1.0eV\n", "%%%%%%%%\n", "\n", "Results logged to local file: mol.batch.orb18_A2U.conf.log\n", "\n", "*** Pushing file: mol.batch.orb18_A2U.conf.log to remote: /home/eps/ePS/mol/batch/orb18_A2U/mol.batch.orb18_A2U.conf.log\n" ] }, { "name": "stdin", "output_type": "stream", "text": [ "File /home/eps/ePS/mol/batch/orb18_A2U/mol.batch.orb18_A2U.conf.log already exists, overwrite? (y/n) y\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Uploaded \n", "/home/eps/ePS/epsman-demo/ESclasses/mol.batch.orb18_A2U.conf.log\n", " to \n", "/home/eps/ePS/mol/batch/orb18_A2U/mol.batch.orb18_A2U.conf.log\n" ] } ], "source": [ "# Run job writer again...\n", "\n", "job.writeInp()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(Above errors should now be fixed...)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Job configuration files\n", "\n", "The end-point of the build routine is the creation of a job configuration file & execution of a shell script on the host machine to create ePS input files. This is currently slightly convoluted, but basically aims to:\n", "\n", "- Provide a method for a minimal job definition in the .conf file, which is then used to generate multiple ePS input files for different energies. \n", "- Make the conf file (somewhat) portable, hence also includes all necessary paths on the host.\n", "- Ensure minimal file IO between local and host machine.\n", "\n", "(In future the shell scripts should be replaced by a python method and better templating.)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Configuration (generation) file: mol.batch.orb18_A2U.conf\n", "\n", "*******\n", "\n", "\n", "# Set working environment\n", "machine=eps-VM\n", "wrkdir=/home/eps/ePS\n", "scpdir=~/github/epsman/shell\n", "\n", "# Settings from ePS_batch_job.sh\n", "ePSpath=/opt/ePolyScat.E3/bin/ePolyScat\n", "jobPath=/home/eps/ePS/jobs\n", "jobComplete=/home/eps/ePS/jobs/completed\n", " \n", "\n", "# Job definitions, used for dir structure and output naming.\n", "mol=mol\n", "orb=orb18_A2U\n", "job=batch\n", "note='mol, orb 18 (A2U/DAh) ionization, batch batch, None.'\n", "\n", "\n", "#*******************************************************************************************\n", "# (c) Molecule (job) settings\n", "#\n", "\n", "# Global configuration\n", "headerSettings=\"LMax 30\n", "FegeEng 12.422\"\n", "\n", "# Job settings\n", "elecStructure=/home/eps/github/epsman/epsman/elecStructure/fileTest/xe_SPKrATZP_rel.molden\n", "elecType='molden'\n", "IP=12.422\n", "OrbOccInit='2 2 2 4 2 2 4 4 2 4 2 2 4 2 4 4 2 2 4'\n", "OrbOccTarget='2 2 2 4 2 2 4 4 2 4 2 2 4 2 4 4 2 1 4'\n", "InitSpinDeg=1\n", "TargSpinDeg=2\n", "SpinDeg=1\n", "InitSym='SG'\n", "TargSym='A2U'\n", "Ssym=(SG SG SG SG SG SG SG SG SG SG SG SG SG SG SG SG A2G A2G A2G A2G A2G A2G A2G A2G A2G A2G A2G A2G A2G A2G A2G A2G B1G B1G B1G B1G B1G B1G B1G B1G B1G B1G B1G B1G B1G B1G B1G B1G B2G B2G B2G B2G B2G B2G B2G B2G B2G B2G B2G B2G B2G B2G B2G B2G PG PG PG PG PG PG PG PG PG PG PG PG PG PG PG PG DG DG DG DG DG DG DG DG DG DG DG DG DG DG DG DG FG FG FG FG FG FG FG FG FG FG FG FG FG FG FG FG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG GG SU SU SU SU SU SU SU SU SU SU SU SU SU SU SU SU A2U A2U A2U A2U A2U A2U A2U A2U A2U A2U A2U A2U A2U A2U A2U A2U B1U B1U B1U B1U B1U B1U B1U B1U B1U B1U B1U B1U B1U B1U B1U B1U B2U B2U B2U B2U B2U B2U B2U B2U B2U B2U B2U B2U B2U B2U B2U B2U PU PU PU PU PU PU PU PU PU PU PU PU PU PU PU PU DU DU DU DU DU DU DU DU DU DU DU DU DU DU DU DU FU FU FU FU FU FU FU FU FU FU FU FU FU FU FU FU GU GU GU GU GU GU GU GU GU GU GU GU GU GU GU GU)\n", "Csym=(SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU)\n", "\n", "\n", "\n" ] } ], "source": [ "# The .conf file is also stored locally (defaults to current working dir), and the full string in self.jobSettings\n", "print(f\"Configuration (generation) file: {job.genFile}\")\n", "print(\"\\n*******\")\n", "print(job.jobSettings)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Modifying jobs\n", "\n", "To update & rewrite the configuration file, make changes to any of the data structures and propagate...\n", "\n", "The current build routine implements:\n", "\n", "1. `self.esData.setChannel(channel)`: Set ionization channel for job\n", "1. `self.setJob()`: setup basic defaults, including name and paths, for job.\n", "2. `self.esData.setePSinputs()`: Set parameter dictionaries self.ePSglobals and self.ePSrecords from inputs, the latter is defined mainly from the electronic structure file (and channel setting).\n", "3. `self.esData.writeInputConf()`: Dictionaries > strings for job template\n", "4. `self.setJobInputConfig()`: Settings string > template file string\n", "5. `self.writeGenFile()`: Template file string > conf file format (adds paths etc.)\n", "6. `self.createJobDirTree()`: Creates job tree on host, and pushes generator (conf) file.\n", "7. `self.Elist = em.multiEChunck(Estart = Estart, Estop = Estop, dE = dE, EJob = EJob, precision = precision)`: Set energies for input file generation on host.\n", "8. `self.writeInp(scrType = scrType, wLog = writeInpLog)`: Write ePS jobs on host, making use of .conf file and shell script as given by `scrType`.\n", "\n", "Any step can be updated/run independently.\n", "\n", "TODO: streamline this!" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Updating symList with Ssym=SG, Csym=None\n", "Set self.ePSglobals for global job settings.\n", "{'LMax': 30, 'FegeEng': 12.422}\n" ] } ], "source": [ "# Change something via a method\n", "\n", "# For symmetries currently need to run both gen and set functions\n", "# job.esData.genSymList(Ssym = 'SG') # Set for a single scattering symmetry only - NOTE this sets self.symList, but doesn't propagate\n", "# job.esData.setePSinputs(Ssym = 'SG') # Set self.ePSglobals and self.ePSrecords from inputs - NOTE this may reset other params too!\n", " # NOTE - need to add some flags here to overwrite!\n", "\n", "# TODO: \"update\" setting for setePSinputs() and/or chain functions more carefully.\n", "\n", "# Update 23/02/22: now automatic sym overwrite\n", "job.esData.setePSinputs(Ssym = 'SG')" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[('SG', 'SG'),\n", " ('SG', 'A2G'),\n", " ('SG', 'B1G'),\n", " ('SG', 'B2G'),\n", " ('SG', 'PG'),\n", " ('SG', 'DG'),\n", " ('SG', 'FG'),\n", " ('SG', 'GG'),\n", " ('SG', 'SU'),\n", " ('SG', 'A2U'),\n", " ('SG', 'B1U'),\n", " ('SG', 'B2U'),\n", " ('SG', 'PU'),\n", " ('SG', 'DU'),\n", " ('SG', 'FU'),\n", " ('SG', 'GU')]" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.esData.symList" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "# Change something in job settings manually\n", "job.esData.ePSrecords['IP']=50.0" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "\n", "# Job definitions, used for dir structure and output naming.\n", "mol=mol\n", "orb=orb18_A2U\n", "job=batch\n", "note='mol, orb 18 (A2U/DAh) ionization, batch batch, None.'\n", "\n", "\n", "#*******************************************************************************************\n", "# (c) Molecule (job) settings\n", "#\n", "\n", "# Global configuration\n", "headerSettings=\"LMax 30\n", "FegeEng 12.422\"\n", "\n", "# Job settings\n", "elecStructure=/home/eps/github/epsman/epsman/elecStructure/fileTest/xe_SPKrATZP_rel.molden\n", "elecType='molden'\n", "IP=50.0\n", "OrbOccInit='2 2 2 4 2 2 4 4 2 4 2 2 4 2 4 4 2 2 4'\n", "OrbOccTarget='2 2 2 4 2 2 4 4 2 4 2 2 4 2 4 4 2 1 4'\n", "InitSpinDeg=1\n", "TargSpinDeg=2\n", "SpinDeg=1\n", "InitSym='SG'\n", "TargSym='A2U'\n", "Ssym=(SG SG SG SG SG SG SG SG SG SG SG SG SG SG SG SG)\n", "Csym=(SG A2G B1G B2G PG DG FG GG SU A2U B1U B2U PU DU FU GU)\n", "\n", "\n", "\n" ] } ], "source": [ "# Propagate - TODO: tidy this up!\n", "job.esData.writeInputConf() # Dictionaries > strings for job template\n", "job.setJobInputConfig() # Settings string > template file string\n", "\n", "# Print\n", "print(job.jobSettings)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Written local job conf file (working dir): /home/eps/ePS/epsman-demo/ESclasses/mol.batch.orb18_A2U.conf\n" ] } ], "source": [ "# Rewrite config to disk (local copy)\n", "job.writeGenFile()\n", "\n", "# For remote either push manually, or run job.createJobDirTree()\n", "\n", "# TODO: update main build routine with an \"update\" option!" ] }, { "cell_type": "code", "execution_count": 52, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Writing input files on remote...\n", "\n", "%%%%%%%%\n", "Job: batch\n", "File: batch.orb18_A2U_E10_15_190eV\n", "Orb: orb18_A2U\n", "Note: mol, orb 18 (A2U/DAh) ionization, batch batch, None.\n", "%%%%%%%%\n", "Base directory: /home/eps/ePS/mol/batch\n", "Job dir: /home/eps/ePS/mol/batch/orb18_A2U\n", "MatE dir: /home/eps/ePS/mol/batch/orb18_A2U/idy\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch’: File exists\n", "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch/orb18_A2U’: File exists\n", "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch/orb18_A2U/idy’: File exists\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "%%%%%%%%\n", "Writing 13 energies to job file:\n", "batch.orb18_A2U_E10_15_190eV\n", "%%%%%%%%\n", "%%%%%%%%\n", "Job: batch\n", "File: batch.orb18_A2U_E15_15_195eV\n", "Orb: orb18_A2U\n", "Note: mol, orb 18 (A2U/DAh) ionization, batch batch, None.\n", "%%%%%%%%\n", "Base directory: /home/eps/ePS/mol/batch\n", "Job dir: /home/eps/ePS/mol/batch/orb18_A2U\n", "MatE dir: /home/eps/ePS/mol/batch/orb18_A2U/idy\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch’: File exists\n", "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch/orb18_A2U’: File exists\n", "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch/orb18_A2U/idy’: File exists\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "%%%%%%%%\n", "Writing 13 energies to job file:\n", "batch.orb18_A2U_E15_15_195eV\n", "%%%%%%%%\n", "%%%%%%%%\n", "Job: batch\n", "File: batch.orb18_A2U_E20_15_200eV\n", "Orb: orb18_A2U\n", "Note: mol, orb 18 (A2U/DAh) ionization, batch batch, None.\n", "%%%%%%%%\n", "Base directory: /home/eps/ePS/mol/batch\n", "Job dir: /home/eps/ePS/mol/batch/orb18_A2U\n", "MatE dir: /home/eps/ePS/mol/batch/orb18_A2U/idy\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch’: File exists\n", "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch/orb18_A2U’: File exists\n", "mkdir: cannot create directory ‘/home/eps/ePS/mol/batch/orb18_A2U/idy’: File exists\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "%%%%%%%%\n", "Writing 13 energies to job file:\n", "batch.orb18_A2U_E20_15_200eV\n", "%%%%%%%%\n", "\n", "Results logged to local file: mol.batch.orb18_A2U.conf.log\n", "\n", "*** Pushing file: mol.batch.orb18_A2U.conf.log to remote: /home/eps/ePS/mol/batch/orb18_A2U/mol.batch.orb18_A2U.conf.log\n" ] }, { "name": "stdin", "output_type": "stream", "text": [ "File /home/eps/ePS/mol/batch/orb18_A2U/mol.batch.orb18_A2U.conf.log already exists, overwrite? (y/n) y\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Uploaded \n", "/home/eps/ePS/epsman-demo/ESclasses/mol.batch.orb18_A2U.conf.log\n", " to \n", "/home/eps/ePS/mol/batch/orb18_A2U/mol.batch.orb18_A2U.conf.log\n" ] } ], "source": [ "# Run job writer again to generate .inp files with new settings.\n", "\n", "job.writeInp()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Energies & job chuncking\n", "\n", "This is currently handled by:\n", "\n", "- `self.Elist`, 2D numpy array defining energies per file.\n", "- `self.writeInp()`, method to write ePS input files per set of energies.\n", "\n", "The Elist can be set manually, or via the `multiEChunck` method.\n", "`self.multiEChunck(Estart = Estart, Estop = Estop, dE = dE, EJob = EJob, EJobRange = None, precision = precision)` set energies for input file generation on host." ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "array([[1.]])" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Currently set list - default is a single point at 1 eV\n", "job.Elist" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Set Estart = 10\n", "Set Estop = 45\n", "Set dE = 5\n", "Set precision = 2\n", "E = 10:5:45, 8 points total, 8/8 = 1 job files will be written.\n" ] }, { "data": { "text/plain": [ "array([[10],\n", " [15],\n", " [20],\n", " [25],\n", " [30],\n", " [35],\n", " [40],\n", " [45]])" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Demo some settings\n", "Estart = 10\n", "Estop = 45\n", "dE = 5\n", "\n", "job.multiEChunck(Estart = Estart, Estop = Estop, dE = dE)\n", "job.Elist" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Set Estart = 10\n", "Set Estop = 45\n", "Set dE = 5\n", "Set EJob = 5\n", "Set precision = 2\n", "E = 10:5:45, 8 points total, 8/4 = 2 job files will be written.\n" ] }, { "data": { "text/plain": [ "array([[10, 15],\n", " [20, 25],\n", " [30, 35],\n", " [40, 45]])" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Force multiple files if required\n", "job.multiEChunck(Estart = Estart, Estop = Estop, dE = dE, EJob = 5)\n", "job.Elist" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Set Estart = 10\n", "Set Estop = 200\n", "Set dE = 5\n", "Set precision = 2\n", "E = 10:5:200, 39 points total, 39/13 = 3 job files will be written.\n" ] }, { "data": { "text/plain": [ "array([[ 10, 15, 20],\n", " [ 25, 30, 35],\n", " [ 40, 45, 50],\n", " [ 55, 60, 65],\n", " [ 70, 75, 80],\n", " [ 85, 90, 95],\n", " [100, 105, 110],\n", " [115, 120, 125],\n", " [130, 135, 140],\n", " [145, 150, 155],\n", " [160, 165, 170],\n", " [175, 180, 185],\n", " [190, 195, 200]])" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Large E sets should chunck automatically\n", "# The points per file will default to the greatest common divisor within EJobRange, np.gcd(Elist.size, np.arange(EJobRange[0],EJobRange[1])).max()\n", "# (with some wiggle room).\n", "Estop = 200\n", "job.multiEChunck(Estart = Estart, Estop = Estop, dE = dE)\n", "job.Elist" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## More about ePS input files\n", "\n", "In the current implementation, the .conf file is used as the base for writing ePolyScat job files, using one of the shell scripts. This is a bit messy, but allows for easy creation & management of job files on the host only.\n", "\n", "Note - this may/should be changed to an all-python templating method in future!\n", "\n", "For more general details on ePolyScat input files and options, see the [ePolyScat manual](https://epolyscat.droppages.com/); there's also a [brief tutorial in the ePSproc docs](https://epsproc.readthedocs.io/en/latest/ePS_ePSproc_tutorial/ePS_tutorial_080520.html) (which follows `test12.inp` from the ePS manual)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Available scripts\n", "\n", "A list of current scripts is given in `job.scrDefn`. Note this currently includes scripts for various purposes.\n", "\n", "TODO: change to nested dict by type & including notes!" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'basic': 'ePS_input_write_template_basic.sh',\n", " 'basicNoDefaults': 'ePS_input_write_template_basic_noDefaults.sh',\n", " 'basic-heavy': 'ePS_input_write_template_basic-heavy.sh',\n", " 'wf-sph': 'ePS_input_write_template_wf_sph.sh',\n", " 'EDCS': 'ePS_input_write_template_basic-EDCS_noDefaults.sh',\n", " 'nb-tpl-JR-v1': 'ePSproc_epsman_template_dev_051119_JR-single.ipynb',\n", " 'nb-tpl-JR-v2': 'ePSproc_epsman_template_dev_051219_JR-single.ipynb',\n", " 'nb-tpl-JR-v3': 'ePSproc_epsman_template_tidy_100120_JR-single.ipynb',\n", " 'nb-tpl-JR-v4': 'ePSproc_epsman_template_tidy_120120_JR-single.ipynb',\n", " 'nb-tpl-JR-v5': 'ePSproc_epsman_template_tidy_300320_JR-single.ipynb',\n", " 'nb-tpl-JR-v4-EC': 'ePSproc_epsman_template_tidy_300320_JR-E-chunck.ipynb',\n", " 'nb-sh-JR': 'jr_epsProc_nb.sh'}" ] }, "execution_count": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "job.scrDefn" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Commands executed by self.writeInp() are collected in self.writeLog\n", "job.writeLog" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "%%%%%%%%\n", "Job: batch\n", "File: batch.orb18_A2U_E1.0_1_1.0eV\n", "Orb: orb18_A2U\n", "Note: mol, orb 18 (A2U/DAh) ionization, batch batch, None.\n", "%%%%%%%%\n", "Base directory: /home/eps/ePS/mol/batch\n", "Job dir: /home/eps/ePS/mol/batch/orb18_A2U\n", "MatE dir: /home/eps/ePS/mol/batch/orb18_A2U/idy\n", "%%%%%%%%\n", "Writing 1 energies to job file:\n", "batch.orb18_A2U_E1.0_1_1.0eV\n", "%%%%%%%%\n", "\n" ] } ], "source": [ "# Note these are objects returned by Fabric, so the output can be displayed too\n", "print(job.writeLog[0].stdout)" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "PosixPath('mol.batch.orb18_A2U.conf.log')" ] }, "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# And outputs in the log file\n", "job.logFile" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "ePSman log file, job: mol.batch.orb18_A2U.conf\n", "Running on eps-VM\n", "2022-02-23 13:11\n", "\n", "%%%%%%%%\n", "Job: batch\n", "File: batch.orb18_A2U_E1.0_1_1.0eV\n", "Orb: orb18_A2U\n", "Note: mol, orb 18 (A2U/DAh) ionization, batch batch, None.\n", "%%%%%%%%\n", "Base directory: /home/eps/ePS/mol/batch\n", "Job dir: /home/eps/ePS/mol/batch/orb18_A2U\n", "MatE dir: /home/eps/ePS/mol/batch/orb18_A2U/idy\n", "%%%%%%%%\n", "Writing 1 energies to job file:\n", "batch.orb18_A2U_E1.0_1_1.0eV\n", "%%%%%%%%\n", "\n", "\n" ] } ], "source": [ "!more {job.logFile}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Files & details\n", "\n", "Currently manual - TODO: wrap to methods." ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "PosixPath('/home/eps/ePS/mol/batch/orb18_A2U')" ] }, "execution_count": 44, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Job path\n", "job.hostDefn[job.host]['jobDir']" ] }, { "cell_type": "code", "execution_count": 53, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "***File List (from eps-VM):\n", "/home/eps/ePS/mol/batch/orb18_A2U/batch.orb18_A2U_E1.0_1_1.0eV.inp\n", "/home/eps/ePS/mol/batch/orb18_A2U/batch.orb18_A2U_E10_15_190eV.inp\n", "/home/eps/ePS/mol/batch/orb18_A2U/batch.orb18_A2U_E15_15_195eV.inp\n", "/home/eps/ePS/mol/batch/orb18_A2U/batch.orb18_A2U_E20_15_200eV.inp\n" ] } ], "source": [ "# Get list of .inp files\n", "fileList = job.getFileList(job.hostDefn[job.host]['jobDir'], fileType='.inp')" ] }, { "cell_type": "code", "execution_count": 58, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "# ePS mol, batch batch, orbital orb18_A2U\n", "# mol, orb 18 (A2U/DAh) ionization, batch batch, None.\n", "# E=10:15:190 (13 points)\n", "#\n", "# File date: Wed 23 Feb 2022 02:58:44 PM EST\n", "# Running on: eps-VM\n", "#\n", "# Configuration: /home/eps/ePS/mol/generators/mol.batch.orb18_A2U.conf\n", "# Template: Basic photoionization template, 30/09/19\n", "\n", "# Master job config settings\n", "LMax 30\n", "FegeEng 12.422\n", "\n", "EMax 190 # EMax, maximum asymptotic energy in eV\n", "IPot 12.422\n", "FegeEng 12.422 # Energy correction used in the fege potential\n", "\n", "\n", "# Set initial and final orbital occupations\n", "OrbOccInit\n", " 2 2 2 4 2 2 4 4 2 4 2 2 4 2 4 4 2 2 4\n", "OrbOcc # occupation of the orbital groups of target\n", " 2 2 2 4 2 2 4 4 2 4 2 2 4 2 4 4 2 1 4\n", "\n", "\n", "# Set electronic structure to read in\n", "Convert '/home/eps/github/epsman/epsman/elecStructure/fileTest/xe_SPKrATZP_rel.molden' 'molden2006'\n", "GetBlms\n", "ExpOrb\n", "\n", "# Set global symmetries & spins\n", "SpinDeg 1 \t# Spin degeneracy of the total scattering state (=1 singlet)\n", "TargSym 'A2U' \t\t# Symmetry of the target state\n", "TargSpinDeg 2 # Target spin degeneracy\n", "InitSym 'SG' \t\t# Initial state symmetry\n", "InitSpinDeg 1 # Initial state spin degeneracy'\n", "\n", "# Set energies\n", "ScatEng 10 25 40 55 70 85 100 115 130 145 160 175 190\n", "\n", "#*** Scat - set final state symmetries & do scattering calc. for each set\n", "\n", "\n", "# Symmetries set 1, SSGCSG\n", "ScatSym 'SG' # Scattering symmetry of total final state\n", "ScatContSym 'SG' # Scattering symmetry of continuum electron\n", "FileName 'MatrixElements' '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSSGCSG.idy' 'REWIND'\n", "\n", "GenFormPhIon\n", "DipoleOp\n", "GetPot\n", "PhIon\n", "GetCro\n", "\n", "\n", "# Symmetries set 2, SSGCA2G\n", "ScatSym 'SG' # Scattering symmetry of total final state\n", "ScatContSym 'A2G' # Scattering symmetry of continuum electron\n" ] }, { "data": { "text/plain": [ "" ] }, "execution_count": 58, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# To view a sample input file, it can be pulled to the local machine directly, \n", "\n", "# TODO: update pullFile with pushFile remote fixes!\n", "# job.pullFile(Path('testInp'), Path(fileList[0]))\n", "\n", "# or piped from the host\n", "# job.c.run('more ' + fileList[1]) # Full file, note this might be quite large\n", "nFile = 1\n", "job.c.run('head -60 ' + fileList[nFile])\n", "\n", "# TODO: view function for this?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Job file breakdown\n", "\n", "The job inputs basically follow the simple photoionization examples from the [ePolyScat manual](https://epolyscat.droppages.com/), so may NOT be suitable in all cases (and may not be the best way to do some things). \n", "\n", "The current scripts set commands for ePS to compute photoionization matrix elements for each symmetry and energy, with `PhIon`, `GetCro` and `DumpIdy` commands (see the [ePSproc advanced tutorial for a brief intro](https://epsproc.readthedocs.io/en/latest/ePS_ePSproc_tutorial/ePS_adv_tutorial_080520.html)).\n", "\n", "Essentially, there are 3 main segments:\n", "\n", "1. Init job & global settings, including the electronic structure file and list of energies." ] }, { "cell_type": "code", "execution_count": 63, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "# ePS mol, batch batch, orbital orb18_A2U\n", "# mol, orb 18 (A2U/DAh) ionization, batch batch, None.\n", "# E=10:15:190 (13 points)\n", "#\n", "# File date: Wed 23 Feb 2022 02:58:44 PM EST\n", "# Running on: eps-VM\n", "#\n", "# Configuration: /home/eps/ePS/mol/generators/mol.batch.orb18_A2U.conf\n", "# Template: Basic photoionization template, 30/09/19\n", "\n", "# Master job config settings\n", "LMax 30\n", "FegeEng 12.422\n", "\n", "EMax 190 # EMax, maximum asymptotic energy in eV\n", "IPot 12.422\n", "FegeEng 12.422 # Energy correction used in the fege potential\n", "\n", "\n", "# Set initial and final orbital occupations\n", "OrbOccInit\n", " 2 2 2 4 2 2 4 4 2 4 2 2 4 2 4 4 2 2 4\n", "OrbOcc # occupation of the orbital groups of target\n", " 2 2 2 4 2 2 4 4 2 4 2 2 4 2 4 4 2 1 4\n", "\n", "\n", "# Set electronic structure to read in\n", "Convert '/home/eps/github/epsman/epsman/elecStructure/fileTest/xe_SPKrATZP_rel.molden' 'molden2006'\n", "GetBlms\n", "ExpOrb\n", "\n", "# Set global symmetries & spins\n", "SpinDeg 1 \t# Spin degeneracy of the total scattering state (=1 singlet)\n", "TargSym 'A2U' \t\t# Symmetry of the target state\n", "TargSpinDeg 2 # Target spin degeneracy\n", "InitSym 'SG' \t\t# Initial state symmetry\n", "InitSpinDeg 1 # Initial state spin degeneracy'\n", "\n", "# Set energies\n", "ScatEng 10 25 40 55 70 85 100 115 130 145 160 175 190\n", "\n" ] } ], "source": [ "job.c.run('head -42 ' + fileList[nFile]);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2. A repeated set of `scat` runs (via `PhIon`), for each symmetry pair, and cross-section outputs (via `GetCro`)." ] }, { "cell_type": "code", "execution_count": 68, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "#*** Scat - set final state symmetries & do scattering calc. for each set\n", "\n", "\n", "# Symmetries set 1, SSGCSG\n", "ScatSym 'SG' # Scattering symmetry of total final state\n", "ScatContSym 'SG' # Scattering symmetry of continuum electron\n", "FileName 'MatrixElements' '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSSGCSG.idy' 'REWIND'\n", "\n", "GenFormPhIon\n", "DipoleOp\n", "GetPot\n", "PhIon\n", "GetCro\n", "\n", "\n", "# Symmetries set 2, SSGCA2G\n", "ScatSym 'SG' # Scattering symmetry of total final state\n", "ScatContSym 'A2G' # Scattering symmetry of continuum electron\n", "FileName 'MatrixElements' '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSSGCA2G.idy' 'REWIND'\n", "\n", "GenFormPhIon\n", "DipoleOp\n", "GetPot\n", "PhIon\n", "GetCro\n", "\n", "\n", "# Symmetries set 3, SSGCB1G\n" ] } ], "source": [ "job.c.run(\"sed -n '43,70p' \" + fileList[nFile]);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "3. Dumping all matrix elements to file (per energy)." ] }, { "cell_type": "code", "execution_count": 70, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 10 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 25 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 40 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 55 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 70 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 85 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 100 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 115 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 130 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 145 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 160 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 175 \n", "DumpIdy '/home/eps/ePS/mol/batch/orb18_A2U/idy/molSGUCGU.idy' 190 \n", "\n", "\n", "\n", "\n", "\n", "#*** END OF JOB\n", "\n" ] } ], "source": [ "job.c.run(\"tail -n 20 \" + fileList[nFile]);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Versions" ] }, { "cell_type": "code", "execution_count": 71, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Wed Feb 23 15:27:58 2022 EST
OSLinuxCPU(s)64Machinex86_64
Architecture64bitEnvironmentJupyter
Python 3.7.10 (default, Feb 26 2021, 18:47:35) \n", "[GCC 7.3.0]
epsman0.0.1fabric2.6.0cclib1.7
numpy1.19.2scipy1.6.1IPython7.21.0
matplotlib3.3.4scooby0.5.6
Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
" ], "text/plain": [ "\n", "--------------------------------------------------------------------------------\n", " Date: Wed Feb 23 15:27:57 2022 EST\n", "\n", " OS : Linux\n", " CPU(s) : 64\n", " Machine : x86_64\n", " Architecture : 64bit\n", " Environment : Jupyter\n", "\n", " Python 3.7.10 (default, Feb 26 2021, 18:47:35) [GCC 7.3.0]\n", "\n", " epsman : 0.0.1\n", " fabric : 2.6.0\n", " cclib : 1.7\n", " numpy : 1.19.2\n", " scipy : 1.6.1\n", " IPython : 7.21.0\n", " matplotlib : 3.3.4\n", " scooby : 0.5.6\n", "\n", " Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for\n", " Intel(R) 64 architecture applications\n", "--------------------------------------------------------------------------------" ] }, "execution_count": 71, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import scooby\n", "scooby.Report(additional=['epsman', 'fabric', 'cclib'])" ] }, { "cell_type": "code", "execution_count": 72, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " master\u001b[m\n", "* \u001b[32mrestructure160221\u001b[m\n", "73f10b5bdbf99e97212a639dd390217084ec0c09\n" ] } ], "source": [ "# Check current Git commit for local ePSproc version\n", "from pathlib import Path\n", "import epsman as em\n", "\n", "!git -C {Path(em.__file__).parent} branch\n", "!git -C {Path(em.__file__).parent} log --format=\"%H\" -n 1" ] }, { "cell_type": "code", "execution_count": 73, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "21b4357a169baf9fa7887c68bd1cf8f92c59642c\trefs/heads/master\n", "73f10b5bdbf99e97212a639dd390217084ec0c09\trefs/heads/restructure160221\n" ] } ], "source": [ "# Check current remote commits\n", "!git ls-remote --heads git://github.com/phockett/epsman" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "jupytext": { "formats": "ipynb,md:myst" }, "kernelspec": { "display_name": "Python [conda env:.conda-epsman-demo]", "language": "python", "name": "conda-env-.conda-epsman-demo-py" }, "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.7.10" } }, "nbformat": 4, "nbformat_minor": 4 }