{"id":19705907,"url":"https://github.com/llnl/graphite","last_synced_at":"2025-06-14T14:33:35.482Z","repository":{"id":66082927,"uuid":"508033566","full_name":"LLNL/graphite","owner":"LLNL","description":"A repository for implementing graph network models based on atomic structures.","archived":false,"fork":false,"pushed_at":"2024-08-08T04:10:45.000Z","size":98015,"stargazers_count":77,"open_issues_count":3,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-04T04:32:41.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LLNL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-06-27T19:15:27.000Z","updated_at":"2025-04-30T17:55:14.000Z","dependencies_parsed_at":"2024-08-08T06:19:57.063Z","dependency_job_id":null,"html_url":"https://github.com/LLNL/graphite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LLNL/graphite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLNL%2Fgraphite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLNL%2Fgraphite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLNL%2Fgraphite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLNL%2Fgraphite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LLNL","download_url":"https://codeload.github.com/LLNL/graphite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLNL%2Fgraphite/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259831223,"owners_count":22918472,"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":[],"created_at":"2024-11-11T21:31:39.387Z","updated_at":"2025-06-14T14:33:35.434Z","avatar_url":"https://github.com/LLNL.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphite\n\nA repository for implementing graph network models based on atomic structures.\n\n\n## Implemented or replicated works\n\n- ALIGNN\n    - [*Atomistic Line Graph Neural Network for improved materials property predictions*][ALIGNN paper]\n- **ALIGNN-d** (our work, see [demo](notebooks/alignn/demo.ipynb))\n    - [*Efficient and interpretable graph network representation for angle-dependent properties applied to optical spectroscopy*][ALIGNN-d paper]\n- Gated GCN\n    - [*Benchmarking Graph Neural Networks*][Gated GCN paper]\n- NequIP (implementation adopted from `e3nn`; requires `e3nn` installation)\n    - [*E(3)-Equivariant Graph Neural Networks for Data-Efficient and Accurate Interatomic Potentials*][NequIP paper]\n- **Atomic Structure denoiser** (our work, see [demo](notebooks/denoiser/demo.ipynb))\n    - [*Score-based denoising for atomic structure identification*][Denoiser paper]\n- MeshGraphNets\n    - [*Learning Mesh-Based Simulation with Graph Networks*][MGN paper]\n- **Score dynamics** (our work, see [demo](notebooks/score-dynamics/demo.ipynb))\n    - [*Score dynamics: scaling molecular dynamics with picoseconds time steps via conditional diffusion model*][SD paper]\n- **Spectroscopy-guided generation of amorphous structures** (our work, see [demo](notebooks/amorph-gen/amorph-gen.ipynb))\n    - [*Spectroscopy-guided discovery of three-dimensional structures of disordered materials with diffusion models*][a-C paper]\n- Equivariant transformer\n    - [*Equivariant pretrained transformer for unified geometric learning on multi-domain 3D molecules*][ET paper]\n- Graphormer\n    - [*Towards predicting equilibrium distributions for molecular systems with deep learning*][Graphormer paper]\n\n\n## Gallery\n\n### Spectroscopy-guided amorphous material generation\n\nUnconditional generation of amorphous carbons via diffusion model. Color is meant to help give you a sense of depth.\n\n![](/media/amorph-gen/a-C-denoise-traj-d15.gif)\n\nConditional generation of amorphous carbons based on a given XANES spectrum.\n\n![](/media/amorph-gen/a-C_generation-with_plot.gif)\n\nGeneration of multi-element, amorphous carbon nitrides.\n\n![](/media/amorph-gen/a-C-N-denoise.gif)\n\n\n### Score dynamics\n\nGenerative rollouts of molecular dynamics over picosecond timesteps via conditional diffusion model.\n\n![](/media/score-dynamics/ala-dipep.gif)\n\n\n### Atomic structure denoiser\n\nSimple and effective atomic denoiser for structure characterization.\n\n\u003cimg src=\"/media/denoiser/denoising-fcc-2d.gif\" width=\"512\"\u003e\n\u003cimg src=\"/media/denoiser/denoising-fcc-3d.gif\" width=\"512\"\u003e\n\n\n## Installation\n\nThe installation time is typically less than 10 minutes on a normal local machine.\n\nInstallation dependencies:\n- `pytorch\u003e=2.0.1`\n- `torch_geometric`\n- `torch-scatter`\n- `torch-cluster`\n\nReasons: many model implementations in this repo are written mostly based on PyTorch, but some operations such as `scatter` and graph pooling are from PyTorch Geometric (PyG), which offers very optimized CUDA implementations. Additionally, most models in this repo treat atomic/molecular data as graphs following the PyG data format (`torch_geometric.data.Data`).\n\nAlso, this repo has scattering (via `Torch.scatter_reduce`) and clustering (e.g., `radius_graph` and `knn_graph`) codes such that `torch-scatter` and `torch-cluster` are not strictly required. Still, it is recommended to install `torch-scatter` and `torch-cluster` if you favor CUDA-optimized compute speed.\n\nLastly, for development purposes, you may want to install packages such as `ase`, `MDAnalysis`, `rdkit`, `lightning`, etc.\n\nExample installation process:\n```bash\nconda create -n graphite\nconda activate graphite\nconda install pytorch pytorch-cuda=12.1 -c pytorch -c nvidia\npip install torch_geometric\npip install torch_scatter torch_cluster -f https://data.pyg.org/whl/torch-2.3.0+cu121.html\n\n# For development depending on your use case\npip install ase jupyterlab ipywidgets seaborn lightning tensorboard\n```\n\nThen, to install `graphite`, clone this repo and run:\n```bash\npip install -e /path/to/the/repo\n```\n\nTo uninstall:\n```bash\npip uninstall graphite\n```\n\n\n## How to use\n\n`graphite` is intended for research and prototyping. It is a general collection of simple codes containing helper functions, custom graph convolutions, model templates, and so on. Full-scale production codes for specific applications and deployments should be hosted elsewhere.\n\n- The `src` folder contains the source code.\n- The `notebooks` folder contains Jupyter notebooks that demonstrate running or training models.\n    - Some demos require additional packages (e.g., PyTorch Lightning for automated training).\n    - The demo notebooks are not always up-to-date. We will try to update the notebooks after every major change to the source code.\n- The `media` folder contains media files.\n\n\n## Release\n\nLLNL-CODE-836648\n\n\n\n[ALIGNN paper]: https://www.nature.com/articles/s41524-021-00650-1\n[ALIGNN-d paper]: https://www.nature.com/articles/s41524-022-00841-4\n[Gated GCN paper]: https://arxiv.org/abs/2003.00982\n[e3nn basic conv doc]: https://docs.e3nn.org/en/stable/guide/convolution.html\n[NequIP paper]: https://www.nature.com/articles/s41467-022-29939-5\n[e3nn transformer doc]: https://docs.e3nn.org/en/stable/guide/transformer.html\n[Denoiser paper]: https://arxiv.org/abs/2212.02421\n[MGN paper]: https://arxiv.org/abs/2010.03409v4\n[ET paper]: https://arxiv.org/abs/2402.12714\n[Graphormer paper]: https://arxiv.org/abs/2306.05445\n[SD paper]: https://pubs.acs.org/doi/10.1021/acs.jctc.3c01361\n[a-C paper]: https://arxiv.org/abs/2312.05472\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllnl%2Fgraphite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllnl%2Fgraphite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllnl%2Fgraphite/lists"}