{"id":17596243,"url":"https://github.com/lamm-mit/atomic2field","last_synced_at":"2025-09-22T08:23:16.126Z","repository":{"id":153541488,"uuid":"519406902","full_name":"lamm-mit/atomic2field","owner":"lamm-mit","description":"Codes for translating structural defects to atomic properties","archived":false,"fork":false,"pushed_at":"2022-09-12T13:23:31.000Z","size":19524,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T04:51:29.201Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/lamm-mit.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}},"created_at":"2022-07-30T03:20:14.000Z","updated_at":"2025-02-25T12:11:15.000Z","dependencies_parsed_at":"2023-05-19T04:15:51.283Z","dependency_job_id":null,"html_url":"https://github.com/lamm-mit/atomic2field","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lamm-mit/atomic2field","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamm-mit%2Fatomic2field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamm-mit%2Fatomic2field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamm-mit%2Fatomic2field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamm-mit%2Fatomic2field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lamm-mit","download_url":"https://codeload.github.com/lamm-mit/atomic2field/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lamm-mit%2Fatomic2field/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276369336,"owners_count":25630193,"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-09-22T02:00:08.972Z","response_time":79,"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":[],"created_at":"2024-10-22T08:24:32.175Z","updated_at":"2025-09-22T08:23:16.107Z","avatar_url":"https://github.com/lamm-mit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Atomic2Field\n\n### Codes for translating structural defects to atomic properties \n\n- Z. Yang, M.J. Buehler, Linking Atomic Structural Defects to Mesoscale Properties in Crystalline Solids using Graph Neural Networks, npj Computational Materials, DOI: 10.1038/s41524-022-00879-4, 2022\n\n![Overall workflow](https://github.com/lamm-mit/atomic2field/blob/main/IMAGE_github.png)\n\n**Requirements**\n```\npip install -r requirements.txt\n```\n\n**Dataset**\n- Three datasets are given: Al/Poly, Graphene/Poly, Graphene/Porous\n- The datasets can be found in the following link: https://www.dropbox.com/sh/w3b8u0i63r2y1kq/AACF8mukZ9nDdG4MGj3F1kCUa?dl=0\n\n**Custom dataset**\n- There are 3 files needed to form a dataset: edge.txt, node_features.txt, node_labels.txt. Formats are shown below.\n- edge.txt: two rows for each data. Both rows are node indices that one edge connects. The length of the row corresponds to the number of edge.\n```\nData0 0 0 0 ...\nData0 1 2 6 ...\n```\n- node_features.txt: The number of rows for each data depends on the input dimension. E.g, if the input is [x, y, z],then there are 3 rows for each data, one for x, one for y, the other for z.\n```\nData0 0.0 0.125 ...\nData0 0.0 0.0 ...\nData0 0.0 0.125 ...\n```\n- node_labels.txt: Currently we only train on 1D node label.\n```\nData0 100050 560992 ...\n```\n\n**Train and test**\n- Put the three data files named as \"edge.txt\", \"node_features.txt\" and \"node_labels.txt\" under \"./data\" folder. (You can also specify your own data path using --data_path argument)\n- Check optional arguments for training\n```\npython PNA.py -h\n```\n- Training (Use Polygraphene dataset as an example): we suggest using multiple GPUs given the high memory requirement.\n```\npython PNA.py --data_path \"./data/\" --batch_size 16 --input_dim 3 --num_layer 6 --max_degree 9\n```\n- Check optional arguments for testing\n```\npython test.py -h\n```\n- Testing (Use same arguments as training):\n```\npython test.py --data_path \"./data/\" --batch_size 16 --input_dim 3 --num_layer 6 --max_degree 9 --ckpt_path \"./pretrained/Graphene/Poly/ckpt/pretrained.pt\"\n```\n**Pretrained models**\n- Pretrained models are saved as .pt files corresponding to the three datasets in the folder \"pretrained\" (models are trained on 4 V100 GPUs). \n- \"Graphene/poly\" for von Mises stress field prediction in polycrystalline graphene; \"Graphene/Porous\" for tensile stress (sxx) field prediction in porous graphene membrane; \"Al/Poly\" for potential energy distribution prediction in polycrystalline aluminum. \n- The details of architectures of pretrained models can be found in the paper.                                  \n\n**REFERENCE AND ORIGINAL PAPER**\n\n- Z. Yang, M.J. Buehler, Linking Atomic Structural Defects to Mesoscale Properties in Crystalline Solids using Graph Neural Networks, npj Computational Materials, DOI: 10.1038/s41524-022-00879-4, 2022\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamm-mit%2Fatomic2field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flamm-mit%2Fatomic2field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flamm-mit%2Fatomic2field/lists"}