Atomistic simulation introduction

What is “atomistic simulation”, and what can be done with it? This section provides an overview.

Various properties of materials can be explained at the atomic level. For example, mechanical properties (elastic constants, Young’s modulus, etc.), thermophysical properties (specific heat, etc.), viscosity, chemical reactions, etc. Atomistic simulations can be used to reproduce how atoms move or to analyze how atoms are arranged in nature.

We will explain the detail gradually, but for now, let’s start with the following code.

Initial setup

The libraries required to run this tutorial can be installed by executing the following command in the Matlantis system.

  • pfp-api-client

  • matlantis-features

  • pfcc-extras

are provided only inside Matlantis system.

※For pfcc-extras, please copy the package from “package launcher”, and install it by following the README.md located inside. ※After installing these libraries, you may need to restart the kernel to reflect the installation. If the subsequent import fails despite the installation succeeded log, try restarting the kernel by selecting “Restart kernel…” from the top tab.

[1]:
!pip install -U pfp-api-client matlantis-features pfcc-extras
# !pip install -e ../pfcc-extras  # please specify the path
Looking in indexes: https://pypi.org/simple, http://pypi.artifact.svc:8080/simple
Requirement already satisfied: pfp-api-client in /home/jovyan/.py313/lib/python3.13/site-packages (2.6.1)
Requirement already satisfied: matlantis-features in /home/jovyan/.py313/lib/python3.13/site-packages (1.2.2)
Requirement already satisfied: pfcc-extras in /home/jovyan/.py313/lib/python3.13/site-packages (0.14.0)
Requirement already satisfied: ase<4.0.0,>=3.25.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pfp-api-client) (3.27.0)
Requirement already satisfied: numpy<3.0.0,>=2.0.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pfp-api-client) (2.2.6)
Requirement already satisfied: grpcio<2.0.0,>=1.70.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pfp-api-client) (1.76.0)
Requirement already satisfied: protobuf<7.0.0,>=5.29.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pfp-api-client) (5.29.5)
Requirement already satisfied: googleapis-common-protos<2.0.0,>=1.60.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pfp-api-client) (1.72.0)
Requirement already satisfied: scipy>=1.8.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from ase<4.0.0,>=3.25.0->pfp-api-client) (1.18.0)
Requirement already satisfied: matplotlib>=3.5.2 in /home/jovyan/.py313/lib/python3.13/site-packages (from ase<4.0.0,>=3.25.0->pfp-api-client) (3.11.1)
Requirement already satisfied: typing-extensions~=4.12 in /home/jovyan/.py313/lib/python3.13/site-packages (from grpcio<2.0.0,>=1.70.0->pfp-api-client) (4.16.0)
Requirement already satisfied: pandas>=1.2.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (3.0.5)
Requirement already satisfied: rdkit<=2026.9.1,>=2025.3.4 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (2026.9.1)
Requirement already satisfied: pymatgen>=2026.3.23 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (2026.5.4)
Requirement already satisfied: pyyaml>=5.4.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (6.0.3)
Requirement already satisfied: tqdm>=4.62.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (4.70.0)
Requirement already satisfied: seekpath==2.2.2 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (2.2.2)
Requirement already satisfied: ga4mp==2.0.4 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (2.0.4)
Requirement already satisfied: plotly>=6.1.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (7.2.0)
Requirement already satisfied: kaleido in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (0.2.1)
Requirement already satisfied: anywidget in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (0.9.21)
Requirement already satisfied: reactionstring<0.7.0,>=0.6.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (0.6.0)
Requirement already satisfied: restscan<0.4.0,>=0.3.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from matlantis-features) (0.3.0)
Requirement already satisfied: packaging in /home/jovyan/.py313/lib/python3.13/site-packages (from seekpath==2.2.2->matlantis-features) (26.2)
Requirement already satisfied: spglib>=1.14.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from seekpath==2.2.2->matlantis-features) (2.7.0)
Requirement already satisfied: Pillow in /home/jovyan/.py313/lib/python3.13/site-packages (from rdkit<=2026.9.1,>=2025.3.4->matlantis-features) (12.3.0)
Requirement already satisfied: more-itertools in /home/jovyan/.py313/lib/python3.13/site-packages (from reactionstring<0.7.0,>=0.6.0->matlantis-features) (10.8.0)
Requirement already satisfied: networkx in /home/jovyan/.py313/lib/python3.13/site-packages (from reactionstring<0.7.0,>=0.6.0->matlantis-features) (3.6.1)
Requirement already satisfied: pycryptodomex in /home/jovyan/.py313/lib/python3.13/site-packages (from reactionstring<0.7.0,>=0.6.0->matlantis-features) (3.23.0)
Requirement already satisfied: requests>=2.4.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from reactionstring<0.7.0,>=0.6.0->matlantis-features) (2.34.2)
Requirement already satisfied: nglview in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from pfcc-extras) (4.0)
Requirement already satisfied: ipywidgets in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (8.1.5)
Requirement already satisfied: numpngw in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (0.1.4)
Requirement already satisfied: joblib in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (1.5.3)
Requirement already satisfied: scikit-learn>=1.4 in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (1.7.2)
Requirement already satisfied: statsmodels in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (0.15.0)
Requirement already satisfied: optuna>=3.1.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (4.9.0)
Requirement already satisfied: pymatgen-core in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (2026.7.27)
Requirement already satisfied: pymatgen-analysis-defects in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (2025.9.26)
Requirement already satisfied: mp-api in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (0.46.2)
Requirement already satisfied: orjson in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (3.11.9)
Requirement already satisfied: mdtraj in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (1.11.1.post1)
Requirement already satisfied: MDAnalysis in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (2.10.0)
Requirement already satisfied: pytz in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (2025.2)
Requirement already satisfied: psutil in /home/jovyan/.py313/lib/python3.13/site-packages (from pfcc-extras) (7.2.2)
Requirement already satisfied: nbformat in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from pfcc-extras) (5.10.4)
Requirement already satisfied: contourpy>=1.0.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from matplotlib>=3.5.2->ase<4.0.0,>=3.25.0->pfp-api-client) (1.3.3)
Requirement already satisfied: cycler>=0.10 in /home/jovyan/.py313/lib/python3.13/site-packages (from matplotlib>=3.5.2->ase<4.0.0,>=3.25.0->pfp-api-client) (0.12.1)
Requirement already satisfied: fonttools>=4.28.2 in /home/jovyan/.py313/lib/python3.13/site-packages (from matplotlib>=3.5.2->ase<4.0.0,>=3.25.0->pfp-api-client) (4.63.0)
Requirement already satisfied: kiwisolver>=1.3.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from matplotlib>=3.5.2->ase<4.0.0,>=3.25.0->pfp-api-client) (1.5.0)
Requirement already satisfied: pyparsing>=3 in /home/jovyan/.py313/lib/python3.13/site-packages (from matplotlib>=3.5.2->ase<4.0.0,>=3.25.0->pfp-api-client) (3.3.2)
Requirement already satisfied: python-dateutil>=2.7 in /home/jovyan/.py313/lib/python3.13/site-packages (from matplotlib>=3.5.2->ase<4.0.0,>=3.25.0->pfp-api-client) (2.9.0.post0)
Requirement already satisfied: alembic>=1.5.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from optuna>=3.1.0->pfcc-extras) (1.17.2)
Requirement already satisfied: colorlog in /home/jovyan/.py313/lib/python3.13/site-packages (from optuna>=3.1.0->pfcc-extras) (6.10.1)
Requirement already satisfied: sqlalchemy>=1.4.2 in /home/jovyan/.py313/lib/python3.13/site-packages (from optuna>=3.1.0->pfcc-extras) (2.0.44)
Requirement already satisfied: Mako in /home/jovyan/.py313/lib/python3.13/site-packages (from alembic>=1.5.0->optuna>=3.1.0->pfcc-extras) (1.3.10)
Requirement already satisfied: narwhals>=1.15.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from plotly>=6.1.1->matlantis-features) (2.24.0)
Requirement already satisfied: bibtexparser in /home/jovyan/.py313/lib/python3.13/site-packages (from pymatgen-core->pfcc-extras) (1.4.4)
Requirement already satisfied: lxml>=6.1.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pymatgen-core->pfcc-extras) (6.1.1)
Requirement already satisfied: monty>=2026.7.16 in /home/jovyan/.py313/lib/python3.13/site-packages (from pymatgen-core->pfcc-extras) (2026.7.16)
Requirement already satisfied: palettable>=3.3.3 in /home/jovyan/.py313/lib/python3.13/site-packages (from pymatgen-core->pfcc-extras) (3.3.3)
Requirement already satisfied: sympy>=1.3 in /home/jovyan/.py313/lib/python3.13/site-packages (from pymatgen-core->pfcc-extras) (1.14.0)
Requirement already satisfied: tabulate>=0.9.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pymatgen-core->pfcc-extras) (0.10.0)
Requirement already satisfied: uncertainties>=3.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from pymatgen-core->pfcc-extras) (3.2.3)
Requirement already satisfied: ruamel.yaml in /home/jovyan/.py313/lib/python3.13/site-packages (from monty>=2026.7.16->pymatgen-core->pfcc-extras) (0.19.1)
Requirement already satisfied: six>=1.5 in /home/jovyan/.py313/lib/python3.13/site-packages (from python-dateutil>=2.7->matplotlib>=3.5.2->ase<4.0.0,>=3.25.0->pfp-api-client) (1.17.0)
Requirement already satisfied: charset_normalizer<4,>=2 in /home/jovyan/.py313/lib/python3.13/site-packages (from requests>=2.4.0->reactionstring<0.7.0,>=0.6.0->matlantis-features) (3.4.9)
Requirement already satisfied: idna<4,>=2.5 in /home/jovyan/.py313/lib/python3.13/site-packages (from requests>=2.4.0->reactionstring<0.7.0,>=0.6.0->matlantis-features) (3.18)
Requirement already satisfied: urllib3<3,>=1.26 in /home/jovyan/.py313/lib/python3.13/site-packages (from requests>=2.4.0->reactionstring<0.7.0,>=0.6.0->matlantis-features) (2.7.0)
Requirement already satisfied: certifi>=2023.5.7 in /home/jovyan/.py313/lib/python3.13/site-packages (from requests>=2.4.0->reactionstring<0.7.0,>=0.6.0->matlantis-features) (2026.7.22)
Requirement already satisfied: threadpoolctl>=3.1.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from scikit-learn>=1.4->pfcc-extras) (3.6.0)
Requirement already satisfied: greenlet>=1 in /home/jovyan/.py313/lib/python3.13/site-packages (from sqlalchemy>=1.4.2->optuna>=3.1.0->pfcc-extras) (3.2.4)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from sympy>=1.3->pymatgen-core->pfcc-extras) (1.3.0)
Requirement already satisfied: psygnal>=0.8.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from anywidget->matlantis-features) (0.15.0)
Requirement already satisfied: comm>=0.1.3 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipywidgets->pfcc-extras) (0.2.3)
Requirement already satisfied: ipython>=6.1.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipywidgets->pfcc-extras) (9.7.0)
Requirement already satisfied: traitlets>=4.3.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipywidgets->pfcc-extras) (5.14.3)
Requirement already satisfied: widgetsnbextension~=4.0.12 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipywidgets->pfcc-extras) (4.0.15)
Requirement already satisfied: jupyterlab-widgets~=3.0.12 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipywidgets->pfcc-extras) (3.0.16)
Requirement already satisfied: decorator>=4.3.2 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipython>=6.1.0->ipywidgets->pfcc-extras) (5.2.1)
Requirement already satisfied: ipython-pygments-lexers>=1.0.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipython>=6.1.0->ipywidgets->pfcc-extras) (1.1.1)
Requirement already satisfied: jedi>=0.18.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipython>=6.1.0->ipywidgets->pfcc-extras) (0.19.2)
Requirement already satisfied: matplotlib-inline>=0.1.5 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipython>=6.1.0->ipywidgets->pfcc-extras) (0.2.1)
Requirement already satisfied: pexpect>4.3 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipython>=6.1.0->ipywidgets->pfcc-extras) (4.9.0)
Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipython>=6.1.0->ipywidgets->pfcc-extras) (3.0.52)
Requirement already satisfied: pygments>=2.11.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipython>=6.1.0->ipywidgets->pfcc-extras) (2.19.2)
Requirement already satisfied: stack_data>=0.6.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from ipython>=6.1.0->ipywidgets->pfcc-extras) (0.6.3)
Requirement already satisfied: wcwidth in /home/jovyan/.py313/lib/python3.13/site-packages (from prompt_toolkit<3.1.0,>=3.0.41->ipython>=6.1.0->ipywidgets->pfcc-extras) (0.2.14)
Requirement already satisfied: parso<0.9.0,>=0.8.4 in /home/jovyan/.py313/lib/python3.13/site-packages (from jedi>=0.18.1->ipython>=6.1.0->ipywidgets->pfcc-extras) (0.8.5)
Requirement already satisfied: ptyprocess>=0.5 in /home/jovyan/.py313/lib/python3.13/site-packages (from pexpect>4.3->ipython>=6.1.0->ipywidgets->pfcc-extras) (0.7.0)
Requirement already satisfied: executing>=1.2.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->pfcc-extras) (2.2.1)
Requirement already satisfied: asttokens>=2.1.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->pfcc-extras) (3.0.1)
Requirement already satisfied: pure-eval in /home/jovyan/.py313/lib/python3.13/site-packages (from stack_data>=0.6.0->ipython>=6.1.0->ipywidgets->pfcc-extras) (0.2.3)
Requirement already satisfied: MarkupSafe>=0.9.2 in /home/jovyan/.py313/lib/python3.13/site-packages (from Mako->alembic>=1.5.0->optuna>=3.1.0->pfcc-extras) (3.0.3)
Requirement already satisfied: GridDataFormats>=0.4.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from MDAnalysis->pfcc-extras) (1.1.0)
Requirement already satisfied: mmtf-python>=1.0.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from MDAnalysis->pfcc-extras) (1.1.3)
Requirement already satisfied: filelock in /home/jovyan/.py313/lib/python3.13/site-packages (from MDAnalysis->pfcc-extras) (3.20.3)
Requirement already satisfied: mda-xdrlib in /home/jovyan/.py313/lib/python3.13/site-packages (from MDAnalysis->pfcc-extras) (0.2.0)
Requirement already satisfied: mrcfile in /home/jovyan/.py313/lib/python3.13/site-packages (from GridDataFormats>=0.4.0->MDAnalysis->pfcc-extras) (1.5.4)
Requirement already satisfied: msgpack>=1.0.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from mmtf-python>=1.0.0->MDAnalysis->pfcc-extras) (1.1.2)
Requirement already satisfied: emmet-core<0.87.2,>=0.87.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from mp-api->pfcc-extras) (0.87.0)
Requirement already satisfied: boto3 in /home/jovyan/.py313/lib/python3.13/site-packages (from mp-api->pfcc-extras) (1.41.0)
Requirement already satisfied: pyarrow>=20.0.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from mp-api->pfcc-extras) (24.0.0)
Requirement already satisfied: deltalake<1.6.0,>=1.4.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from mp-api->pfcc-extras) (1.5.1)
Requirement already satisfied: arro3-core>=0.5.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from deltalake<1.6.0,>=1.4.0->mp-api->pfcc-extras) (0.8.0)
Requirement already satisfied: deprecated>=1.2.18 in /home/jovyan/.py313/lib/python3.13/site-packages (from deltalake<1.6.0,>=1.4.0->mp-api->pfcc-extras) (1.3.1)
Requirement already satisfied: pydantic>=2.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (2.14.3)
Requirement already satisfied: pydantic-settings>=2.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (2.12.0)
Requirement already satisfied: pymatgen-io-validation>=0.1.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (0.1.2)
Requirement already satisfied: pybtex~=0.24 in /home/jovyan/.py313/lib/python3.13/site-packages (from emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (0.25.1)
Requirement already satisfied: blake3 in /home/jovyan/.py313/lib/python3.13/site-packages (from emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (1.0.8)
Requirement already satisfied: inflect in /home/jovyan/.py313/lib/python3.13/site-packages (from emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (7.5.0)
Requirement already satisfied: pubchempy in /home/jovyan/.py313/lib/python3.13/site-packages (from emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (1.0.5)
Requirement already satisfied: latexcodec>=1.0.4 in /home/jovyan/.py313/lib/python3.13/site-packages (from pybtex~=0.24->emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (3.0.1)
Requirement already satisfied: wrapt<3,>=1.10 in /home/jovyan/.py313/lib/python3.13/site-packages (from deprecated>=1.2.18->deltalake<1.6.0,>=1.4.0->mp-api->pfcc-extras) (2.0.1)
Requirement already satisfied: annotated-types>=0.6.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pydantic>=2.0->emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (0.7.0)
Requirement already satisfied: pydantic-core==2.50.4 in /home/jovyan/.py313/lib/python3.13/site-packages (from pydantic>=2.0->emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (2.50.4)
Requirement already satisfied: typing-inspection>=0.4.4 in /home/jovyan/.py313/lib/python3.13/site-packages (from pydantic>=2.0->emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (0.4.5)
Requirement already satisfied: python-dotenv>=0.21.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from pydantic-settings>=2.0->emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (1.2.1)
Requirement already satisfied: botocore<1.42.0,>=1.41.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from boto3->mp-api->pfcc-extras) (1.41.0)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from boto3->mp-api->pfcc-extras) (1.0.1)
Requirement already satisfied: s3transfer<0.15.0,>=0.14.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from boto3->mp-api->pfcc-extras) (0.14.0)
Requirement already satisfied: typeguard>=4.0.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from inflect->emmet-core<0.87.2,>=0.87.0->mp-api->pfcc-extras) (4.5.2)
Requirement already satisfied: fastjsonschema>=2.15 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbformat->pfcc-extras) (2.21.1)
Requirement already satisfied: jsonschema>=2.6 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbformat->pfcc-extras) (4.23.0)
Requirement already satisfied: jupyter-core!=5.0.*,>=4.12 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbformat->pfcc-extras) (5.7.2)
Requirement already satisfied: attrs>=22.2.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jsonschema>=2.6->nbformat->pfcc-extras) (25.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jsonschema>=2.6->nbformat->pfcc-extras) (2024.10.1)
Requirement already satisfied: referencing>=0.28.4 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jsonschema>=2.6->nbformat->pfcc-extras) (0.36.2)
Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jsonschema>=2.6->nbformat->pfcc-extras) (0.23.1)
Requirement already satisfied: platformdirs>=2.5 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-core!=5.0.*,>=4.12->nbformat->pfcc-extras) (4.3.6)
Requirement already satisfied: notebook>=7 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nglview->pfcc-extras) (7.3.2)
Requirement already satisfied: jupyterlab>=3 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nglview->pfcc-extras) (4.3.5)
Requirement already satisfied: async-lru>=1.0.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (2.0.4)
Requirement already satisfied: httpx>=0.25.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (0.28.1)
Requirement already satisfied: ipykernel>=6.5.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (6.29.2)
Requirement already satisfied: jinja2>=3.0.3 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (3.1.5)
Requirement already satisfied: jupyter-lsp>=2.0.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (2.2.5)
Requirement already satisfied: jupyter-server<3,>=2.4.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (2.15.0)
Requirement already satisfied: jupyterlab-server<3,>=2.27.1 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (2.27.3)
Requirement already satisfied: notebook-shim>=0.2 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (0.2.4)
Requirement already satisfied: setuptools>=40.8.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (80.9.0)
Requirement already satisfied: tornado>=6.2.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab>=3->nglview->pfcc-extras) (6.4.2)
Requirement already satisfied: anyio>=3.1.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (4.8.0)
Requirement already satisfied: argon2-cffi>=21.1 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (23.1.0)
Requirement already satisfied: jupyter-client>=7.4.4 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (8.6.3)
Requirement already satisfied: jupyter-events>=0.11.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.12.0)
Requirement already satisfied: jupyter-server-terminals>=0.4.4 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.5.3)
Requirement already satisfied: nbconvert>=6.4.4 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (6.5.3)
Requirement already satisfied: overrides>=5.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (7.7.0)
Requirement already satisfied: prometheus-client>=0.9 in /home/jovyan/.py313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.26.0)
Requirement already satisfied: pyzmq>=24 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (26.2.1)
Requirement already satisfied: send2trash>=1.8.2 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (1.8.3)
Requirement already satisfied: terminado>=0.8.3 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.18.1)
Requirement already satisfied: websocket-client>=1.7 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (1.8.0)
Requirement already satisfied: babel>=2.10 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab-server<3,>=2.27.1->jupyterlab>=3->nglview->pfcc-extras) (2.17.0)
Requirement already satisfied: json5>=0.9.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyterlab-server<3,>=2.27.1->jupyterlab>=3->nglview->pfcc-extras) (0.10.0)
Requirement already satisfied: sniffio>=1.1 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from anyio>=3.1.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (1.3.1)
Requirement already satisfied: argon2-cffi-bindings in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (21.2.0)
Requirement already satisfied: httpcore==1.* in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from httpx>=0.25.0->jupyterlab>=3->nglview->pfcc-extras) (1.0.7)
Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from httpcore==1.*->httpx>=0.25.0->jupyterlab>=3->nglview->pfcc-extras) (0.14.0)
Requirement already satisfied: debugpy>=1.6.5 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from ipykernel>=6.5.0->jupyterlab>=3->nglview->pfcc-extras) (1.8.12)
Requirement already satisfied: nest-asyncio in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from ipykernel>=6.5.0->jupyterlab>=3->nglview->pfcc-extras) (1.6.0)
Requirement already satisfied: python-json-logger>=2.0.4 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (3.2.1)
Requirement already satisfied: rfc3339-validator in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.1.4)
Requirement already satisfied: rfc3986-validator>=0.1.1 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.1.1)
Requirement already satisfied: fqdn in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (1.5.1)
Requirement already satisfied: isoduration in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (20.11.0)
Requirement already satisfied: jsonpointer>1.13 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (3.0.0)
Requirement already satisfied: uri-template in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (1.3.0)
Requirement already satisfied: webcolors>=24.6.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (24.11.1)
Requirement already satisfied: beautifulsoup4 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (4.13.3)
Requirement already satisfied: bleach in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (6.2.0)
Requirement already satisfied: defusedxml in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.7.1)
Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.4)
Requirement already satisfied: jupyterlab-pygments in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.3.0)
Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.8.4)
Requirement already satisfied: nbclient>=0.5.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.10.2)
Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (1.5.1)
Requirement already satisfied: tinycss2 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (1.4.0)
Requirement already satisfied: cffi>=1.0.1 in /home/jovyan/.py313/lib/python3.13/site-packages (from argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (2.0.0)
Requirement already satisfied: pycparser in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (2.22)
Requirement already satisfied: soupsieve>1.2 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (2.6)
Requirement already satisfied: webencodings in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from bleach->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (0.5.1)
Requirement already satisfied: arrow>=0.15.0 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (1.3.0)
Requirement already satisfied: types-python-dateutil>=2.8.10 in /usr/local/pyenv/versions/python313/lib/python3.13/site-packages (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.11.0->jupyter-server<3,>=2.4.0->jupyterlab>=3->nglview->pfcc-extras) (2.9.0.20241206)
Requirement already satisfied: scikit-image>=0.19.3 in /home/jovyan/.py313/lib/python3.13/site-packages (from pymatgen-analysis-defects->pfcc-extras) (0.25.2)
Requirement already satisfied: mp-pyrho>=0.4.4 in /home/jovyan/.py313/lib/python3.13/site-packages (from pymatgen-analysis-defects->pfcc-extras) (0.5.1)
Requirement already satisfied: imageio!=2.35.0,>=2.33 in /home/jovyan/.py313/lib/python3.13/site-packages (from scikit-image>=0.19.3->pymatgen-analysis-defects->pfcc-extras) (2.37.2)
Requirement already satisfied: tifffile>=2022.8.12 in /home/jovyan/.py313/lib/python3.13/site-packages (from scikit-image>=0.19.3->pymatgen-analysis-defects->pfcc-extras) (2025.10.16)
Requirement already satisfied: lazy-loader>=0.4 in /home/jovyan/.py313/lib/python3.13/site-packages (from scikit-image>=0.19.3->pymatgen-analysis-defects->pfcc-extras) (0.4)
Requirement already satisfied: patsy>=0.5.6 in /home/jovyan/.py313/lib/python3.13/site-packages (from statsmodels->pfcc-extras) (1.0.3)
Requirement already satisfied: formulaic>=1.1.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from statsmodels->pfcc-extras) (1.2.2)
Requirement already satisfied: interface-meta>=1.2.0 in /home/jovyan/.py313/lib/python3.13/site-packages (from formulaic>=1.1.0->statsmodels->pfcc-extras) (2.0.1)

