:[S]imple [P]ython [I]pywidgets Interface to obtain the optoelectronic properties of [N]anostructures
The Simple Python Ipywidgets Interface to obtain the optoelectronic properties of Nanostructures (SPIN) is an open source graphical user interface which allows user to work with standard SIESTA (Beta version) files and perform end-to-end atomic level simulation processes, that is, it contains the complete flow, from the construction and visualization of structures or systems until the pre-processing, execution, and post-processing of calculations such as structure optimization, electronic properties like band structure and density of states (DOS) and optical properties. SPIN is a easy-to-use and fast-learning solution written in Python and built from Ipywidgets, however the end-user can use all available features without the need for Python language knowledge.
First step is clone this repository:
git clone https://github.com/JoseMVergara/SPIN.git
For a correct functioning of the tool it is necessary to have anaconda installed in our computer. Please visit the site and follow the installation instructions according to your operating system. For Windows user's is highly recommended to use Windows Subsystem for Linux - WSL (If you already have Anaconda installed please ignore this step).
https://docs.anaconda.com/anaconda/install/
Enter the clone folder, run in the terminal (command line):
cd SPIN
SPIN program is written in Python 3 (>= 3.6). It has some dependences. It is higly recommended to create a new conda environment with the necessary modules:
conda create --name spin --file requirements.txt --channel conda-forge/label/cf201901 --channel anaconda --channel conda-forge --channel default
Activate conda spin environment:
conda activate spin
To run the program, please intance a jupyter notebook, run in command line:
jupyter notebook
then, open and execute SPIN_GUI.ipynb.
Warning For today's correct functionality of all the features available in SPIN, it is recommended to use jupyter notebook instead of jupyter lab.
DFT calculations requires some insight from the user on how the algorithm should treat the problem, e.g, which operators or parameters are appropriate or when is convergence achieved. In the following we shall discuss the different components in calculations in SPIN. This beta version include the three basis part of the SPIN to do DFT calculations employed SIESTA code, i.e, Geometric structure, Configure (DFT parameters) and Calculation (control workflow).
The Geometric description has two taps: Structure options and Viewer.
Is the tap we will use to generate our first set of atomic coordinates. This tap includes four options:
-
Upload file: Allow us to load external structure files in the formats supported by Openbabel. The program supports the SIESTA file formats *.fdf also.
-
Create structure manually: This is our default option for entering the atomic coordinates and unit cell vectors. Coordinates have to be include in Angstrom units.
-
Structures predefined: Allow us to access the ase build options.
-
Load created structures: This option allows us to load previous built structures.
The viewer is only a preview of the made structure in this beta version.
In this section we can configure the DFT parameters for SIESTA calculations. We have two options:
Upload input file : In this option we can reload the parameters from a previous fdf file. Only the parameters of the fdf are read.
Create input file: We can setup all basis DFT parameters, also we can defined the type of calculation, four option are predefined.
-
Relax structure: This option is mandatory to run the other calculation, due that it create the file "label-relaxed.cif" that have the equilibrium structure required for bands, DOS and optical calculations.
-
Calculate Bands structure: Defined the option to get the band structure for periodic systems.
-
Calculate Total and Partial Density of states: We can get the DOS and PDOS, for PDOS this beta version do not include a processor to plot it.
-
Calculate Optical properties: Defined the option to get the optical properties for periodic systems.
This section allows user to select and perform single or multiple calculations.
This section allows user to plot and fully customize graphs results from band strucrure, DOS or optical calculations.
There are some example calculations given with different usage scenarios.
SPIN project is currently in its Beta version and is open to the general public.
If the program was helpful in your research, please cite the article https://doi.org/10.1016/j.cpc.2022.108614
This project is licensed under the terms of the MIT license.