Welcome to Python for Matters Simulations documentation!
Contents:
- Getting started
- Reading Computer Simulations Snapshots
- Write LAMMPS dump/data format header
- Neighbors Definition
- Pair Correlation Functions
- Structure Factors
- Bond Orientational Order Parameters at 2D
- Bond Orientational Order Parameters at 3D
- Static orderings
- Dynamical properties at two & three dimensions
- Hessian matrix calculation and diagonalization
- Vector Analysis
- Topological Defects
- Util Functions
Getting started
This toolkit is a Physics-driven data analyis of computer simulations for materials science, chemistry, physics, and beyond. Currently, the library is mainly designed for computer simulations of amorphous materials and supercooled liquids from the open source simulator LAMMPS. But the analyis is in principle useful for any simulations, and it is straightforward to make extensions.
Installation [recommend in a virtual environment]
Step 1:
You need a C++compiler that supports at least the C++11 standard and cmake.
Recommend using conda or mamba for installation.
Linux: conda install gxx cmake or mamba install gxx cmake
Mac OS.`conda install clang cmake` or mamba install clang cmake
Windows: conda install gxx cmake or mamba install gxx cmake or Download visual studio installer from [here](https://visualstudio.microsoft.com/vs/older-downloads/) and install the C++ compiler.
A package manager is also a good choice, for example:
ubuntu: sudo apt-get install g++ cmake
centos: sudo yum install gcc-c++ cmake3
macos: brew install gcc cmake
Now that you have all the build tools, pip will help you complete everything for compilation.
Step 2:
python3.10 -m venv .venv
source .venv/bin/activate
pip install PyMatterSim
or
git clone https://gitee.com/yuanchaohu/pymattersim --recursive
cd pymattersim
pip install .
Note that this may require updated version of setuptools, which can be upgraded by pip or conda. At the same time, this may require version check of the pip certificates doing open /Applications/Python3.10/InstallCertificates.command (for MAC) pip install –trusted-host pypi.org –trusted-host files.pythonhosted.org –upgrade pip
The source code is available from this gitee project, and the package is deployed at this PYPI page.
Documentation
The documentation for PyMatterSim is hosted online
Citation
@article{hu2024pymattersimpythondataanalysis,
title={PyMatterSim: a Python Data Analysis Library for Computer Simulations of Materials Science, Physics, Chemistry, and Beyond},
author={Y. -C. Hu and J. Tian},
year={2024},
eprint={2411.17970},
archivePrefix={arXiv},
primaryClass={cond-mat.mtrl-sci},
url={https://arxiv.org/abs/2411.17970},
}
Working in progress.
References
Y.-C. Hu et al. Origin of the boson peak in amorphous solids. Nature Physics, 18(6), 669-677 (2022)
Y.-C. Hu et al. Revealing the role of liquid preordering in crystallisation of supercooled liquids. Nature Communications, 13(1), 4519 (2022)
Y.-C. Hu et al. Physical origin of glass formation from multicomponent system. Science Advances 6 (50), eabd2928 (2020)
Y.-C. Hu et al. Configuration correlation governs slow dynamics of supercooled metallic liquids. Proceedings of the National Academy of Sciences U.S.A., 115(25), 6375-6380 (2018)
Y.-C. Hu et al. Five-fold symmetry as indicator of dynamic arrest in metallic glass-forming liquids. Nature Communications, 6(1), 8310 (2015)
Unit Tests
The unit tests for PyMatterSim are included in the github repository
and are configured to be run using the python UnitTest library:
# auto-run tests with shell scripts
cd shell
bash *sh
# run individual tests
cd tests/yourdir/
python *py