Improve the Hole Size–Dependent Refractive Index Sensitivity of Au–Ag Nanocages by Tuning the Alloy Composition

In this study, Au–Ag nanoboxes are converted into Au–Ag alloy nanocages by increasing the hole size. The extinction spectrum and the refractive index sensing characteristics of Au–Ag alloy nanocages with different geometric parameters are studied by using discrete dipole approximation method (DDA). With the increase of Au composition, the peak of local surface plasmon resonance (LSPR) shows approximately linear redshift and the sensitivity factor shows approximately linear decrease. The refractive index sensitivity can be effectively controlled by the Au–Ag ratio at large hole size because the hole and cavity surfaces distribute more environmental dielectric components. Therefore, increasing the hole size and decreasing the Au–Ag ratio can improve the refractive index sensitivity. These calculation results have also been verified experimentally. In order to illustrate the influence of alloy composition on the LSPR characteristics and the refractive index sensitivity, the local electric field distributions under different geometric parameters are plotted. We find that the electric field direction on the hole and cavity surfaces is controlled by the Au–Ag ratio and environmental dielectric constant. Moreover, the field vectors on the hole and cavity surfaces are formed by the superposition of the incident field, the electric field generated by the oscillating electrons on the outer surface, and the polarized field in the environmental dielectric constant.