Executing simple MD simulation example

This is a sample MD (Molecular Dynamics) simulation for silicon dioxide (SiO2 crystal), a major component of the earth’s surface. At this point, you do not need to understand the code at all. Seeing is believing, so let’s run it and visualize it first. (By the end of this tutorial, you will be able to easily understand what this code is doing.)

Input cif file is from
A. Jain, S.P. Ong, G. Hautier, W. Chen, W.D. Richards, S. Dacek, S. Cholia, D. Gunter, D. Skinner, G. Ceder, K.A. Persson (*=equal contributions)
The Materials Project: A materials genome approach to accelerating materials innovation APL Materials, 2013, 1(1), 011002.
Licensed under CC BY 4.0
[2]:
from ase.md.velocitydistribution import MaxwellBoltzmannDistribution, Stationary
from ase.md.verlet import VelocityVerlet
from ase.optimize import BFGS
from ase.io import Trajectory, read
from ase import units

from pfp_api_client.pfp.calculators.ase_calculator import ASECalculator
from pfp_api_client.pfp.estimator import Estimator, EstimatorCalcMode

estimator = Estimator(calc_mode=EstimatorCalcMode.PBE, model_version="v8.0.0")
calculator = ASECalculator(estimator)

atoms = read("../input/SiO2_mp-6930_conventional_standard.cif")
atoms.calc = calculator


