Registry / data / castepinput

castepinput

JSON →
library0.1.11pypypi✓ verified 84d ago

A simple Python library for parsing and writing CASTEP input (.cell, .param) files. Current version 0.1.11, release cadence irregular.

pip install castepinput
INSTALL
IMPORT
SIG · CASTEPINPUT
C
castepinput
datapythonv0.1.11
Install
4.0s avg
Import
Disk
91MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.11 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 90.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.0s · import 0.000s · 87MB
91MB installed
● package 91MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CellInput
from castepinput import CellInput
from castepinput import CastepInput
ParamInput
from castepinput import ParamInput
from castepinput import CastepInput
Block
from castepinput import Block
from castepinput import CastepInput

Read a .cell file, modify a block, and write it back.

from castepinput import CastepInput # Parse an existing .cell file with open('example.cell', 'r') as f: content = f.read() cell = CastepInput(content) print(cell.blocks) # dict of blocks # Modify and write back cell.blocks['blockname'] = [['value1', 'value2']] with open('output.cell', 'w') as f: f.write(str(cell))
Debug
Known issues
gotchaCastepInput accepts file content as a string, not a file path. Use open().read() to pass content.
fix
Read the file first: with open('path.cell') as f: content = f.read() then CastepInput(content)
affects: all
gotchaBlock values are stored as lists of lists; modifying direct list may not update the internal representation. Use the provided methods if available.
fix
Assign directly to `cell.blocks['blockname'] = new_list_of_lists`
affects: all
Upgrade
Version history
0.1.11latest on PyPI · released Apr 17, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
castepinput — pip install castepinput · libregistry