Introduction
In recent years, the investigation on the optical properties of noble metal nanoparticles of Au [1], Ag [2], and Au-Ag alloy [3,4] has greatly promoted the development of noble metal nanoparticles in biochemical spectral sensing [5], imaging [6][7][8], and various biomedical applications. Under the action of the external incident light field, the surface-free electrons in the noble metal nanoparticles will collectively oscillate at the same frequency as the incident electromagnetic wave, which is called LSPR [9]. The intensity and wavelength of the LSPR peak of noble metal nanoparticles are closely related to the metal type, size, morphology, and environmental dielectric constant [10,11], which is the basis of LSPR sensing application, and also provides the possibility of designing and manufacturing ultra-sensitive LSPR refractive index sensors [12,13].
The superior optical properties of Au and Ag nanoparticles have attracted many researchers' attention, so they have been widely studied. Among them, the LSPR effect of Au nanoparticles enables them to have enhanced absorption and scattering characteristics, so Au nanoparticles have become commonly used drugs for the diagnosis, treatment, and imaging in the biomedical field. In addition, the good biocompatibility of Au nanoparticles and easy connectivity with various biomolecule ligands and antibodies, making them suitable for biosensing and detection [14,15]. Compared with Au nanoparticles, Ag nanoparticles have higher refractive index sensitivity, but their stability is poor under the same particle size and morphology [16]. With the development of society, the demand for nanomaterials with the advantages of these two metals is increasing day by day. The LSPR peaks of Au nanoparticles and Ag nanoparticles are around 525 nm and 408 nm, respectively [17]. Au-Ag alloy nanomaterials can adjust the wavelength of LSPR peak to near-infrared region [18]. Therefore, alloy nanomaterials with high stability and high LSPR response are of great significance for the preparation of sensors.
Nowadays, Au nanoparticles and Ag nanoparticles with various morphologies have been prepared, such as rods [19], triangles [20], cones [21], stars [22], nanoshells [23], nanocubes [24], nanoboxes [4], nanoframes [25,26], and hollow nanocages [4]. Each type of nanoparticle has rich and adjustable LSPR characteristics. Also, the theoretical calculations of the LSPR characteristics and refractive index sensitivity of nanoparticles with arbitrary shape are mature, which provide reliable theoretical guidance for the experiment and promote the experimental synthesis and application research. The sharp corners in noble metal nanocubes provide them with abundant LSPR bands and stronger local electric fields [27], and more and more researchers have studied their optical properties in depth [1,28,29]. For example, when the size of the Ag nanocubes changes, the number of LSPR peaks in the spectrum increases and the position of LSPR peaks changes significantly [18]. Besides, compared with the Ag nanocubes, the LSPR peaks of Au nanocages [30], Au-Ag alloy nanoboxes [3], and Au-Ag alloy nanocages [4,31] prepared by the galvanic substitution reaction [32] between the Ag nanocubes and HAuCl 4 are redshifted, and the refractive index sensitivity [1] of the nanocages is higher than that of the nanoboxes [33] and the nanocubes [14]. At different stages of galvanic substitution, Au-Ag ratio, hole size, wall thickness, and wall length [34,35] are all important factors affecting the LSPR peak of nanocages, and the refractive index sensitivity of nanoparticles is related to the LSPR offset [12,36]. In fact, theoretical calculations have proved the influence of the Au-Ag ratio, wall thickness, wall length, environmental dielectric constant [10,11], and hole size on the LSPR peak. The report of Sekhon et al. [14] showed that the changes in alloy composition affected the optical properties of Au-Ag alloy nanocubes, and the alloy composition could change the sensitivity factor. Mahmoud et al. [35] found that the wavelength of LSPR peak of Au nanocages and Au nanoframes blueshifted with the increase of the wall thickness. Similarly, the sensitivity factor of the Au nanoframes had a strong correlation with the aspect ratio, but had little dependence on the wall length [34]. Meanwhile, the sensitivity factor increases linearly with the increase of the aspect ratio (wall length/wall thickness). Zhu et al. [1] also studied the influence of the hole size of the Au nanocages on the LSPR peak and refractive index sensitivity. They found that the LSPR peak wavelength and the refractive index sensitivity of Au nanocages increased exponentially with the increase of hole size. In addition, the Au-Ag alloy nanocages have adjustable wall holes, and the Au-Ag alloy nanocages were developed and designed as biochemical sensors for the detection of mercury ions [4].
On the other hand, the sensitivity of noble metal nanoparticles LSPR to the environmental dielectric constant has opened up a new field for LSPR sensing. As we all know, the position of the LSPR peak depends on the environmental dielectric constant and the morphology, composition, and structure of nanoparticles. In addition, the refractive index sensitivity is defined as the displacement momentum of the LSPR peak position caused by the change of unit refractive index. Therefore, the refractive index sensitivity factor depends on the morphology, size, structure, and type of nanoparticles. Nanopolyhedron with large surface area and sharp tip has higher refractive index sensitivity factor. Therefore, people began to pay attention to the application of nanopolyhedron in refractive index sensors. In the study of refractive index sensitivity of Au nanotubes reported by Zhu and Deng [10], the LSPR optical response was calculated by adjusting the wall thickness and the environmental dielectric constant and it was found that the reduction of the environmental dielectric constant and the reduction of the wall thickness were optimized refractive index sensitivity. Similarly, in Zhu et al.'s [11] other research, calculation results based on a quasi-static model showed that the sensitivity of coaxial cable-type Au nanotubes increased with the increase of the inner diameter or total radius. Sekhon et al. [14] studied the sensing performance of Au-Ag alloy nanocubes by changing the alloy composition to adjust the LSPR band rang. The results of Liaw et al. [15] showed that the LSPR offset in Au-Ag alloy nanocages depends on the porosity. The greater the porosity, the greater the LSPR redshift. The results of this series of studies show that these geometric parameters make plasmons have a wider spectral band range, thus obtaining sensing characteristics that are more sensitive to the geometric parameters. Interestingly, in the Au-Ag alloy nanocages [15], the tunable hole size and Au-Ag ratio and the large inner and outer surface areas increase the tunability of LSPR in a wide spectral band, and make the plasmon coupling modes more complex. According to theoretical calculations, it has been confirmed that the porosity increase of the Au-Ag alloy nanocages and the increase of the environmental dielectric constant cause the redshift of the plasmon resonance peak [14], which means that the porosity may optimize the refractive index sensitivity of the Au-Ag alloy nanocages. Therefore, the search for the optimal geometric parameters of Au-Ag alloy nanocages is crucial for the refractive index sensitivity. The effect of alloy composition on the LSPR peak of the Au-Ag alloy nanocages is unknown at present. How does the alloy composition affect the LSPR peak of the Au-Ag alloy nanocages with different hole sizes? What is the effect of alloy composition proportion on refractive index sensitivity? The influence of alloy composition on refractive index sensing performance has not been studied systematically.
The extinction spectrum and refractive index sensitivities of Au-Ag alloy nanocages with square hole size on the {100} plane at different hole sizes and Au-Ag ratio are calculated by DDA theory. Combining the advantages of alloy nanomaterials and nanocages, we have studied the influence of many factors on refractive index sensitivity. The refractive index sensitivity of Au-Ag alloy nanocages is related to LSPR offset. In this paper, the sensitivity factor is optimized by adjusting the Au-Ag ratio and the hole size. Besides, to clarify the influence of the environmental dielectric constant on the local electric field and LSPR characteristics of Au-Ag alloy nanocages. The physical mechanism of plasmon resonance peak characteristics affected by Au-Ag ratio, hole size, and environmental dielectric constant is discussed in detail, and the influence of these parameters on plasmon coupling is analyzed.

