packmol-util 0.2.7__tar.gz → 0.2.8__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: packmol-util
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: using packmol
5
5
  Author-email: Kengo NAKADA <kengo.nakada@email.com>
6
6
  Requires-Python: >=3.10
@@ -24,9 +24,15 @@ Requires-Dist: linkify-it-py
24
24
  Dynamic: license-file
25
25
 
26
26
  # packmol_util
27
+
27
28
  [![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/ohara-lab-su/packmol_util/blob/main/README.md)
28
29
  [![ja](https://img.shields.io/badge/lang-ja-yellow.svg)](https://github.com/ohara-lab-su/packmol_util/blob/main/README.ja.md)
29
30
 
31
+ [![GitHub](https://img.shields.io/badge/GitHub-ohara--lab--su%2Fpackmol_util-181717?logo=github)](https://github.com/ohara-lab-su/packmol_util/)
32
+ [![GitHub Pages](https://img.shields.io/badge/GitHub%20Pages-Documentation-222222?logo=githubpages&logoColor=white)](https://ohara-lab-su.github.io/packmol_util/en/)
33
+ [![Ohara Lab](https://img.shields.io/badge/Ohara%20Lab-Home-4B5563?logo=homeassistant&logoColor=white)](https://ohara-lab-su.github.io/index.en.html)
34
+
35
+
30
36
 
31
37
  A **Python utility kit for automatically generating amorphous initial structures (POSCAR)** for first-principles calculations (VASP) and molecular dynamics (MD) simulations using Packmol.
32
38
 
@@ -66,3 +72,28 @@ src/
66
72
  └── FeSiB/
67
73
  └── make_FeSiB.py
68
74
  ```
75
+
76
+ ## Example
77
+
78
+ ```python
79
+ from packmol_util.builder import AmorphousBuilder
80
+ from packmol_util.model import write_single_atom_xyz
81
+
82
+ for symbol in ("Fe", "Si", "B"):
83
+ write_single_atom_xyz(f"{symbol}.xyz", symbol)
84
+
85
+ builder = AmorphousBuilder(
86
+ symbols=["Fe", "Si", "B"], ratios=[80, 9, 11],
87
+ total_atom_count=500, minimum_separation=2.0,
88
+ mass_density=7.35,
89
+ )
90
+ for symbol, ratio in zip(builder.symbols, builder.ratios):
91
+ builder.add_template(f"{symbol}.xyz", ratio * builder.multiplier)
92
+ builder.build("FeSiB")
93
+ ```
94
+
95
+ The outputs are `FeSiB_packmol.inp`, `FeSiB_packmol.xyz`, `FeSiB_packmol.log`, `POSCAR`, and `POSCAR.vasp`. An `.fnc` file is written when FNC pairs are registered. The POSCAR filenames are fixed. `AmorphousBuilder` adjusts the requested atom count to a nearby integer multiple of the stoichiometric ratio sum when needed.
96
+
97
+ ## Packmol and documentation
98
+
99
+ The Packmol executable must be installed separately. See the [English tutorial](https://ohara-lab-su.github.io/packmol_util/en/tutorial.html) for installation and input format, the [reference](https://ohara-lab-su.github.io/packmol_util/en/reference.html) for API and FNC details, and the [design philosophy](https://ohara-lab-su.github.io/packmol_util/en/philosophy.html) for component responsibilities.
@@ -1,7 +1,13 @@
1
1
  # packmol_util
2
+
2
3
  [![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/ohara-lab-su/packmol_util/blob/main/README.md)
3
4
  [![ja](https://img.shields.io/badge/lang-ja-yellow.svg)](https://github.com/ohara-lab-su/packmol_util/blob/main/README.ja.md)
4
5
 
6
+ [![GitHub](https://img.shields.io/badge/GitHub-ohara--lab--su%2Fpackmol_util-181717?logo=github)](https://github.com/ohara-lab-su/packmol_util/)
7
+ [![GitHub Pages](https://img.shields.io/badge/GitHub%20Pages-Documentation-222222?logo=githubpages&logoColor=white)](https://ohara-lab-su.github.io/packmol_util/en/)
8
+ [![Ohara Lab](https://img.shields.io/badge/Ohara%20Lab-Home-4B5563?logo=homeassistant&logoColor=white)](https://ohara-lab-su.github.io/index.en.html)
9
+
10
+
5
11
 
6
12
  A **Python utility kit for automatically generating amorphous initial structures (POSCAR)** for first-principles calculations (VASP) and molecular dynamics (MD) simulations using Packmol.
7
13
 
@@ -41,3 +47,28 @@ src/
41
47
  └── FeSiB/
42
48
  └── make_FeSiB.py
43
49
  ```
50
+
51
+ ## Example
52
+
53
+ ```python
54
+ from packmol_util.builder import AmorphousBuilder
55
+ from packmol_util.model import write_single_atom_xyz
56
+
57
+ for symbol in ("Fe", "Si", "B"):
58
+ write_single_atom_xyz(f"{symbol}.xyz", symbol)
59
+
60
+ builder = AmorphousBuilder(
61
+ symbols=["Fe", "Si", "B"], ratios=[80, 9, 11],
62
+ total_atom_count=500, minimum_separation=2.0,
63
+ mass_density=7.35,
64
+ )
65
+ for symbol, ratio in zip(builder.symbols, builder.ratios):
66
+ builder.add_template(f"{symbol}.xyz", ratio * builder.multiplier)
67
+ builder.build("FeSiB")
68
+ ```
69
+
70
+ The outputs are `FeSiB_packmol.inp`, `FeSiB_packmol.xyz`, `FeSiB_packmol.log`, `POSCAR`, and `POSCAR.vasp`. An `.fnc` file is written when FNC pairs are registered. The POSCAR filenames are fixed. `AmorphousBuilder` adjusts the requested atom count to a nearby integer multiple of the stoichiometric ratio sum when needed.
71
+
72
+ ## Packmol and documentation
73
+
74
+ The Packmol executable must be installed separately. See the [English tutorial](https://ohara-lab-su.github.io/packmol_util/en/tutorial.html) for installation and input format, the [reference](https://ohara-lab-su.github.io/packmol_util/en/reference.html) for API and FNC details, and the [design philosophy](https://ohara-lab-su.github.io/packmol_util/en/philosophy.html) for component responsibilities.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "packmol-util"
7
- version = "0.2.7"
7
+ version = "0.2.8"
8
8
 
9
9
  description = "using packmol"
10
10
  authors = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: packmol-util
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: using packmol
5
5
  Author-email: Kengo NAKADA <kengo.nakada@email.com>
6
6
  Requires-Python: >=3.10
@@ -24,9 +24,15 @@ Requires-Dist: linkify-it-py
24
24
  Dynamic: license-file
25
25
 
26
26
  # packmol_util
27
+
27
28
  [![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/ohara-lab-su/packmol_util/blob/main/README.md)
28
29
  [![ja](https://img.shields.io/badge/lang-ja-yellow.svg)](https://github.com/ohara-lab-su/packmol_util/blob/main/README.ja.md)
29
30
 
31
+ [![GitHub](https://img.shields.io/badge/GitHub-ohara--lab--su%2Fpackmol_util-181717?logo=github)](https://github.com/ohara-lab-su/packmol_util/)
32
+ [![GitHub Pages](https://img.shields.io/badge/GitHub%20Pages-Documentation-222222?logo=githubpages&logoColor=white)](https://ohara-lab-su.github.io/packmol_util/en/)
33
+ [![Ohara Lab](https://img.shields.io/badge/Ohara%20Lab-Home-4B5563?logo=homeassistant&logoColor=white)](https://ohara-lab-su.github.io/index.en.html)
34
+
35
+
30
36
 
31
37
  A **Python utility kit for automatically generating amorphous initial structures (POSCAR)** for first-principles calculations (VASP) and molecular dynamics (MD) simulations using Packmol.
32
38
 
@@ -66,3 +72,28 @@ src/
66
72
  └── FeSiB/
67
73
  └── make_FeSiB.py
68
74
  ```
75
+
76
+ ## Example
77
+
78
+ ```python
79
+ from packmol_util.builder import AmorphousBuilder
80
+ from packmol_util.model import write_single_atom_xyz
81
+
82
+ for symbol in ("Fe", "Si", "B"):
83
+ write_single_atom_xyz(f"{symbol}.xyz", symbol)
84
+
85
+ builder = AmorphousBuilder(
86
+ symbols=["Fe", "Si", "B"], ratios=[80, 9, 11],
87
+ total_atom_count=500, minimum_separation=2.0,
88
+ mass_density=7.35,
89
+ )
90
+ for symbol, ratio in zip(builder.symbols, builder.ratios):
91
+ builder.add_template(f"{symbol}.xyz", ratio * builder.multiplier)
92
+ builder.build("FeSiB")
93
+ ```
94
+
95
+ The outputs are `FeSiB_packmol.inp`, `FeSiB_packmol.xyz`, `FeSiB_packmol.log`, `POSCAR`, and `POSCAR.vasp`. An `.fnc` file is written when FNC pairs are registered. The POSCAR filenames are fixed. `AmorphousBuilder` adjusts the requested atom count to a nearby integer multiple of the stoichiometric ratio sum when needed.
96
+
97
+ ## Packmol and documentation
98
+
99
+ The Packmol executable must be installed separately. See the [English tutorial](https://ohara-lab-su.github.io/packmol_util/en/tutorial.html) for installation and input format, the [reference](https://ohara-lab-su.github.io/packmol_util/en/reference.html) for API and FNC details, and the [design philosophy](https://ohara-lab-su.github.io/packmol_util/en/philosophy.html) for component responsibilities.
File without changes
File without changes