Preprint
Article

This version is not peer-reviewed.

Polyaniline-Pyrrole Electronic Interaction as a Potential Cathode Modifier in Magnesium-Sulfur Battery: An Ab Initio Study

Submitted:

25 November 2025

Posted:

25 November 2025

You are already at the latest version

Abstract
Magnesium-sulfur (Mg-S) batteries present a compelling energy storage solution, characterised by their remarkable theoretical energy density and economic viability. Nonetheless, challenges arise, including swift capacity degradation and suboptimal polysulfide (acting as an electronic and ionic insulator) utilisation, mainly due to a phenomenon known as the polysulfide "shuttle effect". This effect also leads to a decline in battery performance. The B3LYP functional and 6-311G (d, p) basis set were used to examine the optoelectronic and charge-transfer properties of a polyaniline-pyrrole (PANIPyr) composite, emphasising interatomic and electronic interactions that enhance charge transport and oxidation of MgS₂. The findings demonstrate the presence of coordination bonding between hydrogen in pyrrole and the N- ion in quinonediimine of polyaniline, significantly enhancing the electrical properties of PANI. The PANIPyr_P1 configuration exhibits the lowest Ɛgap and the highest charge-transfer capacity, thereby improving reactivity towards polysulfides in comparison to pure PANI. Significant electrical interactions at this site establish accessible electrophilic and nucleophilic regions that stabilise the ionic sides of the polysulfides, reduce the shuttle effect, and improve charge transport at the interface. PANIPyr_P1 demonstrates viability for minimising polysulfide migration and enhancing cathodic efficiency in Mg-S batteries, thereby laying a foundation for future investigations into polymer-based cathode modifiers.
Keywords: 
;  ;  ;  ;  

1. Introduction

The increasing demand for portable devices and electric vehicles has led to a significant incorporation of renewable energy sources into modern society. Traditional lithium-ion batteries (LIBs), while widely used in the market, encounter notable challenges regarding resource availability, expense, and safety issues [1]. The uneven geographical distribution and high costs of lithium resources, along with the safety risks linked to dendrite formation and flammable electrolytes, have accelerated the exploration of alternative energy storage chemistries. Magnesium-sulfur (Mg-S) batteries have attracted considerable attention owing to their sustainability, safety, and exceptional theoretical performance [2]. Magnesium is the eighth most abundant element in the Earth's crust, known for its cost-effectiveness and environmental benefits, and it enables dendrite-free deposition at the anode. In comparison to lithium, magnesium metal exhibits a notably higher volumetric capacity (3833 mAh cm⁻³ versus 2046 mAh cm⁻³ for lithium), as well as enhanced operational safety due to its lower tendency for dendrite formation and decreased reactivity with common electrolytes [3]. When paired with sulfur cathodes, which are abundant, cost-effective, and possess an impressive theoretical specific capacity of 1672 mAh g⁻¹, Mg-S batteries achieve a projected energy density that significantly surpasses that of cutting-edge lithium-sulfur systems [4]. As a result, the Mg-S battery architecture stands out as a significant advancement in energy storage technology for the future.
Despite these advantages, the practical implementation of Mg-S batteries faces specific inherent challenges that need to be addressed prior to their commercialisation. The divalent nature of Mg²⁺ leads to strong Coulombic interactions with the host cathode structures, which notably obstruct ion diffusion and cause slow kinetics [5]. This lethargy reduces reversible capacity and leads to considerable polarisation during operation, negatively impacting both energy efficiency and power density. On the cathode side, sulfur faces well-documented challenges, including insufficient electronic conductivity and the shuttle effect caused by soluble magnesium polysulfides [6]. The shuttle effect usually builds up in three phases:
The initial phase involves the solid–liquid biphasic reduction of sulphur to MgS8, which is then immediately dissolved into the electrolyte.
Step I: S8 + 2e + Mg2+ → 2MgS8
The reduction of straight-chain polysulfides happens instantaneously, with the reaction occurring in the liquid phase and demonstrating swift kinetics, as outlined in process steps II and III.
Step II: 3MgS8 + 2e + Mg2+ → 4MgS6
Step III: 2MgS6 + 2e + Mg2+ → 3MgS4
MgS4 is reduced to solid-phase MgS2, which subsequently reacts to yield the final product MgS. MgS4 can alternatively be converted to the solid-phase complex Mg3S8, as well as MgS. This process is summarised in Figure 1. These factors lead to significant capacity degradation, inadequate rate performance, and restricted cycle longevity, reflecting the issues encountered in Li-S systems but intensified by the slower transfer of Mg²⁺ [7]. Additionally, long-chain polysulfides such as S8, S8 2−, S6 2−, and S4 2− can dissolve in liquid electrolytes, resulting in the migration of sulfides from the cathode to the anode. The reduction of active material leads to a significant decrease in capacity and triggers parasitic reactions that expedite battery degradation.
These identified challenges underscore the urgent need for the advancement of advanced cathode materials and electrode architectures that enhance sulfur utilisation, facilitate Mg²⁺ migration, and ensure the stability of interfacial interactions.
Delocalisation is a key factor that leads conjugated conductive polymers (CCPs) to exhibit unique metal-like and polymer-like properties, including conductivity, processability, low density, and corrosion resistance [8]. CCPs have emerged as intriguing materials in the realm of electronics, owing to their unique combination of metal and polymer-like properties. They are being explored for applications in batteries [3], fuel cells, and solar cells [9], as well as sensors [10], electro-catalysis, and actuators [11]. A strategy to improve the electrochemical performance of sulfur cathodes includes the integration of CCPs as functional modifiers. Among various conductive polymers, polyaniline (PANI) stands out as a notably adaptable choice. PANI displays various oxidation states, including leucoemeraldine base (LB), pernigraniline base (PNB), emeraldine base (EB), and the highly conductive emeraldine salt (ES). PANI has garnered significant attention for its extensive π-conjugation, ease of doping and dedoping chemistry, environmental stability, low cost, and straightforward synthesis, making it suitable for applications in sensors, photocatalysis, and energy storage devices. The electronic tunability of PANI greatly enhances charge carrier mobility, while its polymeric flexibility allows for structural adaptability to manage volume changes during cycling [12,13]. In addition to PANI, polypyrrole (PPy) emerges as a noteworthy conductive polymer that has attracted significant attention due to its affordability and impressive efficiency in applications such as solar cells, sensors, electrochemical capacitance, and photothermal agents. Its versatile redox properties, rapid response time, improved conductivity, and straightforward preparation further contribute to its appeal [14].
Thus, recent studies are directed towards hybridising both materials for enhanced electronic tunability and charge transport, which affects the electronic states of the corresponding composites, ultimately reducing polysulfide dissolution and stabilising electrode interfaces. The advantages of this method are the presence of a nanostructure and the flexibility of the polymer due to extended π-conjugation [15]. For instance, Weiyang et al [16]. showcased enhanced cycling stability by synthesising conductive polymer-coated hollow sulfur nanospheres using PANI, PPY, and PEDOT through a simple, scalable water polymerisation method conducted at ambient temperature. The conductive coatings improve the performance of Sulphur cathodes while preserving the hollow structure, offering a reliable basis for directly evaluating the effects of different conductive polymers without the complicating factors of volumetric expansion. The observed performance can be linked to the efficient transfer of charge at the interface. Consequently, it is expected that analogous synergistic effects will arise from doping PANI with PPy monomer nanostructures for electrochemical energy storage, with the polymer serving as both a conductive matrix and a physical-chemical confiner of polysulfides.
Recent computational studies have highlighted the effectiveness of DFT in elucidating the mechanisms of interaction between hybrid polymer materials [17]. Additionally, time-dependent DFT studies of PANI-based composites revealed notable orbital delocalisation across the π-π bridge interface, which enhances charge transfer and aids in bandgap engineering [18,19]. Theoretical insights confirm that computational methods are crucial for the rational design of PANI-based hybrids with optimised interfacial properties. Employing similar methodologies for PANI-based composites in Mg-S batteries would enhance the understanding of Mg adsorption, diffusion, charge transfer, and structural stability within these hybrid systems [19].
This investigation employs density functional theory (DFT) to examine the structural, electronic, and charge transfer characteristics of PANI-pyrrole (PANIPyr) composites, with the objective of improving the performance of magnesium-sulfur batteries as cathode-modifying materials. This study aims to elucidate the collaborative role of pyrrole in enhancing the electronic and conductivity properties of PANI, thereby improving conductivity, stability, and mitigating polysulfide shuttling through the use of PANIPyr cathodes. This will be achieved through a detailed examination of binding energetics, reactivity (nucleophilicity and electrophilicity), and the electronic density of states (DOS). The outcomes from these studies are expected to provide crucial mechanistic insights that will guide the informed design of hybrid PANIPyr systems as a cathode modifier material. This study aims to bridge the gap between experimental insights and theoretical knowledge, thereby advancing the development of high-performance Mg-S batteries.

2. Methods

The geometry optimisation of aniline, pyrrole (Pyr), PANI, and PANI-Pyr composites at two distinct positions was conducted utilising DFT with the B3LYP functional (Becke's 3-parameter exchange functional combined with Lee-Yang-Parr correlation energy) and the 6-311G (d,p) basis set [1]. All calculations were conducted utilising the Gaussian 09 software package [2]. GaussView 5.0.8 [3] was employed to visualise the optimised structures. The estimation of the binding energy was conducted utilising Eq. (1)
EB.E = Ecomplex (PANI/pyr) - EPANI – Epyr
In this context, EB.E represents the binding energy, while Ecomplex(PANI/pyr) denotes the total energy of the PANIPyr composite. The terms EPANI and Epyr refer to the energies associated with PANI and pyr, respectively.
Calculations of the density of states (DOS) were conducted utilising the aforementioned Gaussian software to explore the electronic characteristics of the PANIPyr composite. Following this, the energy (ƐH) of the highest occupied molecular orbital (HOMO) and the energy of the lowest unoccupied molecular orbital (LUMO) (ƐL) were used to compute the conceptual-DFT indices of chemical potential (μ), hardness (η), softness (S), and electrophilicity (ω), using the formulas developed by Janak and Parr et al.[4]. These conceptual DFT indices have been extensively utilised in the literature and can be computed using equations 2-5 [5,6].
μ = 𝜕 E 𝜕 N υ ( r ) ( Ɛ L + Ɛ H ) 2
η = 1 2 𝜕 2 E 𝜕 N 2 υ ( r ) ( Ɛ L Ɛ H ) 2
S = 1 η
ω = μ 2 2 η

3. Results

This section focuses on the optimisation of the interactions involving aniline (Ani), pyrrole (Pyr), and their composite (AniPyr), as well as polyaniline (PANI) and its derivatives at positions 1 and 2 (PANIPyr: PANIPyr_P1 and PANIPyr_P2). The study employs the B3LYP method with a 6-311G (d,p) basis set to analyse two distinct binding sites on PANI. The binding energy at various positions, vibrational frequency, optoelectronic interactions, electrostatic potential (ESP), contour plots, and density of states (DOS) are detailed herein. The frontier molecular orbital theory suggests that the interactions between the HOMO and LUMO of the interacting species significantly influence chemical reactivity [25]. For instance, based on the Koopman theorem [26,27], the negative value of the HOMO energy level can be estimated as the ionisation potential (IP). Furthermore, various quantum chemical parameters were calculated to enhance our comprehension of the intermolecular interactions and optoelectronic characteristics associated with the optimised molecules, especially the complex formed between PANI and pyrrole at different positions. Figure 2 presents the optimised structure of the various molecules utilised for calculations in this study.

3.1. UV-VIS Absorption Spectroscopy

Theoretical modelling of the optoelectronic properties was conducted to identify the critical absorption bands of the materials being studied. Figure 3 (a) illustrates the superposition of the maximum electronic absorption band structures within the UV-visible absorption spectra of Aniline, pyrrole, and the homopolymer, PANI. The spectrum of Aniline displays two significant peaks at 214.94 and 289.34 nm, corresponding to π-π* and n-π* transitions, respectively. The solitary sharp peak identified in pyrrole at 209.89 nm is attributed to the π-π* transition. The transition occurs due to the electronic movement between the HOMO and LUMO linked to the aromatic ring. PANI displayed two distinct peaks: a prominent peak at 248.39 nm, associated with the electron orbital transition of the benzenoid ring, identified as π-π*, and a less intense peak at 319.33 nm, attributed to a polaron-π-π transition. This observation suggests that PANI demonstrates enhanced electronic transition due to the presence of the quinoline ring [28]. A pronounced absorption peak at a higher wavelength is noted in the spectrum of AniPyr (Figure 3(b)). The observed peak can be linked to the π-π* transition, whereas the change in wavelength is likely due to the synergistic electronic interaction occurring between the two molecules. Consequently, the transition in wavelength occurs towards a higher region. In a similar manner, the introduction of Pyr to PANI @ PANIPyr_P1 results in the observation of two absorption peaks in the spectra (Figure 3(c)) at 396.61 and 552.75 nm. The absorption bands are notably intense and appear at considerably higher wavelengths than the individual molecules depicted in Figure 3(c). The initial absorption band observed at 396.61 nm can be attributed to the transition of electrons from the highest occupied molecular orbital to the lowest unoccupied molecular orbital, which is linked to the π-π* electronic transition of the pyr aromatic ring. The second absorption band at 552.75 nm can be linked to the presence of polarons and bipolarons, suggesting that the Pyr incorporated into PANI within the composites mainly comprises free carriers, particularly polarons. Consequently, this illustrates the electronic influence of Pyr on charge mobility. This discovery is consistent with the current body of work [24,29]. In this study, we noted a shift in peak and a variation in intensity in PANIPyr_P1. The differences in peak intensities correlate with the diversity of heterocycles produced by the composite, whereas the changes in peak position are linked to the polymer's chain length. In contrast, PANIPyr_P2 displayed a singular peak at 605.99 nm, indicating a red shift towards a longer wavelength compared to PANIPyr_P1. The convergence of the peaks into a singular entity illustrates a significant interaction at that juncture. The UV-vis results clearly indicated the presence of both monomeric units within the heterocyclic polymer. Therefore, these findings indicate a notable enhancement in the electronic characteristics of both PANIPyr_P1 and PANIPyr_P2.

3.2. Molecular Vibrational Frequency

Figure 4 displays the simulated theoretical vibrational frequencies, highlighting the functional groups found in the simulated materials: aniline, pyrrole, AniPyr, PANI, PANIPyr_P1, and PANIPyr_P2. The significant infrared (IR) frequencies detected in Ani and Pyr are around 3156, 1659, 1529, 1303, 1144, and 869 cm-1, respectively. Asymmetric C-H stretching bands can be detected in both the Ani and Pyr rings within the range of 3156 cm-1. The peak observed at 1659 cm-1 corresponds to the symmetric C=C bond stretching in both pyrrole and quinone units, in addition to the N-H bond bending. Additional bands, including the C-N aromatic band, C-N stretching, and both in-plane and out-of-plane vibrations, appeared as peaks at 1529, 1303, 1056, and 758 cm-1, respectively. The intensity of the observed peaks in Pyr appears to be either slightly shifted or diminished when compared to Ani. The distinctiveness in band absorption may be linked to variations in ring structure. In contrast, the interactions between the Aniline and pyrrole structural units displayed a comparable band pattern as shown in the AniPyr spectrum (Figure 4). The spectral band seems to exhibit increased intensity, indicating a robust synergistic interaction between the two monomers. The main distinguishing peaks for PANI are as follows: The observed peak at 3188 cm-1 indicates an N-H stretching vibration attributed to the presence of an amino group. The peaks at 1646 and 1549 cm-1 correspond to the stretching deformation of the quinone and benzene rings, respectively. The stretching bands identified at 1361 and 1290 cm-1 correspond to the C-N bonds and quinoidal C=N bonds, respectively. The peaks observed at 1192 and 830 cm-1 are indicative of the in-plane and out-of-plane bending vibrations associated with the polyaniline benzene ring, respectively. The vibratory frequency spectra of the PANIPyr_P1 and PANIPyr_P2 composite exhibit comparable band spectra, albeit with a notable shift to higher wavenumbers in relation to their constituent homopolymers and monomer units. demonstrating the chemical interactions and synergy between the polyaniline and pyrrole components (Figure 4). Additionally, the absorption bands of the PANIPyr_P2 composite seem to be somewhat broader and more intense compared to the PANIPyr_P1 composite. The strong band observed at approximately 3571 cm-1 may be attributed to the N-H stretching vibration of both polyaniline and pyrrole units in the composite. Furthermore, the varying orientations of the Pyr molecule on PANI may also introduce supplementary chemical interactions between the two molecules, resulting in the noted alterations in the band absorption peaks. The pronounced peak observed at 1672 cm-1 corresponds to the symmetric C=C bond stretching of both pyrrole and quinone units, along with the bending of the N-H bond. The computational results displayed spectral patterns that closely align with those reported in the literature [7].

3.3. Orbital and Quantum-Mechanical Analysis

Figure 5 demonstrates the distinct localisation of HOMO and LUMO in Ani, Pyr, and PANI. Nonetheless, a distinct difference is noted in the localisation of HOMO and LUMO within the polymer composites of AniPyr, PANIPyr_P1, and PANIPyr_P2 (Figure 5). The HOMO and LUMO of Ani, Pyr, and PANI are situated around the sp2 carbon, which constitutes the aromatic rings, and around the delocalised π-electron within the aromatic rings of the molecules, respectively. This illustrates the electronic distinction between the two orbitals. The LUMO localisation of the composite molecules shows trends akin to those of the individual molecules, although AniPyr's localisation extends towards the NH2 group on the aniline molecule. The LUMO of PANIPyr_P1 and PANIPyr_P2 does not exhibit a localised orbital on the pyrrole ring; this can be attributed to the significant electronic influence on the pyrrole molecule due to the π-electrons present in PANI molecules. It is noteworthy that their HOMOs exhibit a distinctive localisation. The HOMO of AniPyr exhibits greater localisation on the aromatic ring of Aniline. This can be attributed to the π-electron-rich nature of the Aniline molecule, resulting in enhanced overlap of its orbitals with those of pyrrole [8,9]. In a similar manner, PANIPyr_P1 exhibits its HOMO distributed across the entirety of the PANI molecule, excluding the pyrrolic ring. The HOMO of PANIPyr_P2 is distributed nearly throughout the entire PANI molecule, whereas the HOMO of PANI is present in most areas of the molecule, excluding the terminal aromatic benzene ring and the pyrrolic ring (Figure 5). The observation in PANIPyr_P2 could be attributed to the electronic bridge established at the binding site between the two molecules. This could be hindering the smooth transfer of charge to the adjacent aromatic system. Consequently, this effect could account for the reduced ΔNmax properties along with the elevated η and μ noted in Table 1. The energies of the frontier orbitals, specifically the HOMO and LUMO, play a vital role in elucidating a molecule's chemical behaviour. The energy band gap (Ɛgap) plays a crucial role in various characteristics, including stability, reactivity, selectivity, electronic properties, electronic spectra, and electrochemical reactions. Wider gaps indicate a decrease in polarisability, resulting in diminished chemical reactivity and increased stability. The energy associated with the HOMO-LUMO gap can be absorbed by the molecule, leading to electronic transitions that influence light absorption or emission. The properties outlined enable predictions regarding the polymer structure's interactions with adjacent molecules and chemical species [10,11,12], especially in relation to polysulphide molecules aimed at reducing the shuttling effect. The pertinent parameters for Ani, Pyr, PANI, PANIPyr_P1, and PANIPyr_P2 have been calculated and are presented in Table 1. The HOMO and LUMO energy values show significant differences between the studied monomers/single molecules and the obtained composites (Table 1). It can be observed that the Ɛgap values of the monomer or isolated molecules are greater than the formed composites. This demonstrates hybridisation of the orbitals in the composites. With the PANIPyr_P1 composite having the lowest Ɛgap. The EHOMO values are ranked in order from highest to lowest as follows: PANIPyr_P1> PANI > PANIPyr_P2 >AniPyr > Ani > Pyr, while for ELUMO the values follow: Pyr > Ani > AniPyr > PANI > PANIPyr_P2 > PANIPyr_P1. Consequently, the monomers and AniPyr exhibit a reduced capacity for electron donation, indicated by their elevated ionisation energy. In contrast, the polymer composites demonstrate enhanced electron-donating characteristics as a result of a reduced ionisation energy. Interestingly, these composites exhibit a tendency to acquire electrons, as evidenced by their elevated electron affinity. Notably, the sequence of the HOMO-LUMO energy gap (Ɛgap) among the six simulated molecules aligns closely with the ƐL. Pyr > Ani > AniPyr > PANIPyr_P2 > PANI > PANIPyr_P1. Consequently, the PANIPyr_P1 polymer exhibits the lowest Ɛgap among the polymers analysed, indicating a reduced level of chemical stability and, as a result, an increased chemical reactivity and polarisability [13]. A narrower HOMO-LUMO gap indicates an electronically soft system, which typically shows greater size and higher polarisability compared to hard systems [14]. The polymer PANIPyr_P1 exhibits reduced hardness and increased softness in this instance. The determined ΔNmax value of 1.148 for the PANIPyr_P1 indicates a significantly charged condition. This value surpasses those found in earlier studies [15,16]. Based on the analysed findings, increased molecular softness and reduced energy gap correlate with elevated dielectric constants and electrical conductivity, while exhibiting lower optical electronegativity (Table 1).

3.4. Interaction of the Optimised Composite Molecules

To analyse the interaction between the molecules, the optimised structures of the AniPyr and PANIPyr composites, along with their binding energies at two distinct positions (1 and 2), are presented in Table 2. A comparative analysis of the binding energies for various composites at positions 1 and 2 was conducted to ascertain which material exhibits greater reactivity and potential to reduce polysulphide shuttling, thereby improving electrode performance in Mg-S batteries. The binding energies (EB.E) serve as an indicator of the binding affinity between the pyrrole molecule and both monomer aniline and PANI molecules. According to the values presented in Table 2, the AniPyr molecule exhibits a higher binding energy, indicating a significant level of complex stability. Therefore, the elevated stability of the composite results in reduced reactivity towards polysulfides, leading to a lower charge transfer, as demonstrated by its high I.E., and low ΔNmax. In contrast, the EB.E of PANIPyr composites is notably lower than that of AniPyr, indicating their tendency for high reactivity, with PANIPyr_P1 anticipated to exhibit the highest reactivity in comparison to PANIPyr_P2. Consequently, PANIPyr_P1 demonstrates significant potential for interacting with polysulfides, which helps in reducing the shuttling effect. Furthermore, the enhanced charge transfer is expected to improve cathodic performance throughout the discharge cycling process. The findings of this study indicated that the binding of pyrrole at position 1 enhanced the chemical reactivity and electronic properties of the PANIPyr_P1 composite.

3.5. Electrostatic Potential (ESP) and Contour Mapping of Optimised Molecules

The spatial distribution of charge on the atoms within a complex influences the electrostatic potential, which is crucial for intermolecular interactions [17]. The ESP forecasts the reactivity of a molecule or complex, as the regions of negative potential act as sites for protonation and electrophilic attack, while the areas of positive potential signify nucleophilic sites [12]. Figure 6 presents the ESP mapping for aniline, pyrrole, AniPyr, PANI, PANIPyr_P1, and PANIPyr_P2 materials. The colour scale (Figure 6) illustrates positive values (far right, blue) and negative values (far left, red). The red colour code (negative value) signifies the minimum electrostatic potential and pertains to the loosely bound or excess electrons, rendering it vulnerable to electrophilic attack. The blue colour signifies the highest electrostatic potential, reflecting a deficiency in electrons and thus making this position susceptible to nucleophilic attack.
Figure 6a depicts the electrophilic region of the aniline molecule, which is concentrated within the aromatic ring and extends towards the NH2 group. The nucleophilic region exhibits a sparse distribution across the hydrogen atoms bonded to the Sp2 carbon within the ring structure. The acidic proton is identifiable on the NH2 group (deep blue). In the case of the pyrrole molecule (Figure 6b), the nucleophilic sites are concentrated at the upper section of the molecule (CH-NH-CH), while the electrophilic region is only weakly concentrated towards the lower part of the pyrrolic ring. Figure 6(c) illustrates the locations for nucleophilic and electrophilic attack on the PANI molecule. The PANI molecule demonstrates a robust electronic distribution throughout the homopolymer. The nucleophilic site is distinctly localised primarily on the terminal NH2 and in the vicinity of the bridge. The distribution of the electrophilic region is uniform throughout the molecules. This suggests a strong charge transfer capability within the molecule and a tendency to release an electron for potential electronic interactions. The combined ESP and contour mapping presented in Figure 6(d) further illustrates this point. The AniPyr composite exhibits an electronic distribution akin to that of the individual molecule, albeit with minor variations. As illustrated in Figure 6(e), the π-electron-rich aniline acts as the primary site for electrophilic interaction, while the pyrrole molecule exhibits a positive potential, signifying a high degree of electron deficiency and thus serving as the target for nucleophilic attack. The noted variation in electronic distribution may be attributed to the significant electron affinity of PANI compared to pyrrole (Table 1) [6]. In Figure 6(e), the red region is predominantly located on the terminal aromatic ring of PANI, with a sparse presence on the ring that connects to the pyrrolic molecule. The blue region, which serves as the site for nucleophilic attack, is situated between the pyrrole and the connecting PANI ring. Demonstrating a significant electronic interaction between the two molecules. Additionally, it can be inferred that the composite is vulnerable to both nucleophilic and electrophilic attack. Moreover, the molecule exhibits a significant likelihood of reacting with polysulfide, whether from the metal (-MgSn) side or the sulphide side (MgSn-), thereby highlighting its potential to reduce polysulfide shuttling [18,19]. As a result, electron transfer is facilitated, which may subsequently contribute to the enhanced performance of the cathode. A comparable observation is illustrated in Figure 6(g), which exhibits a minor variation. The electronic distribution of the composites (PANIPyr_P1 and PANIPyr_P2) is further depicted through the combined ESP and contour mapping presented in Figure 6f and h. In summary, the charge transfer between PANI and pyrrole demonstrates a significant interaction within the composites, particularly in the PANIPyr_P1 composite. This interaction is predicted to result in effective polysulfide mitigation, thereby enhancing cathode performance.

3.6. Density of States of Optimised Molecules

In order to achieve a more comprehensive insight into the electronic properties of aniline, pyrrole, PANI, PANIPyr_P1, and PANIPyr_P2 materials, the density of states (DOSs) were computed for each of the systems. Figure 6 illustrates the density of states plots for the previously discussed systems in proximity to the Fermi level (EF). When comparing the density of states of isolated molecules such as aniline, pyrrole, and PANI with those of AniPyr, PANIPyr_P1, and PANIPyr_P2 materials, a notable difference in the Fermi level is evident, indicating hybridisation between the interacting molecules. The Fermi level exhibits a minor variation, shifting from -0.096 eV in isolated PANI to -0.097 eV and -0.101 eV in PANIPyr_P1 and PANIPyr_P2, respectively. The sequence of alterations is clearly illustrated in the DOS graph presented in Figure 7. The DOS plot for other bare monomers indicates a higher Fermi level, which implies enhanced electronic stability.

3.7. Proposed Mechanism of Polysulfide Conversion

The dissolution of polysulfides causes a permanent loss of cathode material due to the inaccessibility of dissolved species for electrochemical processes in Li- and Mg-S systems. To mitigate polysulfide shuttling, preventing diffusion within the electrolyte is crucial, which can be achieved through interactions with blocking materials. Materials with electrophilic active sites can bind effectively with polysulfides, aiding in their entrapment within the sulfur cathode. Differences in the structural conformers of Li and Mg polysulfides may lead to distinct binding behaviours, with Mg2+ exhibiting better binding characteristics than Li+, thereby enhancing interactions with blocking materials. This section outlines a mechanism for disrupting polysulphide clusters, utilising PANI-Pyr_P1, which demonstrates both electrophilic and nucleophilic characteristics, to control the solvation structure of magnesium polysulfides (MgPSs) and enhance their reactivity in challenging environments. Two reaction pathways were proposed for the simulated molecule.

3.7.1. Electrophilic Reaction

During the electrophilic attack on the polysulphide, PANI-Pyr_P1 acts as an electrophile, utilising its electrophilic site to interact with the electron-rich MgPSs (nucleophile, Mg-S-) through soft Lewis acid–base interactions, leading to the formation of the complex [PANI-Pyr_P1]MgPS. The complex is reduced at the cathode by gaining electrons, which disrupts the clustering of MgPSs and improves the solvation of MgS, thus facilitating the formation of MgS. The reaction is illustrated in Figure 8(a).

3.7.2. Nucleophilic Reaction

PANI-Pyr_P1 acts as a nucleophile during the nucleophilic attack on polysulphide, utilising its nucleophilic site to engage with the electron-deficient region of the MgPSs (electrophile, Mg2+ S2-) through soft Lewis acid–base interactions, leading to the formation of the complex [PANI-Pyr_P1]MgPS. The complex is reduced at the cathode by gaining electrons, which compromises the structural integrity of MgPSs and promotes the solvation of MgS, facilitating the formation of MgS. This reaction is illustrated in Figure 8(b).

4. Conclusions

The structural, optical, and electrical characteristics of polyaniline (PANI)-pyrrole composites were examined using density functional theory in order to assess their potential use as cathode modifiers in magnesium-sulfur (Mg-S) batteries. The electrical characteristics of two polymeric forms (PANIPyr_P1 and PANIPyr_P2), their dimer (AniPyr), and monomers (aniline and pyrrole) were compared in order to identify important structure-property correlations influencing charge transfer and polysulfide interaction. PANIPyr_P1 was responsive to polysulfide intermediates due to its strong electron donation and acceptance capabilities, low HOMO-LUMO bandgap, and considerable electrical softness. According to electrostatic potential maps, PANIPyr_P1 possesses unique electrophilic and nucleophilic regions that enable efficient interactions with magnesium polysulfides. This is essential for minimising parasitic migration in Mg-S batteries and preserving the integrity of the active material. Rapid electron transport and stable redox conditions are facilitated by hybridisation between PANI and pyrrole, which also results in increased π-conjugation and charge mobility in PANIPyr_P1, according to the study. Furthermore, the reduced binding energy of PANIPyr_P1 suggests better reactivity and stability for polysulfide adsorption and charge transfer. Overall, the results address limits in energy storage applications by offering a mechanistic foundation for the design of polymeric cathode modifiers that can improve the performance of Mg-S batteries by stabilising cathode surfaces and inhibiting polysulfide shuttling.

Author Contributions

MS conceptualised, contributed to the manuscript's writing, and proofread the final draft. HS prepared the original draft, data curation and proofreading of the final manuscript.

Funding

This research and APC were funded by the research office of the Walter Sisulu University, Mthatha, South Africa.

Data Availability Statement

All data and figures used in this work have been adequately referenced.

Acknowledgments

HS and MS extend their sincere appreciation to the Directorate of Research and Innovation Walter Sisulu University for the generous financial support of the postdoctoral fellowship and for providing research facilities.

Conflicts of Interest

The Authors declare no conflict of interest.

Abbreviations

The following are some of the abbreviations used in this manuscript:
PANIPyr Polyaniline-pyrrole
HOMO Highest occupied molecular orbital
LUMO Lowest unoccupied molecular orbital
DFT Density Functional Theory
DOS Density of states
ESP Electrostatic potential
PANI Polyaniline
BE Binding energy
LIB Lithium-ion battery

References

  1. Manousakis, N.M.; et al. Integration of renewable energy and electric vehicles in power systems: a review. Processes 2023, 11, 1544. [Google Scholar] [CrossRef]
  2. Tan, S.; et al. Crystal regulation towards rechargeable magnesium battery cathode materials. Materials Horizons 2020, 7, 1971–1995. [Google Scholar] [CrossRef]
  3. Bonnick, P. and J. Muldoon, A trip to Oz and a peek behind the curtain of magnesium batteries. Advanced Functional Materials 2020, 30, 1910510. [Google Scholar]
  4. Yao, Y.Y.; et al. Advances in cathodes for high-performance magnesium-sulfur batteries: a critical review. Batteries 2023, 9, 203. [Google Scholar] [CrossRef]
  5. Chen, S.; et al. Emerging intercalation cathode materials for multivalent metal-ion batteries: status and challenges. Small Structures 2021, 2, 2100082. [Google Scholar] [CrossRef]
  6. Luo, T.; et al. Polysulfides in magnesium-sulfur batteries. Advanced Materials 2024, 36, 2306239. [Google Scholar] [CrossRef]
  7. Fan, Z.; et al. Defect engineering: can it mitigate strong coulomb effect of Mg2+ in cathode materials for rechargeable magnesium batteries? Nano-Micro Letters 2025, 17, 4. [Google Scholar] [CrossRef]
  8. Gerard, M.; Chaubey, A.; Malhotra, B.D. Application of conducting polymers to biosensors. Biosensors and bioelectronics 2002, 17, 345–359. [Google Scholar]
  9. Gracia, R.; Mecerreyes, D. Polymers with redox properties: materials for batteries, biosensors and more. Polymer Chemistry 2013, 4, 2206–2214. [Google Scholar]
  10. Cho, Y.; Lim, D.; Jo, N. Fabrication of an ion-selective sensor using a conducting polymer actuator. Materials Research Innovations 2011, 15 (suppl. S2), s59–s62. [Google Scholar] [CrossRef]
  11. Kulesza, P.J.; et al. Electrocatalytic properties of conducting polymer-based composite film containing dispersed platinum microparticles towards oxidation of methanol. Electrochimica Acta 1999, 44, 2131–2137. [Google Scholar] [CrossRef]
  12. Wasim, F.; et al. Sensor applications of polypyrrole for oxynitrogen analytes: a DFT study. Journal of Molecular Modelling 2018, 24, 308. [Google Scholar] [CrossRef] [PubMed]
  13. Yang, J.; et al. The potential application of VS2 as an electrode material for Mg ion battery: A DFT study. Applied Surface Science 2021, 544, 148775. [Google Scholar] [CrossRef]
  14. Vernitskaya, T. and O. Efimov, Polypyrrole: A conducting polymer (synthesis, properties, and applications). Успехи химии 1997, 66, 502–505. [Google Scholar]
  15. Sharma, D.; Singh, T. A DFT study of polyaniline/ZnO nanocomposite as a photocatalyst for the reduction of methylene blue dye. Journal of Molecular Liquids 2019, 293, 111528. [Google Scholar] [CrossRef]
  16. Li, W.; et al. Understanding the role of different conductive polymers in improving the nanostructured sulfur cathode performance. Nano Letters 2013, 13, 5534–5540. [Google Scholar] [CrossRef]
  17. Gangwar, A.; et al. Computational modelling and mechanical characteristics of polymeric hybrid composite materials: an extensive review. Archives of Computational Methods in Engineering 2024, 31, 3901–3921. [Google Scholar] [CrossRef]
  18. Cevher, D. Electroactive Polymers for Next-Generation Energy Storage and Conductive Composite Materials: A Focus on Pani and Pedot-Based Conjugated Polymers. 2024.
  19. Zhang, W.; et al. Exposure of active edge structure for electrochemical H2 evolution from VS2/MWCNTs hybrid catalysts. International Journal of Hydrogen Energy 2018, 43, 22949–22954. [Google Scholar] [CrossRef]
  20. Parr, R.G. Density functional theory of atoms and molecules. in Horizons of Quantum Chemistry: Proceedings of the Third International Congress of Quantum Chemistry Held at Kyoto, Japan, October 29-November 3, 1979. 1989. Springer.
  21. Oviedo, P.S.; et al. Exploring the localised to delocalized transition in non-symmetric bimetallic ruthenium polypyridines. Dalton Transactions 2017, 46, 15757–15768. [Google Scholar] [CrossRef]
  22. Frisch, M.E.; et al. Gaussian 16. 2016, Gaussian, Inc., Wallingford, CT.
  23. Janak, K.E.; Parkin, G. Experimental evidence for a temperature-dependent transition between normal and inverse equilibrium isotope effects for oxidative addition of H2 to Ir (PMe2Ph)2(CO) Cl. Journal of the American Chemical Society 2003, 125, 13219–13224. [Google Scholar] [CrossRef]
  24. Omer, R.A.; et al. Synthesis of polyaniline, polypyrrole, and poly (aniline-co-pyrrole) in deep eutectic solvent: a comparative experimental and computational investigation of their structural, spectral, thermal, and morphological characteristics. Chemistry of Heterocyclic Compounds 2024, 60, 463–472. [Google Scholar] [CrossRef]
  25. LEWIS, D.F. Frontier orbitals in chemical and biological activity: quantitative relationships and mechanistic implications. Drug metabolism reviews 1999, 31, 755–816. [Google Scholar] [CrossRef] [PubMed]
  26. Dhonnar, S.L.; et al. Molecular structure, FT-IR spectra, MEP and HOMO-LUMO investigation of 2-(4-fluorophenyl)-5-phenyl-1, 3, 4-oxadiazole using DFT theory calculations. Advanced Journal of Chemistry-Section A 2021, 4, 220–230. [Google Scholar]
  27. Fayemi, O.E.; et al. Investigation of the effects of concentration and voltage on the physicochemical properties of Nylon 6 nanofiber membrane. Scientific Reports 2025, 15, 10865. [Google Scholar] [CrossRef] [PubMed]
  28. Bhugul, V. and G. Choudhari, Synthesis and Characterisation of Polypyrrole-Zinc Oxide Nano Composites by Ex-Situ Technique and Study of Their thermal &Electrical Properties. Int. J. Adv. Res. Innovat 2013, 2, 159–164. [Google Scholar]
  29. Ullah, R.; et al. Preparation of electrochemical supercapacitor based on polypyrrole/gum arabic composites. Polymers 2022, 14, 242. [Google Scholar] [CrossRef]
  30. Abd Ali, L.I.; et al. Polypyrrole-coated zinc/nickel oxide nanocomposites as adsorbents for enhanced removal of Pb (II) in aqueous solution and wastewater: an isothermal, kinetic, and thermodynamic study. Journal of Water Process Engineering 2024, 64, 105589. [Google Scholar] [CrossRef]
  31. Anjalikrishna, P.K.; Suresh, C.H. Utilisation of the through-space effect to design donor–acceptor systems of pyrrole, indole, isoindole, azulene and aniline. Physical Chemistry Chemical Physics 2024, 26, 1340–1351. [Google Scholar] [CrossRef]
  32. Khan, M.M.R.; et al. Simplistic fabrication of aniline and pyrrole-based poly (Ani-co-Py) for efficient photocatalytic performance and supercapacitors. International Journal of Hydrogen Energy 2022, 47, 37860–37869. [Google Scholar] [CrossRef]
  33. Nadr, R.B.; et al. Quantum chemical calculation for the synthesis of some thiazolidin-4-one derivatives. Journal of Molecular Structure 2024, 1308, 138055. [Google Scholar] [CrossRef]
  34. Omer, R.A.; et al. N, N-Bis (2, 4-dihydroxy benzaldehyde) benzidine: Synthesis, characterisation, DFT, and theoretical corrosion study. Journal of Molecular Structure 2024, 1300, 137279. [Google Scholar] [CrossRef]
  35. Omar, R.A.; et al. A novel coumarin-triazole-thiophene hybrid: synthesis, characterisation, ADMET prediction, molecular docking and molecular dynamics studies with a series of SARS-CoV-2 proteins. Journal of Chemical Sciences 2023, 135, 6. [Google Scholar] [CrossRef] [PubMed]
  36. Mamad, D.M.; Omer, R.A.; Othman, K.A. Quantum chemical analysis of amino acids as anti-corrosion agents. Corrosion Reviews 2023, 41, 703–717. [Google Scholar] [CrossRef]
  37. Halim, S.A.; Hamad, H.; Ali, T.E. Deeper insights into the density functional theory of structural, optical, and photoelectrical properties using 5-[(4-oxo-4H-chromen-3-yl) methylidene]-4-oxo (thioxo)-6-thioxo-2-sulfido-1, 3, 2-diazaphosphinanes. Optical and Quantum Electronics 2023, 55, 458. [Google Scholar] [CrossRef]
  38. Chen, S.A.; Lee, H.T. Polyaniline plasticised with 1-methyl-2-pyrrolidone: structure and doping behaviour. Macromolecules 1993, 26, 3254–3261. [Google Scholar]
  39. Manuel, J.; et al. Electrochemical properties of lithium polymer batteries with doped polyaniline as cathode material. Materials Research Bulletin 2012, 47, 2815–2818. [Google Scholar] [CrossRef]
  40. Koparir, P.; et al. Synthesis, characterisation and computational analysis of thiophene-2, 5-diylbis ((3-mesityl-3-methylcyclobutyl) methanone). Polycyclic Aromatic Compounds 2023, 43, 6107–6125. [Google Scholar] [CrossRef]
  41. Roberts, A.L.; Sanborn, P.N.; Gschwend, P.M. Nucleophilic substitution reactions of dihalomethanes with hydrogen sulfide species. Environmental science & technology 1992, 26, 2263–2274. [Google Scholar]
  42. Zeng, Z.; Liu, X. Sulfur immobilization by “chemical anchor” to suppress the diffusion of polysulfides in lithium–sulfur batteries. Advanced Materials Interfaces 2018, 5, 1701274. [Google Scholar] [CrossRef]
Figure 1. Solution-phase pathway for polysulfide conversion in Mg-S battery as proposed by Gao et al. [8].
Figure 1. Solution-phase pathway for polysulfide conversion in Mg-S battery as proposed by Gao et al. [8].
Preprints 186673 g001
Figure 2. Optimised structure of (a) Aniline, (b) Pyrrole, (c) PANI, (d) AniPyr, (e) PANIPyr_P1 and (f) PANIPyr_P2.
Figure 2. Optimised structure of (a) Aniline, (b) Pyrrole, (c) PANI, (d) AniPyr, (e) PANIPyr_P1 and (f) PANIPyr_P2.
Preprints 186673 g002aPreprints 186673 g002b
Figure 3. Optical absorption spectra of (a)Aniline, pyrrole and PANI, (b) AniPyr and (c) PANIPyr_P1 and PANIPyr_P2.
Figure 3. Optical absorption spectra of (a)Aniline, pyrrole and PANI, (b) AniPyr and (c) PANIPyr_P1 and PANIPyr_P2.
Preprints 186673 g003
Figure 4. Vibrational spectra of simulated molecules.
Figure 4. Vibrational spectra of simulated molecules.
Preprints 186673 g004
Figure 5. Molecular orbital HOMO-LUMO: (a-b) Aniline, (c-d) Pyrrole, (e-f) PANI, (g-h) AniPyr, (i-j) PANIPyr_P1 and (k-l) PANIPyr_P2, respectively.
Figure 5. Molecular orbital HOMO-LUMO: (a-b) Aniline, (c-d) Pyrrole, (e-f) PANI, (g-h) AniPyr, (i-j) PANIPyr_P1 and (k-l) PANIPyr_P2, respectively.
Preprints 186673 g005aPreprints 186673 g005b
Figure 6. ESP mapping of (a) Aniline, (b) Pyrrole, (c) PANI, (d) combined ESP and contour mapping of PANI, (e) AniPyr, (f) combined ESP and contour mapping of AniPyr, (g) PANIPyr_P1, (h) combined ESP and contour mapping of PANIPyr_P1, (i) PANIPyr_P2 and (j) combined ESP and contour mapping of PANIPyr_P2.
Figure 6. ESP mapping of (a) Aniline, (b) Pyrrole, (c) PANI, (d) combined ESP and contour mapping of PANI, (e) AniPyr, (f) combined ESP and contour mapping of AniPyr, (g) PANIPyr_P1, (h) combined ESP and contour mapping of PANIPyr_P1, (i) PANIPyr_P2 and (j) combined ESP and contour mapping of PANIPyr_P2.
Preprints 186673 g006aPreprints 186673 g006b
Figure 7. DOS of simulated molecules and composites.
Figure 7. DOS of simulated molecules and composites.
Preprints 186673 g007
Figure 8. (a) Electrophilic reaction mechanism of PANI-Pyr_P1 on MgPSs and (b) Nucleophilic reaction mechanism of PANI-Pyr_P1 on MgPSs.
Figure 8. (a) Electrophilic reaction mechanism of PANI-Pyr_P1 on MgPSs and (b) Nucleophilic reaction mechanism of PANI-Pyr_P1 on MgPSs.
Preprints 186673 g008aPreprints 186673 g008b
Table 1. Calculated quantum chemical reactivity parameters.
Table 1. Calculated quantum chemical reactivity parameters.
Parameters (eV) Aniline Pyrrole AniPyr PANI PANIPyr_P1 PANIPyr_P2
EHOMO (ƐH) -0.20646 -0.21853 -0.20245 -0.18070 -0.18011 -0.18933
ELUMO (ƐL) -0.00337 -0.00312 -0.00819 -0.01113 -0.01279 -0.01213
Energy gap (Ɛgap) 0.20309 0.21541 0.19426 0.16957 0.16732 0.1772
Ionisation energy (I.E) 0.20646 0.21853 0.20245 0.18070 0.18011 0.18933
Electron Affinity (E.A) 0.00337 0.00312 0.00819 0.01113 0.01279 0.01213
Hardness (η) 0.101545 0.107705 0.09713 0.084785 0.08366 0.0886
Softness (eV-1) 9.848 9.285 10.296 11.795 11.953 11.287
Electronegativity (χ) 0.105 0.111 0.105 0.096 0.096 0.101
Chemical potential (μ) -0.105 -0.111 -0.105 -0.096 -0.096 -0.101
Electrophilicity (ω) 0.054 0.0572 0.0567 0.054 0.055 0.058
Nucleophilicity (Ɛ), eV-1 18.519 17.544 17.637 18.519 18.182 17.241
Back donation (ΔEbd) -0.025 -0.027 -0.024 -0.021 -0.0209 -0.022
Electron transfer (ΔNmax) 1.034 1.031 1.081 1.132 1.148 1.139
Fermi level (EF) -0.105 -0.111 -1053 -0.096 -0.097 -0.101
Work function (Φ) 0.105 0.111 1053 0.096 0.097 0.101
Optical electronegativity (Δχ*) 0.054 0.058 0.052 0.045 0.0455 0.047
Table 2. Estimated binding energies of predicted composite molecules.
Table 2. Estimated binding energies of predicted composite molecules.
Composites AniPyr PANIPyr_P1 PANIPyr_P2
Binding energy (eV) 2.547 -0.024 0.092
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated