CLI tool to view CIF files from various sources in your editor
Project description
view-cif
CLI tool to view CIF files from various sources in your preferred editor.
Features
- Open CIF files by file path, PDB code, or compound name
- Automatic download from PDB (including next-gen format)
- CCD and PRD/PRDCC bulk file support
- Configurable editor and data paths via YAML config
- Cache-based viewing (no blocking
--wait)
Installation
Requires Python 3.12+.
# From PyPI
pip install view-cif
# Or with uv
uv tool install view-cif
Usage
# Open a local CIF file
view-cif /path/to/structure.cif
# Open by PDB code (auto-downloads)
view-cif 1abc
# Open next-gen PDB format
view-cif 1abc --next-gen
# Open from a specific directory
view-cif ABC /path/to/cif/dir
# Open CCD chemical component
view-cif ATP
# Open PRD definition
view-cif prd --ccd-definition
Options
| Option | Short | Description |
|---|---|---|
--ccd-definition |
-d |
Use CCD definition file type |
--next-gen |
-n |
Use pdb_next_gen format |
Configuration
On first run, a default config is created at ~/.config/view-cif/config.yaml.
Managing config via CLI
# Show current configuration
view-cif config show
# Change editor
view-cif config set editor nvim
# Set data paths
view-cif config set paths.chem_comp /data/chem_comp
view-cif config set paths.monomers /data/monomers
Config keys
| Key | Description |
|---|---|
editor |
Editor command to open CIF files (e.g., code, nvim, emacs) |
cache_dir |
Directory for cached CIF output |
paths.pdb_next_gen |
Root directory for next-gen PDB files |
paths.bird |
Root directory for BIRD (PRD) data |
paths.monomers |
Directory containing components.cif.gz |
paths.chem_comp |
Directory for chemical component CIF files |
paths.prd |
Directory for PRD definition CIF files |
Development
# Install with dev dependencies
uv sync --group dev
# Run tests
uv run pytest --cov=view_cif -v
# Lint
uv run ruff check .
License
Project details
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 view_cif-0.2.2.tar.gz.
File metadata
- Download URL: view_cif-0.2.2.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccf5822cb1b96ee436df66440e22987bb161fad1494f466bdb5b489079fc1d87
|
|
| MD5 |
9ab579a30ea75699912faf32ce24d853
|
|
| BLAKE2b-256 |
67f580b0eee5f7104b378598c3cfcbfa062d4b115112610f8dea29a5f2c7f87e
|
Provenance
The following attestation bundles were made for view_cif-0.2.2.tar.gz:
Publisher:
publish.yml on N283T/view-cif
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
view_cif-0.2.2.tar.gz -
Subject digest:
ccf5822cb1b96ee436df66440e22987bb161fad1494f466bdb5b489079fc1d87 - Sigstore transparency entry: 1051436104
- Sigstore integration time:
-
Permalink:
N283T/view-cif@f2208c6be822152a7df244c102a2d2913a86880e -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/N283T
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2208c6be822152a7df244c102a2d2913a86880e -
Trigger Event:
push
-
Statement type:
File details
Details for the file view_cif-0.2.2-py3-none-any.whl.
File metadata
- Download URL: view_cif-0.2.2-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f3f49356bf0b3647725f0d713faf776259acc45ddf01dbc68bf1fc6a8087039
|
|
| MD5 |
719741d186d71e178da89af3924d5669
|
|
| BLAKE2b-256 |
f31f83752bea9ef27ec7b8a6bc1a30920dbf18ce612ee37baa57bf1238bacaec
|
Provenance
The following attestation bundles were made for view_cif-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on N283T/view-cif
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
view_cif-0.2.2-py3-none-any.whl -
Subject digest:
1f3f49356bf0b3647725f0d713faf776259acc45ddf01dbc68bf1fc6a8087039 - Sigstore transparency entry: 1051436105
- Sigstore integration time:
-
Permalink:
N283T/view-cif@f2208c6be822152a7df244c102a2d2913a86880e -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/N283T
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2208c6be822152a7df244c102a2d2913a86880e -
Trigger Event:
push
-
Statement type: