{"id":25927884,"url":"https://github.com/samirelanduk/molstar-react","last_synced_at":"2025-03-03T21:10:59.391Z","repository":{"id":45682300,"uuid":"381511839","full_name":"samirelanduk/molstar-react","owner":"samirelanduk","description":"Molstar as a react component","archived":false,"fork":false,"pushed_at":"2023-06-18T21:28:46.000Z","size":233,"stargazers_count":26,"open_issues_count":4,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-28T23:46:33.005Z","etag":null,"topics":["bioinformatics","molstar","pdb","protein-visualization","react","structural-bioinformatics"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/molstar-react","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samirelanduk.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}},"created_at":"2021-06-29T22:25:33.000Z","updated_at":"2025-01-30T13:08:20.000Z","dependencies_parsed_at":"2023-11-28T17:18:04.311Z","dependency_job_id":null,"html_url":"https://github.com/samirelanduk/molstar-react","commit_stats":{"total_commits":57,"total_committers":5,"mean_commits":11.4,"dds":"0.49122807017543857","last_synced_commit":"e5cdff26490ef381848269740dcf64e6e8201baa"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samirelanduk%2Fmolstar-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samirelanduk%2Fmolstar-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samirelanduk%2Fmolstar-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samirelanduk%2Fmolstar-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samirelanduk","download_url":"https://codeload.github.com/samirelanduk/molstar-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241739430,"owners_count":20012103,"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":["bioinformatics","molstar","pdb","protein-visualization","react","structural-bioinformatics"],"created_at":"2025-03-03T21:10:58.864Z","updated_at":"2025-03-03T21:10:59.385Z","avatar_url":"https://github.com/samirelanduk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Molstar React\n\n[![Npm Version](https://img.shields.io/npm/v/molstar-react.svg)][npm_url]\n[![downloads](https://img.shields.io/npm/dt/molstar-react.svg)][npm_url]\n[![license](https://img.shields.io/npm/l/molstar-react.svg)][npm_url]\n[![Twitter Follow](https://img.shields.io/twitter/follow/samirelanduk)](https://twitter.com/samirelanduk)\n\n[npm_url]: https://www.npmjs.org/package/molstar-react\n\nA react component for adding the [Molstar Macromolecular Visualiser](https://github.com/molstar/molstar) to your app.\n\n## Installation\n\nWith npm:\n\n```bash\nnpm install molstar-react\n```\n\n## Basic Use\n\nTo use:\n\n```jsx\nimport Molstar from \"molstar-react\";\n\nexport const App = () =\u003e {\n\n  return (\n    \u003cdiv\u003e\n      \u003cMolstar pdbId=\"1LOL\" /\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\nThis will render a full page Molstar plugin, with the structure 1LOL loaded.\n\n### Props\n\n#### `pdbId`\n\nYou can pre-load an official PDB structure by supplying its 4 letter ID as a prop.\n\n#### `url`\n\nYou can also pre-load a structure by passing in the URL of the file - as long as it is a file type that Molstar supports.\n\n#### `file`\n\nThirdly, you can provide a file object, which should have a `filestring` property and a `type` property (`\"pdb\"`, `\"mmcif\"` etc. - anything that molstar itself natively supports).\n\n#### `dimensions`\n\nBy default the molstar plugin will take up the full screen. If you want it to act as just a normal div, you can provide a `[width, height]` array instead.\n\n#### `className`\n\nA class name to apply to the outer parent element.\n\n#### `useInterface`\n\nIf `true`, the full Molstar interface will be used around the core canvas.\n\n#### `showControls`\n\nIf `true` and `useInterface` is `true`, the controls will be shown around the sides of the interface. Only recommended for large sizes.\n\n#### `showAxes`\n\nIf `true`, axes will appear in the bottom left corner.\n\n## Changelog\n\n### Release 0.5.2\n\n*13 May 2023*\n\n- Fixed 'Invalid data cell' issue.\n- Fixed duplicate-fetch issue.\n\n### Release 0.5.1\n\n*26 April 2022*\n\n- Fixed issue where `?key=value` params in URLs would break extension parsing.\n\n### Release 0.5.0\n\n*4 March 2022*\n\n- Added option to provide filestring directly.\n- Added option to toggle axes in bottom left corner.\n\n### Release 0.4.0\n\n*29 January 2022*\n\n- Now uses Plugin and PluginUI directly instead of Viewer.\n- Class name prop.\n- Plugin now clears first when pdbID/URL prop changes.\n\n### Release 0.3.0\n\n*3 August 2021*\n\n- Added ability to control dimensions rather than always being full-screen.\n- Removed distinction between viewer and non-viewer.\n\n### Release 0.2.1\n\n*16 July 2021*\n\n- Fixed re-render initialising.\n- Component now disposes of viewer when removed.\n\n### Release 0.2.0\n\n*13 July 2021*\n\n- Made distinction between Molstar Viewer and Molstar Core.\n- Enabled custom viewer options.\n- Added option to load structure from URL.\n- Made pre-loading structure optional.\n\n### Release 0.1.0\n\n*3 July 2021*\n\n- Basic full screen Molstar.\n- Added fetching by PDB ID.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamirelanduk%2Fmolstar-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamirelanduk%2Fmolstar-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamirelanduk%2Fmolstar-react/lists"}