Imperial Materials Simulation
Molecular simulation tool made for the theory and simulation module taken by materials science and engineering undergraduates at Imperial College London.
It models the forces acting on a molecule in different situations and displays the results live using an interactive Jupyter notebook dashboard.
See the docs folder for the Quick Start Guide.
Method
Each polymer is a linear string of beads (CH2 units) with no side chains. Bonds are modelled as springs and long range interactions are modelled using a 12-6 Lennard-Jones potential.
Four methods of atomistic simulation are implemented:
-
Steepest descent structural relaxation / energy minimization.
-
Constant temperature ('NVT') dynamics with a Langevin thermostat.
-
Constant energy Hamiltonian ('NVE') molecular dynamics.
-
Metropolis Monte Carlo ('MMC') stochastic model.
For each time step, the forces and potentials of each atom are calculated. This allows for their positions and velocities to be updated following the given atomistic simluation method.
Installation
This library can be installed from pypi:
pip install imperial-materials-simulation
This requires at least Python 3.9.
Usage
All examples shown can be found in the examples notebook.
All functionality and details are well documented in the doc-strings of the main Simulation class and its methods.
Minimal use
Data collection
Detailed Analysis
Support
If you encounter any problems, please create an issue on the GitHub issue tracker. I will endevour push a fix to PyPI as soon as I can.
Community contributions are also welcome. Feel free to create a pull request if you have implemented a bug fix or a feature.
Development Workflow
Install uv:
winget install --id=astral-sh.uv -e
or
curl -LsSf https://astral.sh/uv/install.sh | sh
Download the repo.
git clone https://github.com/AyhamSaffar/imperial-materials-simulation.git
Enter created repo.
cd imperial-materials-simulation
Create environment
uv sync
Run code
uv run "scripts/Data Collection.py"
Jupyter notebooks can be run by selecting the Python interpreter in the newly created .venv folder.
Roadmap
The following features could be implemented down the road following popular demand:
-
Replace MatPlotLib graphs in display with Plotly for a faster & more responsive dashboard (especially when its live updating during longer runs).
-
Add run .xyz trajectory exporter for better integration with external software.
-
Added support for charged functional groups on the simulated molecule and a VRORV integrator to better account for the added electrostatic forces.
-
Add artist to run dataframe on dashboard so numbers are displayed in scientific format and the row for the current run gets highlighted.
Authors and Acknowledgment
This program was written by me, Ayham Al-Saffar, based on Paul Tangney's initial codebase and was funded by an Imperial College London Student Shapers grant.
Metadata
Release files for imperial-materials-simulation 1.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| imperial_materials_simulation-1.3.5.tar.gz | 376.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| imperial_materials_simulation-1.3.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 392.6 kB
Release files / imperial_materials_simulation-1.3.5.tar.gz
| Download URL | imperial_materials_simulation-1.3.5.tar.gz |
|---|---|
| Size | 376.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08e4dc5f20503d5b23288c3d329d5d7430494aa8d5a65460c9f756871f52f016
|
|
BLAKE2b-256 checksum How to use checksums |
f055e44e061847c97c50abd41d276a8afd1ddfa14753c60d918518b43c6cae74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / imperial_materials_simulation-1.3.5-py3-none-any.whl
| Download URL | imperial_materials_simulation-1.3.5-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc87da731cb1dd1821f1f93f4de870609b96d515fcc12f35da4cece99113fb62
|
|
BLAKE2b-256 checksum How to use checksums |
07812444c1317fd30f571de1686ba466463c6249e28bd2bed97a99a3c5c8786a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for imperial-materials-simulation 1.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.