The Model and Procedure
The DDA Theory The theoretical numerical calculation of noble metal nanoparticles is mainly to investigate the effect of geometric parameters on plasmon resonance. To obtain the optical response of LSPR, we need to discuss the electromagnetic interaction between the incident light and nanoparticles under the framework of Maxwell's equations, but Maxwell's equations are limited to simple spheres [37] and ellipsoids. To be able to calculate the optical properties of noble metal nanoparticles of any shape, in 1964, Devoe [38] first proposed the basic idea of DDA to solve any geometric shape by approximation method, but this method is limited to the aggregation of smaller wavelengths. In 1973, Purcell and Pennypacke [39] modified and improved the DDA idea, and applied DDA to the calculation of optical properties of various particles. Simply put, the DDA algorithm is to simulate the target shape with a finite number of dipole points, and the interaction of the dipole points after applying external electromagnetic light waves simulates the collective oscillation of free electrons. Then, under the given conditions, the optical response of the geometric parameters to the target shape is calculated [40]. Since the DDA idea was proposed, the geometric parameters, simulation accuracy and convergence, application fields, and program codes in the DDA method have been modified and improved to varying degrees [40][41][42][43][44][45][46][47]. DDA has become a powerful theoretical method that can simulate nanoparticles of any shape. In this paper, DDSCAT.7.3 software is used to simulate the plasma optical response and electric field distribution of Au-Ag alloy nanocages under different geometric parameters. In the Au-Ag alloy nanocages model in this article, the origin of the coordinates is at the center of the model, and the distance between the dipole points is set to 1 nm. Besides, the accuracy and convergence of DDA calculations are closely related to the number of dipole points. According to reports, for metal nanoparticles with arbitrary geometries, when the dipole number is greater than 10,000, the DDA algorithm is accurate to calculate all scattering interfaces [48]. In addition, when the DDA algorithm with a dipole number greater than 10,000 is used to calculate the optical properties of metal nanoparticles, the calculated results can be effectively guaranteed [1,49]. In our theoretical calculation, the grid spacing d = 1.0 nm, for the Au-Ag nanocages with a wall length of 40 nm and a wall thickness of 5 nm, it can be represented by more than 13,900 dipoles, thus all of the calculation results could be ensured that are effective. In addition to the above geometric parameters, there is another important factor which is the dielectric functions of noble metals. Au and Ag in the Au-Ag alloy nanocages are homogeneously distributed, and the dielectric function of the Au-Ag alloy can be expressed as: where is the atomic percentage of Ag, and Au and Ag are the frequency-dependent dielectric functions of Au and Ag, respectively, which are referred to in [50].

The Au-Ag Alloy Nanocages Model
In the theoretical calculation of DDA, we have designed a Au-Ag alloy nanocage model (in which Au and Ag elements are uniformly distributed), as shown in Fig. 1. It is a cubical Au-Ag alloy nanocage with a cubical cavity, and the centers of six {100} surfaces are provided with a cuboidal hole, and the thickness of the hole and the wall thickness are fixed at 5 nm. The model of Au-Ag alloy nanocages with increased gold content and decreased hole size changes from Fig. 1(a) to Fig. 1(b). The model has four main geometric parameters: the wall length A = 40 nm, the wall thickness h = 5 nm, the hole size D (hole length on the {100} plane) changing from 5 to 28 nm, and Au-Ag ratio changing from 1:4 to 1:0. In the calculation of this paper, the effects of the Au-Ag ratio and the hole size on the optical properties are studied. It should be noted that the inner cubical cavity is connected with the surrounding environment of the nanocages, so the cavity and the surrounding dielectric are set to be the same during the simulation, and the refractive index is expressed by ε. Furthermore, the direction of the incident plane wave K is parallel to the + x axis, and the direction of the incident electric field E0 is along the + y axis.