opt = BFGS(atoms)
opt.run()

atoms = atoms * (3, 3, 3)
atoms.calc = calculator
# Set the momenta corresponding to T=700K.
MaxwellBoltzmannDistribution(atoms, temperature_K=700.0)
# Sets the center-of-mass momentum to zero.
Stationary(atoms)
# Run MD using the VelocityVerlet algorithm
dyn = VelocityVerlet(atoms, 1.0 * units.fs, trajectory="output/dyn.traj")

def print_dyn():
    print(f"Dyn  step: {dyn.get_number_of_steps(): >3}, energy: {atoms.get_total_energy():.3f}")

dyn.attach(print_dyn, interval=10)
dyn.run(100)
      Step     Time          Energy          fmax
BFGS:    0 14:30:36      -57.072301        0.010032
Dyn  step:   0, energy: -1520.919
Dyn  step:  10, energy: -1520.865
Dyn  step:  20, energy: -1520.875
Dyn  step:  30, energy: -1520.892
Dyn  step:  40, energy: -1520.879
Dyn  step:  50, energy: -1520.877
Dyn  step:  60, energy: -1520.884
Dyn  step:  70, energy: -1520.886
Dyn  step:  80, energy: -1520.879
Dyn  step:  90, energy: -1520.884
Dyn  step: 100, energy: -1520.884
[3]:
from pfcc_extras.visualize.view import view_ngl

