{"id":15140730,"url":"https://github.com/superstar54/weas","last_synced_at":"2026-01-28T15:09:38.135Z","repository":{"id":228413565,"uuid":"772814181","full_name":"superstar54/weas","owner":"superstar54","description":"WEAS is JavaScript library to visualize and manipulate the atomic structures directly in the web browser.","archived":false,"fork":false,"pushed_at":"2026-01-09T09:52:26.000Z","size":17935,"stargazers_count":13,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-12T17:53:29.597Z","etag":null,"topics":["3d","crystal","isosurface","manipulation","molecule","three-js","visualization"],"latest_commit_sha":null,"homepage":"https://weas.readthedocs.io/en/latest/index.html","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/superstar54.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-16T00:47:24.000Z","updated_at":"2026-01-09T09:51:59.000Z","dependencies_parsed_at":"2024-03-29T06:32:22.689Z","dependency_job_id":"9859af89-64b2-4ac8-a9cd-25e4af4cda9e","html_url":"https://github.com/superstar54/weas","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"98a2ae55962c13ddc3ce123e73ac5fe678437a7f"},"previous_names":["superstar54/weas"],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/superstar54/weas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstar54%2Fweas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstar54%2Fweas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstar54%2Fweas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstar54%2Fweas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superstar54","download_url":"https://codeload.github.com/superstar54/weas/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superstar54%2Fweas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T13:02:32.985Z","status":"ssl_error","status_checked_at":"2026-01-28T13:02:04.945Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["3d","crystal","isosurface","manipulation","molecule","three-js","visualization"],"created_at":"2024-09-26T08:40:32.837Z","updated_at":"2026-01-28T15:09:38.119Z","avatar_url":"https://github.com/superstar54.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Web Environment For Atomic Structure (WEAS)\n\n[![npm version](https://img.shields.io/npm/v/weas.svg?style=flat-square)](https://www.npmjs.com/package/weas)\n[![Docs status](https://readthedocs.org/projects/weas/badge)](http://weas.readthedocs.io/)\n[![Unit test](https://github.com/superstar54/weas/actions/workflows/ci.yml/badge.svg)](https://github.com/superstar54/weas/actions/workflows/ci.yml)\n\nThe WEAS package is a JavaScript library designed to visualize and edit atomic structures (molecule, crystal, nanoparticle) in the web environments.\n\nFeatures:\n\n- Model: space-filling, ball-stick, polyhedral.\n- Supported File types: cif, xyz, cube, xsf, POSCAR.\n- Edit structure: move, rotate, delete, and replace atoms.\n- Atom groups for tagging and selection by group.\n- Support periodic boundary conditions.\n- Animation (view and edit).\n- Volumetric data (isosurface).\n- Vector fields, e.g., magnetic moment.\n- Import structures and export image/JSON/XYZ/CIF (and animation when available) from the GUI.\n\n### Demo\n\nHere are some demo pages:\n\n- [Codepen Demo](https://codepen.io/superstar54/full/MWRgKaG)\n- ...\n\n### How to use\n\nPlease visit: [WEAS Documentation](https://weas.readthedocs.io/en/latest/index.html)\n\n### Viewer state and history\n\nWEAS separates viewer state changes from operations that record undo/redo.\n\n```js\n// Apply state changes without history, with deferred redraws.\nviewer.avr.transaction(() =\u003e {\n  viewer.avr.applyState({ modelStyle: 1, colorBy: \"Element\" });\n});\n\n// Apply state changes with history.\nviewer.avr.setState({ colorBy: \"Index\" }, { record: true, redraw: \"full\" });\n```\n\n### Save and restore state\n\nYou can export the full viewer state (atoms, plugins, viewer settings, camera) to JSON\nand import it later.\n\n```js\nconst snapshot = viewer.exportState();\n// persist snapshot as JSON\nconst payload = JSON.stringify(snapshot);\n// restore later\nviewer.importState(JSON.parse(payload));\n```\n\n### Import/export structures\n\nThe GUI includes import/export buttons for JSON/XYZ/CIF. You can also use the\nhelpers programmatically:\n\n```js\nimport { parseStructureText, applyStructurePayload, buildExportPayload, downloadText } from \"weas\";\n\nconst parsed = parseStructureText(text, \".cif\");\napplyStructurePayload(viewer, parsed.data);\n\nconst payload = buildExportPayload(viewer, \"xyz\");\ndownloadText(payload.text, payload.filename, payload.mimeType);\n```\n\n### Examples\n\n### Molecule\n\n\u003cimg src=\"docs/source/_static/images/example_color_by_species.png\"  width=\"300px\"/\u003e\n\n### Crystal structure\n\n\u003cimg src=\"docs/source/_static/images/model_style_2.png\"  width=\"300px\"/\u003e\n\n#### Isosurfaces\n\n\u003cimg src=\"docs/source/_static/images/example-isosurface.png\"  width=\"300px\"/\u003e\n\n#### Volume Slice\n\n\u003cimg src=\"docs/source/_static/images/example-volume-slice.png\"  width=\"300px\"/\u003e\n\n#### Animation\n\n\u003cimg src=\"docs/source/_static/images/animation_md.gif\"  width=\"500px\"/\u003e\n\n#### Phonons\n\n\u003cimg src=\"docs/source/_static/images/example-phonon.gif\"  width=\"300px\"/\u003e\n\n### How to run a demo locally\n\nClone the repository,\n\n```console\nnpm install\nnpm start\n```\n\nThen go to the `demo` site.\n\n### Test\n\n```console\nnpm install\nnpm test\n```\n\n#### End-to-end test\n\nUse [playwright](https://playwright.dev/docs/intro) for the e2e test.\n\nFor the first time, one needs to install the dependence.\n\n```\nnpx playwright install\n```\n\nThen run\n\n```\nnpm run build\nnpx playwright test\n```\n\nRun the test with the title\n\n```\nnpx playwright test -g \"Animation\"\n```\n\nIf the snapshots need to be updated:\n\n```\nnpx playwright test --update-snapshots\n```\n\n### Contact\n\n- Xing Wang \u003cxingwang1991@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperstar54%2Fweas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperstar54%2Fweas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperstar54%2Fweas/lists"}