Create a new conda environment and please follow instructions for installing tensorflow, and install tf_version >= 2.10. Follow instructions for GPU utilization if desired. Install other necessary libraries in order to run the codes.
A sample code for data preparation and training of the 3D convolutional neural network is given in the notebook "Training.ipynb" within the "training" folder. There are three subfolders here, namely "losses", "results", and "weights". The "losses" folder contains csv files of the training and validation losses, as well as the training rate. The "results" folder contains csv files of the predictions on the training, testing, and validation datapoints. The "weights" folder contains the saved model weights after training has finished. These weights can be used in the "Training.ipynb" notebook to predict on unseen data. The DFT data for all properties for all structures in this study are found in "merged_csv.csv". Training data can be made available upon reasonable request.
A sample code for generating and preparing the input data is found in "image_prep". There is an example of a Ni-Cu structure and its x-y charge density planes. There are functions to create colored planes, combine all planes into one 4D numpy array, and convert the 4D numpy array to grayscale and resize into a 3D numpy array for final use in the model.
Please refer to the notebook: "visualization.ipynb" in the folder "paper_figures" to find out how to reproduce the plots based on the models' results stored in "xlsx" formats, generated by the guidelines given in the "Training.ipynb" file. Please note that such results are already stored in the folder called "results," in the "paper_figures" directory. There is also a notebook called "3d_cube_plots.ipynb", which was used to generate the figure from the paper of several x-y planes and the cube (Figure 2).