Molecular simulation tool made for ICL materials students
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imperial_materials_simulation-1.3.3.tar.gz.
File metadata
- Download URL: imperial_materials_simulation-1.3.3.tar.gz
- Upload date:
- Size: 375.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38688a0e77910eb5f6a51b89e3268be77e0d389d7fda904aa22c99525c28c45a
|
|
| MD5 |
aed181adde349d7ef467ab5cd7918bdd
|
|
| BLAKE2b-256 |
4df1ac11f99084847380e5894a90a221524f645eed599833726cbe8ccc66d7e8
|
File details
Details for the file imperial_materials_simulation-1.3.3-py3-none-any.whl.
File metadata
- Download URL: imperial_materials_simulation-1.3.3-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f07ea4103f79b250bebd0455d533f000a2d9a317d2c05edc25749e9e15f47430
|
|
| MD5 |
26750c6ff8233d2a82e8dc1327a5bb7e
|
|
| BLAKE2b-256 |
0355600eb869d0a5295180ee2feda4cf7d2c72bc4f72d79f1af3b64ade73cb3c
|