The Sun emits enough power onto Earth each second to satisfy the entire human energy demand for over two hours. Given that it is readily available and renewable, solar power is an attractive source of energy. However, as of 2018, less than two percent of the world’s energy came from solar. Historically, solar energy harvesting has been expensive and relatively inefficient. Even this meager solar usage, though, is an improvement over the previous two decades, as the amount of power collected from solar energy worldwide increased over 300-fold from 2000 to 2019. New technological advances over the last twenty years have driven this increased reliance on solar by decreasing costs, and new technological developments promise to augment this solar usage by further decreasing costs and increasing solar panel efficiency. Over the past 20 years, the costs associated with solar cells, the structures capable of converting light energy into electricity, have been steadily decreasing.
A solar cell is a device that generates electric power upon absorption of sunlight. All photovoltaics are based on semiconductors, which are materials featuring a forbidden energy gap between their electron filled valence band (VB) and their empty conduction band (CB). The forbidden energy gap is called band gap (BG). Without any external excitation source, semiconductors exhibit almost no free charge carries in the CB leading to a low conductivity, between that of conductors and insulators. Upon light absorption or the application of an external electric field, electrons can be excited into the CB and the semiconductor becomes conductive. It is important to notice that electrons can only be transferred into the CB if the energy, which is applied to the electrons, equals or exceeds the energy of the BG.(Fig. 1).[3,4]
Because solar cells are used to convert light into electricity, they need to be composed of some material that’s good at capturing energy from light. This material can be sandwiched between two metal plates which carry the electricity captured from light energy to where it is needed, like the lights of a home or machines of a factory . Choosing the right material to capture light involves measuring the difference between two energy levels called the valence band and the conduction band. The lower-energy valence band is filled with many small negatively charged particles called electrons, but the higher-energy conduction band is mostly empty. When electrons are hit with particles of light, called photons, they can absorb enough energy to jump from the low-energy conduction band into the high-energy valence band. Once in the valence band, the extra energy in the electron can be harvested as electricity. It’s as if the electrons are sitting at the bottom of a hill (the conduction band) and being hit by a photon that gives them the energy to leap to the top (the valance band). The amount of energy needed for electrons to jump into the valence band depends on the type of material. Essentially, the size of the metaphorical hill varies based on the properties of a given material. The size of this energy gap matters because it impacts how efficiently solar cells convert light into electricity. Specifically, if photons hit the electrons with less energy than the electron needs to jump from the valence band to the conduction band, none of the light’s energy is captured. Alternatively, If the light has more energy than is needed to overcome that gap, then the electron captures the precise energy it needs and wastes the remainder. Both of these scenarios lead to inefficiencies in solar harvesting, making the choice of solar cell material an important one. Historically, silicon has been the most popular material for solar cells One reason for this popularity lies in the size of the gap between silicon’s conduction and valence bands, as the energy of most light particles is very close to the energy needed by silicon’s electrons to jump the energy gap. Theoretically, about 32% of light energy could be converted into electric energy with a silicon solar cell. This may not seem like a lot, but it is significantly more efficient than most other materials. Additionally, silicon is also inexpensive. It is one of the most abundant elements on earth, and the cost of refining it has decreased dramatically since 1980. The solar cell and electronics industries have driven the decrease in purification cost as they have learned better bulk purification techniques to drive the demand of solar cells and consumer electronics.[5,6]
In the coming years, technology improvements will ensure that solar becomes even cheaper. It could well be that by 2030, solar will have become the most important source of energy for electricity production in a large part of the world. This will also have a positive impact on the environment and climate change. 
Perovskite solar cells (PSCs) emerging as a promising photovoltaic technology with high efficiency and low manufacturing cost have attracted the attention from all over the world..Both the efficiency and stability of PSCs have increased steadily in recent years.[8,9] Perovskite solar cells (PSCs) have become a promising thin-film photovoltaic (PV) technology due to the high light-absorption coefficient, long carrier diffusion length, and solution processibility of metal halide perovskite materials.
Lev Perovski discovered and determined the crystallographic structure of the mineral CaTiO3 in 1839. That particular structure is called perovskite and it refers to a set of compounds with a certain ABX3 crystal structure. A refers to a larger monovalent cation, B is a smaller bivalent cation, and X is a monovalent anion that bonds with both A and B. The stability of a certain perovskite structure can be predicted by the Goldschimdt tolerance factor t that can be determined by the following simple equation
where RA, RB, and RX are the ionic radii of the A, B, and X ions,respectively. Ideally, t > 1 results in hexagonal or tetragonal structures. 1 > t > 0.9 produces a cubic structure, 0.9 > t > 0.71 gives an orthorhombic or rhombohedral structure, and t < 0.71 does not produce a perovskite crystal structure. The Goldschimdt tolerance factor t is a zeroth-order approximation that facilitates ease of calculation inmost of the cases, but anomaly has been found in approximately 26% of cases, asmentioned in some literatures . Bartel et al proposed another tolerance factor that can be presented by the following equation 
where RA, RB, and RX are the ionic radii of the respective species and nA is the oxidation state of the A cation. The possibility of a perovskite structure formation arises when t < 4.18 and the lesser value increases the probability of the formation of perovskite.Equation 2 cannot predict the exact crystallographic structures such as Eq. 1, but it can predict the probability of perovskite formation more accurately than that of Eq. 1 and an anomaly has been observed in mere 8% of cases . So, it is highly prescribed to use both the equations on a certain species to accurately predict the probability of formation of a perovskite structure and the exact crystallographic structure. 
Metal halide perovskites have been intensively studied over the past years due to their attractive electronic, optical and optoelectronic properties. In spite of the phenomenally high solar-conversion efficiency achieved with perovskites, their adverse instability remains the key obstacle restricting their wider applications. These ionic crystals can be affected by many factors, such as varied temperatures, humid air, polar solvents, and electron-withdrawing/donating gases. However, under certain controlled conditions, changes in perovskite structures/compositions via, for example, phase transitions, hydration/dehydration, gasadsorption/desorption, and ion intercalation/decalation, can all be reversed.[14,15]
In an effort to reduce the impact of global warming, renewable energy reliance has increased. Recent reductions in manufacturing costs of solar cells are steps towards the future use of large-scale photovoltaics cells. However, cost and efficiency are still challenges faced by the PV industry. A new family of hybrid organic–inorganic lead halide perovskites offer high prospects on both energy conversion efficiency and production cost, especially methylammonium lead triiodide. MAPbI3 has an extremely high absorption coefficient, long charge diffusion length, high defect tolerance, and high ambipolar transport. It has an experimental band gap of 1.55 eV close to that of the ideal band gap (which yields the highest theoretical conversion efficiency), 1.35 eV. The outstanding performance of these materials proves useful for other optoelectronic applications. However, there are two main issues: the stability and the toxicity of lead (Pb). The presence of Pb in high performing perovskites poses serious environmental and health concerns.Solar cells are placed in direct contact with nature, so exposure to rainfall and solar heating is inevitable.Degradation into volatile PbI2 is highly likely due to the low thermal stability of MAPbI3, causing severe chronic health problems. Lead pollution further impacts natural resources, diffusing into the atmosphere, contaminating water sources, and emitting greenhouse gases. Elimination of the Pb toxicity from perovskite cells requires complete replacement of Pb with other nontoxic elements.[16,17]
Lead-free perovskites have drawn much attention of researchers in the field of electronics and photovoltaics due to the toxicity issue of the lead halide perovskites. The methylammonium tin iodide (CH3NH3SnI3) amongst others has become a viable alternative due to its eco-friendliness, as well as narrower bandgap and its wider visible absorption spectrum. In this study different theoretical approaches were employed in investigating the structural, electronic properties of the CH3NH3SnI3 perovskite. .
MATERILAS AND METHODS
First-principles calculations were performed in the frame of Density Functional Theory (DFT). Simulation of methylammonium tin iodide (CH3NH3SnI3) and methylammonium lead iodide (CH3NH3PbI3) was done using the Quantum ESPRESSO Software package. Additionally, the pseudopotentials from QE database corresponding to the three exchange–correlation functionals (LDA, PBE,and GGA) were used for the band structures and density of states calculation.
RESULTS AND DISCUSSION
Nanostructured perovskites include perovskite quantum dots, nanoparticles, nanosheets, nanorods,and perovskites with nanoscale internal ordering.
perovskite exist in different dimensions and phases.This class of materials are categorized into different structures including three dimensional (3D), two dimensional (2D), one dimensional (1D) and zero dimensional (0D) structures. Dimensionality of this material is defined by the linkage of the octahedral units [PbX6]4 take place forming [PbX8]6 octahedra is of manifolds, varying from corner-sharing to face-sharing to edge-sharing. If the octahedral units are isolated, it would correspond to 0D, while an arrangement of complete corner sharing octahedral would be a 3D perovskite. Fig. 1 depicts the various dimensions of perovskite. 
Three-dimensional (3D) organic-inorganic halide perovskites have been regarded as promising sunlight harvesters for perovskite solar cells (PSCs). Here, the three-dimensional structures of methylammonium lead iodide and methylammonium tin iodide have been drawn and compared theoretically and practically.
A band gap is a range of energy levels in a material in which electrons cannot exist. The absence or presence of a band gap as well as its size can help us understand the electronic behaviour of a material a. nd distinguish electrical insulators, conductors, and semiconductors. It is well known that some basic optoelectronic properties are essential for an efficient photovoltaic device, including suitable band gap, low carrier effective masses, small exciton binding energy,high optical absorption, etc. These properties are strongly linked to concepts such as electronegativity, bond length, bond energy, orbital overlap, and band width. it has been shown that it is very helpful to understand and predict the electronic band structure features without high-level calculations, with the chemical understanding of bonding in solids .
Now, in this part, we have investigated and drawn the bandgap of two structures of methylammonium lead iodide, methylammonium tin iodide and compared with theoretical values.
Density Of State (DOS)
The density of states (DOS) is essentially the number of different states at a particular energy level that electrons are allowed to occupy, i.e. the number of electron states per unit volume per unit energy. Electronic density of states (DOS) is a key factor in condensed matter physics and material science that determines the properties of metals. First-principles density-functional theory (DFT) calculations have typically been used to obtain the DOS despite the considerable computation cost. High DOS at a specific energy level indicates that there is a huge no of states available for the occupation of electrons whereas in the DOS graph a DOS of zero means that there are no states to occupy. For the case of atoms or molecules in a system (unlike isolated systems) we did not obtain a discrete density distribution but we get a continuous spectrum of the density of states So it is very important to study the density of states (DOS) for deeper study of electronic band structure. 
Here we examine the density of states of methylammonium lead iodide and methylammonium tin iodide and observe the closeness of the theoretical and practical states in the graphs.
Results show four distinct regions consisting of capacitance bands and one region containing a conduction band. It should be noted that the separation between the upper part of the capacity modes and the lower part of the conduction modes shows a band gap. This indicates that the MAPbI3 perovskite exhibits semiconductor behavior. Sharp and dense edge modes separate the VB modes from the CB, and a band gap of 1.6 is visible in the figure. Fermi alignment is shown at the edge of the capacity bar. The existence of such states indicates the high potential of this material for electron excitation and optical transitions and consequently the beginning of the electron production process in the hole.(Fig. 6)
A higher density of modes can be observed in the perovskite capacitance band, indicating that the MASnI3 perovskite belongs to the semiconductor family. The analysis provides a better understanding of the band gap changes that affect the electronic states of the Sn and I atoms. 5p modes Atoms I with partial overlap with 5s tin modes are the main contributors to the maximum capacitance band. The conduction band, on the other hand, is filled by the 5p states of Sn atoms, which are responsible for forming the minimum conduction band with a small fraction of the 5p states of the iodine atoms. In general, the location of the Fermi surface between the capacitance band and the conduction band is controlled by the electron density of the p-states of the tin and iodine atoms in the perovskite.(Fig.7-Fig. 9).
1-Structural study in both cases agrees very well with the experimental results. (Fig. 2 and Fig. 3)
2- The acceptable bandwidth range in a solar cell is between 1-1.8 (ev). An ideal solar cell has a direct band gap of 1.4 (ev) to absorb the maximum number of photons from the sun.so Band structure The structure of MAPbI3 is performed at the PBE level and with GW calculations. The Pm-symmetry is based on the PbI3 framework without the presence of the CH3NH3 molecule. After making the frame, the CH3NH3 molecule is added to the center of the PbI3 frame in different directions ,  and .(Fig. 4)
The energy gap in MASnI3 is closer to the experimental with the LDA approximation and is in good agreement. According to the band gap diagram, it can be imagined that MASnI3 also transports electrons in the capacitance band to the conduction band at a high level, where it can be used as solar cell material.(Fig. 5)
3- State density is basically the number of different states in a particular energy level that electrons are allowed to occupy, that is, the number of electron states per unit volume per unit energy.
CONFLICT OF INTEREST
The authors declare that there is no conflict of interests regarding the publication of this manuscript.