packing materials and molecules in boxes using for machine learnt interatomic potentials
Project description
what is packmm
packmm is a simple python package that allows to build atomistic and molecular systems which are of interest for materials and molecular modelling.
It tries to generate realistic starting configuration by employing machine learnt interatomic potential for describing interactions between atoms and Monte Carlo, Molecular Dynamics and hybrid Monte Carlo.
It provides both a cli and a python api, with some examples below.
Quick install
uv pip install pack-mm
or install the lates
uv pip install git+https://github.com/ddmms/pack-mm.git
CLI examples
MOF in spherical pocket
packmm --system examples/data/UiO-66.cif --molecule H2O --nmols 10 --where sphere --centre 10.0,10.0,10.0 --radius 5.0 --geometry
Zeolite in cylindrical channel
packmm --system examples/data/MFI.cif --molecule H2O --nmols 30 --where cylinderY --centre 10.0,10.0,13.0 --radius 3.5 --height 19.00 --no-geometry
NaCl on surface
packmm --system examples/data/NaCl.cif --molecule H2O --nmols 30 --where box --centre 8.5,8.5,16.0 --a 16.9 --b 16.9 --c 7.5 --no-geometry
MOF ellipsoid
first add a methanol
packmm --system examples/data/Cu2L.cif --molecule examples/data/Ethanol.xyz --nmols 1 --where sphere --centre 5.18,8.15,25.25 --radius 1 --model small-0b2 --geometry
!()[examples/pics/Cu2L-ethanol.png]
packmm --system Cu2L-ethanol.cif --molecule H2O --nmols 10 --where ellipsoid --centre 5.18,8.15,25.25 --a 5.18 --b 8.15 --c 8.25 --no-geometry --model small-0b2
!()[examples/pics/Cu2l-ethanol-water.png]
Liquid water
packmm --molecule H2O --nmols 33 --where anywhere --cell-a 10.0 --cell-b 10.0 --cell-c 10.0 --model small-0b2
!()[examples/pics/water.png]
interstitials
packmm --system Pd-super.cif --molecule H2 --nmols 50 --where anywhere --model small-0b2
before optimisation
!()[examples/pics/Pd-H2-noopt.png]
after optimisation
!()[examples/pics/Pd-H2.png]
full list of options
packmm --help
Usage: packmm [OPTIONS]
Pack molecules into a system based on the specified parameters.
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --system TEXT The original box in which │
│ you want to add particles. │
│ If not provided, an empty │
│ box will be created. │
│ [default: None] │
│ --molecule TEXT Name of the molecule to be │
│ processed, ASE-recognizable │
│ or ASE-readable file. │
│ [default: H2O] │
│ --nmols INTEGER Target number of molecules │
│ to insert. │
│ [default: -1] │
│ --ntries INTEGER Maximum number of attempts │
│ to insert each molecule. │
│ [default: 50] │
│ --seed INTEGER Random seed for │
│ reproducibility. │
│ [default: 2025] │
│ --where [anywhere|sphere|box|cylin Where to insert the │
│ derZ|cylinderY|cylinderX|e molecule. Choices: │
│ llipsoid] 'anywhere', 'sphere', │
│ 'box', 'cylinderZ', │
│ 'cylinderY', 'cylinderX', │
│ 'ellipsoid'. │
│ [default: anywhere] │
│ --centre TEXT Centre of the insertion │
│ zone, coordinates in Å, │
│ e.g., '5.0, 5.0, 5.0'. │
│ [default: None] │
│ --radius FLOAT Radius of the sphere or │
│ cylinder in Å, depending on │
│ the insertion volume. │
│ [default: None] │
│ --height FLOAT Height of the cylinder in │
│ Å. │
│ [default: None] │
│ --a FLOAT Side of the box or │
│ semi-axis of the ellipsoid, │
│ in Å, depends on the │
│ insertion method. │
│ [default: None] │
│ --b FLOAT Side of the box or │
│ semi-axis of the ellipsoid, │
│ in Å, depends on the │
│ insertion method. │
│ [default: None] │
│ --c FLOAT Side of the box or │
│ semi-axis of the ellipsoid, │
│ in Å, depends on the │
│ insertion method. │
│ [default: None] │
│ --device TEXT Device to run calculations │
│ on (e.g., 'cpu' or 'cuda'). │
│ [default: cpu] │
│ --model TEXT ML model to use. │
│ [default: medium-omat-0] │
│ --arch TEXT MLIP architecture to use. │
│ [default: mace_mp] │
│ --temperature FLOAT Temperature for the Monte │
│ Carlo acceptance rule. │
│ [default: 300.0] │
│ --cell-a FLOAT Side of the empty box along │
│ the x-axis in Å. │
│ [default: 20.0] │
│ --cell-b FLOAT Side of the empty box along │
│ the y-axis in Å. │
│ [default: 20.0] │
│ --cell-c FLOAT Side of the empty box along │
│ the z-axis in Å. │
│ [default: 20.0] │
│ --fmax FLOAT force tollerance for │
│ optimisation if needed. │
│ [default: 0.1] │
│ --geometry --no-geometry Perform geometry │
│ optimization at the end. │
│ [default: geometry] │
│ --out-path TEXT path to save various │
│ outputs. │
│ [default: .] │
│ --install-completion Install completion for the │
│ current shell. │
│ --show-completion Show completion for the │
│ current shell, to copy it │
│ or customize the │
│ installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
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 pack_mm-0.0.20.tar.gz.
File metadata
- Download URL: pack_mm-0.0.20.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb255ffe3d1761b0747f47e44e09d29a1f8ba89cfe4194c3f1bc3ea9e1967c28
|
|
| MD5 |
604986db0cc8b07762efdfb5e5ecf933
|
|
| BLAKE2b-256 |
f815bad624528c0497394dca935a30ad48d25a71c90f19a644e04ce3782530a4
|
Provenance
The following attestation bundles were made for pack_mm-0.0.20.tar.gz:
Publisher:
python-publish.yml on ddmms/pack-mm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pack_mm-0.0.20.tar.gz -
Subject digest:
fb255ffe3d1761b0747f47e44e09d29a1f8ba89cfe4194c3f1bc3ea9e1967c28 - Sigstore transparency entry: 173532323
- Sigstore integration time:
-
Permalink:
ddmms/pack-mm@fba204caf9ab29e52d45c6a832aa56123d7f7aa1 -
Branch / Tag:
refs/tags/v0.0.20 - Owner: https://github.com/ddmms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fba204caf9ab29e52d45c6a832aa56123d7f7aa1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pack_mm-0.0.20-py3-none-any.whl.
File metadata
- Download URL: pack_mm-0.0.20-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df272e7a6b899ceee5f4e7759f028ed2fa9f1af32ae8dfb2ce590bbc610ae5b2
|
|
| MD5 |
e7fc2fd32e8b44bdaaa448cdc2ebee2d
|
|
| BLAKE2b-256 |
92faf9c640397edd29ceebe422c65a595c83695849ca55f78927077a5ef7f90e
|
Provenance
The following attestation bundles were made for pack_mm-0.0.20-py3-none-any.whl:
Publisher:
python-publish.yml on ddmms/pack-mm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pack_mm-0.0.20-py3-none-any.whl -
Subject digest:
df272e7a6b899ceee5f4e7759f028ed2fa9f1af32ae8dfb2ce590bbc610ae5b2 - Sigstore transparency entry: 173532325
- Sigstore integration time:
-
Permalink:
ddmms/pack-mm@fba204caf9ab29e52d45c6a832aa56123d7f7aa1 -
Branch / Tag:
refs/tags/v0.0.20 - Owner: https://github.com/ddmms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@fba204caf9ab29e52d45c6a832aa56123d7f7aa1 -
Trigger Event:
push
-
Statement type: