Skip to main content

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.

minimal use example

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:

  1. Steepest descent structural relaxation / energy minimization.

  2. Constant temperature ('NVT') dynamics with a Langevin thermostat.

  3. Constant energy Hamiltonian ('NVE') molecular dynamics.

  4. 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

minimal use example

Data collection

data collection example

Detailed Analysis

detailed analysis example

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imperial_materials_simulation-1.3.0.tar.gz (371.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imperial_materials_simulation-1.3.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file imperial_materials_simulation-1.3.0.tar.gz.

File metadata

File hashes

Hashes for imperial_materials_simulation-1.3.0.tar.gz
Algorithm Hash digest
SHA256 26c8885feace5068b13135ff5d7fb3f6f64871fab3453c298b98f6d5a78defef
MD5 076274190dd8a1f97cf8ac98d78595b1
BLAKE2b-256 2f15f5cdc97582fffea3f902f500dcaf4ef7b48099959edc1a47ad12ae9a2408

See more details on using hashes here.

File details

Details for the file imperial_materials_simulation-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for imperial_materials_simulation-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e47eab875abf5d0bd6b852e2e5077423fcc0db4f6ed805d5cb67f2ec9ac5188
MD5 75272a8c80c9477a4dca9def64d6a908
BLAKE2b-256 40fe09089347e25245400ac925c32712afc672a2f87d11d1e8ff0fbcdfe4c8ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page