Package for sf_convert
Project description
mmCIF File Script
This Python script provides command line interface to read, write, and manipulate mmCIF files using the py-mmcif
library.
Installation
You need Python 3.6 or later to run this script. The py-mmcif
library can be installed via pip:
pip install py-mmcif
Usage
Run the script with the -h
or --help
option to view the help message:
python sffile.py --help
Here are the available command line arguments:
-r
or--read
: Read from an mmCIF file. Provide the filename as an argument. Example:python sffile.py --read myfile.cif
-w
or--write
: Write to an mmCIF file. Provide the filename as an argument. Example:python sffile.py --write myfile.cif
-b
or--block
: Get a block by its name. Provide the block name as an argument. Example:python sffile.py --read myfile.cif --block myblock
-o
or--object
: Get an object from a block by its category. Provide the block name and category as arguments. Example:python sffile.py --read myfile.cif --object myblock mycategory
-d
or--default
: Set a block as the default block. Provide the block name as an argument. Example:python sffile.py --read myfile.cif --default myblock
-g
or--get
: Get an object from the default block by its category. Provide the category as an argument. Example:python sffile.py --read myfile.cif --default myblock --get mycategory
-ob
or--objblock
: Get an object from a block. This is similar to the--object
argument. Provide the block name and category as arguments. Example:python sffile.py --read myfile.cif --objblock myblock mycategory
-l
or--list
: List the names of all blocks in the file. Example:python sffile.py --read myfile.cif --list
-c
or--categories
: List all categories in a block. Provide the block name as an argument. Example:python sffile.py --read myfile.cif --categories myblock
You can also combine these arguments. For example, you can read from a file, list the blocks, get an object from a block, and then write to a file:
python sffile.py --read myfile.cif --list --object myblock mycategory --write myfile.cif
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
sf_convert-2.1.6.tar.gz
(28.0 MB
view details)
Built Distribution
File details
Details for the file sf_convert-2.1.6.tar.gz
.
File metadata
- Download URL: sf_convert-2.1.6.tar.gz
- Upload date:
- Size: 28.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf6dc818900a6fb948907c19ab167c0e258d050f161113c52ec52ac7d5f39533 |
|
MD5 | 752e4d75868298ffe1e6725fbd37614a |
|
BLAKE2b-256 | c087e6d7e33ef00ee0858c67d1c2f11e11edf62173877682419a2dc12d29b395 |
File details
Details for the file sf_convert-2.1.6-py3-none-any.whl
.
File metadata
- Download URL: sf_convert-2.1.6-py3-none-any.whl
- Upload date:
- Size: 64.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 858c12af3ef828129b7e0da0d0a4b43ce63b3dcf3ac11832b68336b8e093094a |
|
MD5 | 30dee16ad05537a55097ff56176f1798 |
|
BLAKE2b-256 | 9cb3c6af08ae771ce228ce3f6b9957a4f61e03acd173f94873807a3a5db76b99 |