Extinction Spectra of Au-Ag Alloy Nanocages with Different Geometric Parameters
To determine the effect of the Au-Ag ratio and the hole size on the refractive index sensitivity factor of the Au-Ag alloy nanocages, the extinction spectra of different Au-Ag ratios and different hole sizes in two environmental dielectric constants have been compared in Fig. 2. In the theoretical calculation of DDA, The wall length A is 40 nm and the wall thickness is 5 nm. We observe one LSPR peak from the corresponding spectrum. It can be found that LSPR is sensitive to changes in parameters such as the Au-Ag ratio, the hole size, and the environmental dielectric constant. To analyze conveniently, the main parameters of the Au-Ag alloy nanocages are denoted as A-h-D. In detail, when the environmental dielectric constant changes from 1.00 to 1.33, the redshift of the LSPR peak is 115 nm when the Au-Ag ratio is 1:4 and 106 nm when the Au-Ag ratio is 4:1. At the same time, it is found that the redshift of the LSPR peak with the D = 10 nm is 141 nm, while that of the LSPR peak with the D = 5 nm is only 115 nm under the same conditions. From this comparison, decreasing the Au-Ag ratio and increasing the hole size can improve the refractive index sensitivity of the Au-Ag alloy nanocages, but the LSPR peak redshift with a large hole size is much larger than that with a low Au-Ag ratio, which indicates that hole size can better control the refractive index sensitivity. Therefore, the plasmon optical sensitivity of the Au-Ag alloy nanocages can be improved by optimizing the alloy composition and the hole size. The research groups of Zhu et al. [1], Liaw et al. [15], and Chen et al. [4] also reported similar results: the greater the porosity of gold nanocages, the more significant the redshift of the LSPR peak.
It is well known that gold nanoparticles have good biocompatibility, stability and silver nanoparticles have high sensitivity, while Au-Ag alloy nanoparticles can have the advantages of both gold and silver nanoparticles, which has aroused the interest of many researchers. To further research the effect of the Au-Ag ratio and the hole size on the LSPR spectrum of the Au-Ag alloy nanocages and the effect of the environmental dielectric constant on the plasmon peak wavelength of the Au-Ag alloy nanocages at different Au-Ag ratios and different hole sizes, Fig. 3 has plotted the extinction spectrum with different geometric parameters. Figure 3a and c compare the LSPR spectrum with small and large hole sizes, respectively, at different Au-Ag ratios. The LSPR peak exhibits approximately linear redshift with the increase of the Au component, and the LSPR peak offset increases and intensity decreases. The change of LSPR peak is due to the decrease of the dielectric constant of alloy material caused by the increase of Au composition, which leads to the increase of LSPR peak wavelength [51] and the decrease of LSPR peak energy in the environmental dielectric constant. Figure 3b and d respectively show the LSPR spectrumwith small and large hole sizes at different environmental dielectric constants. When the environmental dielectric constant increases, the LSPR peak also shows approximate linear redshift, which is similar to the result of Lee et al.'s [16] research group about the sensitivity of the LSPR peak of Au nanocubes and Ag nanocubes to refractive index. Interestingly, the LSPR peak strength of the small hole increases with the increase of the environmental dielectric constant. On the contrary, the LSPR peak strength of the large hole decreases with the increase of the environmental dielectric constant. This may be because the hole size affects the local electric field distribution and local electric field strength [1]. Therefore, the effects of the Au-Ag ratio, hole size, and environmental dielectric constant on the LSPR peak can be discussed through the local electric field distribution to clarify the physical mechanism of the effect of geometric parameters on the LSPR peak.

