Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment/various-relaxations #107

Draft
wants to merge 23 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -6,6 +6,7 @@ Below, we list the contents of this repository, in roughly the order that a user

| Folder | Notebook | Description |
| ------------------|-----------------------------------------| ----------- |

| [Examples/System](examples/system/) | [Get Authentication Params](examples/system/get_authentication_params.ipynb) | Demonstrates how to programatically find your user ID and access token, which is to [authenticate](https://docs.mat3ra.com/rest-api/authentication/) for many portions of the Mat3ra API.
| [Examples/Workflow](examples/workflow/) | [Get Workflows](examples/workflow/get_workflows.ipynb) | Walks through how to [query](https://docs.mat3ra.com/rest-api/query-structure/) the Mat3ra API to programatically search for workflows. In this example, we search for workflows that calculate the total energy of a material.
| [Examples/Workflow](examples/workflow/) | [Quantum Espresso Workflow and Job](examples/workflow/qe_scf_calculation.ipynb) | Create Quantum Espresso workflow starting from QE input file; create and submit job; after the job is finished, download output file, and finally perform postprocessing analysis.
Expand Down
1 change: 1 addition & 0 deletions other/materials_designer/BN.json
@@ -0,0 +1 @@
{"lattice":{"a":2.508995,"b":2.508995,"c":7.71,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"},"type":"HEX","vectors":{"a":[2.508995,0,0],"b":[-1.254498,2.172854,0],"c":[0,0,7.71],"alat":1,"units":"angstrom"}},"basis":{"elements":[{"id":0,"value":"B"},{"id":1,"value":"N"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.333333,0.666667,0]}],"units":"crystal","cell":[[2.50899515,0,1.5363164397618668e-16],[-1.2544975749999998,2.1728535378719482,1.5363164397618668e-16],[0,0,7.71]],"constraints":[]},"name":"h-BN (mp-984)","isNonPeriodic":false,"external":{"id":"mp-984","source":"materials project","doi":"10.17188/1281942","url":"https://next-gen.materialsproject.org/materials/mp-984/","origin":true}}
1 change: 1 addition & 0 deletions other/materials_designer/Gr.json
@@ -0,0 +1 @@
{"lattice":{"a":2.467291,"b":2.467291,"c":20,"alpha":90,"beta":90,"gamma":120,"units":{"length":"angstrom","angle":"degree"},"type":"HEX","vectors":{"a":[2.467291,0,0],"b":[-1.233645,2.136737,0],"c":[0,0,20],"alat":1,"units":"angstrom"}},"basis":{"elements":[{"id":0,"value":"C"},{"id":1,"value":"C"}],"coordinates":[{"id":0,"value":[0,0,0]},{"id":1,"value":[0.333333,0.666667,0]}],"units":"crystal","cell":[[2.467291,0,1.5107800128575361e-16],[-1.2336454999999997,2.1367366845287115,1.5107800128575361e-16],[0,0,20]],"constraints":[]},"name":"Graphene (mp-1040425)","isNonPeriodic":false,"external":{"id":"mp-1040425","source":"materials project","doi":"10.17188/1405723","url":"https://next-gen.materialsproject.org/materials/mp-1040425/","origin":true},"isUpdated":true}
1 change: 1 addition & 0 deletions other/materials_designer/Ni.json
@@ -0,0 +1 @@
{"name":"Ni (mp-23)","basis":{"elements":[{"id":0,"value":"Ni"}],"coordinates":[{"id":0,"value":[0,0,0]}],"units":"crystal","cell":[[2.130422493309719,0,1.2300000000000002],[0.7101408311032398,2.008581589082206,1.2300000000000002],[0,0,2.46]],"constraints":[{"id":0,"value":[true,true,true]}]},"lattice":{"a":2.46,"b":2.46,"c":2.46,"alpha":60,"beta":60,"gamma":60,"units":{"length":"angstrom","angle":"degree"},"type":"FCC","vectors":{"a":[2.130422,0,1.23],"b":[0.7101408,2.008582,1.23],"c":[0,0,2.46],"alat":1,"units":"angstrom"}},"isNonPeriodic":false,"external":{"id":"mp-224","source":"materials project","doi":"10.17188/1199153","url":"https://next-gen.materialsproject.org/materials/mp-23/","origin":true},"isUpdated":true}
15 changes: 15 additions & 0 deletions other/materials_designer/calculator_pickle.py
@@ -0,0 +1,15 @@
import matgl
from matgl.ext.ase import M3GNetCalculator
from matgl.ext.ase import M3GNetCalculator

import cloudpickle

pot = matgl.load_model("M3GNet-MP-2021.2.8-PES")

# Save the calculator to pickle for use in the Pyodide environment
calculator = M3GNetCalculator(pot)
print(calculator)

with open("m3gnet_calculator_3.11_32.pkl", "wb") as f:
cloudpickle.dump(calculator, f, protocol=3)