diff --git a/ARISE.ipynb b/ARISE.ipynb index 6f6c0a5d1472f562ce1f3ffdb6f81e22802e83e5..428ac3d5ef3e81e63f085a74c67ccf82f1e7de4f 100644 --- a/ARISE.ipynb +++ b/ARISE.ipynb @@ -97,7 +97,7 @@ "import pickle\n", "\n", "# filepaths\n", - "prototype_path = './data/ARISE/single_crystals/PROTOTYPES' # prototypes used in [1]\n", + "prototype_path = './data/arise/single_crystals/PROTOTYPES' # prototypes used in [1]\n", "bcc_prototype_path = os.path.join(prototype_path, \n", " 'Elemental_solids',\n", " 'bcc_W_A_cI2_229_a',\n", @@ -113,15 +113,15 @@ " 'RockSalt_NaCl',\n", " 'RockSalt_NaCl.in' )\n", "\n", - "nn_model_path = './data/ARISE/nn_model/AI_SYM_Leitherer_et_al_2021.h5'\n", - "nn_model_class_info_path = './data/ARISE/nn_model'\n", + "nn_model_path = './data/arise/nn_model/AI_SYM_Leitherer_et_al_2021.h5'\n", + "nn_model_class_info_path = './data/arise/nn_model'\n", "\n", - "calculations_path = './data/ARISE/calculations'\n", + "calculations_path = './data/arise/calculations'\n", "\n", - "fcc_bcc_desc = np.load('./data/ARISE/saved_soap_descriptors/fcc_Cu_A_cF4_225_a_bcc_W_A_cI2_229_a.npy')\n", + "fcc_bcc_desc = np.load('./data/arise/saved_soap_descriptors/fcc_Cu_A_cF4_225_a_bcc_W_A_cI2_229_a.npy')\n", "fcc_desc = fcc_bcc_desc[:1]\n", "bcc_desc = fcc_bcc_desc[1:]\n", - "nacl_desc = np.load('./data/ARISE/saved_soap_descriptors/RockSalt_NaCl.npy')\n", + "nacl_desc = np.load('./data/arise/saved_soap_descriptors/RockSalt_NaCl.npy')\n", "\n", "\n", "\n", @@ -558,7 +558,7 @@ "source": [ "For the predictions in the fcc, non-zero probability is also assigned to a tetragonal prototype (identifier 'bctIn_In_A_tI2_139_a', where the AFLOW identifier is specified in this case as well, see [4] for more details). This assignment is justified since it is a slightly distorted (tetragonal) version of fcc (http://aflowlib.org/prototype-encyclopedia/A_tI2_139_a.In.html). Moreover, the uncertainty is non-zero, indicating that there is more than one candidate for the most similar prototype. Interestingly, also the low probability candidates are still meaningful. Further analysis of this classification-probability induced ranking is provided in [1], specifically Fig. 3 (for experimental scanning transmission electron microscopy data of graphene) and Supplementary note 2.3 (for out-of-sample single-crystal structures from AFLOW and NOMAD). This study becomes particularly important if one wants to investigate atomic structures that are not include in the training set. In the mentioned figures of [1], we provide guidelines on how one can still use ARISE in this situation and interpret its predictions. \n", "\n", - "In the next section, we will first extend to multi-species systems and then provide the code for this out-of-sample studies, where you may also try different structures (upload the geometry files to './data/ARISE/calculations_path'). " + "In the next section, we will first extend to multi-species systems and then provide the code for this out-of-sample studies, where you may also try different structures (upload the geometry files to './data/arise/calculations_path'). " ] }, { @@ -690,7 +690,7 @@ "# prototype.info['crystal_structure'] + '.in')]\n", "\n", "\n", - "AFLOW_other_protos_path = './data/ARISE/single_crystals/exploration_examples'\n", + "AFLOW_other_protos_path = './data/arise/single_crystals/exploration_examples'\n", "AFLOW_geo_files = os.listdir(AFLOW_other_protos_path)\n", "out_of_sample_prototypes = [_.split('.')[0] for _ in AFLOW_geo_files]\n", "AFLOW_geo_files_paths = [os.path.join(AFLOW_other_protos_path, _) for _ in AFLOW_geo_files]\n", @@ -794,7 +794,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Please run the following cell if you want to study out-of-sample structures (including the prototypes investigated in Supplementary Note 2.3 of [1]). If you want to inspect your own, new structures, just upload the to './data/ARISE/calculations_path' and rerun the code cell before 'Some practical tips'). " + "Please run the following cell if you want to study out-of-sample structures (including the prototypes investigated in Supplementary Note 2.3 of [1]). If you want to inspect your own, new structures, just upload the to './data/arise/calculations_path' and rerun the code cell before 'Some practical tips'). " ] }, { @@ -920,7 +920,7 @@ "metadata": {}, "outputs": [], "source": [ - "geometry_files = ['./data/ARISE/polycrystals/four_grains_elemental_solid.xyz']\n", + "geometry_files = ['./data/arise/polycrystals/four_grains_elemental_solid.xyz']\n", "view(read(geometry_files[0], ':', 'xyz')[0], viewer='ngl')" ] }, @@ -930,7 +930,7 @@ "source": [ "We choose a box size that is roughly equal to the slab thickness and perform the SPM analysis. We choose here a very coarse stride and the smaller we will choose it the better the resolution will get. We select a stride along the z-axis that is larger than the slab thickness, a setting for which no stride in this direction will be made.\n", "\n", - "A folder (in './data/ARISE/calculations_path') in which all relevant information is saved is created automatically. The name of the folder is given by the structure file being passed and the options for SPM (box size and stride).\n", + "A folder (in './data/arise/calculations_path') in which all relevant information is saved is created automatically. The name of the folder is given by the structure file being passed and the options for SPM (box size and stride).\n", "\n", "Note that if you run the cell below multiple times, a new folder (with \"_run_i\", i=1,... appended to the file name) will be created, so no data will be lost.\n", "\n", @@ -1095,7 +1095,7 @@ "n_neighbors_list = [25, 50, 100, 250, 1000] \n", "min_cluster_sizes = n_neighbors_list\n", "\n", - "analysis_folder_path = './data/ARISE/unsupervised_learning'\n", + "analysis_folder_path = './data/arise/unsupervised_learning'\n", "file_name = 'four_grains_elemental_solid.xyz_stride_1.0_1.0_16.0_box_size_16.0_.tar.gz_'\n", "\n", "layer_name = 'dense_1' \n", @@ -1356,7 +1356,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.8.8" } }, "nbformat": 4,