{"id":13994703,"url":"https://github.com/khamidieh/predict_tc","last_synced_at":"2025-07-22T20:30:49.978Z","repository":{"id":217790874,"uuid":"122763607","full_name":"khamidieh/predict_tc","owner":"khamidieh","description":"Predict the Critical Temperature of a Superconductor","archived":false,"fork":false,"pushed_at":"2018-11-11T15:12:04.000Z","size":27995,"stargazers_count":27,"open_issues_count":0,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-29T16:39:25.761Z","etag":null,"topics":["machine-learning","solid-state-chemistry","solid-state-physics","superconductivity"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khamidieh.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":"2018-02-24T17:39:16.000Z","updated_at":"2024-11-28T09:35:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"0d1c90ca-b1bf-4a21-87f4-9c11b1bd3923","html_url":"https://github.com/khamidieh/predict_tc","commit_stats":null,"previous_names":["khamidieh/predict_tc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/khamidieh/predict_tc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khamidieh%2Fpredict_tc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khamidieh%2Fpredict_tc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khamidieh%2Fpredict_tc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khamidieh%2Fpredict_tc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khamidieh","download_url":"https://codeload.github.com/khamidieh/predict_tc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khamidieh%2Fpredict_tc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266567136,"owners_count":23949295,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["machine-learning","solid-state-chemistry","solid-state-physics","superconductivity"],"created_at":"2024-08-09T14:03:03.699Z","updated_at":"2025-07-22T20:30:49.966Z","avatar_url":"https://github.com/khamidieh.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# Predict the Critical Temperature of a Superconductor\n\nFor the most up to date information and for citation please see [here](https://www.sciencedirect.com/science/article/pii/S0927025618304877).  An arXiv version is [here](https://arxiv.org/abs/1803.10260).  You can also see the slides presented at the March 2018 American Physical Society: [KamH_APS_March_2018.pdf](https://github.com/khamidieh/predict_tc/blob/master/KamH_APS_March_2018.pdf).\n\nAll the code I used is now available in the file script main_script_production_9.R.  Be careful blindly copying and running this code; some chunks may take days to run.\n\n\nThis readme file shows you how to set up and make predictions.  Step (6) shows you how to download the data.  If you just want to  download the data, just run steps (1), (4), and (6).\n\n------------------------------------------------------------------------------------------------------------------------------------\n\n**Step (1)** \n\nGo to https://cloud.r-project.org/ to install the latest version of R.\n\n\n**Step (2)** \n\nOnce R has been installed, you need two R packages.  Open up the R gui and run the following command.  If a pop up window opens up with the title \"Secure CRAN mirror\", just pick \"0-Cloud [https]\" and hit OK.  \n```r\ninstall.packages(c(\"xgboost\",\"CHNOSZ\"))\n```\nYou only need to run the above command once unless you download a new R version.\n\n\n**Step (3)** \n\nYou need to make the R packages available to your current R session.  You need to do this *EVERY* time you start a new R session.  At the R prompt run:\n```r\nlibrary(xgboost)\nlibrary(CHNOSZ)\n```\nOne more time: You need to do this *EVERY* time you start a new R session.\n\n\n**Step (4)** \n\nNext, download the file `tc.RData` which is posted here in github; just go to https://github.com/khamidieh/predict_tc/blob/master/tc.RData and hit the `Download` button.  Make sure you know where in your computer you downloaded this file.  This file contains all the data and auxiliary functions to do the predictions.\n\n*Important: Make sure your R session's working directory is set to where you downloaded `tc.RData`.*\n\nYou can do this in two ways: (1) Go to the R Console, then go to menu path File, and then to \"Change dir...\", or (2) use ```setwd() ``` command.  (I do not use RStudio.)\n\nOnce your directory is set properly run:\n```r\nload(\"tc.RData\")\n```\n\n**Step (5)** \n\nStart predicting.  Try these:\n```r\npredict_tc(\"Ba0.2La1.8Cu1O4\", verbose = TRUE)\npredict_tc(\"MgB2\")\npredict_tc(\"Hg\")\npredict_tc(\"Ca0.5Sr0.5C6\", verbose = TRUE)\npredict_tc(\"NaSn2As2\", verbose = TRUE)\npredict_tc(\"H2S\", verbose = TRUE)\npredict_tc(\"FCl\", verbose = TRUE)\npredict_tc(\"mgB2\", verbose = TRUE)\n```\nSetting ```verbose = TRUE``` will find materials similar to the one you entered.  The default is false.\n\n\n**Step (6)**\n\nRun the following to get the train data.  This train data was used to create the XGBoost model.\n```r\nwrite.csv(train, \"train.csv\", row.names = F)\n```\n\nYou can also run this to get a data file that has the chemical formulas broken up.\n```r\nwrite.csv(unique_m, \"unique_m.csv\", row.names = F)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhamidieh%2Fpredict_tc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhamidieh%2Fpredict_tc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhamidieh%2Fpredict_tc/lists"}