{"id":15018308,"url":"https://github.com/justinmc/parse-pdb","last_synced_at":"2025-08-11T22:37:47.736Z","repository":{"id":57319434,"uuid":"114488181","full_name":"justinmc/parse-pdb","owner":"justinmc","description":"A small utility for parsing PDB files into useable JSON","archived":false,"fork":false,"pushed_at":"2023-01-25T01:53:00.000Z","size":109,"stargazers_count":9,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T12:59:08.547Z","etag":null,"topics":["json","molecular-data","molecule","pdb"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/justinmc.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}},"created_at":"2017-12-16T20:24:55.000Z","updated_at":"2024-04-03T15:11:56.000Z","dependencies_parsed_at":"2023-02-14T03:46:01.600Z","dependency_job_id":null,"html_url":"https://github.com/justinmc/parse-pdb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/justinmc/parse-pdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmc%2Fparse-pdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmc%2Fparse-pdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmc%2Fparse-pdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmc%2Fparse-pdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinmc","download_url":"https://codeload.github.com/justinmc/parse-pdb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinmc%2Fparse-pdb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269771894,"owners_count":24473321,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["json","molecular-data","molecule","pdb"],"created_at":"2024-09-24T19:51:48.793Z","updated_at":"2025-08-11T22:37:47.704Z","avatar_url":"https://github.com/justinmc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parse-pdb\nA simple utility for parsing PDB files into an easily useable JSON format that handles atoms, residues, and chains.\n\nSee also [parse-pdb-rust](https://github.com/justinmc/parse-pdb-rust).\n\n## Getting Started\n\n  npm install --save parse-pdb\n\n```\nconst parsePdb = require('parse-pdb');\nconst { readFileSync } = require('fs');\n\nconst pdbString = readFileSync('./3aid.pdb', 'utf8');\n\nconst parsed = parsePdb(pdbString);\n\nconsole.log(parsed.atoms);\n/*\n[ { serial: 1,\n    name: 'N',\n    altLoc: '',\n    resName: 'PRO',\n    chainID: 'A',\n    resSeq: 1,\n    iCode: '',\n    x: -2.555,\n    y: 9.253,\n    z: 34.411,\n    occupancy: 1,\n    tempFactor: 30.6,\n    element: 'N',\n    charge: '' },\n  ...1845 others\n]\n*/\n```\n\n## JSON Format\nThe output json is an object containing arrays of each structure keyed on record name, according to the [pdb spec](http://www.wwpdb.org/documentation/file-format-content/format33/sect9.html).\n\n```\n  atoms:\n    serial: integer\n    name: string\n    altLoc: string\n    resName: string\n    chainID: string\n    resSeq: integer\n    iCode: string\n    x: float\n    y: float\n    z: float\n    occupancy: float\n    tempFactor: float\n    element: string\n    charge: string\n  seqRes:\n    serNum: integer\n    chainID: string\n    numRes: integer\n    resNames: array of strings\n  residues:\n    id: integer (count)\n    serNum: integer\n    chainID: string\n    resName: string\n    atoms: array of atoms\n  chains: Map\n    key: chainID\n    value:\n      id: integer (count)\n      chainID: string\n      residues: array of residues\n```\n\n## License\nMIT.  See LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinmc%2Fparse-pdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinmc%2Fparse-pdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinmc%2Fparse-pdb/lists"}