traj = Trajectory("output/dyn.traj")[::5]
view_ngl(traj, representations=["ball+stick"])
[3]:
[4]:
from pfcc_extras.visualize.povray import traj_to_gif, traj_to_apng
from IPython.display import Image


traj_to_apng(traj, "output/sio2-md.png", rotation="30x,30y,30z", clean=True, n_jobs=16, width=600)
Image(url="output/sio2-md.png")  # , width=150
[Parallel(n_jobs=16)]: Using backend ThreadingBackend with 16 concurrent workers.
[Parallel(n_jobs=16)]: Done  12 out of  21 | elapsed:   23.5s remaining:   17.7s
[Parallel(n_jobs=16)]: Done  21 out of  21 | elapsed:   31.4s finished
[4]:

A technique called molecular dynamics is used to study the dynamics of atoms in SiO2 crystals at 700K.

In the above example, we simulated 243 atoms. The volume is about \(3 \times 10^{-27}\)m, and the length scale is about 15Å = (\(15 \times 10^{-10}\)m) for each axis, which is many orders of magnitude smaller than the 1m scale that we deal with in our daily lives.

One thing to consider here is that we cannot simulate on a computer the entire material we are dealing with on the same scale as it is. Even materials on the order of grams have Avogadro’s number, i.e., atoms on the order of \(10^{23}\), and the computer cannot handle such a large number of atoms.