Refractive Index Sensitivity of Au-Ag Alloy Nanocages with Different Au Components
To determine the characteristic of the LSPR peak, Fig. 4(a) depicts the LSPR peak as a function of the environmental dielectric constant of different hole sizes. One can found that the LSPR peak increases approximately linearly with the increase of the environmental dielectric constant. And the slope of the curve increases approximately exponentially with the increase of the hole size. For instance, when the hole is D = 5 nm, the LSPR peak increases to 890 nm as the environmental dielectric constant increases from 1.00 to 2.00. When we systematically increase the hole size from 5 to 28 nm, the LSPR can reach 2315 nm. Similar results have been found in the studies of Zhu et al. [10], Tam et al. [52], and Prodan et al. [53]; it was found that the LSPR peak redshifted with the increase of the environmental dielectric constant, which were attributed to the fact that the increase in the environmental dielectric constant decreased the restoring force of the oscillating electrons of the metal nanoparticles, resulting in the reduction in LSPR peak energy.
As we all know, the refractive index sensitivity factor is defined as the change in the LSPR peak position per unit refractive index (RIU), denoted as △λ max /△n. In this paper, the refractive index sensing characteristics with different Au-Ag ratios and different hole sizes are investigated. In our theoretical calculation, the refractive index sensitivity is determined by calculating the extinction spectrum under different parameters with the environmental dielectric constant varying from 1.0 to 2.0. As shown in the simulation results of Fig. 4(a)-(c), according to the definition of the refractive index sensitivity factor, it can be seen that the slope of the fitting curve can be expressed as the refractive sensitivity factor.
The curves in Fig. 4(b)-(c) show the relationship between the LSPR peak and the environmental dielectric constant at different Au-Ag ratios. For the small hole size D = 5 nm and the Au-Ag ratio of 1:4, when the environmental dielectric constant increases from 1.0 to 2.0, the LSPR peak redshifts to 909 nm. When the Au-Ag ratio increases to 1:0, the LSPR peak can reach 974 nm. However, for the large hole size D = 28 nm and Au-Ag ratio of 1:4, the LSPR peak increases from 1151 to 2315 nm at the same refractive index change. When the Au-Ag ratio increases to 1:0, the LSPR peak decreased slightly to 2225 nm. Overall, the LSPR peak redshift with the increase of the environmental To more clearly observe the relationship between the refractive index sensitivity and the Au-Ag ratio, Fig. 4(d) shows the refractive index sensitivity with different geometric parameters. The results show that the Au-Ag ratio has different effects on the refractive index sensitivity with different hole sizes. Specifically, when the hole sizes are 5 nm, 10 nm, 15 nm, 20 nm and 25 nm, respectively, the Au-Ag ratio has little effect on the refractive index sensitivity. On the contrary, when the hole size is 28 nm, the refractive index sensitivity decreases from 1164 to 1013 nm/RIU with the increase of the Au composition, that is, when the hole size is large enough, the Au-Ag ratio can effectively control the refractive index sensitivity. The refractive index sensitivity of Au-Ag alloy nanocages is higher than that of gold nanocages studied by Zhu et al. [1]. Therefore, the Au-Ag alloy nanocages with the large hole size and low Au composition have excellent refractive index sensitivity. This means that Au-Ag alloy nanocages may be used to make more sensitive optical sensors.

Synthesis of Au-Ag Nanocages
Au-Ag nanocubes with different gold and silver contents, multiple holes on the surface, and hollow inside were prepared based on the galvanic replacement between HAuCl 4 and Ag nanocubes [4]. Specifically, firstly, Ag nanocubes were prepared as sacrificial templates by the polyol method reported by Xia's group [54]. Then, 1.6 mL of Ag nanocubes aqueous solution was dispersed into 5 mL of PVP (2 mg/mL) aqueous solution into a 30 mL vial and heated at 80℃ for 10 min with magnetic stirring. Thereafter, HAuCl 4 (0.5 mM) aqueous solution was injected dropwise into the vial using a micropipette. The reaction progress was monitored by UV-visible spectra. Once the LSPR peak reached the predetermined value, the HAuCl 4 solution was stopped to add and the reaction solution was cooled down to room temperature. Finally, this reaction solution was centrifuge to leave the precipitate for further usage.

The Measurement of Refractive Index Sensitivity
To investigate the sensitivities of Au-Ag nanocages with different refractive indices, the prepared Au-Ag nanocage precipitates were redispersed into water, ethanol, isopropanol, and ethylene glycol, and then their absorption spectra were measured.

