{"id":30581512,"url":"https://github.com/atoosaparsa/cgm-torch","last_synced_at":"2026-06-14T21:32:14.374Z","repository":{"id":310564026,"uuid":"815656744","full_name":"AtoosaParsa/CGM-Torch","owner":"AtoosaParsa","description":"Code for \"Gradient-based Design of Computational Granular Crystals\", Parsa et al.","archived":false,"fork":false,"pushed_at":"2025-08-18T21:13:02.000Z","size":40029,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T08:51:22.178Z","etag":null,"topics":["deep-learning","differentiable-simulators","gradient-based-optimisation","granular-material","metamaterial-design","metamaterials","pytorch","unconventional-computing"],"latest_commit_sha":null,"homepage":"","language":"Python","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/AtoosaParsa.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}},"created_at":"2024-06-15T18:36:23.000Z","updated_at":"2025-08-18T21:13:05.000Z","dependencies_parsed_at":"2025-08-18T23:38:43.659Z","dependency_job_id":null,"html_url":"https://github.com/AtoosaParsa/CGM-Torch","commit_stats":null,"previous_names":["atoosaparsa/cgm-torch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AtoosaParsa/CGM-Torch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtoosaParsa%2FCGM-Torch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtoosaParsa%2FCGM-Torch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtoosaParsa%2FCGM-Torch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtoosaParsa%2FCGM-Torch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AtoosaParsa","download_url":"https://codeload.github.com/AtoosaParsa/CGM-Torch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AtoosaParsa%2FCGM-Torch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34339194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":["deep-learning","differentiable-simulators","gradient-based-optimisation","granular-material","metamaterial-design","metamaterials","pytorch","unconventional-computing"],"created_at":"2025-08-29T06:35:54.040Z","updated_at":"2026-06-14T21:32:14.356Z","avatar_url":"https://github.com/AtoosaParsa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CGM-Torch: A Differentiable Simulator for Granular Materials\n\nThis repository contains the source code for all the experiments in the following paper:\n\n[Parsa, A., O'Hern, C. S., Kramer-Bottiglio, R., \u0026 Bongard, J. (2024). Gradient-based Design of Computational Granular Crystals. arXiv preprint arXiv:2404.04825.](https://arxiv.org/abs/2404.04825)\n\n\u003c/br\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/AtoosaParsa/CGM-Torch/blob/main/media/overview.png\"  width=\"700\"\u003e\n\u003c/p\u003e\n\n\u003c/br\u003e\n\u003c/br\u003e\n\n## Installation\nClone this repository and install the following using your preferred python environment or package management tool:\n\n## Usage\n### Training a new model:\n```\npython train.py --name \"test\" --savedir \"./test/\" --seed 1\n```\n\n### Loading a previously trained model:\n```\npython loadModel.py --savedir \"./test/\" --name \"test\" --seed 1 --plotName 'AND'\n```\n\n## AND Gate\n![](https://github.com/AtoosaParsa/GCTorch/blob/main/media/AND_config.gif)\n![](https://github.com/AtoosaParsa/GCTorch/blob/main/media/AND_plot.gif)\n\n## XOR Gate\n![](https://github.com/AtoosaParsa/GCTorch/blob/main/media/XOR_config.gif)\n![](https://github.com/AtoosaParsa/GCTorch/blob/main/media/XOR_plot.gif)\n\n## Citation\nIf you find our paper or this repository useful or relevant to your work please consider citing us:\n\n```\n@article{parsa2024gradient,\n  title={Gradient-based Design of Computational Granular Crystals},\n  author={Parsa, Atoosa and O'Hern, Corey S and Kramer-Bottiglio, Rebecca and Bongard, Josh},\n  journal={arXiv preprint arXiv:2404.04825},\n  year={2024}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatoosaparsa%2Fcgm-torch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatoosaparsa%2Fcgm-torch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatoosaparsa%2Fcgm-torch/lists"}