ciffetch
ciffetch is a PyQt6 dialog for searching the Crystallography Open Database
(COD) and retrieving crystal structure
data as CIF files. It can be run as a standalone application or embedded in
another PyQt application.
Search using chemical formula or required elements, space group, lattice parameter ranges, text, journal, and publication year. Matching entries appear in a sortable results table; double-click an entry to choose where to save its CIF file.
Requirements
- Python 3
- PyQt6
- requests
Install the dependencies with:
python -m pip install PyQt6 requests
Run the application
python ciffetch.py
Enter search criteria in the dialog and run the search. Double-click a result to fetch its CIF file and save it to a chosen location.
Use from a PyQt application
Create a QApplication, instantiate CifFetchDialog, and call
fetch_cifs(). The sigFileFetched signal provides the saved file path and
CIF text when a file has been fetched:
import sys
from PyQt6.QtWidgets import QApplication
from ciffetch import CifFetchDialog
app = QApplication(sys.argv)
dialog = CifFetchDialog()
dialog.sigFileFetched.connect(
lambda path, cif_content: print(f"Saved {path} ({len(cif_content)} characters)")
)
dialog.fetch_cifs()
sys.exit(app.exec())
For single-file selection, call dialog.fetch_single_cif() instead.
CifFetchDialog also emits the standard accepted() signal after a file is
fetched in single-file mode. The get_latest_saved_file() method returns the
most recently saved file path.
Acknowledgment and data
This application is made possible by the people behind the Crystallography Open Database. COD data and the database are dedicated to the public domain under CC0. Users of COD data should acknowledge the original authors of the structural data and cite the relevant source information provided with each entry.
License
The ciffetch software is licensed under the
GNU General Public License, version 3. This software license is
separate from the license and attribution requirements for data retrieved from
COD.
Metadata
Release files for ciffetch 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ciffetch-0.1.0.tar.gz | 24.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ciffetch-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.4 kB
Release files / ciffetch-0.1.0.tar.gz
| Download URL | ciffetch-0.1.0.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9646f19bf5d74de0873a83383a75311eaa1d5ce98f267a9a4ef667bb6cf6fdf
|
|
BLAKE2b-256 checksum How to use checksums |
49e34cf9f8945410a46cb515232e6fd12070a03d23b7504e3833d5d41bc2fb78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / ciffetch-0.1.0-py3-none-any.whl
| Download URL | ciffetch-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
626672101a563d877c756dfd71bb2c6b6ea62d15e35a4e01873cdd7ce0eacaf6
|
|
BLAKE2b-256 checksum How to use checksums |
b0b7b1f40dcb13057d391123e52de3cc2345cea9ae646586551b987816fb80be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|