From d94b9f3b5da95b5da00b47263a304a7300fdb505 Mon Sep 17 00:00:00 2001 From: yanghan234 Date: Tue, 3 Dec 2024 03:50:21 +0000 Subject: [PATCH] deploy: b57447fd5bdb451ceed70e413adf51e1752b494e --- ..._3.png => examples_phonon_example_7_3.png} | Bin ..._4.png => examples_phonon_example_7_4.png} | Bin _sources/examples/phonon_example.ipynb | 17 ++---- _sources/user_guide/getting_started.rst | 5 +- _sources/user_guide/installation.rst | 5 +- examples/phonon_example.html | 14 ++--- examples/phonon_example.ipynb | 17 ++---- searchindex.js | 2 +- user_guide/getting_started.html | 51 +++++++++--------- user_guide/installation.html | 5 +- 10 files changed, 55 insertions(+), 61 deletions(-) rename _images/{examples_phonon_example_8_3.png => examples_phonon_example_7_3.png} (100%) rename _images/{examples_phonon_example_8_4.png => examples_phonon_example_7_4.png} (100%) diff --git a/_images/examples_phonon_example_8_3.png b/_images/examples_phonon_example_7_3.png similarity index 100% rename from _images/examples_phonon_example_8_3.png rename to _images/examples_phonon_example_7_3.png diff --git a/_images/examples_phonon_example_8_4.png b/_images/examples_phonon_example_7_4.png similarity index 100% rename from _images/examples_phonon_example_8_4.png rename to _images/examples_phonon_example_7_4.png diff --git a/_sources/examples/phonon_example.ipynb b/_sources/examples/phonon_example.ipynb index 4653aa9..bab2964 100644 --- a/_sources/examples/phonon_example.ipynb +++ b/_sources/examples/phonon_example.ipynb @@ -27,18 +27,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "
\n", - " If you see the error information that the ``phonopy`` package is missing, you can install it with\n", - "
" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "
\n", - " ``conda install phonopy -c conda-forge``\n", - "
" + "> If you see the error that the ``phonopy`` package is missing, you can install it with\n", + "> \n", + "> ```bash\n", + "> conda install phonopy -c conda-forge\n", + "> ```" ] }, { diff --git a/_sources/user_guide/getting_started.rst b/_sources/user_guide/getting_started.rst index 5088487..3703b26 100644 --- a/_sources/user_guide/getting_started.rst +++ b/_sources/user_guide/getting_started.rst @@ -43,6 +43,7 @@ a list of structures using the ``Potential`` class. .. code-block:: python :linenos: + import torch import numpy as np from ase.build import bulk from ase.units import GPa @@ -56,7 +57,9 @@ a list of structures using the ``Potential`` class. structures = [si] * 10 # load the model - potential = Potential.load(load_path="/path/to/checkpoint", device="cuda:0") + device = "cuda" if torch.cuda.is_available() else "cpu" + print(f"Running MatterSim on {device}") + potential = Potential.load(device=device) # build the dataloader that is compatible with MatterSim dataloader = build_dataloader(structures, only_inference=True) diff --git a/_sources/user_guide/installation.rst b/_sources/user_guide/installation.rst index 4fc33be..7f575f6 100644 --- a/_sources/user_guide/installation.rst +++ b/_sources/user_guide/installation.rst @@ -33,8 +33,9 @@ To install the package, run the following command under the root of the folder: Please note that the installation process may take a while due to the installation of the dependencies. -For faster installation, we recommend the users to install with [mamba or micromamba](https://mamba.readthedocs.io/en/latest/index.html), -and the [uv](https://docs.astral.sh/uv/) package manager. +For faster installation, we recommend the users to install with +`mamba or micromamba `_, +and the `uv `_ package manager. .. code-block:: console diff --git a/examples/phonon_example.html b/examples/phonon_example.html index bdeba00..3fbf5bb 100644 --- a/examples/phonon_example.html +++ b/examples/phonon_example.html @@ -343,12 +343,12 @@

2. Phonon Dispersion -

If you see the error information that the phonopy package is missing, you can install it with

