diff --git a/other/jarvis/run_job_using_material_from_jarvis_db.ipynb b/other/jarvis/run_job_using_material_from_jarvis_db.ipynb
index bd1153a3..769b0089 100644
--- a/other/jarvis/run_job_using_material_from_jarvis_db.ipynb
+++ b/other/jarvis/run_job_using_material_from_jarvis_db.ipynb
@@ -1,574 +1,1537 @@
{
- "cells": [
- {
- "cell_type": "markdown",
- "source": [
- "\n",
- "\n",
- ""
- ],
- "metadata": {
- "collapsed": false
- },
- "id": "3c567b6400249971"
- },
- {
- "cell_type": "markdown",
- "source": [
- "## Install Packages\n",
- "First, install `express-py` which includes `jarvis-tools` as dependency."
- ],
- "metadata": {
- "collapsed": false
- },
- "id": "8b00ab6854f2263b"
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "outputs": [],
- "source": [
- "!pip install express-py==2024.1.25.post7"
- ],
- "metadata": {
- "collapsed": false
- },
- "id": "b1288bc79ee2c828"
- },
- {
- "cell_type": "markdown",
- "source": [
- "## Get Materials Data From JARVIS\n",
- "Then, let\"s get the dataset containing 2D materials from JARVIS and wrap it into a pandas dataframe."
- ],
- "metadata": {
- "collapsed": false
- },
- "id": "f418c51a7f794f9f"
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "outputs": [],
- "source": [
- "import pandas as pd\n",
- "from jarvis.db.figshare import data, get_jid_data\n",
- "\n",
- "dft_2d = data(\"dft_2d\")\n",
- "df = pd.DataFrame(dft_2d)"
- ],
- "metadata": {
- "collapsed": false
- },
- "id": "b1ee775d1476f884"
- },
- {
- "cell_type": "markdown",
- "source": [
- "## Create a simple heterostructure\n",
- "\n",
- "We use two material ids and place them one above another."
- ],
- "metadata": {
- "collapsed": false
- },
- "id": "9035ff20f1483b33"
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "outputs": [],
- "source": [
- "from jarvis.core.atoms import Atoms\n",
- "from jarvis.analysis.interface.zur import make_interface\n",
- "\n",
- "## Note: JVASP-670 is an entry for MoTe2\n",
- "jid1 = \"JVASP-670\"\n",
- "jid2 =\"JVASP-664\"\n",
- "\n",
- "for i in dft_2d:\n",
- " if i[\"jid\"] == jid1:\n",
- " atoms1 = Atoms.from_dict(i[\"atoms\"])\n",
- "for i in dft_2d:\n",
- " if i[\"jid\"] == jid2:\n",
- " atoms2 = Atoms.from_dict(i[\"atoms\"])\n",
- "\n",
- "interface_atoms_dict = make_interface(film=atoms1, subs=atoms2)\n",
- "heterostructure_atoms = interface_atoms_dict[\"interface\"].center_around_origin()\n",
- "\n",
- "print (jid1,jid2,atoms1.composition.reduced_formula,atoms2.composition.reduced_formula, heterostructure_atoms)"
- ],
- "metadata": {
- "collapsed": false,
- "pycharm": {
- "name": "#%%\n"
- }
- },
- "id": "1b3e7d016f30b61"
- },
- {
- "cell_type": "markdown",
- "source": [
- "## Extract the film and substrate"
- ],
- "metadata": {
- "collapsed": false,
- "pycharm": {
- "name": "#%% md\n"
- }
- },
- "id": "4d59e226b39bbf41"
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "outputs": [],
- "source": [
- "# Using the fractional coordinate Z level of 0.5 to separate top/bottom\n",
- "# See also https://github.com/usnistgov/jarvis/issues/311\n",
- "heterostructure_atoms_copy = Atoms.from_dict(heterostructure_atoms.to_dict())\n",
- "indices_to_remove = []\n",
- "for index, coord in enumerate(heterostructure_atoms_copy.coords):\n",
- " print(coord, index)\n",
- " if coord[2] < 0.5:\n",
- " indices_to_remove.append(index)\n",
- "for i, ind in enumerate(indices_to_remove):\n",
- " heterostructure_atoms_copy = heterostructure_atoms_copy.remove_site_by_index(ind - i)\n",
- " print(\"removed\", ind, heterostructure_atoms_copy.props)\n",
- "substrate_atoms = Atoms.from_dict(heterostructure_atoms_copy.to_dict())\n",
- "\n",
- "heterostructure_atoms_copy = Atoms.from_dict(heterostructure_atoms.to_dict())\n",
- "indices_to_remove = []\n",
- "for index, coord in enumerate(heterostructure_atoms_copy.coords):\n",
- " print(coord, index)\n",
- " if coord[2] > 0.5:\n",
- " indices_to_remove.append(index)\n",
- "for i, ind in enumerate(indices_to_remove):\n",
- " heterostructure_atoms_copy = heterostructure_atoms_copy.remove_site_by_index(ind - i)\n",
- " print(\"removed\", ind, heterostructure_atoms_copy.props)\n",
- "film_atoms = Atoms.from_dict(heterostructure_atoms_copy.to_dict())"
- ],
- "metadata": {
- "collapsed": false,
- "pycharm": {
- "name": "#%%\n"
- }
- },
- "id": "c60f1cdeca83df6a"
- },
- {
- "cell_type": "markdown",
- "source": [
- "## Extract Structure and Convert to ESSE\n",
- "Next, we extract an entry from the JARVIS dataset and convert it into ESSE format ready to be uploaded to Mat3ra.com."
- ],
- "metadata": {
- "collapsed": false
- },
- "id": "15fe5f9de299c935"
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "outputs": [],
- "source": [
- "import json\n",
- "from express import ExPrESS\n",
- "\n",
- "def jarvis_atoms_to_esse(atoms):\n",
- " # JARVIS Atoms return poscar as representation\n",
- " # https://github.com/usnistgov/jarvis/blob/master/jarvis/core/atoms.py#L1333\n",
- " poscar = atoms.__repr__()\n",
- " kwargs = {\n",
- " \"structure_string\": poscar,\n",
- " \"cell_type\": \"original\",\n",
- " \"structure_format\": \"poscar\"\n",
- " }\n",
- " handler = ExPrESS(\"structure\", **kwargs)\n",
- " material = handler.property(\"material\", **kwargs)\n",
- " return material\n",
- "\n",
- "material_film = jarvis_atoms_to_esse(film_atoms)\n",
- "material_substrate = jarvis_atoms_to_esse(substrate_atoms)\n",
- "material_heterostructure = jarvis_atoms_to_esse(heterostructure_atoms)\n",
- "\n",
- "# To preview resulting JSON data\n",
- "print(json.dumps(material_heterostructure, indent=4))"
- ],
- "metadata": {
- "collapsed": false
- },
- "id": "c41fb68c6d25fe48"
- },
- {
- "cell_type": "markdown",
- "source": [
- "## Setup the API credentials\n",
- "Finally, we can upload the material to Mat3ra.com using the REST API: follow the explanation in another example notebook [here](../../examples/material/create_material.ipynb). One can replace the content of the `CONFIG` variable with the JSON data above."
- ],
- "metadata": {
- "collapsed": false
- },
- "id": "a4a48479c7ea090f"
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "outputs": [],
- "source": [
- "# @title Authorization Form\n",
- "ACCOUNT_ID = \"\" # @param {type:\"string\"}\n",
- "AUTH_TOKEN = \"\" # @param {type:\"string\"}\n",
- "MATERIALS_PROJECT_API_KEY = \"MATERIALS_PROJECT_API_KEY\" # @param {type:\"string\"}\n",
- "ORGANIZATION_ID = \"\"\n",
- "\n",
- "\n",
- "import os\n",
- "\n",
- "if \"COLAB_JUPYTER_IP\" in os.environ:\n",
- " os.environ.update(\n",
- " dict(\n",
- " ACCOUNT_ID=ACCOUNT_ID,\n",
- " AUTH_TOKEN=AUTH_TOKEN,\n",
- " MATERIALS_PROJECT_API_KEY=MATERIALS_PROJECT_API_KEY,\n",
- " ORGANIZATION_ID=ORGANIZATION_ID,\n",
- " )\n",
- " )\n",
- "\n",
- " !GIT_BRANCH=\"dev\"; export GIT_BRANCH; curl -s \"https://raw.githubusercontent.com/Exabyte-io/api-examples/${GIT_BRANCH}/scripts/env.sh\" | bash"
- ],
- "metadata": {
- "collapsed": false,
- "pycharm": {
- "name": "#%%\n"
- }
- },
- "id": "5b2ae68afcacc16"
- },
- {
- "cell_type": "markdown",
- "source": [
- "## Initialize the API Endpoints"
- ],
- "metadata": {
- "collapsed": false,
- "pycharm": {
- "name": "#%% md\n"
- }
- },
- "id": "deac6f9f10d31b19"
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "outputs": [],
- "source": [
- "from utils.settings import ENDPOINT_ARGS, ACCOUNT_ID\n",
- "from utils.generic import wait_for_jobs_to_finish, get_property_by_subworkflow_and_unit_indicies, dataframe_to_html, display_JSON\n",
- "\n",
- "# Relevant functions from the API client\n",
- "from exabyte_api_client.endpoints.jobs import JobEndpoints\n",
- "from exabyte_api_client.endpoints.projects import ProjectEndpoints\n",
- "from exabyte_api_client.endpoints.materials import MaterialEndpoints\n",
- "from exabyte_api_client.endpoints.bank_workflows import BankWorkflowEndpoints\n",
- "from exabyte_api_client.endpoints.properties import PropertiesEndpoints\n",
- "\n",
- "job_endpoints = JobEndpoints(*ENDPOINT_ARGS)\n",
- "project_endpoints = ProjectEndpoints(*ENDPOINT_ARGS)\n",
- "material_endpoints = MaterialEndpoints(*ENDPOINT_ARGS)\n",
- "property_endpoints = PropertiesEndpoints(*ENDPOINT_ARGS)\n",
- "bank_workflow_endpoints = BankWorkflowEndpoints(*ENDPOINT_ARGS)"
- ],
- "metadata": {
- "collapsed": false,
- "pycharm": {
- "name": "#%%\n"
- }
- },
- "id": "979e35d5e828f794"
- },
- {
- "cell_type": "markdown",
- "source": [
- "## Create Material in the platform"
- ],
- "metadata": {
- "collapsed": false,
- "pycharm": {
- "name": "#%% md\n"
- }
- },
- "id": "6ea47ba011947ad5"
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "outputs": [],
- "source": [
- "material_heterostructure[\"name\"] = f\"Heterostructure - {jid1} with {jid2}\"\n",
- "material_heterostructure_in_the_platform = material_endpoints.create(material_heterostructure)\n",
- "\n",
- "material_film[\"name\"] = f\"Film - {jid1}\"\n",
- "material_film_in_the_platform = material_endpoints.create(material_film)\n",
- "\n",
- "material_substrate[\"name\"] = f\"Substrate - {jid2}\"\n",
- "material_substrate_in_the_platform = material_endpoints.create(material_substrate)"
- ],
- "metadata": {
- "collapsed": false,
- "pycharm": {
- "name": "#%%\n"
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "source": [
+ "\n",
+ "\n",
+ ""
+ ],
+ "metadata": {
+ "collapsed": false,
+ "id": "3c567b6400249971"
+ },
+ "id": "3c567b6400249971"
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "## Install Packages\n",
+ "First, install `express-py` which includes `jarvis-tools` as dependency."
+ ],
+ "metadata": {
+ "collapsed": false,
+ "id": "8b00ab6854f2263b"
+ },
+ "id": "8b00ab6854f2263b"
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Collecting express-py==2024.1.25.post7\n",
+ " Downloading express_py-2024.1.25.post7-py3-none-any.whl.metadata (9.1 kB)\n",
+ "Collecting munch==2.5.0 (from express-py==2024.1.25.post7)\n",
+ " Downloading munch-2.5.0-py2.py3-none-any.whl.metadata (5.8 kB)\n",
+ "Collecting pymatgen>=2023.8.10 (from express-py==2024.1.25.post7)\n",
+ " Downloading pymatgen-2024.8.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (13 kB)\n",
+ "Collecting ase>=3.17.0 (from express-py==2024.1.25.post7)\n",
+ " Downloading ase-3.23.0-py3-none-any.whl.metadata (3.8 kB)\n",
+ "Collecting mat3ra-esse>=2024.1.25.post7 (from express-py==2024.1.25.post7)\n",
+ " Downloading mat3ra_esse-2024.6.4.post1-py3-none-any.whl.metadata (8.9 kB)\n",
+ "Collecting rdkit-pypi>=2022.3.5 (from express-py==2024.1.25.post7)\n",
+ " Downloading rdkit_pypi-2022.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.9 kB)\n",
+ "Collecting jarvis-tools>=2023.12.12 (from express-py==2024.1.25.post7)\n",
+ " Downloading jarvis_tools-2024.5.10-py2.py3-none-any.whl.metadata (3.5 kB)\n",
+ "Collecting numpy==1.23.5 (from express-py==2024.1.25.post7)\n",
+ " Downloading numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.3 kB)\n",
+ "Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from munch==2.5.0->express-py==2024.1.25.post7) (1.16.0)\n",
+ "Requirement already satisfied: scipy>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from ase>=3.17.0->express-py==2024.1.25.post7) (1.13.1)\n",
+ "Requirement already satisfied: matplotlib>=3.3.4 in /usr/local/lib/python3.10/dist-packages (from ase>=3.17.0->express-py==2024.1.25.post7) (3.7.1)\n",
+ "Collecting spglib>=1.14.1 (from jarvis-tools>=2023.12.12->express-py==2024.1.25.post7)\n",
+ " Downloading spglib-2.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.2 kB)\n",
+ "Requirement already satisfied: joblib>=0.14.1 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (1.4.2)\n",
+ "Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (2.32.3)\n",
+ "Requirement already satisfied: toolz>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (0.12.1)\n",
+ "Collecting xmltodict>=0.11.0 (from jarvis-tools>=2023.12.12->express-py==2024.1.25.post7)\n",
+ " Downloading xmltodict-0.13.0-py2.py3-none-any.whl.metadata (7.7 kB)\n",
+ "Requirement already satisfied: tqdm>=4.41.1 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (4.66.5)\n",
+ "Requirement already satisfied: scikit-learn in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (1.3.2)\n",
+ "Requirement already satisfied: inflect in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (7.3.1)\n",
+ "Collecting exabyte-json-include>=2023.12.23.post0 (from mat3ra-esse>=2024.1.25.post7->express-py==2024.1.25.post7)\n",
+ " Downloading exabyte_json_include-2023.12.23.post0-py3-none-any.whl.metadata (3.1 kB)\n",
+ "Requirement already satisfied: jsonschema>=2.6.0 in /usr/local/lib/python3.10/dist-packages (from mat3ra-esse>=2024.1.25.post7->express-py==2024.1.25.post7) (4.23.0)\n",
+ "Collecting matplotlib>=3.3.4 (from ase>=3.17.0->express-py==2024.1.25.post7)\n",
+ " Downloading matplotlib-3.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)\n",
+ "Collecting monty>=2024.7.29 (from pymatgen>=2023.8.10->express-py==2024.1.25.post7)\n",
+ " Downloading monty-2024.7.30-py3-none-any.whl.metadata (3.2 kB)\n",
+ "Requirement already satisfied: networkx>=2.2 in /usr/local/lib/python3.10/dist-packages (from pymatgen>=2023.8.10->express-py==2024.1.25.post7) (3.3)\n",
+ "Collecting palettable>=3.3.3 (from pymatgen>=2023.8.10->express-py==2024.1.25.post7)\n",
+ " Downloading palettable-3.3.3-py2.py3-none-any.whl.metadata (3.3 kB)\n",
+ "Requirement already satisfied: pandas>=2 in /usr/local/lib/python3.10/dist-packages (from pymatgen>=2023.8.10->express-py==2024.1.25.post7) (2.1.4)\n",
+ "Requirement already satisfied: plotly>=4.5.0 in /usr/local/lib/python3.10/dist-packages (from pymatgen>=2023.8.10->express-py==2024.1.25.post7) (5.15.0)\n",
+ "Collecting pybtex>=0.24.0 (from pymatgen>=2023.8.10->express-py==2024.1.25.post7)\n",
+ " Downloading pybtex-0.24.0-py2.py3-none-any.whl.metadata (2.0 kB)\n",
+ "Collecting ruamel.yaml>=0.17.0 (from pymatgen>=2023.8.10->express-py==2024.1.25.post7)\n",
+ " Downloading ruamel.yaml-0.18.6-py3-none-any.whl.metadata (23 kB)\n",
+ "Requirement already satisfied: sympy>=1.2 in /usr/local/lib/python3.10/dist-packages (from pymatgen>=2023.8.10->express-py==2024.1.25.post7) (1.13.1)\n",
+ "Requirement already satisfied: tabulate>=0.9 in /usr/local/lib/python3.10/dist-packages (from pymatgen>=2023.8.10->express-py==2024.1.25.post7) (0.9.0)\n",
+ "Collecting uncertainties>=3.1.4 (from pymatgen>=2023.8.10->express-py==2024.1.25.post7)\n",
+ " Downloading uncertainties-3.2.2-py3-none-any.whl.metadata (6.9 kB)\n",
+ "INFO: pip is looking at multiple versions of pymatgen to determine which version is compatible with other requirements. This could take a while.\n",
+ "Collecting pymatgen>=2023.8.10 (from express-py==2024.1.25.post7)\n",
+ " Downloading pymatgen-2024.7.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (13 kB)\n",
+ " Downloading pymatgen-2024.6.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (13 kB)\n",
+ " Downloading pymatgen-2024.6.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (13 kB)\n",
+ " Downloading pymatgen-2024.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (13 kB)\n",
+ " Downloading pymatgen-2024.4.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (13 kB)\n",
+ " Downloading pymatgen-2024.4.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (13 kB)\n",
+ " Downloading pymatgen-2024.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ "INFO: pip is still looking at multiple versions of pymatgen to determine which version is compatible with other requirements. This could take a while.\n",
+ " Downloading pymatgen-2024.2.23-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ " Downloading pymatgen-2024.2.20-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ " Downloading pymatgen-2024.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ " Downloading pymatgen-2024.1.27.tar.gz (7.2 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.2/7.2 MB\u001b[0m \u001b[31m25.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
+ " Downloading pymatgen-2024.1.26-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ "INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.\n",
+ " Downloading pymatgen-2023.12.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (13 kB)\n",
+ " Downloading pymatgen-2023.11.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ " Downloading pymatgen-2023.11.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (13 kB)\n",
+ " Downloading pymatgen-2023.10.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ " Downloading pymatgen-2023.10.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ " Downloading pymatgen-2023.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ " Downloading pymatgen-2023.9.25-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
+ "Requirement already satisfied: Pillow in /usr/local/lib/python3.10/dist-packages (from rdkit-pypi>=2022.3.5->express-py==2024.1.25.post7) (9.4.0)\n",
+ "Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6.0->mat3ra-esse>=2024.1.25.post7->express-py==2024.1.25.post7) (24.2.0)\n",
+ "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6.0->mat3ra-esse>=2024.1.25.post7->express-py==2024.1.25.post7) (2023.12.1)\n",
+ "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6.0->mat3ra-esse>=2024.1.25.post7->express-py==2024.1.25.post7) (0.35.1)\n",
+ "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=2.6.0->mat3ra-esse>=2024.1.25.post7->express-py==2024.1.25.post7) (0.20.0)\n",
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.4->ase>=3.17.0->express-py==2024.1.25.post7) (1.2.1)\n",
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.4->ase>=3.17.0->express-py==2024.1.25.post7) (0.12.1)\n",
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.4->ase>=3.17.0->express-py==2024.1.25.post7) (4.53.1)\n",
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.4->ase>=3.17.0->express-py==2024.1.25.post7) (1.4.5)\n",
+ "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.4->ase>=3.17.0->express-py==2024.1.25.post7) (24.1)\n",
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.4->ase>=3.17.0->express-py==2024.1.25.post7) (3.1.2)\n",
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.3.4->ase>=3.17.0->express-py==2024.1.25.post7) (2.8.2)\n",
+ "Requirement already satisfied: tenacity>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from plotly>=4.5.0->pymatgen>=2023.8.10->express-py==2024.1.25.post7) (9.0.0)\n",
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (3.3.2)\n",
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (3.7)\n",
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (2.0.7)\n",
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (2024.7.4)\n",
+ "Collecting ruamel.yaml.clib>=0.2.7 (from ruamel.yaml>=0.17.0->pymatgen>=2023.8.10->express-py==2024.1.25.post7)\n",
+ " Downloading ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl.metadata (2.2 kB)\n",
+ "Requirement already satisfied: more-itertools>=8.5.0 in /usr/local/lib/python3.10/dist-packages (from inflect->jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (10.3.0)\n",
+ "Requirement already satisfied: typeguard>=4.0.1 in /usr/local/lib/python3.10/dist-packages (from inflect->jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (4.3.0)\n",
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=2->pymatgen>=2023.8.10->express-py==2024.1.25.post7) (2024.1)\n",
+ "Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas>=2->pymatgen>=2023.8.10->express-py==2024.1.25.post7) (2024.1)\n",
+ "Requirement already satisfied: PyYAML>=3.01 in /usr/local/lib/python3.10/dist-packages (from pybtex>=0.24.0->pymatgen>=2023.8.10->express-py==2024.1.25.post7) (6.0.2)\n",
+ "Collecting latexcodec>=1.0.4 (from pybtex>=0.24.0->pymatgen>=2023.8.10->express-py==2024.1.25.post7)\n",
+ " Downloading latexcodec-3.0.0-py3-none-any.whl.metadata (4.9 kB)\n",
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (3.5.0)\n",
+ "Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy>=1.2->pymatgen>=2023.8.10->express-py==2024.1.25.post7) (1.3.0)\n",
+ "Requirement already satisfied: typing-extensions>=4.10.0 in /usr/local/lib/python3.10/dist-packages (from typeguard>=4.0.1->inflect->jarvis-tools>=2023.12.12->express-py==2024.1.25.post7) (4.12.2)\n",
+ "Downloading express_py-2024.1.25.post7-py3-none-any.whl (82 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m82.6/82.6 kB\u001b[0m \u001b[31m5.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading munch-2.5.0-py2.py3-none-any.whl (10 kB)\n",
+ "Downloading numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m17.1/17.1 MB\u001b[0m \u001b[31m50.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading ase-3.23.0-py3-none-any.whl (2.9 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.9/2.9 MB\u001b[0m \u001b[31m61.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading jarvis_tools-2024.5.10-py2.py3-none-any.whl (4.2 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.2/4.2 MB\u001b[0m \u001b[31m58.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading mat3ra_esse-2024.6.4.post1-py3-none-any.whl (488 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m488.6/488.6 kB\u001b[0m \u001b[31m25.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading pymatgen-2023.9.25-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m9.6/9.6 MB\u001b[0m \u001b[31m33.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading rdkit_pypi-2022.9.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (29.4 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m29.4/29.4 MB\u001b[0m \u001b[31m19.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading exabyte_json_include-2023.12.23.post0-py3-none-any.whl (5.3 kB)\n",
+ "Downloading monty-2024.7.30-py3-none-any.whl (48 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m48.9/48.9 kB\u001b[0m \u001b[31m2.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading palettable-3.3.3-py2.py3-none-any.whl (332 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m332.3/332.3 kB\u001b[0m \u001b[31m15.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading ruamel.yaml-0.18.6-py3-none-any.whl (117 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m117.8/117.8 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading spglib-2.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.1/1.1 MB\u001b[0m \u001b[31m37.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading uncertainties-3.2.2-py3-none-any.whl (58 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)\n",
+ "Downloading pybtex-0.24.0-py2.py3-none-any.whl (561 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m561.4/561.4 kB\u001b[0m \u001b[31m25.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading latexcodec-3.0.0-py3-none-any.whl (18 kB)\n",
+ "Downloading ruamel.yaml.clib-0.2.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (526 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m526.7/526.7 kB\u001b[0m \u001b[31m29.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hInstalling collected packages: xmltodict, uncertainties, ruamel.yaml.clib, palettable, numpy, munch, monty, latexcodec, exabyte-json-include, spglib, ruamel.yaml, rdkit-pypi, pybtex, pymatgen, mat3ra-esse, jarvis-tools, ase, express-py\n",
+ " Attempting uninstall: numpy\n",
+ " Found existing installation: numpy 1.26.4\n",
+ " Uninstalling numpy-1.26.4:\n",
+ " Successfully uninstalled numpy-1.26.4\n",
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
+ "xgboost 2.1.1 requires nvidia-nccl-cu12; platform_system == \"Linux\" and platform_machine != \"aarch64\", which is not installed.\n",
+ "albucore 0.0.13 requires numpy<2,>=1.24.4, but you have numpy 1.23.5 which is incompatible.\n",
+ "albumentations 1.4.13 requires numpy>=1.24.4, but you have numpy 1.23.5 which is incompatible.\n",
+ "chex 0.1.86 requires numpy>=1.24.1, but you have numpy 1.23.5 which is incompatible.\n",
+ "pandas-stubs 2.1.4.231227 requires numpy>=1.26.0; python_version < \"3.13\", but you have numpy 1.23.5 which is incompatible.\u001b[0m\u001b[31m\n",
+ "\u001b[0mSuccessfully installed ase-3.23.0 exabyte-json-include-2023.12.23.post0 express-py-2024.1.25.post7 jarvis-tools-2024.5.10 latexcodec-3.0.0 mat3ra-esse-2024.6.4.post1 monty-2024.7.30 munch-2.5.0 numpy-1.23.5 palettable-3.3.3 pybtex-0.24.0 pymatgen-2023.9.25 rdkit-pypi-2022.9.5 ruamel.yaml-0.18.6 ruamel.yaml.clib-0.2.8 spglib-2.5.0 uncertainties-3.2.2 xmltodict-0.13.0\n"
+ ]
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "application/vnd.colab-display-data+json": {
+ "pip_warning": {
+ "packages": [
+ "numpy"
+ ]
+ },
+ "id": "0d43ec263d394e1080b24103f14c3b34"
+ }
+ },
+ "metadata": {}
+ }
+ ],
+ "source": [
+ "!pip install express-py==2024.1.25.post7"
+ ],
+ "metadata": {
+ "id": "b1288bc79ee2c828",
+ "outputId": "ac71d8df-2be8-46f0-eb92-a4b0207a37c2",
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 1000
+ }
+ },
+ "id": "b1288bc79ee2c828"
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "pip install intermat"
+ ],
+ "metadata": {
+ "id": "onRcB7rou8ZM",
+ "outputId": "130beabc-5c2d-4e8c-a8ac-f3a5bcaf8bcb",
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ }
+ },
+ "id": "onRcB7rou8ZM",
+ "execution_count": 3,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "Collecting intermat\n",
+ " Downloading intermat-2024.3.24-py2.py3-none-any.whl.metadata (30 kB)\n",
+ "Requirement already satisfied: numpy>=1.22.0 in /usr/local/lib/python3.10/dist-packages (from intermat) (1.23.5)\n",
+ "Requirement already satisfied: scipy>=1.6.3 in /usr/local/lib/python3.10/dist-packages (from intermat) (1.13.1)\n",
+ "Requirement already satisfied: jarvis-tools>=2021.07.19 in /usr/local/lib/python3.10/dist-packages (from intermat) (2024.5.10)\n",
+ "Collecting pydantic-settings (from intermat)\n",
+ " Downloading pydantic_settings-2.4.0-py3-none-any.whl.metadata (3.5 kB)\n",
+ "Requirement already satisfied: matplotlib>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2021.07.19->intermat) (3.7.1)\n",
+ "Requirement already satisfied: spglib>=1.14.1 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2021.07.19->intermat) (2.5.0)\n",
+ "Requirement already satisfied: joblib>=0.14.1 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2021.07.19->intermat) (1.4.2)\n",
+ "Requirement already satisfied: requests>=2.23.0 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2021.07.19->intermat) (2.32.3)\n",
+ "Requirement already satisfied: toolz>=0.9.0 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2021.07.19->intermat) (0.12.1)\n",
+ "Requirement already satisfied: xmltodict>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2021.07.19->intermat) (0.13.0)\n",
+ "Requirement already satisfied: tqdm>=4.41.1 in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2021.07.19->intermat) (4.66.5)\n",
+ "Requirement already satisfied: scikit-learn in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2021.07.19->intermat) (1.3.2)\n",
+ "Requirement already satisfied: inflect in /usr/local/lib/python3.10/dist-packages (from jarvis-tools>=2021.07.19->intermat) (7.3.1)\n",
+ "Requirement already satisfied: pydantic>=2.7.0 in /usr/local/lib/python3.10/dist-packages (from pydantic-settings->intermat) (2.8.2)\n",
+ "Collecting python-dotenv>=0.21.0 (from pydantic-settings->intermat)\n",
+ " Downloading python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)\n",
+ "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.0.0->jarvis-tools>=2021.07.19->intermat) (1.2.1)\n",
+ "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.0.0->jarvis-tools>=2021.07.19->intermat) (0.12.1)\n",
+ "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.0.0->jarvis-tools>=2021.07.19->intermat) (4.53.1)\n",
+ "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.0.0->jarvis-tools>=2021.07.19->intermat) (1.4.5)\n",
+ "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.0.0->jarvis-tools>=2021.07.19->intermat) (24.1)\n",
+ "Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.0.0->jarvis-tools>=2021.07.19->intermat) (9.4.0)\n",
+ "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.0.0->jarvis-tools>=2021.07.19->intermat) (3.1.2)\n",
+ "Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=3.0.0->jarvis-tools>=2021.07.19->intermat) (2.8.2)\n",
+ "Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.7.0->pydantic-settings->intermat) (0.7.0)\n",
+ "Requirement already satisfied: pydantic-core==2.20.1 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.7.0->pydantic-settings->intermat) (2.20.1)\n",
+ "Requirement already satisfied: typing-extensions>=4.6.1 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.7.0->pydantic-settings->intermat) (4.12.2)\n",
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->jarvis-tools>=2021.07.19->intermat) (3.3.2)\n",
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->jarvis-tools>=2021.07.19->intermat) (3.7)\n",
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->jarvis-tools>=2021.07.19->intermat) (2.0.7)\n",
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.23.0->jarvis-tools>=2021.07.19->intermat) (2024.7.4)\n",
+ "Requirement already satisfied: more-itertools>=8.5.0 in /usr/local/lib/python3.10/dist-packages (from inflect->jarvis-tools>=2021.07.19->intermat) (10.3.0)\n",
+ "Requirement already satisfied: typeguard>=4.0.1 in /usr/local/lib/python3.10/dist-packages (from inflect->jarvis-tools>=2021.07.19->intermat) (4.3.0)\n",
+ "Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->jarvis-tools>=2021.07.19->intermat) (3.5.0)\n",
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib>=3.0.0->jarvis-tools>=2021.07.19->intermat) (1.16.0)\n",
+ "Downloading intermat-2024.3.24-py2.py3-none-any.whl (49 kB)\n",
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m49.1/49.1 kB\u001b[0m \u001b[31m1.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
+ "\u001b[?25hDownloading pydantic_settings-2.4.0-py3-none-any.whl (23 kB)\n",
+ "Downloading python_dotenv-1.0.1-py3-none-any.whl (19 kB)\n",
+ "Installing collected packages: python-dotenv, pydantic-settings, intermat\n",
+ "Successfully installed intermat-2024.3.24 pydantic-settings-2.4.0 python-dotenv-1.0.1\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "# pos_subs=\"\"\"GaAs\n",
+ "# 1.0\n",
+ "# 3.509895098013499 -6.584084e-10 2.026439508259945\n",
+ "# 1.169965032050413 3.3091606691404545 2.026439508259945\n",
+ "# -1.8622597e-09 -1.3168164e-09 4.052878022970947\n",
+ "# Ga As\n",
+ "# 1 1\n",
+ "# Cartesian\n",
+ "# 0.0 0.0 0.0\n",
+ "# 1.1699675 0.82729 2.02644\n",
+ "# \"\"\"\n",
+ "\n",
+ "# pos_film=\"\"\"Si2\n",
+ "# 1.0\n",
+ "# 3.3641499856336465 -2.5027128e-09 1.94229273881412\n",
+ "# 1.121382991333525 3.1717517190189715 1.9422927388141193\n",
+ "# -2.5909987e-09 -1.8321133e-09 3.884586486670313\n",
+ "# Si\n",
+ "# 2\n",
+ "# Cartesian\n",
+ "# 3.92483875 2.77528125 6.7980237500000005\n",
+ "# 0.56069125 0.39646875 0.9711462500000001\n",
+ "# \"\"\"\n",
+ "# with open('pos_film','w') as f:\n",
+ "# f.write(pos_film)\n",
+ "\n",
+ "# with open('pos_subs','w') as f:\n",
+ "# f.write(pos_subs)\n",
+ "\n",
+ "# from jarvis.db.jsonutils import dumpjson,loadjson\n",
+ "# from jarvis.db.jsonutils import dumpjson\n",
+ "# import plotly.graph_objects as go\n",
+ "\n",
+ "# config = {'calculator_method': 'ewald',\n",
+ "# 'disp_intvl': 0.1,\n",
+ "# 'film_file_path': 'pos_film',\n",
+ "# 'substrate_file_path': 'pos_subs',\n",
+ "# 'film_index': '1_1_0',\n",
+ "# 'substrate_index': '1_1_0'}\n",
+ "\n",
+ "# dumpjson(data=config,filename='config_example2.json')\n",
+ "# !run_intermat.py --config_file config_example2.json >out2\n",
+ "\n",
+ "# res=loadjson('intermat_results.json')"
+ ],
+ "metadata": {
+ "id": "XWx2Suvau3Dc"
+ },
+ "id": "XWx2Suvau3Dc",
+ "execution_count": 4,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "from jarvis.db.jsonutils import dumpjson,loadjson\n",
+ "from jarvis.db.jsonutils import dumpjson\n",
+ "import plotly.graph_objects as go\n",
+ "\n",
+ "config = {'calculator_method': 'ewald',\n",
+ " 'disp_intvl': 0.1,\n",
+ " 'film_index': '0_0_1',\n",
+ " 'film_jid': 'JVASP-670',\n",
+ " 'substrate_index': '0_0_1',\n",
+ " 'dataset':'dft_2d',\n",
+ " 'substrate_jid': 'JVASP-664'}\n",
+ "\n",
+ "dumpjson(data=config,filename='config_example2.json')\n",
+ "!run_intermat.py --config_file config_example2.json >out2\n",
+ "\n",
+ "res=loadjson('intermat_results.json')"
+ ],
+ "metadata": {
+ "id": "gjRSGGmJvLPS",
+ "outputId": "469ee7d0-7e56-4576-8e73-095a712a621e",
+ "colab": {
+ "base_uri": "https://localhost:8080/"
+ }
+ },
+ "id": "gjRSGGmJvLPS",
+ "execution_count": 15,
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "/usr/local/lib/python3.10/dist-packages/spglib/spglib.py:115: DeprecationWarning: dict interface (SpglibDataset['number']) is deprecated.Use attribute interface ({self.__class__.__name__}.{key}) instead\n",
+ " warnings.warn(\n",
+ "/usr/local/lib/python3.10/dist-packages/intermat/generate.py:55: RuntimeWarning: divide by zero encountered in double_scalars\n",
+ " strain_y = (\n",
+ "100% 100/100 [00:03<00:00, 25.66it/s]\n"
+ ]
+ }
+ ]
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "%matplotlib inline\n",
+ "import matplotlib.pyplot as plt\n",
+ "plt.contourf(res['wads'],cmap='plasma')\n",
+ "plt.axis('off')\n"
+ ],
+ "metadata": {
+ "id": "v9EdTNV1vLMU",
+ "outputId": "994bfa21-18ef-457b-acd2-6ca65c2253d6",
+ "colab": {
+ "base_uri": "https://localhost:8080/",
+ "height": 424
+ }
+ },
+ "id": "v9EdTNV1vLMU",
+ "execution_count": 16,
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "data": {
+ "text/plain": [
+ "(0.0, 9.0, 0.0, 9.0)"
+ ]
+ },
+ "metadata": {},
+ "execution_count": 16
+ },
+ {
+ "output_type": "display_data",
+ "data": {
+ "text/plain": [
+ "