Experimental Results and Discussion
In this paper, Au-Ag nanocages with rich LSPR peak positions are synthesized by using Ag nanocubes as the template and adding different volumes of HAuCl 4 . The absorption spectra are shown in Fig. 5. As the volume of HAuCl 4 increases, the LSPR of Au-Ag nanocages gradually changes from 481 to 851 nm, and abundant solution colors appear (inset in Fig. 5). Figure 6 shows the TEM images of Au-Ag nanocages obtained after dropwise addition of different volumes of HAuCl 4 . With the increasing volume of HAuCl 4 , firstly, holes appear on the {100} surface of the cube and the inside begins to be a cavity. Then, the internal cavity becomes larger, the hole size and hole density increase, and the wall thickness decreases gradually. Finally, the nanocages become porous nanostructures, more Ag atoms are dissolved, and the Ag atoms are greatly reduced [55]. Au-Ag nanocages have adjustable inner cavity, hole number, Au-Ag ratio, and LSPR peak positions, which means that Au-Ag nanocages may be an advantageous candidate for highsensitivity biosensor. Therefore, we focus on the sensitivity of Au-Ag nanocages.
In order to investigate the effect of the Au-Ag ratio and the holes on the refractive index sensitivity, we choose different morphologies of Au-Ag nanocages to conduct the refractive index sensitivity measurement experiment. The refractive indices of water, ethanol, isopropanol, and ethylene glycol are 1.333, 1.361, 1.37723, and 1.43063, respectively. Figure 7a and b show the normalized absorption of the LSPR peak redshift with the increase in the refractive index of the Au-Ag nanocages synthesized with the addition of different HAuCl 4 . Refractive index sensitivity is defined as the wavelength change when the refractive index changes one unit, and can be obtained by plotting the function between LSPR peak position and refractive index. As shown in the inset in Fig. 7(c), the slope of the fitted curve can be expressed as refractive index sensitivity. To visualize the sensitivity of the Au-Ag nanocages in different morphologies, we  Fig. 7(d). When the volume of HAuCl 4 increases from 0 to 600 L , the Ag nanocubes have been etched into Au-Ag nanocages with obvious holes on the surface and hollow inside, and the sensitivity increases from 174.1268 to 286.7971 nm/RIU. The pinholes on the surface and the hollow inside improve the sensitivity. As the volume of HAuCl 4 increases gradually to 2400 μL, the hole size and the hole density increase further and the wall thickness decreases, increasing its sensitivity to 512.1377 nm/RIU. When the volume of HAuCl 4 is further increased to 4800 μL, the silver atoms in the alloy nanoshell are selectively removed, and more silver atoms are dissolved. In other words, when the size and density of pinholes become larger, the silver atoms are greatly reduced, and the sensitivity decreases to 204.8551 nm/ RIU. The experimental results show that the increased hole size increases the sensitivity of Au-Ag nanocages, and the decrease of Ag content decreases the sensitivity of Au-Ag nanocages. These results are also consistent with the previously reported results [1,56]. From the general trend, our experimental results are in good agreement with the theoretical calculation results above.

