pack-mm 0.0.19__py3-none-any.whl → 0.0.21__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pack_mm/core/core.py +3 -2
- pack_mm-0.0.21.dist-info/METADATA +246 -0
- pack_mm-0.0.21.dist-info/RECORD +8 -0
- pack_mm-0.0.19.dist-info/METADATA +0 -36
- pack_mm-0.0.19.dist-info/RECORD +0 -8
- {pack_mm-0.0.19.dist-info → pack_mm-0.0.21.dist-info}/WHEEL +0 -0
- {pack_mm-0.0.19.dist-info → pack_mm-0.0.21.dist-info}/entry_points.txt +0 -0
- {pack_mm-0.0.19.dist-info → pack_mm-0.0.21.dist-info}/licenses/LICENSE +0 -0
pack_mm/core/core.py
CHANGED
@@ -11,6 +11,7 @@ from pathlib import Path
|
|
11
11
|
from ase import Atoms
|
12
12
|
from ase.build import molecule as build_molecule
|
13
13
|
from ase.io import read, write
|
14
|
+
from ase.units import kB
|
14
15
|
from janus_core.calculations.geom_opt import GeomOpt
|
15
16
|
from janus_core.helpers.mlip_calculators import choose_calculator
|
16
17
|
from numpy import cos, exp, pi, random, sin, sqrt
|
@@ -185,7 +186,7 @@ def pack_molecules(
|
|
185
186
|
cell_a, cell_b, cell_c (float): Cell dimensions if system is empty.
|
186
187
|
out_path (str): path to save various outputs
|
187
188
|
"""
|
188
|
-
kbt = temperature *
|
189
|
+
kbt = temperature * kB
|
189
190
|
validate_value("temperature", temperature)
|
190
191
|
validate_value("radius", radius)
|
191
192
|
validate_value("height", height)
|
@@ -358,5 +359,5 @@ def optimize_geometry(
|
|
358
359
|
filter_kwargs={"hydrostatic_strain": True},
|
359
360
|
)
|
360
361
|
geo.run()
|
361
|
-
write(Path(out_path) / f"{struct_path}-opt.cif", geo.struct)
|
362
|
+
write(Path(out_path) / f"{Path(struct_path).stem}-opt.cif", geo.struct)
|
362
363
|
return geo.struct.get_potential_energy()
|
@@ -0,0 +1,246 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: pack-mm
|
3
|
+
Version: 0.0.21
|
4
|
+
Summary: packing materials and molecules in boxes using for machine learnt interatomic potentials
|
5
|
+
Author: Alin M. Elena
|
6
|
+
Classifier: Programming Language :: Python
|
7
|
+
Classifier: Programming Language :: Python :: 3.10
|
8
|
+
Classifier: Programming Language :: Python :: 3.11
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
12
|
+
Classifier: Natural Language :: English
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
14
|
+
Project-URL: Repository, https://github.com/ddmms/pack-mm/
|
15
|
+
Project-URL: Documentation, https://ddmms.github.io/pack-mm/
|
16
|
+
Requires-Python: >=3.10
|
17
|
+
Requires-Dist: janus-core>=0.7.2
|
18
|
+
Requires-Dist: typer<1.0.0,>=0.12.5
|
19
|
+
Requires-Dist: typer-config<2.0.0,>=1.4.2
|
20
|
+
Description-Content-Type: text/markdown
|
21
|
+
|
22
|
+
[![Python versions][python-badge]][python-link]
|
23
|
+
[![Build Status][ci-badge]][ci-link]
|
24
|
+
[![Coverage Status][cov-badge]][cov-link]
|
25
|
+
[![License][license-badge]][license-link]
|
26
|
+
|
27
|
+
# what is packmm
|
28
|
+
|
29
|
+
packmm is a simple python package that allows to build atomistic and molecular
|
30
|
+
systems which are of interest for materials and molecular modelling.
|
31
|
+
|
32
|
+
It tries to generate realistic starting configuration by employing machine learnt
|
33
|
+
interatomic potential for describing interactions between atoms and Monte Carlo,
|
34
|
+
Molecular Dynamics and hybrid Monte Carlo.
|
35
|
+
|
36
|
+
It provides both a cli and a python api, with some examples below.
|
37
|
+
|
38
|
+
## Quick install
|
39
|
+
|
40
|
+
```bash
|
41
|
+
|
42
|
+
uv pip install pack-mm
|
43
|
+
|
44
|
+
```
|
45
|
+
or install the lates
|
46
|
+
|
47
|
+
```bash
|
48
|
+
|
49
|
+
uv pip install git+https://github.com/ddmms/pack-mm.git
|
50
|
+
|
51
|
+
```
|
52
|
+
|
53
|
+
## CLI examples
|
54
|
+
|
55
|
+
|
56
|
+
### MOF in spherical pocket
|
57
|
+
|
58
|
+
```bash
|
59
|
+
|
60
|
+
packmm --system examples/data/UiO-66.cif --molecule H2O --nmols 10 --where sphere --centre 10.0,10.0,10.0 --radius 5.0 --geometry
|
61
|
+
|
62
|
+
```
|
63
|
+
|
64
|
+

|
65
|
+
|
66
|
+
### Zeolite in cylindrical channel
|
67
|
+
|
68
|
+
|
69
|
+
```bash
|
70
|
+
|
71
|
+
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
|
72
|
+
|
73
|
+
```
|
74
|
+
|
75
|
+

|
76
|
+
|
77
|
+
### NaCl on surface
|
78
|
+
|
79
|
+
```bash
|
80
|
+
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
|
81
|
+
|
82
|
+
```
|
83
|
+
|
84
|
+

|
85
|
+
|
86
|
+
### MOF ellipsoid
|
87
|
+
|
88
|
+
first add a methanol
|
89
|
+
|
90
|
+
```bash
|
91
|
+
|
92
|
+
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
|
93
|
+
|
94
|
+
```
|
95
|
+
|
96
|
+

|
97
|
+
|
98
|
+
``` bash
|
99
|
+
|
100
|
+
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
|
101
|
+
|
102
|
+
|
103
|
+
```
|
104
|
+
|
105
|
+

|
106
|
+
|
107
|
+
### Liquid water
|
108
|
+
|
109
|
+
```bash
|
110
|
+
|
111
|
+
packmm --molecule H2O --nmols 33 --where anywhere --cell-a 10.0 --cell-b 10.0 --cell-c 10.0 --model small-0b2
|
112
|
+
|
113
|
+
|
114
|
+
```
|
115
|
+
|
116
|
+

|
117
|
+
|
118
|
+
### interstitials
|
119
|
+
|
120
|
+
```bash
|
121
|
+
|
122
|
+
packmm --system Pd-super.cif --molecule H2 --nmols 50 --where anywhere --model small-0b2
|
123
|
+
|
124
|
+
```
|
125
|
+
|
126
|
+
before optimisation
|
127
|
+
|
128
|
+

|
129
|
+
|
130
|
+
|
131
|
+
after optimisation
|
132
|
+
|
133
|
+

|
134
|
+
|
135
|
+
|
136
|
+
### full list of options
|
137
|
+
|
138
|
+
```bash
|
139
|
+
|
140
|
+
packmm --help
|
141
|
+
|
142
|
+
Usage: packmm [OPTIONS]
|
143
|
+
|
144
|
+
Pack molecules into a system based on the specified parameters.
|
145
|
+
|
146
|
+
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
|
147
|
+
│ --system TEXT The original box in which │
|
148
|
+
│ you want to add particles. │
|
149
|
+
│ If not provided, an empty │
|
150
|
+
│ box will be created. │
|
151
|
+
│ [default: None] │
|
152
|
+
│ --molecule TEXT Name of the molecule to be │
|
153
|
+
│ processed, ASE-recognizable │
|
154
|
+
│ or ASE-readable file. │
|
155
|
+
│ [default: H2O] │
|
156
|
+
│ --nmols INTEGER Target number of molecules │
|
157
|
+
│ to insert. │
|
158
|
+
│ [default: -1] │
|
159
|
+
│ --ntries INTEGER Maximum number of attempts │
|
160
|
+
│ to insert each molecule. │
|
161
|
+
│ [default: 50] │
|
162
|
+
│ --seed INTEGER Random seed for │
|
163
|
+
│ reproducibility. │
|
164
|
+
│ [default: 2025] │
|
165
|
+
│ --where [anywhere|sphere|box|cylin Where to insert the │
|
166
|
+
│ derZ|cylinderY|cylinderX|e molecule. Choices: │
|
167
|
+
│ llipsoid] 'anywhere', 'sphere', │
|
168
|
+
│ 'box', 'cylinderZ', │
|
169
|
+
│ 'cylinderY', 'cylinderX', │
|
170
|
+
│ 'ellipsoid'. │
|
171
|
+
│ [default: anywhere] │
|
172
|
+
│ --centre TEXT Centre of the insertion │
|
173
|
+
│ zone, coordinates in Å, │
|
174
|
+
│ e.g., '5.0, 5.0, 5.0'. │
|
175
|
+
│ [default: None] │
|
176
|
+
│ --radius FLOAT Radius of the sphere or │
|
177
|
+
│ cylinder in Å, depending on │
|
178
|
+
│ the insertion volume. │
|
179
|
+
│ [default: None] │
|
180
|
+
│ --height FLOAT Height of the cylinder in │
|
181
|
+
│ Å. │
|
182
|
+
│ [default: None] │
|
183
|
+
│ --a FLOAT Side of the box or │
|
184
|
+
│ semi-axis of the ellipsoid, │
|
185
|
+
│ in Å, depends on the │
|
186
|
+
│ insertion method. │
|
187
|
+
│ [default: None] │
|
188
|
+
│ --b FLOAT Side of the box or │
|
189
|
+
│ semi-axis of the ellipsoid, │
|
190
|
+
│ in Å, depends on the │
|
191
|
+
│ insertion method. │
|
192
|
+
│ [default: None] │
|
193
|
+
│ --c FLOAT Side of the box or │
|
194
|
+
│ semi-axis of the ellipsoid, │
|
195
|
+
│ in Å, depends on the │
|
196
|
+
│ insertion method. │
|
197
|
+
│ [default: None] │
|
198
|
+
│ --device TEXT Device to run calculations │
|
199
|
+
│ on (e.g., 'cpu' or 'cuda'). │
|
200
|
+
│ [default: cpu] │
|
201
|
+
│ --model TEXT ML model to use. │
|
202
|
+
│ [default: medium-omat-0] │
|
203
|
+
│ --arch TEXT MLIP architecture to use. │
|
204
|
+
│ [default: mace_mp] │
|
205
|
+
│ --temperature FLOAT Temperature for the Monte │
|
206
|
+
│ Carlo acceptance rule. │
|
207
|
+
│ [default: 300.0] │
|
208
|
+
│ --cell-a FLOAT Side of the empty box along │
|
209
|
+
│ the x-axis in Å. │
|
210
|
+
│ [default: 20.0] │
|
211
|
+
│ --cell-b FLOAT Side of the empty box along │
|
212
|
+
│ the y-axis in Å. │
|
213
|
+
│ [default: 20.0] │
|
214
|
+
│ --cell-c FLOAT Side of the empty box along │
|
215
|
+
│ the z-axis in Å. │
|
216
|
+
│ [default: 20.0] │
|
217
|
+
│ --fmax FLOAT force tollerance for │
|
218
|
+
│ optimisation if needed. │
|
219
|
+
│ [default: 0.1] │
|
220
|
+
│ --geometry --no-geometry Perform geometry │
|
221
|
+
│ optimization at the end. │
|
222
|
+
│ [default: geometry] │
|
223
|
+
│ --out-path TEXT path to save various │
|
224
|
+
│ outputs. │
|
225
|
+
│ [default: .] │
|
226
|
+
│ --install-completion Install completion for the │
|
227
|
+
│ current shell. │
|
228
|
+
│ --show-completion Show completion for the │
|
229
|
+
│ current shell, to copy it │
|
230
|
+
│ or customize the │
|
231
|
+
│ installation. │
|
232
|
+
│ --help Show this message and exit. │
|
233
|
+
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
|
234
|
+
|
235
|
+
|
236
|
+
```
|
237
|
+
|
238
|
+
|
239
|
+
[python-badge]: https://img.shields.io/pypi/pyversions/pack-mm.svg
|
240
|
+
[python-link]: https://pypi.org/project/pack-mm/
|
241
|
+
[ci-badge]: https://github.com/ddmms/pack-mm/actions/workflows/build.yml/badge.svg?branch=main
|
242
|
+
[ci-link]: https://github.com/ddmms/pack-mm/actions
|
243
|
+
[cov-badge]: https://coveralls.io/repos/github/ddmms/pack-mm/badge.svg?branch=main
|
244
|
+
[cov-link]: https://coveralls.io/github/ddmms/pack-mm?branch=main
|
245
|
+
[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg
|
246
|
+
[license-link]: https://opensource.org/license/MIT
|
@@ -0,0 +1,8 @@
|
|
1
|
+
pack_mm-0.0.21.dist-info/METADATA,sha256=jW4IZ3HFn-e7AxJ8dAteajsDSs1dsybX3G9l080Gr5Y,13506
|
2
|
+
pack_mm-0.0.21.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
pack_mm-0.0.21.dist-info/entry_points.txt,sha256=ajKA2oehIa_LCVCP2XTRxV0VNgjGl9c2wYkwk0BasrQ,66
|
4
|
+
pack_mm-0.0.21.dist-info/licenses/LICENSE,sha256=ZOYkPdn_vQ8wYJqZnjesow79F_grMbVlHcJ9V91G1pE,1100
|
5
|
+
pack_mm/__init__.py,sha256=ct7qfCmTDwhLYip6JKYWRLasmmaGYt0ColbK0CpvYZk,150
|
6
|
+
pack_mm/cli/packmm.py,sha256=VqumDT_f1Nf1LCZ1WsF5D6MoLmKEQPEimYenibQHIU4,4944
|
7
|
+
pack_mm/core/core.py,sha256=vNMQOVDIXyRCUWosww9sSHUxwqbjPRk5JLsb9muwpVA,11369
|
8
|
+
pack_mm-0.0.21.dist-info/RECORD,,
|
@@ -1,36 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: pack-mm
|
3
|
-
Version: 0.0.19
|
4
|
-
Summary: packing materials and molecules in boxes using for machine learnt interatomic potentials
|
5
|
-
Author: Alin M. Elena
|
6
|
-
Classifier: Programming Language :: Python
|
7
|
-
Classifier: Programming Language :: Python :: 3.10
|
8
|
-
Classifier: Programming Language :: Python :: 3.11
|
9
|
-
Classifier: Programming Language :: Python :: 3.12
|
10
|
-
Classifier: Intended Audience :: Science/Research
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
12
|
-
Classifier: Natural Language :: English
|
13
|
-
Classifier: Development Status :: 3 - Alpha
|
14
|
-
Project-URL: Repository, https://github.com/ddmms/pack-mm/
|
15
|
-
Project-URL: Documentation, https://ddmms.github.io/pack-mm/
|
16
|
-
Requires-Python: >=3.10
|
17
|
-
Requires-Dist: janus-core>=0.7.2
|
18
|
-
Requires-Dist: typer<1.0.0,>=0.12.5
|
19
|
-
Requires-Dist: typer-config<2.0.0,>=1.4.2
|
20
|
-
Description-Content-Type: text/markdown
|
21
|
-
|
22
|
-
# pack materials and molecules
|
23
|
-
|
24
|
-
[![Python versions][python-badge]][python-link]
|
25
|
-
[![Build Status][ci-badge]][ci-link]
|
26
|
-
[![Coverage Status][cov-badge]][cov-link]
|
27
|
-
[![License][license-badge]][license-link]
|
28
|
-
|
29
|
-
[python-badge]: https://img.shields.io/pypi/pyversions/pack-mm.svg
|
30
|
-
[python-link]: https://pypi.org/project/pack-mm/
|
31
|
-
[ci-badge]: https://github.com/ddmms/pack-mm/actions/workflows/build.yml/badge.svg?branch=main
|
32
|
-
[ci-link]: https://github.com/ddmms/pack-mm/actions
|
33
|
-
[cov-badge]: https://coveralls.io/repos/github/ddmms/pack-mm/badge.svg?branch=main
|
34
|
-
[cov-link]: https://coveralls.io/github/ddmms/pack-mm?branch=main
|
35
|
-
[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg
|
36
|
-
[license-link]: https://opensource.org/license/MIT
|
pack_mm-0.0.19.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
pack_mm-0.0.19.dist-info/METADATA,sha256=XknqobiQ9HNQyOPmGsJ_auICisxR128TXg_0cU4kh8Y,1583
|
2
|
-
pack_mm-0.0.19.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
-
pack_mm-0.0.19.dist-info/entry_points.txt,sha256=ajKA2oehIa_LCVCP2XTRxV0VNgjGl9c2wYkwk0BasrQ,66
|
4
|
-
pack_mm-0.0.19.dist-info/licenses/LICENSE,sha256=ZOYkPdn_vQ8wYJqZnjesow79F_grMbVlHcJ9V91G1pE,1100
|
5
|
-
pack_mm/__init__.py,sha256=ct7qfCmTDwhLYip6JKYWRLasmmaGYt0ColbK0CpvYZk,150
|
6
|
-
pack_mm/cli/packmm.py,sha256=VqumDT_f1Nf1LCZ1WsF5D6MoLmKEQPEimYenibQHIU4,4944
|
7
|
-
pack_mm/core/core.py,sha256=RT9EgMkejhMkqVHN0t_Yn8MDXgQDFD_HOw6Sf3pBeSc,11373
|
8
|
-
pack_mm-0.0.19.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|