{"id":17309834,"url":"https://github.com/eliotjones/biocif","last_synced_at":"2025-10-25T11:02:42.656Z","repository":{"id":87878695,"uuid":"240928738","full_name":"EliotJones/BioCif","owner":"EliotJones","description":"Parse the CIF file format for Protein Data Bank (PDB) data.","archived":false,"fork":false,"pushed_at":"2020-03-28T13:19:40.000Z","size":1706,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-29T05:23:51.230Z","etag":null,"topics":["cif","cif-formats","crystallography","csharp","pdbx","protein-data-bank"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EliotJones.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-16T16:53:13.000Z","updated_at":"2023-05-19T11:02:27.000Z","dependencies_parsed_at":"2024-01-13T09:17:05.648Z","dependency_job_id":null,"html_url":"https://github.com/EliotJones/BioCif","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliotJones%2FBioCif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliotJones%2FBioCif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliotJones%2FBioCif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliotJones%2FBioCif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EliotJones","download_url":"https://codeload.github.com/EliotJones/BioCif/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228265842,"owners_count":17893836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cif","cif-formats","crystallography","csharp","pdbx","protein-data-bank"],"created_at":"2024-10-15T12:32:57.659Z","updated_at":"2025-10-25T11:02:37.621Z","avatar_url":"https://github.com/EliotJones.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bio CIF #\n\n\u003cimg src=\"https://raw.githubusercontent.com/EliotJones/BioCif/master/icon.png\" width=\"128px\"/\u003e\n\nBioCif is a small C# library designed to parse the [Crystallographic Information File](https://www.iucr.org/resources/cif) (CIF) format, the standard for information interchange in crystallography. It is designed to be fast and easy-to-use.\n\nIt provides access to both Tokenization and Parsing of CIF formats for both version 1.1 and version 2.0 as well as convenience wrappers for an API for the [Protein Data Bank](https://www.rcsb.org/) (PDB) data. The PDB hosts CIF format data (PDBx/mmCIF - Macro-molecular CIF) for protein structure.\n\n## Usage ##\n\nTo access the raw stream of tokens:\n\n    using BioCif.Core.Tokenization;\n    using BioCif.Core.Tokens;\n\n    using (var fileStream = File.Open(@\"C:\\path\\to\\data.cif\"))\n    using (var streamReader = new StreamReader(fileStream))\n    {\n        foreach (Token token in CifTokenizer.Tokenize(streamReader))\n        {\n            Console.WriteLine(token.TokenType);\n        }\n    }\n\nTo access the parsed CIF structure:\n\n    using (var fileStream = File.Open(@\"C:\\path\\to\\data.cif\"))\n    {\n        Cif cif = CifParser.Parse(fileStream);\n\n        DataBlock block = cif.DataBlocks[0];\n        Console.WriteLine($\"Block name: {block.Name}\");\n\n        foreach (IDataBlockMember member in block.Members)\n        {\n            // ...\n        }\n    }\n\nTo access a parsed PDBx/mmCIF:\n\n    Pdbx pdbx = PdbxParser.ParseFile(@\"C:\\path\\to\\mypdbx.cif\");\n    PdbxDataBlock block = pdbx.First;\n    List\u003cAuditAuthor\u003e auditAuthors = block.AuditAuthors;\n\n\n## Notes ##\n\nDefined terms from the CIF specification: \n\n+ data file - information relating to an experiment\n+ dictionary file - contains information about data names\n+ data name (AKA Tag): identifies the content of a data value\n+ data value: string representing a value of any type.\n+ data item: data name + data value\n\nNotes on structures within a CIF file:\n\n    data block : highest level of cif file\n      data_\u003cblock name\u003e\n      [data items or save frames]\n\n    save frame: partitionaed collection of data items\n      save_\u003cframe code\u003e\n      [data items]\n      save_   # Terminates the save frame\n      ^ only used in dictionary files\n\n## Useful Links ##\n\n+ Dictionary for PDBx/mmCIF data names: http://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Index/\n+ CIF Version 1.1 specification: https://www.iucr.org/resources/cif/spec/version1.1/cifsyntax\n+ Search PDBx structures in the PDB: https://www.rcsb.org/#Category-search\n+ Existing C# tools for CIF format among others: https://github.com/mindleaving/genome-tools\n+ CIF on Wikipedia: https://en.wikipedia.org/wiki/Crystallographic_Information_File\n+ Crystallography Open Database of non-mmCIF CIF files:http://www.crystallography.net/cod/index.php\n\n## Status ##\n\nEarly stage/incomplete/unmaintained.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliotjones%2Fbiocif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliotjones%2Fbiocif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliotjones%2Fbiocif/lists"}