The Physical Mechanism of Component-Controlled LSPR
The results of Fig. 3(a)-(b) show that the Au-Ag ratio plays an important role in affecting LSPR peak properties. To clarify the physical mechanism of the effect of the Au-Ag ratio on the LSPR peak, the local electric field distributions of y-o-z sections with different Au-Ag ratios at the resonance wavelengths corresponding to different geometric parameters are calculated. The DDA simulation results are shown in Fig. 8 and Fig. 10. Notably, the local electric field strength of the LSPR peak calculated by DDA decreases sharply with the distance increase from the surface, resulting in a large error in the theoretical calculation [1]. Therefore, the local field distance on the surface of Au-Ag alloy nanocages calculated in this paper is 0.25 nm, and the dipole distance is 1.0 nm, which guarantees the accuracy and reliability of the DDA theoretical calculation. Figure 8 shows the local electric field distributions for different Au-Ag ratios at D = 5 nm. We find that the strong electric field is concentrated on the outer tip and the hole surface, but the local electric field at the outer tip is stronger. This is due to the electric field focusing effect of the tip [1,9]. On the contrary, small hole surface area and large {100} crystal plane disperse polarized charges, so plasmon coupling between hole surfaces is relatively weak. However, it should be noted that the Au-Ag ratio does not affect the electric field direction on the cavity surface. In detail, when the Au-Ag ratio is 1:4, as shown in Fig. 8(a1) and Fig. 8(a2), the outer surface and the hole surface generate the + y direction electric field in the same direction as the incident polarization field. The electric field generated by the cavity is in the -y direction. Interestingly, when the Au-Ag ratio changes from 1:4 to 1:0, compared with Fig. 8(a1) and Fig. 8(a2), the electric field directions in Fig. 8(b1)-(d1) and Fig. 8(b2)-(d2) remain unchanged, and the local enhancement factor decreases with the increase of the Au composition. This may be due to the reduction of the dielectric constant of the Au-Ag alloy material reducing the polarized charges density of the outer tip and the hole surface, thereby weakening the electric field focusing effect of the outer tip and plasmon coupling between the two hole surfaces. In addition, a small amount of positive (negative) charges distribution is observed on the left side (right side) of the cavity in Fig. 8(d2), which meant that the effect of the polarized electric field in the environmental dielectric constant on the electric field distribution in the cavity is increased.
The appearance and movement of noble metal nanoparticles' LSPR peak are closely related to the Coulomb restoring force between the positive and negative charges. The change of the Coulomb restoring force leads to the change of the LSPR peak resonance energy. It is well known that the electron relaxation time of gold is shorter than that of silver [57], which means that the electron scattering of gold is stronger than that of silver. Therefore, when the Au component is large, the LSPR peak energy decreases and the plasmon resonance weakens, and the LSPR peak undergoes redshift and the LSPR peak intensity decreases, as shown in Fig. 3(a) and Fig. 3(c). To elucidate the "hot spots" distribution for large hole size, Fig. 9 shows the local electric field distribution of different y-o-z sections of large hole size. Figure 9 shows a completely different result from Fig. 8, the local electric field is uniformly distributed on the whole surface, and the strong local electric field is concentrated on the hole surface and the inner corner of the Au-Ag alloy nanocages. This may be due to the increase in the effective coupling area of the large hole size, resulting in more polarized charges concentration on the hole surface and less polarized charges at the outer tip. Besides, the local electric field is uniformly distributed due to the plasmon coupling excited by the shorter distance between the outer wall and the inner wall. More polarized charges on the hole surface and the electric field focusing effect at the inner corner indicate that there is a stronger electric field at the inner corner. Therefore, the hole size affects the local electric field distribution. Figure 10 shows the local electric field distribution of the LSPR peak, in which D = 28 nm and Au-Ag ratio change. Compared with Fig. 8, the electric field distribution on the cavity and hole surfaces with large hole size can be changed by the Au-Ag ratio. The larger hole size increases the environmental dielectric composition on the hole surface, which makes the hole surface possibly affected by more polarized electric fields in the environmental dielectric constant. At the same time, more environmental dielectric composition is distributed on the cavity surface. Finally, the incident polarized field, the polarized field on the outer surface, and the polarized field in the environmental dielectric constant are superimposed to form the electric fields on the cavity and hole surface. Therefore, the electric field distribution of the cavity and hole surface may change. It should be noted that the electric field on the hole surface may affect the electric field distribution of the cavity.
In detail, Fig. 10(a1) and Fig. 10(a2) show that the outer surface electric field is along the + y direction, and the electric fields of the hole and cavity are along the -y direction. When the Au-Ag ratio increases to 1:2, a small amount of positive (negative) charges are distributed on the left (right) side of the hole and cavity surface. The possible reasons are that the increase of environmental dielectric composition on the surface of hole and cavity makes the polarized field in the environmental dielectric constant have greater influence, and the increase of gold composition makes the plasmon resonance on the hole surface weaken. Therefore, the electric fields in the -y direction of hole and cavity weaken, while the electric field in the + y direction of the outer surface increases. Compared with Fig. 10(a1) and Fig. 10(a2), the electric fields of hole and cavity in Fig. 10(c1)-(d1) and Fig. 10(c2)-(d2) are along the + y direction when the Au-Ag ratio is 2:1 and 1:0, which means that more and more positive (negative) charges are distributed on the left (right) side of hole and cavity, and the + y direction electric field enhanced by the outer surface affects the electric field distribution of the hole and cavity. With the increase of Au component, the electric field in + y direction on the outer surface increases, and the electric fields in -y direction of hole and cavity decrease, so the local electric field enhancement factor decreases.