Therefore, in atomistic simulations, it is necessary to perform appropriate modeling according to the phenomenon to create a simplified system that can be analyzed on a computer by extracting only the necessary elements to reproduce the desired phenomenon, rather than creating something exactly the same as the natural world. There are various methods for modeling, and you will be able to do them by learning through this tutorial.


[Column] Modeling

For example, if you want to simulate the Earth, if you are interested in weather, you would need to focus your modeling on the Earth’s surface atmosphere. On the other hand, if you are interested in earthquakes, you would need to concentrate your modeling on the Earth’s internal structure rather than the atmosphere. If you want to simulate the environment on the surface of the earth, you might consider cutting out only a portion of a continent rather than the entire planet.


Again, let’s look at the simulation results. The ones that appear here include the following.

  • Atom

    • Each atom is specified by element number, has an xyz coordinate value, and has a velocity.

  • Cell.

    • The box is represented by the cube in the above figure. It allows us to deal with systems in which this cell follows the periodic boundary condition indefinitely.

When dealing with a molecule floating in a vacuum, the cell periodic boundary condition is not necessary. For systems such as solids, which have a regular structure, the periodic boundary condition allows us to treat structures that extend infinitely in each of the x, y, and z axes (strictly speaking, the a, b, and c axes, which are the crystal axes).

The cell & periodic boundary condition are artificial concepts for the convenience of computation and modeling. In reality, a crystal structure is considered to have a regular structure in the interior followed by another structure on the surface. However the surface is in a very different state compared to interior and has special characteristics, making computation difficult in some cases. Therefore, by artificially limiting our simulation to the world of cells and imposing the periodic boundary condition that the right end and the left end are connected, we can create a world that has no surface and continues repeatedly, so that we can deal with problems.

In the next section, we will learn how to handle these structures with Python programs and perform atomistic simulations.