sf-convert


Namesf-convert JSON
Version 2.1.11 PyPI version JSON
download
home_pageNone
SummaryPackage for sf_convert
upload_time2024-12-10 21:34:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseapache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
pip install py-mmcif
```

## Usage

Run the script with the `-h` or `--help` option to view the help message:

```bash
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:

```bash
python sffile.py --read myfile.cif --list --object myblock mycategory --write myfile.cif
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sf-convert",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Vivek Reddy Chithari <vivek.chithari@rcsb.org>, Ezra Peisach <ezra.peisach@rcsb.org>",
    "download_url": "https://files.pythonhosted.org/packages/b7/bd/4bceb9c406c21f9522d9b8ec93256f1639c0eec5dd5152ddd5a0f5bb15cc/sf_convert-2.1.11.tar.gz",
    "platform": null,
    "description": "# mmCIF File Script\n\nThis Python script provides command line interface to read, write, and manipulate mmCIF files using the `py-mmcif` library. \n\n## Installation\n\nYou need Python 3.6 or later to run this script. The `py-mmcif` library can be installed via pip:\n\n```bash\npip install py-mmcif\n```\n\n## Usage\n\nRun the script with the `-h` or `--help` option to view the help message:\n\n```bash\npython sffile.py --help\n```\n\nHere are the available command line arguments:\n\n- `-r` or `--read`: Read from an mmCIF file. Provide the filename as an argument. \n    Example: `python sffile.py --read myfile.cif`\n- `-w` or `--write`: Write to an mmCIF file. Provide the filename as an argument. \n    Example: `python sffile.py --write myfile.cif`\n- `-b` or `--block`: Get a block by its name. Provide the block name as an argument.\n    Example: `python sffile.py --read myfile.cif --block myblock`\n- `-o` or `--object`: Get an object from a block by its category. Provide the block name and category as arguments.\n    Example: `python sffile.py --read myfile.cif --object myblock mycategory`\n- `-d` or `--default`: Set a block as the default block. Provide the block name as an argument.\n    Example: `python sffile.py --read myfile.cif --default myblock`\n- `-g` or `--get`: Get an object from the default block by its category. Provide the category as an argument.\n    Example: `python sffile.py --read myfile.cif --default myblock --get mycategory`\n- `-ob` or `--objblock`: Get an object from a block. This is similar to the `--object` argument. Provide the block name and category as arguments.\n    Example: `python sffile.py --read myfile.cif --objblock myblock mycategory`\n- `-l` or `--list`: List the names of all blocks in the file.\n    Example: `python sffile.py --read myfile.cif --list`\n- `-c` or `--categories`: List all categories in a block. Provide the block name as an argument.\n    Example: `python sffile.py --read myfile.cif --categories myblock`\n\nYou 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:\n\n```bash\npython sffile.py --read myfile.cif --list --object myblock mycategory --write myfile.cif\n```\n",
    "bugtrack_url": null,
    "license": "apache-2.0",
    "summary": "Package for sf_convert",
    "version": "2.1.11",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd7f05e54751a1c881f62e5f1de3cc021cb89e7980a7f6dd08f741bbc4aa10dd",
                "md5": "07c348eca20def5fd7fba8d0706ac2a2",
                "sha256": "f8a914886e149a86d2e7b894c47fd3ebc2299941e700e64a968d474cf1e3ca1d"
            },
            "downloads": -1,
            "filename": "sf_convert-2.1.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "07c348eca20def5fd7fba8d0706ac2a2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 65789,
            "upload_time": "2024-12-10T21:34:26",
            "upload_time_iso_8601": "2024-12-10T21:34:26.657898Z",
            "url": "https://files.pythonhosted.org/packages/bd/7f/05e54751a1c881f62e5f1de3cc021cb89e7980a7f6dd08f741bbc4aa10dd/sf_convert-2.1.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b7bd4bceb9c406c21f9522d9b8ec93256f1639c0eec5dd5152ddd5a0f5bb15cc",
                "md5": "7d408e7970e780c75477b6f05efa485e",
                "sha256": "2cd58e589b2382a7cdb525d8e26e28c4897223624129aeddcef7a62e98b5d7c7"
            },
            "downloads": -1,
            "filename": "sf_convert-2.1.11.tar.gz",
            "has_sig": false,
            "md5_digest": "7d408e7970e780c75477b6f05efa485e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 29245367,
            "upload_time": "2024-12-10T21:34:50",
            "upload_time_iso_8601": "2024-12-10T21:34:50.751656Z",
            "url": "https://files.pythonhosted.org/packages/b7/bd/4bceb9c406c21f9522d9b8ec93256f1639c0eec5dd5152ddd5a0f5bb15cc/sf_convert-2.1.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 21:34:50",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "sf-convert"
}
        
Elapsed time: 0.36783s