The Physical Mechanism of the Hole Size-Dependent Refractive Index Sensing of Nanocages by Tuning the Alloy Composition
The results of Fig. 4(b)-(c) show that the increase of the Ag component in the large hole size can improve the refractive index sensitivity. To investigate the influence of Au-Ag ratio on refractive index sensitivity, the field vectors of different refractive indices with different Au-Ag ratios and different hole sizes are plotted in Fig. 11 and Fig. 12. The refractive indices are 1.00, 1.33, 1.50, and 2.00, and A and h are fixed at 40 nm and 5 nm, respectively. When D = 5 nm, the refractive index changes the cavity electric field direction, while when D = 28 nm and the Au-Ag ratio is 1:4, the refractive index changes the direction of the hole and cavity electric field. This may be because more environmental dielectric constants are distributed on the surfaces of cavity and large hole, and the polarized electric field in the environmental dielectric constant has a greater influence on the electric fields on the surfaces of cavity and large hole size. In addition, the hole size can affect the distribution of "hot spots" and the electric field distribution on the hole surface.
The local electric field distribution of the small hole size is shown in Fig. 11. When the refractive index is 1.00, the electric fields of the outer and hole surfaces are in the + y direction, and the cavity electric field is in the -y direction. When the refractive index increases (ε = 1.33, 1.50), the cavity electric field is in the + y direction and the local electric field enhancement factor increases. The increased environmental dielectric constant enhances the polarized electric field in the environmental dielectric constant, and the polarized electric field reduces the restoring force of oscillating electrons on the outer surface and the hole surface, resulting in the decrease of LSPR peak energy and the redshift of LSPR peak [10]. At the same time, the increased environmental dielectric constant increases the electron dipole moment on the outer and hole surface [58], and further leads to the enhancement of plasmon coupling on the outer and hole surface, and thus the local electric field enhancement factor becomes larger. It should be noted that the enhanced + y electric field weakens the -y electric field on the cavity surface, and the + y electric field with sufficient intensity may cause a change in the electric field direction of the cavity. Furthermore, a small amount of positive (negative) charges on the left (right) side of the outer surface is found in Fig. 11(g1) and Fig. 11(g2). When the refractive index is 2.00, the local electric field enhancement factor decreases slightly. The outer surface, which distributes more polarized charges, reduces the polarized charges density on the hole surface so that plasmon resonance on the hole surface is relatively weak. Of interest, the local electric field enhancement factors in Fig. 11(h1) and Fig. 11 (h2) decrease only slightly because there are more positive charges on the left side of the outer surface, resulting in a stronger -y electric field. Figure 12 shows the local electric fields with different refractive indices for large hole size. When the Au-Ag ratio is 1:0, with the increase of the refractive index, the enhanced polarized field in the environmental dielectric constant weakens the + y direction electric field on the hole  [1], and thus the weakening of the local electric field enhancement factor is observed. When the Au-Ag ratio is 1:4, the refractive index increases from 1.00 to 1.33, and the electric fields of the hole and cavity surface are along the -y direction. The + y electric field on the outer surface is enhanced by the increase of the dipole moment on the outer surface. The enhanced + y electric field may affect the electric field distributions on the hole and cavity surfaces, so when the refractive index increases to 1.50 and 2.00, the electric fields on the hole and cavity surface are along the + y direction. With the increase of the refractive index, the + y direction electric field increases, and then the local electric field enhancement factor decreases. It is noteworthy that the large hole size distributes more environmental dielectric components, and more Ag components can enhance the plasmon resonance, and the + y direction electric field of the Au-Ag alloy nanocages is enhanced due to the increase of the refractive index. Therefore, the Au-Ag alloy nanocages with the large hole size and more Ag components have higher refractive index sensitivity.
In general, the increase of Au composition and refractive index cause the LSPR peak redshift of the nanoparticles [57,59]. Interestingly, when A-h-D is 40-5-28 nm and the refractive index ε is 2.00, the LSPR of the alloy nanocages blueshift with the increase of Au composition. The possible reason is that the stronger additional + y direction electric field is formed on the hole surface with low Au composition (Au:Ag = 1:4), Therefore, the restoring force of the Au-Ag alloy nanocages' LSPR peak is lower and the LSPR peak wavelength is longer.

Conclusions
In conclusion, the plasmon extinction spectrum of Au-Ag alloy nanocages with different Au-Ag ratios and different hole sizes and the refractive index sensitivity of Au-Ag alloy nanocages are theoretically studied by DDA. The calculation results based on DDA theory show that the LSPR peak can be adjusted by the alloy composition ratio and hole size. At the same time, it is also found that the refractive index sensitivity can be effectively controlled by the alloy composition ratio at the large hole size. The sensitivity decreases linearly with the increase of Au composition but increases exponentially with the increase of hole size. In addition, the local field vector distributions with different hole sizes, different Au-Ag ratios, and different refractive indexes are investigated, which indicates that the field vectors of the hole and cavity are formed by the superposition of the incident field, the electric field formed by the outer surface of the nanocages, and the polarized field formed by the environmental dielectric constant, so the electric field direction of the hole and cavity may be reversely deflected. Moreover, in the case of large hole size, the electric field distributions on the surfaces of the cavity and hole are controlled by the Au-Ag ratio and refractive index. At the same time, our experimental results show that when the hole size and the hole density increase, the refractive index sensitivity can be improved. When the hole size is large, the decrease of the Ag content decreases the refractive index sensitivity. These experimental results are in good agreement with the theoretical calculation results. That is to say, by changing Au-Ag ratio and the hole size of the Au-Ag alloy nanocages, it is expected to become an optical sensor with high refractive index sensitivity.