Skip to content

Commit

Permalink
pre-commit run --all-files
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Feb 8, 2024
1 parent 3ab365d commit 025a46a
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 78 deletions.
2 changes: 1 addition & 1 deletion chgnet/utils/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def read_json(filepath: str) -> dict:
filepath (str): file name of json to read.
Returns:
dictionary stored in fjson
dict: data stored in filepath
"""
with open(filepath) as file:
return json.load(file)
Expand Down
42 changes: 21 additions & 21 deletions examples/basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "f8c75a16",
"id": "0",
"metadata": {},
"source": [
"# This notebook shows example to load the CHGNet for prediction\n"
Expand All @@ -11,7 +11,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "87432e22",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -25,7 +25,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7ead933c",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -42,7 +42,7 @@
},
{
"cell_type": "markdown",
"id": "16eeae1e",
"id": "3",
"metadata": {},
"source": [
"### Read structure from a json or cif file\n"
Expand All @@ -51,7 +51,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "208fa4aa",
"id": "4",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -94,7 +94,7 @@
},
{
"cell_type": "markdown",
"id": "abcc09b4",
"id": "5",
"metadata": {},
"source": [
"### Define Model\n"
Expand All @@ -103,7 +103,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c04a0993",
"id": "6",
"metadata": {},
"outputs": [
{
Expand All @@ -123,7 +123,7 @@
},
{
"cell_type": "markdown",
"id": "961d51fc",
"id": "7",
"metadata": {},
"source": [
"# Predict energy, force, stress, magmom\n"
Expand All @@ -132,7 +132,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2c7c1997",
"id": "8",
"metadata": {
"pycharm": {
"name": "#%%\n"
Expand Down Expand Up @@ -181,7 +181,7 @@
},
{
"cell_type": "markdown",
"id": "2258f2f5",
"id": "9",
"metadata": {},
"source": [
"# Structure Optimization\n"
Expand All @@ -190,7 +190,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "27dac383",
"id": "10",
"metadata": {},
"outputs": [
{
Expand All @@ -211,7 +211,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "04bc3159",
"id": "11",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -270,7 +270,7 @@
},
{
"cell_type": "markdown",
"id": "06f7e84c",
"id": "12",
"metadata": {},
"source": [
"# Molecular Dynamics\n"
Expand All @@ -279,7 +279,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1a59a5b5",
"id": "13",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -316,7 +316,7 @@
},
{
"cell_type": "markdown",
"id": "c6a10ec8",
"id": "14",
"metadata": {},
"source": [
"# Magmom Visualization\n"
Expand All @@ -325,7 +325,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2d5c2f93",
"id": "15",
"metadata": {},
"outputs": [
{
Expand All @@ -344,7 +344,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "db4c9f16",
"id": "16",
"metadata": {},
"outputs": [
{
Expand All @@ -368,7 +368,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a0fe8e50",
"id": "17",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -784,7 +784,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c96fb111",
"id": "18",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -797,7 +797,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "71ac47b1",
"id": "19",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1862,7 +1862,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.11.7"
}
},
"nbformat": 4,
Expand Down
20 changes: 10 additions & 10 deletions examples/crystaltoolkit_relax_viewer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"attachments": {},
"cell_type": "markdown",
"id": "f8c75a16",
"id": "0",
"metadata": {},
"source": [
"# Crystaltoolkit Relaxation Viewer\n",
Expand All @@ -14,7 +14,7 @@
{
"attachments": {},
"cell_type": "markdown",
"id": "a51da8f4",
"id": "1",
"metadata": {},
"source": [
"Running the last cell in this notebook should spin up a `dash` app that looks like this:\n",
Expand All @@ -25,7 +25,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "156e8031",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -42,7 +42,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7ead933c",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -53,7 +53,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e6792912",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -72,7 +72,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "208fa4aa",
"id": "5",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -100,7 +100,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5d6e9fcc",
"id": "6",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -218,7 +218,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c04ebd43",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -235,7 +235,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e7a91576",
"id": "8",
"metadata": {},
"outputs": [
{
Expand All @@ -256,7 +256,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c9f16422",
"id": "9",
"metadata": {},
"outputs": [
{
Expand Down
Loading

0 comments on commit 025a46a

Please sign in to comment.