@pikaa-ai/pikaa 0.3.22 → 0.3.24

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.
Files changed (191) hide show
  1. package/assets/brand/orbit-logo-option4-whale.jpg +0 -0
  2. package/assets/brand/orbit-logo.jpg +0 -0
  3. package/assets/brand/orbit-logo.png +0 -0
  4. package/assets/brand/orbit-logo.svg +3 -0
  5. package/dist/cli.js +448 -181
  6. package/dist/index.js +22 -2
  7. package/package.json +1 -2
  8. package/skills/adaptyv/SKILL.md +0 -240
  9. package/skills/aeon/SKILL.md +0 -402
  10. package/skills/analytical-method-validation/SKILL.md +0 -299
  11. package/skills/anndata/SKILL.md +0 -431
  12. package/skills/arbor/SKILL.md +0 -152
  13. package/skills/arboreto/SKILL.md +0 -267
  14. package/skills/astropy/SKILL.md +0 -353
  15. package/skills/autoskill/SKILL.md +0 -233
  16. package/skills/benchling-integration/SKILL.md +0 -229
  17. package/skills/bgpt-paper-search/SKILL.md +0 -75
  18. package/skills/bids/SKILL.md +0 -237
  19. package/skills/biopython/SKILL.md +0 -472
  20. package/skills/bioservices/SKILL.md +0 -399
  21. package/skills/bulk-rnaseq/SKILL.md +0 -198
  22. package/skills/cellxgene-census/SKILL.md +0 -283
  23. package/skills/cirq/SKILL.md +0 -370
  24. package/skills/citation-management/SKILL.md +0 -329
  25. package/skills/clinical-decision-support/SKILL.md +0 -238
  26. package/skills/clinical-decision-support/references/README.md +0 -62
  27. package/skills/clinical-reports/SKILL.md +0 -248
  28. package/skills/clinical-reports/references/README.md +0 -34
  29. package/skills/cobrapy/SKILL.md +0 -496
  30. package/skills/consciousness-council/SKILL.md +0 -151
  31. package/skills/dask/SKILL.md +0 -482
  32. package/skills/database-lookup/SKILL.md +0 -386
  33. package/skills/datamol/SKILL.md +0 -200
  34. package/skills/deepchem/SKILL.md +0 -244
  35. package/skills/deepspot-m/SKILL.md +0 -175
  36. package/skills/deeptools/SKILL.md +0 -412
  37. package/skills/depmap/SKILL.md +0 -301
  38. package/skills/dhdna-profiler/SKILL.md +0 -184
  39. package/skills/diffdock/SKILL.md +0 -488
  40. package/skills/dnanexus-integration/SKILL.md +0 -325
  41. package/skills/docx/SKILL.md +0 -99
  42. package/skills/esm/SKILL.md +0 -334
  43. package/skills/etetoolkit/SKILL.md +0 -327
  44. package/skills/exa-search/SKILL.md +0 -102
  45. package/skills/executing-plans/SKILL.md +0 -14
  46. package/skills/experimental-design/SKILL.md +0 -234
  47. package/skills/exploratory-data-analysis/SKILL.md +0 -280
  48. package/skills/flowio/SKILL.md +0 -310
  49. package/skills/fluidsim/SKILL.md +0 -279
  50. package/skills/frontend-design/SKILL.md +0 -100
  51. package/skills/generate-image/SKILL.md +0 -304
  52. package/skills/geniml/SKILL.md +0 -310
  53. package/skills/genomic-coordinates/SKILL.md +0 -189
  54. package/skills/genomic-intelligence/SKILL.md +0 -243
  55. package/skills/geomaster/README.md +0 -105
  56. package/skills/geomaster/SKILL.md +0 -366
  57. package/skills/geopandas/SKILL.md +0 -250
  58. package/skills/get-available-resources/SKILL.md +0 -260
  59. package/skills/gget/SKILL.md +0 -153
  60. package/skills/ginkgo-cloud-lab/SKILL.md +0 -106
  61. package/skills/glycoengineering/SKILL.md +0 -339
  62. package/skills/gtars/SKILL.md +0 -282
  63. package/skills/guardian-rails/SKILL.md +0 -54
  64. package/skills/histolab/SKILL.md +0 -243
  65. package/skills/hugging-science/SKILL.md +0 -132
  66. package/skills/hypogenic/SKILL.md +0 -290
  67. package/skills/hypothesis-generation/SKILL.md +0 -264
  68. package/skills/imaging-data-commons/SKILL.md +0 -496
  69. package/skills/infographics/SKILL.md +0 -315
  70. package/skills/iso-standards-readiness/SKILL.md +0 -352
  71. package/skills/lab-hardware-cad/SKILL.md +0 -372
  72. package/skills/labarchive-integration/SKILL.md +0 -216
  73. package/skills/lamindb/SKILL.md +0 -408
  74. package/skills/latchbio-integration/SKILL.md +0 -227
  75. package/skills/latex-posters/SKILL.md +0 -369
  76. package/skills/latex-posters/references/README.md +0 -439
  77. package/skills/liteparse/SKILL.md +0 -295
  78. package/skills/literature-review/SKILL.md +0 -263
  79. package/skills/markdown-mermaid-writing/SKILL.md +0 -322
  80. package/skills/market-research-reports/SKILL.md +0 -337
  81. package/skills/markitdown/SKILL.md +0 -264
  82. package/skills/matchms/SKILL.md +0 -276
  83. package/skills/matlab/SKILL.md +0 -274
  84. package/skills/matplotlib/SKILL.md +0 -378
  85. package/skills/medchem/SKILL.md +0 -321
  86. package/skills/modal/SKILL.md +0 -468
  87. package/skills/molecular-dynamics/SKILL.md +0 -458
  88. package/skills/molfeat/SKILL.md +0 -348
  89. package/skills/ncats-arax/SKILL.md +0 -178
  90. package/skills/networkx/SKILL.md +0 -440
  91. package/skills/neurokit2/SKILL.md +0 -323
  92. package/skills/neuropixels-analysis/SKILL.md +0 -412
  93. package/skills/nextflow/SKILL.md +0 -195
  94. package/skills/omero-integration/SKILL.md +0 -222
  95. package/skills/onekgpd/SKILL.md +0 -371
  96. package/skills/ontology-term-resolution/SKILL.md +0 -147
  97. package/skills/open-notebook/SKILL.md +0 -297
  98. package/skills/openpiv/SKILL.md +0 -469
  99. package/skills/opentrons-integration/SKILL.md +0 -322
  100. package/skills/optimize-for-gpu/SKILL.md +0 -176
  101. package/skills/owasp-top10/SKILL.md +0 -48
  102. package/skills/pacsomatic/LICENSE +0 -21
  103. package/skills/pacsomatic/SKILL.md +0 -150
  104. package/skills/paper-lookup/SKILL.md +0 -263
  105. package/skills/paperclip/SKILL.md +0 -413
  106. package/skills/paperzilla/SKILL.md +0 -159
  107. package/skills/parallel-web/SKILL.md +0 -128
  108. package/skills/pathml/SKILL.md +0 -222
  109. package/skills/pathogen-variant-surveillance/SKILL.md +0 -208
  110. package/skills/pathway-enrichment/SKILL.md +0 -194
  111. package/skills/pdf/SKILL.md +0 -322
  112. package/skills/peer-review/SKILL.md +0 -288
  113. package/skills/penetration-testing/SKILL.md +0 -31
  114. package/skills/pennylane/SKILL.md +0 -240
  115. package/skills/phylogenetics/SKILL.md +0 -409
  116. package/skills/pi-agent/SKILL.md +0 -83
  117. package/skills/pkpd-modeling/SKILL.md +0 -381
  118. package/skills/polars/SKILL.md +0 -393
  119. package/skills/polars-bio/SKILL.md +0 -379
  120. package/skills/ponytail/SKILL.md +0 -31
  121. package/skills/ponytail-audit/SKILL.md +0 -18
  122. package/skills/pptx/SKILL.md +0 -246
  123. package/skills/pptx-posters/SKILL.md +0 -258
  124. package/skills/primekg/SKILL.md +0 -99
  125. package/skills/protocolsio-integration/SKILL.md +0 -236
  126. package/skills/pufferlib/SKILL.md +0 -328
  127. package/skills/pydeseq2/SKILL.md +0 -369
  128. package/skills/pydicom/SKILL.md +0 -381
  129. package/skills/pyhealth/SKILL.md +0 -124
  130. package/skills/pylabrobot/SKILL.md +0 -216
  131. package/skills/pymatgen/SKILL.md +0 -404
  132. package/skills/pymc/SKILL.md +0 -310
  133. package/skills/pymoo/SKILL.md +0 -276
  134. package/skills/pyopenms/SKILL.md +0 -179
  135. package/skills/pysam/SKILL.md +0 -330
  136. package/skills/pytdc/SKILL.md +0 -297
  137. package/skills/pytorch-lightning/SKILL.md +0 -191
  138. package/skills/pyzotero/SKILL.md +0 -137
  139. package/skills/qiskit/SKILL.md +0 -259
  140. package/skills/qutip/SKILL.md +0 -317
  141. package/skills/rdkit/SKILL.md +0 -94
  142. package/skills/relsa-severity-assessment/SKILL.md +0 -354
  143. package/skills/research-grants/SKILL.md +0 -296
  144. package/skills/research-grants/references/README.md +0 -287
  145. package/skills/research-lookup/README.md +0 -106
  146. package/skills/research-lookup/SKILL.md +0 -338
  147. package/skills/rowan/SKILL.md +0 -398
  148. package/skills/scanpy/SKILL.md +0 -303
  149. package/skills/scholar-evaluation/SKILL.md +0 -296
  150. package/skills/scientific-brainstorming/SKILL.md +0 -282
  151. package/skills/scientific-critical-thinking/SKILL.md +0 -180
  152. package/skills/scientific-schematics/SKILL.md +0 -370
  153. package/skills/scientific-slides/SKILL.md +0 -379
  154. package/skills/scientific-visualization/SKILL.md +0 -285
  155. package/skills/scientific-writing/SKILL.md +0 -356
  156. package/skills/scikit-bio/SKILL.md +0 -470
  157. package/skills/scikit-learn/SKILL.md +0 -324
  158. package/skills/scikit-survival/SKILL.md +0 -313
  159. package/skills/scvelo/SKILL.md +0 -328
  160. package/skills/scvi-tools/SKILL.md +0 -201
  161. package/skills/seaborn/SKILL.md +0 -254
  162. package/skills/security-auditor/SKILL.md +0 -37
  163. package/skills/shap/SKILL.md +0 -282
  164. package/skills/simpy/SKILL.md +0 -283
  165. package/skills/stable-baselines3/SKILL.md +0 -325
  166. package/skills/statistical-analysis/SKILL.md +0 -446
  167. package/skills/statistical-power/SKILL.md +0 -200
  168. package/skills/statsmodels/SKILL.md +0 -238
  169. package/skills/sympy/SKILL.md +0 -354
  170. package/skills/systematic-debugging/SKILL.md +0 -35
  171. package/skills/tamarind/SKILL.md +0 -285
  172. package/skills/tdd/SKILL.md +0 -26
  173. package/skills/tiledbvcf/SKILL.md +0 -456
  174. package/skills/timesfm-forecasting/SKILL.md +0 -408
  175. package/skills/timesfm-forecasting/examples/global-temperature/README.md +0 -178
  176. package/skills/torch-geometric/SKILL.md +0 -458
  177. package/skills/torchdrug/SKILL.md +0 -241
  178. package/skills/transformers/SKILL.md +0 -195
  179. package/skills/treatment-plans/SKILL.md +0 -174
  180. package/skills/treatment-plans/references/README.md +0 -19
  181. package/skills/umap-learn/SKILL.md +0 -488
  182. package/skills/uncertainty-and-units/SKILL.md +0 -384
  183. package/skills/usfiscaldata/SKILL.md +0 -171
  184. package/skills/vaex/SKILL.md +0 -204
  185. package/skills/venue-templates/SKILL.md +0 -269
  186. package/skills/verification-before-completion/SKILL.md +0 -22
  187. package/skills/waypoint-bio/SKILL.md +0 -273
  188. package/skills/what-if-oracle/SKILL.md +0 -184
  189. package/skills/writing-plans/SKILL.md +0 -15
  190. package/skills/xlsx/SKILL.md +0 -110
  191. package/skills/zarr-python/SKILL.md +0 -241