- -
-../_images/examples_phonon_example_8_4.png +../_images/examples_phonon_example_7_4.png
diff --git a/examples/phonon_example.ipynb b/examples/phonon_example.ipynb index 4653aa9..bab2964 100644 --- a/examples/phonon_example.ipynb +++ b/examples/phonon_example.ipynb @@ -27,18 +27,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "
\n", - " If you see the error information that the ``phonopy`` package is missing, you can install it with\n", - "
" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "
\n", - " ``conda install phonopy -c conda-forge``\n", - "
" + "> If you see the error that the ``phonopy`` package is missing, you can install it with\n", + "> \n", + "> ```bash\n", + "> conda install phonopy -c conda-forge\n", + "> ```" ] }, { diff --git a/searchindex.js b/searchindex.js index c4292a4..d31d11d 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"A minimal example using ASE calculator": [[5, "a-minimal-example-using-ase-calculator"]], "Batch prediction using the Potential class": [[5, "batch-prediction-using-the-potential-class"]], "Bibliography": [[4, "bibliography"]], "Compile the docs": [[0, "compile-the-docs"]], "Examples": [[1, null]], "Frequently Asked Questions": [[4, "frequently-asked-questions"]], "Getting Started": [[5, null]], "Import the necessary modules": [[3, "import-the-necessary-modules"]], "Install from PyPI": [[6, "install-from-pypi"]], "Install from source code": [[6, "install-from-source-code"]], "Installation": [[6, null]], "MatterSim Documentations": [[0, null]], "Model checkpoints": [[6, "model-checkpoints"]], "Overview": [[4, "overview"]], "Phonon Dispersion": [[2, null]], "Pre-trained Models": [[4, "pre-trained-models"]], "Prerequisite": [[0, "prerequisite"]], "Run the relaxation": [[3, "run-the-relaxation"]], "Set up the atomic structure with attached MatterSim Calculator": [[2, "Set-up-the-atomic-structure-with-attached-MatterSim-Calculator"]], "Set up the phonon workflow": [[2, "Set-up-the-phonon-workflow"]], "Set up the structure to relax": [[3, "set-up-the-structure-to-relax"]], "Structure Optimization": [[3, null]], "Welcome to the MatterSim Documentation!": [[4, null]]}, "docnames": ["README", "examples/examples", "examples/phonon_example", "examples/relax_example", "index", "user_guide/getting_started", "user_guide/installation"], "envversion": {"nbsphinx": 4, "sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["README.md", "examples/examples.rst", "examples/phonon_example.ipynb", "examples/relax_example.rst", "index.rst", "user_guide/getting_started.rst", "user_guide/installation.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": 2, "0": [2, 3, 4, 5], "00": 2, "000000": 2, "000004": 2, "01": 2, "02": 2, "04967": 4, "09": 2, "0x79df360c45e0": 2, "1": [2, 3, 5], "10": 5, "100": 2, "115": 2, "12": 2, "1m": [2, 4], "2": [2, 5], "2024": [2, 4], "23": 2, "24": 2, "2405": 4, "2nd": 2, "3": [2, 3, 5], "36": 2, "39": 2, "4": 2, "413": 2, "43": [3, 5], "5": [2, 3, 5], "500": 3, "5m": 4, "6": 2, "63it": 2, "7": 2, "8000": 0, "9": 2, "A": 4, "By": 5, "For": 6, "If": [2, 4], "In": [0, 2, 5, 6], "The": [4, 5, 6], "These": 4, "To": [0, 5, 6], "__class__": 2, "__name__": 2, "_build": 0, "ab": 4, "abov": 5, "accur": 4, "accuraci": 4, "across": 4, "activ": [4, 6], "advanc": 4, "after": 2, "also": 5, "alwai": 4, "amplitud": 2, "an": [4, 5], "andrew": 4, "angstrom": 5, "ani": 4, "api_phonopi": 2, "appli": 3, "applic": [2, 3], "appreci": 4, "appropri": 4, "ar": 4, "architectur": 4, "archiveprefix": 4, "arrai": 5, "art": 4, "articl": 4, "arxiv": 4, "ase": [2, 3, 5], "astral": 6, "atom": [3, 5], "atomist": 4, "attach": 3, "attribut": 2, "author": 4, "autodoc": 0, "avail": 6, "b": 0, "band": 2, "base": 4, "been": 4, "bfg": 3, "brillouin": 2, "brows": 0, "browser": 0, "bug": 4, "build": [0, 2, 3, 5], "build_dataload": 5, "build_ext": 6, "built": 3, "bulk": [2, 3, 5], "c": [0, 2], "calc": [2, 3, 5], "calcul": 3, "can": [0, 2, 4, 5, 6], "case": 6, "cdot": 5, "cell": 3, "chang": 4, "checkpoint": 5, "chen": 4, "chenxi": 4, "chrome": 0, "cite": 4, "class": 3, "claudio": 4, "com": 6, "command": 6, "commandlin": 0, "compat": 5, "comput": 2, "cond": 4, "conda": [0, 2, 6], "config": 2, "constant": 2, "constrain": 3, "constrain_symmetri": 3, "contribut": 4, "convers": 5, "convert": 5, "copybutton": 0, "cpu": 5, "creat": [2, 6], "cuda": 5, "current": [4, 6], "daniel": 4, "dat": 2, "data": 4, "dataload": 5, "dataset": 5, "deep": 4, "default": 5, "deliv": 4, "demonstr": 5, "densiti": 2, "depend": [0, 6], "deprec": 2, "deprecationwarn": 2, "depth": 4, "design": 4, "detail": 4, "develop": 4, "devic": 5, "diag": 2, "diamond": [3, 5], "dict": 2, "directori": 0, "dispers": 1, "displac": 2, "do": 4, "doc": 6, "drift": 2, "due": 6, "e": [0, 6], "edg": 0, "effect": 5, "effici": [4, 5], "element": 4, "els": 5, "en": 6, "enabl": 0, "energi": 5, "env": [2, 6], "environ": [0, 5, 6], "eprint": 4, "error": 2, "etc": 2, "ev": 5, "exampl": 3, "execut": 0, "expcellfilt": 3, "explan": 4, "f": [2, 5, 6], "facilit": 5, "factor": 5, "fals": [2, 5], "faster": [4, 6], "fc": 2, "featur": 4, "field": 4, "figure_format": 2, "file": 2, "filter": 3, "find": 2, "find_prim": 2, "first": 5, "folder": 6, "follow": [0, 2, 4, 5, 6], "forc": [2, 5], "forcefield": [2, 3, 5], "forg": [0, 2], "form": 5, "found": 6, "fowler": 4, "frequenc": 2, "from": [2, 3, 5], "futur": 4, "g": 0, "gener": 4, "get_forc": 5, "get_potential_energi": 5, "get_stress": 5, "git": 6, "github": [4, 6], "gpa": [2, 3, 5], "gpu": 5, "gt": 2, "guanzhi": 4, "ha": 2, "han": 4, "hanyang": 2, "hao": 4, "has_imag": 2, "have": 4, "help": 4, "high": 4, "home": 2, "hongxia": 4, "horton": 4, "how": [3, 4, 5], "howev": 5, "html": [0, 6], "http": [0, 4, 6], "hu": 4, "i": [2, 3, 4, 5], "identifi": 4, "imaginari": 2, "implement": [3, 5], "import": [2, 5], "improv": 4, "inaccur": 4, "includ": 2, "include_forc": 5, "include_stress": 5, "index": 6, "infer": 2, "info": 2, "inform": 2, "initi": 3, "inlinebackend": 2, "inplac": 6, "instal": [0, 2], "instead": 2, "integr": 2, "interfac": [2, 5], "intern": 2, "introduc": 4, "io": 6, "is_avail": 5, "issu": 4, "jake": 4, "jielan": 4, "journal": 4, "jupyt": 0, "kei": 2, "kong": 4, "l": 2, "larg": 5, "larger": 4, "latest": 6, "learn": 4, "len": [3, 5], "leverag": 4, "li": 4, "lib": 2, "line": 2, "lingyu": 4, "list": 5, "liu": 4, "lixin": 4, "load": [2, 5], "load_path": 5, "local": 0, "localhost": 0, "look": 4, "lt": 2, "lu": 4, "m": 0, "m3gnet": 4, "machin": 0, "mai": [0, 4, 6], "make": [4, 5], "mamba": 6, "manag": 6, "manuscript": 4, "markdown": 0, "mat": 4, "materi": 4, "mathr": 5, "mathrm": 5, "matrix": 2, "mattersim": [3, 5, 6], "mattersimcalcul": [2, 3, 5], "matthew": 4, "max": 2, "mesh": 2, "method": [3, 5], "methodologi": 4, "micromamba": 6, "microsoft": [4, 6], "mini": 4, "miniforge3": 2, "minim": 0, "miss": 2, "model": [2, 5], "more": [4, 5], "mtrl": 4, "multipl": 5, "multipli": 5, "nbconvert": 0, "nbsphinx": 0, "need": [0, 4], "newer": 4, "note": 6, "notebook": 0, "np": [2, 3, 5], "number": 2, "numpi": [2, 3, 5], "object": [2, 3], "offer": 4, "one": 5, "onli": 5, "only_infer": 5, "optim": 1, "org": 4, "our": 4, "output": 2, "packag": [2, 5, 6], "pandoc": 0, "paper": 4, "path": 5, "per": 5, "perform": 3, "perturb": 3, "ph": 2, "phonon": 1, "phonon_si_exampl": 2, "phononworkflow": 2, "phonopi": 2, "phonopy_param": 2, "pinsler": 4, "pip": [0, 6], "plan": 4, "pleas": [4, 6], "png": 2, "popular": 5, "port": 0, "posit": 3, "potenti": [2, 3], "pre": 2, "predict_properti": 5, "preprint": 4, "pressur": 4, "primaryclass": 4, "print": [2, 5], "process": 6, "produc": 4, "properti": [4, 5], "provid": [4, 5], "pth": 2, "public": 2, "pull": 4, "py": [2, 6], "python": [0, 6], "python3": [0, 2], "q1": 4, "q2": 4, "q3": 4, "q4": 4, "qian": 4, "qpoint": 2, "rais": 4, "randn": 3, "random": 3, "rang": 4, "read": 0, "readthedoc": 6, "recommend": 6, "recommonmark": 0, "relat": 2, "relaxed_structur": 3, "releas": 4, "repeat": 2, "replic": 5, "repo": 0, "report": 4, "repositori": [4, 6], "request": 4, "research": 4, "result": 4, "retina": 2, "robert": 4, "root": [0, 6], "run": [2, 4, 5, 6], "scale": 5, "sci": 4, "scienc": 4, "see": 2, "self": 2, "server": 0, "set": 5, "setup": 6, "sh": 6, "shi": 4, "shuizhou": 4, "si": [2, 3, 5], "si2": 2, "si2_phonon_band": 2, "si2_phonon_do": 2, "silicon": 3, "simpl": 3, "simul": [4, 5], "singl": 5, "site": 2, "smith": 4, "some": 4, "specif": 4, "spglib": 2, "spglibdataset": 2, "sphinx": 0, "sphinx_book_them": 0, "stai": 4, "start": 0, "state": [2, 4], "std_lattic": 2, "std_posit": 2, "std_rotation_matrix": 2, "std_type": 2, "step": 3, "still": 4, "stress": 5, "structur": [1, 5], "submit": 4, "suggest": 4, "sun": 4, "supercel": 2, "supercell_matrix": 2, "support": [3, 4], "symmetr": 2, "symmetri": 3, "system": 4, "take": 6, "techniqu": 4, "temperatur": 4, "tensor": 5, "test": 2, "thi": [0, 3, 4], "through": 4, "thu": 5, "tian": 4, "time": [4, 5], "titl": 4, "tmp": 2, "tool": 4, "torch": 5, "total": 5, "total_do": 2, "train": 2, "transformation_matrix": 2, "translat": 2, "true": [3, 5], "tune": 4, "two": 4, "typehint": 0, "uncom": 2, "under": [0, 6], "underli": 4, "unexpect": 4, "unit": [2, 3, 5], "up": 5, "updat": 4, "url": 4, "us": [2, 3, 4], "user": 6, "util": 5, "uv": 6, "v1": [2, 4], "valuabl": 4, "version": [4, 6], "view": 2, "viewer": 2, "visual": 2, "voigt": 5, "wai": 5, "wang": 4, "want": 6, "warmli": 4, "warn": 2, "we": [4, 5, 6], "web": 0, "where": 4, "whether": 3, "which": [4, 5], "while": 6, "wide": 4, "work": 4, "work_dir": 2, "workflow": 4, "x3d": 2, "xie": 4, "xixian": 4, "xx": 2, "yaml": [2, 6], "yang": 4, "yang2024mattersim": 4, "ye": 4, "year": 4, "yichi": 4, "you": [0, 2, 4, 6], "your": [0, 4], "yu": 4, "zekun": 4, "zeni": 4, "zhou": 4, "ziheng": 4, "zone": 2, "zz": 2, "z\u00fcgner": 4}, "titles": ["MatterSim Documentations", "Examples", "2. Phonon Dispersion", "1. Structure Optimization", "Welcome to the MatterSim Documentation!", "Getting Started", "Installation"], "titleterms": {"A": 5, "ASE": 5, "ask": 4, "atom": 2, "attach": 2, "batch": 5, "bibliographi": 4, "calcul": [2, 5], "checkpoint": 6, "class": 5, "code": 6, "compil": 0, "dispers": 2, "doc": 0, "document": [0, 4], "exampl": [1, 5], "frequent": 4, "from": 6, "get": 5, "import": 3, "instal": 6, "mattersim": [0, 2, 4], "minim": 5, "model": [4, 6], "modul": 3, "necessari": 3, "optim": 3, "overview": 4, "phonon": 2, "potenti": 5, "pre": 4, "predict": 5, "prerequisit": 0, "pypi": 6, "question": 4, "relax": 3, "run": 3, "set": [2, 3], "sourc": 6, "start": 5, "structur": [2, 3], "train": 4, "up": [2, 3], "us": 5, "welcom": 4, "workflow": 2}}) \ No newline at end of file +Search.setIndex({"alltitles": {"A minimal example using ASE calculator": [[5, "a-minimal-example-using-ase-calculator"]], "Batch prediction using the Potential class": [[5, "batch-prediction-using-the-potential-class"]], "Bibliography": [[4, "bibliography"]], "Compile the docs": [[0, "compile-the-docs"]], "Examples": [[1, null]], "Frequently Asked Questions": [[4, "frequently-asked-questions"]], "Getting Started": [[5, null]], "Import the necessary modules": [[3, "import-the-necessary-modules"]], "Install from PyPI": [[6, "install-from-pypi"]], "Install from source code": [[6, "install-from-source-code"]], "Installation": [[6, null]], "MatterSim Documentations": [[0, null]], "Model checkpoints": [[6, "model-checkpoints"]], "Overview": [[4, "overview"]], "Phonon Dispersion": [[2, null]], "Pre-trained Models": [[4, "pre-trained-models"]], "Prerequisite": [[0, "prerequisite"]], "Run the relaxation": [[3, "run-the-relaxation"]], "Set up the atomic structure with attached MatterSim Calculator": [[2, "Set-up-the-atomic-structure-with-attached-MatterSim-Calculator"]], "Set up the phonon workflow": [[2, "Set-up-the-phonon-workflow"]], "Set up the structure to relax": [[3, "set-up-the-structure-to-relax"]], "Structure Optimization": [[3, null]], "Welcome to the MatterSim Documentation!": [[4, null]]}, "docnames": ["README", "examples/examples", "examples/phonon_example", "examples/relax_example", "index", "user_guide/getting_started", "user_guide/installation"], "envversion": {"nbsphinx": 4, "sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["README.md", "examples/examples.rst", "examples/phonon_example.ipynb", "examples/relax_example.rst", "index.rst", "user_guide/getting_started.rst", "user_guide/installation.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": 2, "0": [2, 3, 4, 5], "00": 2, "000000": 2, "000004": 2, "01": 2, "02": 2, "04967": 4, "09": 2, "0x79df360c45e0": 2, "1": [2, 3, 5], "10": 5, "100": 2, "115": 2, "12": 2, "1m": [2, 4], "2": [2, 5], "2024": [2, 4], "23": 2, "24": 2, "2405": 4, "2nd": 2, "3": [2, 3, 5], "36": 2, "39": 2, "4": 2, "413": 2, "43": [3, 5], "5": [2, 3, 5], "500": 3, "5m": 4, "6": 2, "63it": 2, "7": 2, "8000": 0, "9": 2, "A": 4, "By": 5, "For": 6, "If": [2, 4], "In": [0, 2, 5, 6], "The": [4, 5, 6], "These": 4, "To": [0, 5, 6], "__class__": 2, "__name__": 2, "_build": 0, "ab": 4, "abov": 5, "accur": 4, "accuraci": 4, "across": 4, "activ": [4, 6], "advanc": 4, "after": 2, "also": 5, "alwai": 4, "amplitud": 2, "an": [4, 5], "andrew": 4, "angstrom": 5, "ani": 4, "api_phonopi": 2, "appli": 3, "applic": [2, 3], "appreci": 4, "appropri": 4, "ar": 4, "architectur": 4, "archiveprefix": 4, "arrai": 5, "art": 4, "articl": 4, "arxiv": 4, "ase": [2, 3, 5], "atom": [3, 5], "atomist": 4, "attach": 3, "attribut": 2, "author": 4, "autodoc": 0, "avail": 6, "b": 0, "band": 2, "base": 4, "been": 4, "bfg": 3, "brillouin": 2, "brows": 0, "browser": 0, "bug": 4, "build": [0, 2, 3, 5], "build_dataload": 5, "build_ext": 6, "built": 3, "bulk": [2, 3, 5], "c": [0, 2], "calc": [2, 3, 5], "calcul": 3, "can": [0, 2, 4, 5, 6], "case": 6, "cdot": 5, "cell": 3, "chang": 4, "chen": 4, "chenxi": 4, "chrome": 0, "cite": 4, "class": 3, "claudio": 4, "com": 6, "command": 6, "commandlin": 0, "compat": 5, "comput": 2, "cond": 4, "conda": [0, 2, 6], "config": 2, "constant": 2, "constrain": 3, "constrain_symmetri": 3, "contribut": 4, "convers": 5, "convert": 5, "copybutton": 0, "cpu": 5, "creat": [2, 6], "cuda": 5, "current": [4, 6], "daniel": 4, "dat": 2, "data": 4, "dataload": 5, "dataset": 5, "deep": 4, "default": 5, "deliv": 4, "demonstr": 5, "densiti": 2, "depend": [0, 6], "deprec": 2, "deprecationwarn": 2, "depth": 4, "design": 4, "detail": 4, "develop": 4, "devic": 5, "diag": 2, "diamond": [3, 5], "dict": 2, "directori": 0, "dispers": 1, "displac": 2, "do": 4, "drift": 2, "due": 6, "e": [0, 6], "edg": 0, "effect": 5, "effici": [4, 5], "element": 4, "els": 5, "enabl": 0, "energi": 5, "env": [2, 6], "environ": [0, 5, 6], "eprint": 4, "error": 2, "etc": 2, "ev": 5, "exampl": 3, "execut": 0, "expcellfilt": 3, "explan": 4, "f": [2, 5, 6], "facilit": 5, "factor": 5, "fals": [2, 5], "faster": [4, 6], "fc": 2, "featur": 4, "field": 4, "figure_format": 2, "file": 2, "filter": 3, "find": 2, "find_prim": 2, "first": 5, "folder": 6, "follow": [0, 2, 4, 5, 6], "forc": [2, 5], "forcefield": [2, 3, 5], "forg": [0, 2], "form": 5, "found": 6, "fowler": 4, "frequenc": 2, "from": [2, 3, 5], "futur": 4, "g": 0, "gener": 4, "get_forc": 5, "get_potential_energi": 5, "get_stress": 5, "git": 6, "github": [4, 6], "gpa": [2, 3, 5], "gpu": 5, "gt": 2, "guanzhi": 4, "ha": 2, "han": 4, "hanyang": 2, "hao": 4, "has_imag": 2, "have": 4, "help": 4, "high": 4, "home": 2, "hongxia": 4, "horton": 4, "how": [3, 4, 5], "howev": 5, "html": 0, "http": [0, 4, 6], "hu": 4, "i": [2, 3, 4, 5], "identifi": 4, "imaginari": 2, "implement": [3, 5], "import": [2, 5], "improv": 4, "inaccur": 4, "includ": 2, "include_forc": 5, "include_stress": 5, "infer": 2, "info": 2, "initi": 3, "inlinebackend": 2, "inplac": 6, "instal": [0, 2], "instead": 2, "integr": 2, "interfac": [2, 5], "intern": 2, "introduc": 4, "is_avail": 5, "issu": 4, "jake": 4, "jielan": 4, "journal": 4, "jupyt": 0, "kei": 2, "kong": 4, "l": 2, "larg": 5, "larger": 4, "latest": 6, "learn": 4, "len": [3, 5], "leverag": 4, "li": 4, "lib": 2, "line": 2, "lingyu": 4, "list": 5, "liu": 4, "lixin": 4, "load": [2, 5], "local": 0, "localhost": 0, "look": 4, "lt": 2, "lu": 4, "m": 0, "m3gnet": 4, "machin": 0, "mai": [0, 4, 6], "make": [4, 5], "mamba": 6, "manag": 6, "manuscript": 4, "markdown": 0, "mat": 4, "materi": 4, "mathr": 5, "mathrm": 5, "matrix": 2, "mattersim": [3, 5, 6], "mattersimcalcul": [2, 3, 5], "matthew": 4, "max": 2, "mesh": 2, "method": [3, 5], "methodologi": 4, "micromamba": 6, "microsoft": [4, 6], "mini": 4, "miniforge3": 2, "minim": 0, "miss": 2, "model": [2, 5], "more": [4, 5], "mtrl": 4, "multipl": 5, "multipli": 5, "nbconvert": 0, "nbsphinx": 0, "need": [0, 4], "newer": 4, "note": 6, "notebook": 0, "np": [2, 3, 5], "number": 2, "numpi": [2, 3, 5], "object": [2, 3], "offer": 4, "one": 5, "onli": 5, "only_infer": 5, "optim": 1, "org": 4, "our": 4, "output": 2, "packag": [2, 5, 6], "pandoc": 0, "paper": 4, "per": 5, "perform": 3, "perturb": 3, "ph": 2, "phonon": 1, "phonon_si_exampl": 2, "phononworkflow": 2, "phonopi": 2, "phonopy_param": 2, "pinsler": 4, "pip": [0, 6], "plan": 4, "pleas": [4, 6], "png": 2, "popular": 5, "port": 0, "posit": 3, "potenti": [2, 3], "pre": 2, "predict_properti": 5, "preprint": 4, "pressur": 4, "primaryclass": 4, "print": [2, 5], "process": 6, "produc": 4, "properti": [4, 5], "provid": [4, 5], "pth": 2, "public": 2, "pull": 4, "py": [2, 6], "python": [0, 6], "python3": [0, 2], "q1": 4, "q2": 4, "q3": 4, "q4": 4, "qian": 4, "qpoint": 2, "rais": 4, "randn": 3, "random": 3, "rang": 4, "read": 0, "recommend": 6, "recommonmark": 0, "relat": 2, "relaxed_structur": 3, "releas": 4, "repeat": 2, "replic": 5, "repo": 0, "report": 4, "repositori": [4, 6], "request": 4, "research": 4, "result": 4, "retina": 2, "robert": 4, "root": [0, 6], "run": [2, 4, 5, 6], "scale": 5, "sci": 4, "scienc": 4, "see": 2, "self": 2, "server": 0, "set": 5, "setup": 6, "shi": 4, "shuizhou": 4, "si": [2, 3, 5], "si2": 2, "si2_phonon_band": 2, "si2_phonon_do": 2, "silicon": 3, "simpl": 3, "simul": [4, 5], "singl": 5, "site": 2, "smith": 4, "some": 4, "specif": 4, "spglib": 2, "spglibdataset": 2, "sphinx": 0, "sphinx_book_them": 0, "stai": 4, "start": 0, "state": [2, 4], "std_lattic": 2, "std_posit": 2, "std_rotation_matrix": 2, "std_type": 2, "step": 3, "still": 4, "stress": 5, "structur": [1, 5], "submit": 4, "suggest": 4, "sun": 4, "supercel": 2, "supercell_matrix": 2, "support": [3, 4], "symmetr": 2, "symmetri": 3, "system": 4, "take": 6, "techniqu": 4, "temperatur": 4, "tensor": 5, "test": 2, "thi": [0, 3, 4], "through": 4, "thu": 5, "tian": 4, "time": [4, 5], "titl": 4, "tmp": 2, "tool": 4, "torch": 5, "total": 5, "total_do": 2, "train": 2, "transformation_matrix": 2, "translat": 2, "true": [3, 5], "tune": 4, "two": 4, "typehint": 0, "uncom": 2, "under": [0, 6], "underli": 4, "unexpect": 4, "unit": [2, 3, 5], "up": 5, "updat": 4, "url": 4, "us": [2, 3, 4], "user": 6, "util": 5, "uv": 6, "v1": [2, 4], "valuabl": 4, "version": [4, 6], "view": 2, "viewer": 2, "visual": 2, "voigt": 5, "wai": 5, "wang": 4, "want": 6, "warmli": 4, "warn": 2, "we": [4, 5, 6], "web": 0, "where": 4, "whether": 3, "which": [4, 5], "while": 6, "wide": 4, "work": 4, "work_dir": 2, "workflow": 4, "x3d": 2, "xie": 4, "xixian": 4, "xx": 2, "yaml": [2, 6], "yang": 4, "yang2024mattersim": 4, "ye": 4, "year": 4, "yichi": 4, "you": [0, 2, 4, 6], "your": [0, 4], "yu": 4, "zekun": 4, "zeni": 4, "zhou": 4, "ziheng": 4, "zone": 2, "zz": 2, "z\u00fcgner": 4}, "titles": ["MatterSim Documentations", "Examples", "2. Phonon Dispersion", "1. Structure Optimization", "Welcome to the MatterSim Documentation!", "Getting Started", "Installation"], "titleterms": {"A": 5, "ASE": 5, "ask": 4, "atom": 2, "attach": 2, "batch": 5, "bibliographi": 4, "calcul": [2, 5], "checkpoint": 6, "class": 5, "code": 6, "compil": 0, "dispers": 2, "doc": 0, "document": [0, 4], "exampl": [1, 5], "frequent": 4, "from": 6, "get": 5, "import": 3, "instal": 6, "mattersim": [0, 2, 4], "minim": 5, "model": [4, 6], "modul": 3, "necessari": 3, "optim": 3, "overview": 4, "phonon": 2, "potenti": 5, "pre": 4, "predict": 5, "prerequisit": 0, "pypi": 6, "question": 4, "relax": 3, "run": 3, "set": [2, 3], "sourc": 6, "start": 5, "structur": [2, 3], "train": 4, "up": [2, 3], "us": 5, "welcom": 4, "workflow": 2}}) \ No newline at end of file diff --git a/user_guide/getting_started.html b/user_guide/getting_started.html index cb190cd..6d5ae24 100644 --- a/user_guide/getting_started.html +++ b/user_guide/getting_started.html @@ -360,32 +360,35 @@

Batch prediction using the predict_properties method. In the following example, we demonstrate how to predict the properties of a list of structures using the Potential class.

-
 1import numpy as np
- 2from ase.build import bulk
- 3from ase.units import GPa
- 4from mattersim.forcefield.potential import Potential
- 5from mattersim.datasets.utils.build import build_dataloader
- 6
- 7# set up the structure
- 8si = bulk("Si", "diamond", a=5.43)
- 9
-10# replicate the structures to form a list
-11structures = [si] * 10
-12
-13# load the model
-14potential = Potential.load(load_path="/path/to/checkpoint", device="cuda:0")
-15
-16# build the dataloader that is compatible with MatterSim
-17dataloader = build_dataloader(structures, only_inference=True)
+
 1import torch
+ 2import numpy as np
+ 3from ase.build import bulk
+ 4from ase.units import GPa
+ 5from mattersim.forcefield.potential import Potential
+ 6from mattersim.datasets.utils.build import build_dataloader
+ 7
+ 8# set up the structure
+ 9si = bulk("Si", "diamond", a=5.43)
+10
+11# replicate the structures to form a list
+12structures = [si] * 10
+13
+14# load the model
+15device = "cuda" if torch.cuda.is_available() else "cpu"
+16print(f"Running MatterSim on {device}")
+17potential = Potential.load(device=device)
 18
-19# make predictions
-20predictions = potential.predict_properties(dataloader, include_forces=True, include_stresses=True)
+19# build the dataloader that is compatible with MatterSim
+20dataloader = build_dataloader(structures, only_inference=True)
 21
-22# print the predictions
-23print(f"Total energy in eV: {predictions[0]}")
-24print(f"Forces in eV/Angstrom: {predictions[1]}")
-25print(f"Stresses in GPa: {predictions[2]}")
-26print(f"Stresses in eV/A^3: {np.array(predictions[2])*GPa}")
+22# make predictions
+23predictions = potential.predict_properties(dataloader, include_forces=True, include_stresses=True)
+24
+25# print the predictions
+26print(f"Total energy in eV: {predictions[0]}")
+27print(f"Forces in eV/Angstrom: {predictions[1]}")
+28print(f"Stresses in GPa: {predictions[2]}")
+29print(f"Stresses in eV/A^3: {np.array(predictions[2])*GPa}")
 
diff --git a/user_guide/installation.html b/user_guide/installation.html index 3b5b505..df0fc21 100644 --- a/user_guide/installation.html +++ b/user_guide/installation.html @@ -348,8 +348,9 @@

Install from source codehttps://mamba.readthedocs.io/en/latest/index.html), -and the [uv](https://docs.astral.sh/uv/) package manager.

+For faster installation, we recommend the users to install with +mamba or micromamba, +and the uv package manager.

mamba env create -f environment.yaml
 mamba activate mattersim
 uv pip install -e .