{ "info": { "author": "Glen van Ginkel (Protein Data Bank in Europe; PDBe)", "author_email": "pdbe@ebi.ac.uk", "bugtrack_url": null, "classifiers": [], "description": "Copyright [2013] EMBL - European Bioinformatics Institute\nLicensed under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in\ncompliance with the License. You may obtain a copy of\nthe License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on\nan \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied. See the License for the\nspecific language governing permissions and limitations\nunder the License.\n\nDescription: [![pipeline status](https://gitlab.com/glenveegee/PDBeCIF/badges/master/pipeline.svg)](https://gitlab.com/glenveegee/PDBeCIF/commits/master)\n [![coverage report](https://gitlab.com/glenveegee/PDBeCIF/badges/master/coverage.svg)](https://gitlab.com/glenveegee/PDBeCIF/commits/master)\n \n # PDBeCIF \n Protein Data Bank in Europe (PDBe; http://pdbe.org) mmCif/CIF/STAR parser and API\n \n used to work with STAR, CIF, and mmCIF formatted files. The package\n contains modules for accessing mmCIF data in different ways depending\n on the type of task required.\n \n Typical usage often looks like this:\n \n ```python\n from mmCif import *\n from mmcifIO import mmcifIO\n ```\n \n ## Reading from a file\n \n ### INPUT: Any STAR/CIF/mmCIF file, OUTPUT: CifFile object\n ```python\n cfr = mmcifIO.CifFileReader(input='dictionary')\n cif_file = cfr.read(os.path.join(, \"usage-example.cif\"), output='cif_file')\n print \"CifFile:\", cif_file\n ```\n \n ## Writing to a file\n \n ### INPUT: CifFile object\n ```python\n # create a file writer\n cff = mmcifIO.CifFileWriter(os.path.join(, \"cif_output_test.cif\"))\n # write the file\n cff.write(cif_file)\n ```\n \n \n ## Using a CifFile object\n \n Using the CifFile object to access, edit and update mmCIF data.\n The following examples use a CifFile object with roughly the following structure.\n \n Data are manipulated using the accessors and mutators provided:\n \n NB: See the Test suite in mmCif.test for more examples\n \n ### Example 1 - Working with CifFile\n \n ```python\n print \"DataBlock ids:\", cif_file.getDataBlockIds() #List all datablock ids\n print \"DataBlock objects:\", cif_file.getDataBlocks() #List all datablock objects\n data_block_1 = cif_file.getDataBlock(\"TEST_CIF\") #Get a specific datablock\n data_block_1 = cif_file.getDataBlocks()[0] #Get the first datablock\n data_block_2 = cif_file.setDataBlock(\"BLOCK_2\") # Create another empty datablock\n data_block_3 = cif_file.setDataBlock(\"BLOCK_3\") # Create another empty datablock\n cif_file.removeChild(data_block_2) # Remove datablock (Method 1 - given object)\n cif_file.removeChild(\"BLOCK_3\") # Remove datablock (Method 2 - given ID)\n print \"RECYCLED DATABLOCKS:\", cif_file.recycleBin # Removed objects are stored in a recycle bin\n ```\n \n ### Example 2 - Working with DataBlock\n \n NB: Category and SaveFrame are handled in the same manner\n \n ```python\n data_block_1 = cif_file.getDataBlock(\"TEST_CIF\") #Get a specific datablock\n data_block_4 = cif_file.setDataBlock(\"BLOCK_4\") # Create another empty datablock\n data_block_5 = cif_file.setDataBlock(\"BLOCK_5\") # Create another empty datablock\n data_block_5.getId() # Get the datablock ID\n data_block_5.updateId(\"BLOCK_5.1\") # Change the datablock ID\n print \"Category ids:\", data_block_1.getCategoryIds() #List all category ids\n print \"Category objects:\", data_block_1.getCategories() #List all category objects\n category_1 = data_block_1.getCategory(\"_test_keyword\") #Get a specific category\n category_2 = data_block_4.setCategory(\"CATEGORY_2\") #Create an empty category\n category_3 = data_block_4.setCategory(\"CATEGORY_3\") #Create an empty category\n data_block_4.removeChild(category_2) # Remove category (Method 1 - given object)\n data_block_4.removeChild(\"CATEGORY_3\") # Remove category (Method 2 - given ID)\n data_block_5.remove() # Remove datablock from CifFile\n print \"RECYCLED CATEGORIES:\", data_block_4.recycleBin # Removed objects are stored in a recycle bin\n ```\n \n ### Example 3 - Working with Category\n \n ```python\n category_1 = data_block_1.getCategory(\"_test_keyword\") #Get a specific category\n category_4 = data_block_4.setCategory(\"CATEGORY_4\") # Create another empty category\n category_5 = data_block_4.setCategory(\"CATEGORY_5\") # Create another empty category\n print \"Item names:\", category_1.getItemNames() #List all item names\n print \"Item objects:\", category_1.getItems() #List all item objects\n item_1 = category_1.getItem(\"field_1\") #Get a specific item\n item_2 = category_4.setItem(\"ITEM_2\") #Create an empty item\n item_3 = category_4.setItem(\"ITEM_3\") #Create an empty item\n category_4.removeChild(item_2) # Remove item (Method 1 - given object)\n category_4.removeChild(\"ITEM_3\") # Remove item (Method 2 - given ID)\n category_5.remove() # Remove category from DataBlock\n print \"RECYCLED ITEMS:\", category_4.recycleBin # Removed objects end up in the recycle bin\n ```\n \n ### Example 4 - Working with Item\n \n ```python\n item_1 = category_1.getItem(\"field_1\") #Get a specific item\n item_4 = category_4.setItem(\"ITEM_4\") # Create another empty item\n item_5 = category_4.setItem(\"ITEM_5\") # Create another empty item\n print \"Value (raw):\", item_1.getRawValue() #Get raw item value (Method 1 - using accessor)\n print \"Value (raw):\", item_1.value #Get raw item value (Method 2 - using attribute)\n print \"Value (formated):\", item_1.getFormattedValue() #Get the formated value (for file export)\n item_4.setValue(\"VALUE_2\") #Set the item value\n item_5.setValue([9, 8, 7, 6, 5]) #Set the item value\n item_5.remove() # Remove item from Category\n print \"RECYCLED ITEMS:\", category_4.recycleBin # Removed objects end up in the recycle bin\n ```\n ### Example 5 - Method chaining\n For every object the setXXXX() method always returns the this you are\n trying to set. If no object is present it creates a new one and returns it.\n setXXXX() can therefor be used as both accessor and mutator\n ```python\n \n cif_file.setDataBlock(\"BLOCK_6\").setCategory(\"CATEGORY_6\").setItem(\"ITEM_6\").setValue(\"VALUE_6\")\n ```\n \n ## Installation\n \n ### pip\n \n pip install git+http://gitlab.com/glenveegee/PDBeCIF.git\n \n Optionally, you can specify a tag/branch. For example:\n \n pip install git+http://gitlab.com/glenveegee/PDBeCIF.git@v1.3.4\n \n ### Manual\n \n You can also simply download a release from https://gitlab.com/glenveegee/PDBeCIF/releases and copy it to your Python library path.\n \n \nKeywords: STAR CIF mmCIF PDB PDBe parsing parser API\nPlatform: UNKNOWN\nClassifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)\nClassifier: Programming Language:: Python\nClassifier: Programming Language:: Python:: 2\nClassifier: Programming Language:: Python:: 2.6\nClassifier: Programming Language:: Python:: 2.7\nClassifier: Programming Language:: Python:: 3\nClassifier: Programming Language:: Python:: 3.2\nClassifier: Programming Language:: Python:: 3.3\nClassifier: Programming Language:: Python:: 3.4\nClassifier: Programming Language:: Python:: 3.5\nClassifier: Programming Language:: Python:: 3.6\nClassifier: Programming Language:: Python:: 3.7\nClassifier: Programming Language:: Python:: Implementation:: CPython\nClassifier: Programming Language:: Python:: Implementation:: PyPy\nClassifier: Operating System :: Unix\nClassifier: Operating System :: MacOS\nClassifier: Operating System :: POSIX\nClassifier: Intended Audience :: Science/Research\nClassifier: Intended Audience :: Developers\nClassifier: Topic :: Scientific/Engineering :: Bio-Informatics\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/PDBeCIF/", "keywords": "", "license": "Apache License", "maintainer": "", "maintainer_email": "", "name": "PDBeCif", "package_url": "https://pypi.org/project/PDBeCif/", "platform": "", "project_url": "https://pypi.org/project/PDBeCif/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/PDBeCIF/" }, "release_url": "https://pypi.org/project/PDBeCif/1.3.78800442/", "requires_dist": null, "requires_python": "", "summary": "A lightweight pure python package for reading, writing and manipulating mmCIF files distributed by the wwPDB", "version": "1.3.78800442" }, "last_serial": 4022936, "releases": { "1.3.4": [ { "comment_text": "", "digests": { "md5": "d3ce614a0855340e6bed6ed5ef98589f", "sha256": "99f5ad6857b534ec9eca57a05cc69790b765938e5fed770baf8d519d3055c719" }, "downloads": -1, "filename": "PDBeCif-1.3.4-py3-none-any.whl", "has_sig": false, "md5_digest": "d3ce614a0855340e6bed6ed5ef98589f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 26948, "upload_time": "2018-06-28T16:19:37", "url": "https://files.pythonhosted.org/packages/9c/6a/295919fee7f263c072603977fa0d99e7c83e8b870aef99a7c6e32181006d/PDBeCif-1.3.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff917e6c0bed9e965a3c9f6dfbf25924", "sha256": "b5ef80d22ba46b74e9738056dc3fcdf67a9bc76d49cd2039d9e2c3dd8b9f6d4e" }, "downloads": -1, "filename": "PDBeCif-1.3.78455612-py3-none-any.whl", "has_sig": false, "md5_digest": "ff917e6c0bed9e965a3c9f6dfbf25924", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27007, "upload_time": "2018-07-02T09:28:10", "url": "https://files.pythonhosted.org/packages/fe/c3/74788ba9f69840f01aedf5c45dc7b6f76378ebebda8a579ef7166cc6ca03/PDBeCif-1.3.78455612-py3-none-any.whl" } ], "1.3.5": [ { "comment_text": "", "digests": { "md5": "1ca4e254444c816687100c10f44d5fe4", "sha256": "f0a42b121e1161d2ed44c924c06ba56989450c83e4184d950e19068dea41fba6" }, "downloads": -1, "filename": "PDBeCif-1.3.5-py2-none-any.whl", "has_sig": false, "md5_digest": "1ca4e254444c816687100c10f44d5fe4", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 30240, "upload_time": "2018-06-29T19:46:44", "url": "https://files.pythonhosted.org/packages/b4/23/5e0439553a849a038b3c57972a484e0d819373141a07e605e5469a3de107/PDBeCif-1.3.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f9585b34e7527836fe306e3370972f1", "sha256": "4b9dccc2185f2e426b2b1380b1e0e6a570c2ecae85a7ab09ea4190294dc7bc16" }, "downloads": -1, "filename": "PDBeCif-1.3.5.tar.gz", "has_sig": false, "md5_digest": "6f9585b34e7527836fe306e3370972f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22684, "upload_time": "2018-06-29T19:46:45", "url": "https://files.pythonhosted.org/packages/a9/f4/489257083988129ef4e68399228cfbbdb87205b4bfe081709b5c161767c8/PDBeCif-1.3.5.tar.gz" } ], "1.3.78455612": [ { "comment_text": "", "digests": { "md5": "6e395d9eda92e3312a6c849fd15b272a", "sha256": "f8444a62d9f5a75bd1969996afab44675f7c71f93ecccb576474f3944f959421" }, "downloads": -1, "filename": "PDBeCif-1.3.78455612-py2-none-any.whl", "has_sig": false, "md5_digest": "6e395d9eda92e3312a6c849fd15b272a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 30321, "upload_time": "2018-06-29T20:13:25", "url": "https://files.pythonhosted.org/packages/d9/27/952e0d2eee8f4fbcb357d121a1f444e2af7944e24380ecd26fa1c086712c/PDBeCif-1.3.78455612-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78c4cd073510e6c8a961b0ade59ddd49", "sha256": "1ff09b370e15c344553989a005de5c652472080ea80301c8d44a84870d785b03" }, "downloads": -1, "filename": "PDBeCif-1.3.78455612.tar.gz", "has_sig": false, "md5_digest": "78c4cd073510e6c8a961b0ade59ddd49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22275, "upload_time": "2018-06-29T20:13:25", "url": "https://files.pythonhosted.org/packages/06/30/02a3d6a6b05b4e304ed480ccf3cf40d2d7989155e4e08102f87ffc666dd3/PDBeCif-1.3.78455612.tar.gz" } ], "1.3.78800442": [ { "comment_text": "", "digests": { "md5": "f880d2fc39b02677a2b487b111abe818", "sha256": "65bbc39539964a9baef11cbdbf1c2660deefae72650a84191d87727ef5353c24" }, "downloads": -1, "filename": "PDBeCif-1.3.78800442-py3-none-any.whl", "has_sig": false, "md5_digest": "f880d2fc39b02677a2b487b111abe818", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 30477, "upload_time": "2018-07-02T13:32:15", "url": "https://files.pythonhosted.org/packages/22/ce/5a012ddc7772c8395cdbbc36b89446bef68848110e5180abd37406ae2091/PDBeCif-1.3.78800442-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "674c80779a63cdb4f258c5595cf78d18", "sha256": "06f427cca4f2aa4df501c8dff6b491148cb51d5312da1fdd899014f432d52a04" }, "downloads": -1, "filename": "PDBeCif-1.3.78800442.tar.gz", "has_sig": false, "md5_digest": "674c80779a63cdb4f258c5595cf78d18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22552, "upload_time": "2018-07-02T13:32:16", "url": "https://files.pythonhosted.org/packages/a9/3c/967e983c0f212474efed388a64955164172739bb66dfd327093a48f06ba6/PDBeCif-1.3.78800442.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f880d2fc39b02677a2b487b111abe818", "sha256": "65bbc39539964a9baef11cbdbf1c2660deefae72650a84191d87727ef5353c24" }, "downloads": -1, "filename": "PDBeCif-1.3.78800442-py3-none-any.whl", "has_sig": false, "md5_digest": "f880d2fc39b02677a2b487b111abe818", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 30477, "upload_time": "2018-07-02T13:32:15", "url": "https://files.pythonhosted.org/packages/22/ce/5a012ddc7772c8395cdbbc36b89446bef68848110e5180abd37406ae2091/PDBeCif-1.3.78800442-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "674c80779a63cdb4f258c5595cf78d18", "sha256": "06f427cca4f2aa4df501c8dff6b491148cb51d5312da1fdd899014f432d52a04" }, "downloads": -1, "filename": "PDBeCif-1.3.78800442.tar.gz", "has_sig": false, "md5_digest": "674c80779a63cdb4f258c5595cf78d18", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22552, "upload_time": "2018-07-02T13:32:16", "url": "https://files.pythonhosted.org/packages/a9/3c/967e983c0f212474efed388a64955164172739bb66dfd327093a48f06ba6/PDBeCif-1.3.78800442.tar.gz" } ] }