@@ -1,216 +0,0 @@
1
- ---
2
- name: pylabrobot
3
- description: Develop and review PyLabRobot lab-automation resources, liquid-handling plans, offline simulations, and supported-device integrations. Use for PyLabRobot protocols or API questions; keep physical execution behind an explicit operator safety gate.
4
- license: MIT
5
- compatibility: Verified against PyLabRobot 0.2.1 on Python 3.9+. Bundled planning CLIs require only Python 3.11+ and make no serial, USB, or network connections. Physical devices need model-specific extras, configuration, calibration, and trained operator approval.
6
- allowed-tools: Read Write Edit Bash
7
- metadata:
8
- version: "1.2"
9
- skill-author: "K-Dense Inc."
10
- pylabrobot-version: "0.2.1"
11
- researched: "2026-07-23"
12
- ---
13
-
14
- # PyLabRobot
15
-
16
- Use PyLabRobot's hardware-agnostic frontends, resource tree, trackers, and
17
- device-specific backends to develop laboratory automation. Default to local
18
- manifest validation, bookkeeping, and the software-only chatterbox backend.
19
-
20
- ## Verified snapshot
21
-
22
- - PyPI stable: **`PyLabRobot==0.2.1`**, released **2026-03-23**.
23
- - Upstream requirement: **Python >=3.9**. This skill uses Python 3.11 for its
24
- reproducible smoke tests.
25
- - `/stable/` documentation identifies itself as 0.2.1. `/dev/` and repository
26
- `main` describe unreleased work and must not be assumed available in 0.2.1.
27
- - Stable liquid-handler backends include `STARBackend`, `VantageBackend`,
28
- `EVOBackend`, `OpentronsOT2Backend`, and the offline
29
- `LiquidHandlerChatterboxBackend`.
30
- - PyLabRobot's GitHub Releases page has no 0.2.x software release entry; use
31
- the PyPI history, `v0.2.1` tag, and changelog as release evidence.
32
-
33
- ## Non-negotiable hardware boundary
34
-
35
- Never connect to, initialize, home, move, heat, shake, spin, pump, open/close,
36
- or otherwise command physical equipment automatically. Do not turn a simulation
37
- plan into a live backend merely by changing an environment variable, config
38
- value, or import.
39
-
40
- Before any separately authorized live run, require a trained human to:
41
-
42
- 1. Explicitly confirm the exact backend, device identity, firmware, transport,
43
- deck, and protocol revision.
44
- 2. Reconcile the physical deck against the resource tree, including carriers,
45
- adapters, lids, plates, tip racks, waste, labware orientation, barcodes, and
46
- every occupied coordinate.
47
- 3. Verify calibration, teaching, motion envelopes, collision risks, gripper or
48
- channel clearances, and all aspiration/dispense coordinates.
49
- 4. Review source identity and actual fill volume, dead volume, destination
50
- capacity, tip type/capacity/filter compatibility, channel mapping, units,
51
- heights, rates, liquid class, blowout/mixing, and contamination boundaries.
52
- 5. Confirm guards, doors, waste capacity, containment, emergency stop readiness,
53
- PPE, biosafety/chemical controls, and a safe abort/recovery procedure.
54
- 6. Approve a slow dry run or nonhazardous commissioning run when anything is
55
- new or changed.
56
-
57
- Tracker state is **bookkeeping**, not sensing. It cannot prove that liquid or a
58
- tip is physically present. The Visualizer renders resource/tracker events; it
59
- does not model physics. Chatterbox prints planned operations; it does not prove
60
- calibration, reachability, collision freedom, liquid behavior, or device state.
61
-
62
- ## Required intake
63
-
64
- Do not guess any of these:
65
-
66
- - Exact device model, installed options, firmware, computer/OS, and transport.
67
- - Stable PyLabRobot version and required extras.
68
- - Deck/deck origin, carriers, adapters, resource definitions, dimensions,
69
- coordinates, orientations, and motion clearances.
70
- - Plate/tube/reservoir capacities and dead volumes; initial physical volumes.
71
- - Tip model, filter, fitting, capacity, rack state, channel count, and channel
72
- mapping.
73
- - Transfer units (`uL`, `mm`, `uL/s`, `s`), heights, rates, mixing, air gaps,
74
- blowout, liquid properties, and validated vendor liquid class.
75
- - Contamination policy, controls, waste handling, operator interventions,
76
- acceptance criteria, and recovery procedure.
77
-
78
- If information is missing, produce an assumptions/blockers list and an offline
79
- draft only.
80
-
81
- ## Reproducible install
82
-
83
- For offline API inspection and chatterbox simulation:
84
-
85
- ```bash
86
- uv venv --python 3.11 .venv-pylabrobot
87
- uv pip install --python .venv-pylabrobot/bin/python "PyLabRobot==0.2.1"
88
- ```
89
-
90
- On Windows, use `.venv-pylabrobot\Scripts\python.exe`. Do not install hardware
91
- extras until the user names the device and explicitly approves its transport
92
- dependencies. Then inspect the matching stable device page before considering a
93
- pin such as `"PyLabRobot[serial]==0.2.1"` or `"PyLabRobot[usb]==0.2.1"`.
94
-
95
- ## Offline-first workflow
96
-
97
- Run from the repository root. Every bundled CLI uses strict, bounded UTF-8
98
- JSON/CSV, local non-symlink paths, fixed allowlists, and JSON output. None can
99
- select a live backend.
100
-
101
- ```bash
102
- python3 skills/pylabrobot/scripts/validate_manifest.py \
103
- --input tests/pylabrobot/fixtures/protocol_manifest.json
104
-
105
- python3 skills/pylabrobot/scripts/check_deck_geometry.py \
106
- --input tests/pylabrobot/fixtures/protocol_manifest.json
107
-
108
- python3 skills/pylabrobot/scripts/plan_transfers.py \
109
- --manifest tests/pylabrobot/fixtures/protocol_manifest.json \
110
- --transfers tests/pylabrobot/fixtures/transfers.csv
111
-
112
- python3 skills/pylabrobot/scripts/generate_simulation_plan.py \
113
- --manifest tests/pylabrobot/fixtures/protocol_manifest.json \
114
- --transfers tests/pylabrobot/fixtures/transfers.csv
115
-
116
- python3 skills/pylabrobot/scripts/inspect_backends.py \
117
- --expected-version 0.2.1 --strict
118
- ```
119
-
120
- The geometry checker uses conservative static axis-aligned boxes; it is not a
121
- motion planner. The transfer planner requires one new tip per row and checks
122
- source/dead/destination volumes, tip capacity, wells, channels, heights, rates,
123
- units, and allowlists. Review
124
- `assets/protocol-manifest.schema.json` and the synthetic fixtures before making
125
- a project-specific manifest.
126
-
127
- ## Verified software-only example
128
-
129
- The exact backend below is software-only. Do not substitute a hardware backend.
130
-
131
- ```python
132
- from pylabrobot.liquid_handling import LiquidHandler
133
- from pylabrobot.liquid_handling.backends import LiquidHandlerChatterboxBackend
134
- from pylabrobot.resources import (
135
- Cor_96_wellplate_360ul_Fb,
136
- PLT_CAR_L5AC_A00,
137
- TIP_CAR_480_A00,
138
- hamilton_96_tiprack_1000uL_filter,
139
- set_tip_tracking,
140
- set_volume_tracking,
141
- )
142
- from pylabrobot.resources.hamilton import STARLetDeck
143
-
144
- set_tip_tracking(True)
145
- set_volume_tracking(True)
146
-
147
- deck = STARLetDeck()
148
- tip_carrier = TIP_CAR_480_A00(name="tip_carrier")
149
- tips = hamilton_96_tiprack_1000uL_filter(name="tips")
150
- tip_carrier[0] = tips
151
- plate_carrier = PLT_CAR_L5AC_A00(name="plate_carrier")
152
- source = Cor_96_wellplate_360ul_Fb(name="source")
153
- destination = Cor_96_wellplate_360ul_Fb(name="destination")
154
- plate_carrier[0] = source
155
- plate_carrier[1] = destination
156
- deck.assign_child_resource(tip_carrier, rails=3)
157
- deck.assign_child_resource(plate_carrier, rails=15)
158
- source.get_well("A1").tracker.set_volume(100.0) # planned state, not sensing
159
-
160
- lh = LiquidHandler(backend=LiquidHandlerChatterboxBackend(), deck=deck)
161
- await lh.setup() # safe here only because the backend above is software-only
162
- try:
163
- await lh.pick_up_tips(tips["A1"])
164
- await lh.aspirate(source["A1"], vols=[10.0])
165
- await lh.dispense(destination["A1"], vols=[10.0])
166
- await lh.return_tips()
167
- finally:
168
- await lh.stop()
169
- ```
170
-
171
- ## API rules that prevent stale code
172
-
173
- - Current names are `STARBackend`, `VantageBackend`, `EVOBackend`, and
174
- `OpentronsOT2Backend`; do not use stale `STAR`, `TecanBackend`,
175
- `OpentronsBackend`, or `ChatterboxBackend` imports.
176
- - Use `LiquidHandlerChatterboxBackend` for generic offline liquid-handler
177
- testing. `ChatterBoxBackend` is a separate legacy-named export; do not
178
- conflate the two.
179
- - `Visualizer(resource=...)` is valid, followed by `await vis.setup()` and
180
- `await vis.stop()`; it starts localhost HTTP/WebSocket servers and may open a
181
- browser.
182
- - There is no generic `from pylabrobot.liquid_handling import LiquidClass` in
183
- 0.2.1. Stable liquid classes are vendor-specific, for example
184
- `pylabrobot.liquid_handling.liquid_classes.hamilton.HamiltonLiquidClass`.
185
- - Most frontend methods are async. Backend kwargs and capabilities are
186
- vendor/model specific; a shared frontend does not imply identical behavior.
187
-
188
- ## References
189
-
190
- - [Liquid handling](references/liquid-handling.md) — operations, tips, tracking,
191
- liquid classes, units, and validation.
192
- - [Resources](references/resources.md) — decks, coordinates, plates, tip racks,
193
- collisions, state, and serialization.
194
- - [Hardware backends](references/hardware-backends.md) — verified names,
195
- support levels, capabilities, and live-run gate.
196
- - [Analytical equipment](references/analytical-equipment.md) — plate readers
197
- and scales.
198
- - [Material handling](references/material-handling.md) — pumps, heaters,
199
- shakers, temperature control, storage, and centrifuges.
200
- - [Visualization](references/visualization.md) — chatterbox, Visualizer,
201
- localhost services, and simulation limits.
202
-
203
- ## Dated upstream sources
204
-
205
- Checked **2026-07-23**:
206
-
207
- - [PyPI 0.2.1](https://pypi.org/project/PyLabRobot/) — released 2026-03-23;
208
- Python >=3.9; extras and artifacts.
209
- - [Stable installation guide](https://docs.pylabrobot.org/stable/user_guide/_getting-started/installation.html)
210
- — stable versus source/dev install and optional transport groups.
211
- - [Stable API](https://docs.pylabrobot.org/stable/api/pylabrobot.html) and
212
- [supported machines](https://docs.pylabrobot.org/stable/user_guide/machines.html)
213
- — 0.2.1 API and model-specific support labels.
214
- - [`v0.2.1` source tag](https://github.com/PyLabRobot/pylabrobot/tree/v0.2.1)
215
- and [changelog](https://github.com/PyLabRobot/pylabrobot/blob/main/CHANGELOG.md)
216
- — tag dated 2026-03-23; `Unreleased` is development-only.
@@ -1,404 +0,0 @@
1
- ---
2
- name: pymatgen
3
- description: Analyze, validate, convert, and transform materials structures and computed materials data with current pymatgen APIs, including local phase diagrams, symmetry sensitivity, electronic-structure I/O, and explicitly bounded Materials Project queries.
4
- license: MIT
5
- compatibility: Python 3.11+ with uv. The verified snapshot uses pymatgen 2026.5.4, pymatgen-core 2026.7.16, and mp-api 0.46.4. Bundled help and planning CLIs use only the standard library; local scientific execution lazily requires the pinned pymatgen packages. Materials Project access additionally requires explicit network approval and the single named secret MP_API_KEY.
6
- allowed-tools: Read Write Bash Glob Python
7
- metadata:
8
- version: "1.2"
9
- skill-author: "K-Dense Inc."
10
- last-reviewed: "2026-07-23"
11
- ---
12
-
13
- # pymatgen
14
-
15
- Use pymatgen for explicit, provenance-preserving work with compositions,
16
- molecules, periodic structures, computed entries, symmetry, phase diagrams,
17
- electronic structures, and electronic-structure-code files. Treat every parse,
18
- conversion, symmetry assignment, transformation, and database result as
19
- method- and parameter-dependent.
20
-
21
- The MIT frontmatter license covers this skill. `pymatgen` and
22
- `pymatgen-core` are MIT; `mp-api` declares BSD-3-Clause-LBNL. Materials Project
23
- data is generally CC BY 4.0, while contributed data remains owned by its
24
- contributors. Check the exact artifact and data terms before redistribution.
25
-
26
- ## Verified snapshot (2026-07-23)
27
-
28
- - `pymatgen==2026.5.4` is the latest stable wrapper release (2026-05-04).
29
- Package metadata requires Python 3.11+ and directly requires
30
- `pymatgen-core>=2026.4.16`.
31
- - `pymatgen-core==2026.7.16` is the latest stable core release (2026-07-16).
32
- It now contains core objects, symmetry/lattice operations, and the I/O layer,
33
- all under the existing `pymatgen.*` namespace.
34
- - `mp-api==0.46.4` is the latest stable Materials Project client
35
- (2026-06-15), requires Python 3.11+, and depends on
36
- `pymatgen>2024.2.20`.
37
- - The current API site is built from 2026.7.16 core documentation. Pinning both
38
- distributions prevents `pymatgen==2026.5.4` from silently resolving to a
39
- different future core.
40
- - Pymatgen uses date-based versions. PyPI renders the date with dots; do not
41
- infer semantic-version compatibility from the numbers.
42
-
43
- Create a project lock for reproducibility:
44
-
45
- ```bash
46
- uv init --python 3.11
47
- uv add "pymatgen==2026.5.4" "pymatgen-core==2026.7.16" "mp-api==0.46.4"
48
- uv lock
49
- uv sync --frozen
50
- ```
51
-
52
- For a disposable reviewed environment:
53
-
54
- ```bash
55
- uv venv --python 3.11 .venv-pymatgen
56
- uv pip install --python .venv-pymatgen/bin/python \
57
- "pymatgen==2026.5.4" "pymatgen-core==2026.7.16" "mp-api==0.46.4"
58
- ```
59
-
60
- Direct pins do not freeze all transitive wheels. Preserve `uv.lock`, platform,
61
- Python version, package versions, and artifact hashes.
62
-
63
- ## Required workflow
64
-
65
- 1. State whether the object is a non-periodic `Molecule` or periodic
66
- `Structure`; record lattice and periodic boundary conditions.
67
- 2. State units. Pymatgen commonly uses Å, degrees, eV, eV/atom, amu, and
68
- g/cm³, but each API's documented contract is authoritative.
69
- 3. State coordinate mode. `Structure` coordinates are fractional unless
70
- `coords_are_cartesian=True`; `Molecule` coordinates are Cartesian.
71
- 4. Inspect every parser warning. For CIF, preserve occupancy, site-merging,
72
- stoichiometry, and correction warnings; do not silently accept fixes.
73
- 5. Report disorder/partial occupancies and oxidation-state decoration. Never
74
- guess oxidation states implicitly.
75
- 6. Run validation before symmetry, neighbor, transformation, conversion, or
76
- thermodynamic analysis.
77
- 7. Sweep symmetry tolerances and report `symprec` in Å and
78
- `angle_tolerance` in degrees with every assignment.
79
- 8. Treat transformations as new artifacts. Preserve the input, parameters,
80
- software versions, warnings, and parent/child checksums.
81
- 9. Before conversion, identify representation loss. Write only to a new path
82
- and round-trip-check scientifically relevant properties.
83
- 10. Build phase diagrams only from compatible total energies and correction
84
- schemes. A computed hull is conditional on the supplied entry set.
85
- 11. Keep all database access off by default. Disclose endpoint, filters,
86
- fields, result limit, cache behavior, output, license, and citation before
87
- an explicit execution step.
88
- 12. Preserve an artifact manifest. Never use pickle or load an untrusted
89
- general object graph; use schema-validated JSON and explicit constructors.
90
-
91
- ## Core objects
92
-
93
- Use the public convenience imports:
94
-
95
- ```python
96
- from pymatgen.core import Composition, Element, Lattice, Molecule, Structure
97
-
98
- composition = Composition("LiFePO4", strict=True)
99
- iron = Element("Fe")
100
-
101
- lattice = Lattice.cubic(5.64) # Å
102
- structure = Structure(
103
- lattice,
104
- ["Na", "Cl"],
105
- [[0, 0, 0], [0.5, 0.5, 0.5]],
106
- coords_are_cartesian=False,
107
- validate_proximity=True,
108
- )
109
-
110
- molecule = Molecule(
111
- ["O", "H", "H"],
112
- [[0.0, 0.0, 0.0], [0.758, 0.0, 0.504], [-0.758, 0.0, 0.504]],
113
- charge=0,
114
- spin_multiplicity=1,
115
- )
116
- ```
117
-
118
- `Structure` and `Molecule` are mutable; use `IStructure`/`IMolecule` or an
119
- explicit copy when mutation would compromise provenance. See
120
- [core classes](references/core_classes.md).
121
-
122
- ## Safe local structure intake
123
-
124
- Prefer the bundled validator, which captures CIF and Python warnings and
125
- reports units, occupancy, disorder, oxidation states, periodicity, coordinate
126
- mode, and minimum distances:
127
-
128
- ```bash
129
- python scripts/composition_structure_validator.py composition "Fe2O3"
130
- python scripts/composition_structure_validator.py structure structure.cif
131
- python scripts/structure_analyzer.py structure.cif --symmetry
132
- ```
133
-
134
- For direct CIF work, use the current parser method and inspect both warning
135
- channels:
136
-
137
- ```python
138
- import warnings
139
- from pymatgen.io.cif import CifParser
140
-
141
- with warnings.catch_warnings(record=True) as caught:
142
- warnings.simplefilter("always")
143
- parser = CifParser("input.cif", check_cif=True)
144
- structures = parser.parse_structures(
145
- primitive=False,
146
- check_occu=True,
147
- on_error="raise",
148
- )
149
-
150
- parser_messages = list(parser.warnings)
151
- python_messages = [str(item.message) for item in caught]
152
- ```
153
-
154
- Do not parse untrusted files in a privileged process. A critical malicious-CIF
155
- code-execution flaw affected pymatgen through 2024.2.8 and was fixed in
156
- 2024.2.20; the pinned release is newer, but parsers still process attacker
157
- controlled input. Use isolation and CPU/RAM/disk/time limits.
158
-
159
- ## Symmetry
160
-
161
- Space-group assignment depends on tolerances and structure quality:
162
-
163
- ```python
164
- from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
165
-
166
- analyzer = SpacegroupAnalyzer(
167
- structure,
168
- symprec=0.01, # Å
169
- angle_tolerance=5.0, # degrees
170
- )
171
- symbol = analyzer.get_space_group_symbol()
172
- number = analyzer.get_space_group_number()
173
- ```
174
-
175
- The Materials Project pipeline commonly uses `symprec=0.1 Å`, while pymatgen's
176
- documented default is `0.01 Å`; these can produce different assignments.
177
- Generate a sensitivity report instead of changing tolerance until a preferred
178
- answer appears:
179
-
180
- ```bash
181
- python scripts/symmetry_sensitivity_report.py structure.cif \
182
- --symprec 0.001,0.01,0.1 --angle-tolerance 1,5
183
- ```
184
-
185
- See [analysis modules](references/analysis_modules.md).
186
-
187
- ## Conversion and parser/writer I/O
188
-
189
- Plan first; the planner does not open files or import pymatgen:
190
-
191
- ```bash
192
- python scripts/io_conversion_plan.py \
193
- --input input.cif --input-format cif \
194
- --output POSCAR.new --output-format poscar \
195
- --periodic --coordinate-mode direct
196
- ```
197
-
198
- Then convert to a new path with explicit loss acknowledgement:
199
-
200
- ```bash
201
- python scripts/structure_converter.py input.cif POSCAR.new \
202
- --output-format poscar --coordinate-mode direct --allow-lossy \
203
- --acknowledge-parser-warnings
204
- ```
205
-
206
- CIF, POSCAR, XYZ, and JSON do not preserve the same semantics. Check lattice,
207
- periodicity, coordinate mode, species ordering, selective dynamics, site
208
- properties, oxidation states, labels, and disorder after every conversion.
209
- See [I/O formats](references/io_formats.md).
210
-
211
- ## Transformations and provenance
212
-
213
- Transform a copy and preserve history:
214
-
215
- ```python
216
- from pymatgen.alchemy.materials import TransformedStructure
217
- from pymatgen.transformations.standard_transformations import (
218
- SubstitutionTransformation,
219
- SupercellTransformation,
220
- )
221
-
222
- tracked = TransformedStructure(structure.copy(), [])
223
- tracked.append_transformation(SupercellTransformation([2, 2, 2]))
224
- tracked.append_transformation(SubstitutionTransformation({"Na": "K"}))
225
- derived = tracked.final_structure
226
- history = tracked.history
227
- ```
228
-
229
- One-to-many ordering, doping, slab, and magnetic transformations can expand
230
- combinatorially or invoke optional executables. Bound candidates, sites,
231
- supercell size, runtime, and output count. See
232
- [transformations and workflows](references/transformations_workflows.md).
233
-
234
- ## Local phase diagrams
235
-
236
- The bundled generator is offline and accepts only a strict JSON schema with
237
- total eV per entry and provenance:
238
-
239
- ```json
240
- {
241
- "schema_version": "1.0",
242
- "energy_unit": "eV",
243
- "energy_basis": "total_per_entry",
244
- "provenance": {
245
- "source": "reviewed local calculations",
246
- "method": "one compatible energy/correction scheme"
247
- },
248
- "entries": [
249
- {
250
- "entry_id": "local-Li",
251
- "composition": "Li",
252
- "energy_eV": -1.0,
253
- "provenance": {"source": "calculation manifest sha256:..."}
254
- }
255
- ]
256
- }
257
- ```
258
-
259
- ```bash
260
- python scripts/phase_diagram_generator.py entries.json --analyze Li2O
261
- ```
262
-
263
- Elemental endpoints and all competing phases must be present. Do not mix raw
264
- energies from different functionals, pseudopotentials, magnetic states, or
265
- correction conventions. Computed on-hull status is not experimental stability.
266
-
267
- ## Band structures, DOS, VASP, and Q-Chem
268
-
269
- Parse only the data needed:
270
-
271
- ```python
272
- from pymatgen.io.vasp import Vasprun
273
-
274
- run = Vasprun(
275
- "vasprun.xml",
276
- parse_dos=True,
277
- parse_eigen=True,
278
- parse_projected_eigen=False,
279
- parse_potcar_file=False,
280
- )
281
- band_structure = run.get_band_structure(line_mode=True)
282
- band_gap = band_structure.get_band_gap()
283
- complete_dos = run.complete_dos
284
- ```
285
-
286
- Projected eigenvalues can require extreme memory. Verify convergence, k-path,
287
- spin/SOC settings, Fermi-level conventions, smearing, and projection basis
288
- before interpreting gaps or DOS. A parser success is not a converged
289
- calculation.
290
-
291
- Current Q-Chem interfaces are `pymatgen.io.qchem.inputs.QCInput` and
292
- `pymatgen.io.qchem.outputs.QCOutput`:
293
-
294
- ```python
295
- from pymatgen.io.qchem.inputs import QCInput
296
-
297
- job = QCInput(
298
- molecule,
299
- rem={"job_type": "sp", "method": "wb97x-v", "basis": "def2-svpd"},
300
- )
301
- text = str(job)
302
- ```
303
-
304
- Pymatgen writes inputs and parses outputs; it does not grant a VASP or Q-Chem
305
- license or establish method validity. POTCAR files are VASP-licensed and are
306
- not distributed by pymatgen. Never redistribute them or scan unrelated
307
- directories for them. Optional tools such as enumlib, Bader, packmol, ffmpeg,
308
- and Zeo++ are native/external executables: review provenance, licenses, argv,
309
- working directory, and resource limits before a separate explicit invocation.
310
-
311
- ## Materials Project: plan before network
312
-
313
- Use only:
314
-
315
- ```python
316
- from mp_api.client import MPRester
317
- ```
318
-
319
- The client reads `MP_API_KEY` when constructed. Supply only that named
320
- environment variable through the user's shell or secret manager. Do not accept
321
- the key as a CLI argument, traverse `.env` files, dump environment variables,
322
- or print exception data without redaction.
323
-
324
- Dry-run planning is the default:
325
-
326
- ```bash
327
- python scripts/mp_query.py \
328
- --chemsys Li-Fe-O \
329
- --energy-above-hull 0 0.05 \
330
- --fields formula_pretty,energy_above_hull,band_gap,origins \
331
- --limit 25
332
- ```
333
-
334
- Only `--execute` permits one bounded summary query and requires a new output:
335
-
336
- ```bash
337
- python scripts/mp_query.py \
338
- --material-id mp-149 \
339
- --fields formula_pretty,structure,origins,last_updated \
340
- --limit 1 --output mp-149.json --execute
341
- ```
342
-
343
- The CLI sets `num_chunks=1`, requires explicit fields and filters, caps results,
344
- does not implement an implicit result cache, and never overwrites output.
345
- `MPRester` initialization also performs compatibility/heartbeat metadata
346
- requests; the plan discloses these, disables the platform-detail user agent and
347
- local database-version notification log, and records the returned database
348
- version. The summary workflow does not request full-dataset cache downloads.
349
- `mp-api` 0.46.4 retries HTTP 429/502/504 according to its own configured policy
350
- and respects `Retry-After`; do not invent a numeric service quota or add an
351
- unbounded retry loop.
352
-
353
- Materials Project core values are computed, method-dependent data—not
354
- experimental truth. PBE commonly overestimates lattice parameters and
355
- systematically underestimates band gaps; aggregated values can change across
356
- database releases. Preserve retrieval time, query, fields, material/task
357
- origins, database release when available, client versions, CC BY attribution,
358
- and the canonical plus property-specific citations. See
359
- [Materials Project API](references/materials_project_api.md).
360
-
361
- ## Bundled CLIs
362
-
363
- All CLIs have dependency-free `--help`, lazy scientific imports, bounded JSON,
364
- and no implicit network:
365
-
366
- - `scripts/composition_structure_validator.py` — strict composition/structure
367
- checks; optional oxidation-state guessing is explicit and bounded.
368
- - `scripts/structure_analyzer.py` — bounded lattice, sites, symmetry, distance,
369
- and optional CrystalNN report.
370
- - `scripts/symmetry_sensitivity_report.py` — tolerance-grid space groups.
371
- - `scripts/io_conversion_plan.py` — dependency-free representation-loss plan.
372
- - `scripts/structure_converter.py` — one-file conversion to a new path.
373
- - `scripts/phase_diagram_generator.py` — strict local computed-entry hull.
374
- - `scripts/mp_query.py` — dry-run MP query plan and opt-in bounded client.
375
- - `scripts/artifact_manifest.py` — checksums, versions, sources, and provenance.
376
-
377
- Use:
378
-
379
- ```bash
380
- python scripts/artifact_manifest.py \
381
- --artifact input.cif --artifact analysis.json \
382
- --workflow "local symmetry sensitivity" --output manifest.json
383
- ```
384
-
385
- ## References
386
-
387
- - [Core classes](references/core_classes.md)
388
- - [I/O formats, VASP, and Q-Chem](references/io_formats.md)
389
- - [Analysis, symmetry, phase diagrams, bands, and DOS](references/analysis_modules.md)
390
- - [Transformations and workflows](references/transformations_workflows.md)
391
- - [Materials Project API, provenance, license, and limits](references/materials_project_api.md)
392
-
393
- ## Sources (verified 2026-07-23)
394
-
395
- - [pymatgen 2026.5.4 on PyPI](https://pypi.org/project/pymatgen/)
396
- - [pymatgen-core 2026.7.16 on PyPI](https://pypi.org/project/pymatgen-core/)
397
- - [pymatgen API documentation](https://pymatgen.org/)
398
- - [pymatgen changelog](https://pymatgen.org/CHANGES.html)
399
- - [mp-api 0.46.4 on PyPI](https://pypi.org/project/mp-api/)
400
- - [Materials Project API getting started](https://docs.materialsproject.org/downloading-data/using-the-api/getting-started)
401
- - [Materials Project query guide](https://docs.materialsproject.org/downloading-data/using-the-api/querying-data)
402
- - [Materials Project FAQ and computed-data caveats](https://docs.materialsproject.org/frequently-asked-questions)
403
- - [Materials Project citation page](https://materialsproject.org/about/cite)
404
- - [Official tutorial series endorsed by pymatgen](https://github.com/computron/pymatgen_tutorials)