Skip to main content

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.3.tar.gz (28.0 MB view details)

Uploaded Source

Built Distribution

sf_convert-2.1.3-py3-none-any.whl (64.2 kB view details)

Uploaded Python 3

File details

Details for the file sf_convert-2.1.3.tar.gz.

File metadata

  • Download URL: sf_convert-2.1.3.tar.gz
  • Upload date:
  • Size: 28.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for sf_convert-2.1.3.tar.gz
Algorithm Hash digest
SHA256 479006ac7a5128cbf58419aab96500c0740897cb16741c3ac2d821a048682db5
MD5 c7a3e85ca9d52d2aa9b670052c5b2443
BLAKE2b-256 0fb13166b6d6281978a0d8040120464b3a87c82592b214fcea3591131ce99ac5

See more details on using hashes here.

File details

Details for the file sf_convert-2.1.3-py3-none-any.whl.

File metadata

  • Download URL: sf_convert-2.1.3-py3-none-any.whl
  • Upload date:
  • Size: 64.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for sf_convert-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 88e19fde93797d94503c935f225f87ca0918a35965dbf8a7f0226423d30d6020
MD5 22fbf9e54ddcbfbae298d7ed114e9c0b
BLAKE2b-256 9be19514f283e519f483dfa3731262154b03bab45728e528612690bd539cd25a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page