# Molecular Dynamics Simulation Calculation Method for Elasticity and Plasticity of Metal Nanostructures

Authors: Kunrong Zeng; Kaifeng Chen
Journal: Advances in Materials Science and Engineering
 (2022)

---

## Abstract

With the rapid development of nanotechnology, surface plasmon (SP) of metal nanostructures has become one of the research hotspots in the research of information science, physics, biology, materials science, chemistry, and other interdisciplinary fields. Surface plasmon research is an emerging discipline. In this paper, based on the CPU algorithm and the GPU algorithm for the extraction of pressure and single-atom average potential energy, time tests and error analysis of different molecular scales are carried out. The analytical results show that the absolute and relative errors of pressure and single-atom average potential energy extraction increase with the molecular scale. When the molecular scale reaches 100k, the errors of pressure and single-atom average potential energy reach 0.32 and 0.052, respectively. However, compared with the pressure and single-atom average potential energy extracted by the CPU algorithm, the error of the results extracted by the GPU algorithm is only 1.55% and −1.45%.


---

## Body

## 1. Introduction

As early as 1902, the “Wood anomaly” was found in the reflection spectrum of metal gratings. In 1941, anomalous reflections could be explained by electromagnetic wave patterns on the surface of metal grating structures. In 1956, when analyzing the phenomenon of energy loss caused by electrons passing through metallic materials, researchers identified this loss as a so-called plasma. This is due to the collective oscillation of free electrons. In 1957, when electrons passed rapidly through thin metal films, researchers discovered that energy loss occurred not only in the plasma, but also at other frequencies. They predicted the existence of surface plasmons, and experiments in 1959 confirmed these theoretical results. They first proposed the concept of surface plasmons and gave a relationship with dispersion in 1960. The researchers investigated the resonance conditions in this mode. In 1968, two scholars proposed the attenuated total reflection method. The surface plasmon wave is excited by prism coupling, and the resonance of metal surface plasmon is observed.Surface plasmons (SPs) have attracted much attention in recent years. It has even become a separate discipline: Plasmonics. It has been hundreds of years since it was thought to be the first (1902) experimental observation of the surface plasmon phenomenon, and it has been mathematically predicted that surface waves propagate on metal surfaces with limited electrical conductivity. During this period, due to the limitation of science and technology, this field has not been able to develop very well, until it has developed rapidly with the development of nanophotonics, biomedicine, energy, and other related fields in recent years. In particular, the development of optoelectronic devices is advancing by leaps and bounds. Compared with traditional electronic devices, optoelectronic devices have the characteristics of high precision, low power consumption, and fast propagation speed. With the development of science and technology, the size of optoelectronic devices is getting smaller and smaller, but the size is finally limited to the micro-nano level. This is mainly due to some anomalous phenomena when light transmits through nanometer-sized objects, such as abnormal light transmission, surface fluorescence enhancement, and surface-enhanced Raman scattering. Surface plasmons are essentially formed by the collective oscillation of free electrons in the conduction band near the Fermi level of the metal surface driven by a specific electromagnetic field, which is a type of electromagnetic surface wave.The resonance of Fanos is due to the interference of dark and light on the surface plasmons in metallic nanostructures. The luminophore of a surface plasmon is a mode with a finite dipole moment that can be activated under the conditions of incident light. Therefore, it is a bright superradiant state with broad spectral lines and large interfaces. The behavior of zero static dipole moment is a sub-emissive state that cannot be directly activated by incident light, and its linewidth is small. Therefore, in the case of high radiation, dark resonances can be activated by bright resonance states to reduce radiation losses. Since the resonance of Fanos is highly sensitive to changes in the actual medium environmental index, the resonance of Fanos metal nanoparticles has also been extensively studied in designing highly sensitive effective chemical effect indices. Over the past few years, many people have studied Fanos resonance. However, it is still a challenge to obtain Fano resonances with narrow linewidth and high spectral contrast at the same time.


## 2. Related Work

In this paper, some techniques are studied based on the molecular dynamics simulation calculation method of elasticity and plasticity of metal nanostructures. It is necessary to fully apply these techniques to research in this field. Reddy AP observed that the addition of nano-sized SiCp particles in an aluminum alloy matrix results in excellent mechanical and physical properties and interfacial properties of nanocomposites [1]. Shtertser et al. stated that metal matrix composites containing nanoscale carbon (nanotubes, graphene, etc.) were of great interest from the perspective of developing materials with improved mechanical properties [2]. Nguyen et al. investigated mixed oleylamine and oleic acid as a liquid matrix for sputtered metal nanoparticles and the effect of mixed liquid composition on particle size, homogeneity, and colloidal and oxidative stability [3]. Korotchenkov developed the theory of plasmonic exciton coupling for metallic nanocylindrical gratings [4]. Albrecht et al. believed that multifunctional metal nanoparticles (NPs) of multimetallic nanoparticles were essential to facilitate nanomaterial-based applications [5]. Ganesan et al. believed that molecular dynamics (MD) was an important tool that can provide significant benefits for structure-based drug design [6]. Gastegger et al. believed that machine learning has become an invaluable tool in many fields of research. In the current work, he exploited this ability to predict highly accurate molecular infrared spectra with unprecedented computational efficiency [7]. Bandrauk et al. believed that attosecond science is an emerging and rapidly developing field of research. Among them, molecular dynamics is studied on the time scale of several attoseconds [8]. Yeh et al. investigated the tensile deformation of semicrystalline polyethylene (PE) at two different strain rates and temperatures by molecular dynamics simulations [9]. Wang et al. believed that molecular dynamics simulations were used to study water desalination through functionalized nanoporous graphene membranes [10]. Loco et al. presented the realization of a Born-Oppenheimer (BO) hybrid quantum mechanics/molecular mechanics (QM/MM) molecular dynamics (MD) strategy using density functional theory (DFT) and polarized AMOEBA force fields [11].


## 3. Molecular Dynamics Simulation Calculation Method of Metal Nanostructures

### 3.1. Metal Nanostructure Research

When light of a specific wavelength is radiated to the interface between the metal and the medium, the electromagnetic waves interact with the free electrons on the metal surface. During the interaction, if the frequency of the light wave approaches the resonant frequency of the free surface electrons, large-scale collective oscillations occur. Such surface electromagnetic waves are generated by the rational interaction of free electrons and light waves on metal surfaces. The exponential drop indicates that the surface plasmons are oriented perpendicular to the surface and propagate along the surface of the metallic medium [12].Surface plasmons have two modes. Localized surface plasmons (LSPs) are a mode located on the surface of metal nanostructures. Surface plasmon polaritons (SPPs) propagating along metal-dielectric interfaces are another mode.Localized surface plasma: resonance occurs when the frequency of the incident light wave coincides with the oscillation frequency of free electrons on the metal surface, and the metal interacts strongly with the incident frequency of the electromagnetic wave. Surface plasmon resonance (SPR) refers to the state of resonance in which energy from an electromagnetic field can be converted into free collective electron kinetic energy on a metal surface. The electromagnetic field on the metal surface can get very big benefits. Since this phenomenon is limited by the size of the structure, localized surface plasmons (LSPs) are free electron oscillations on metal surfaces.Surface plasmon polaritons: surface plasmon polaritons are electromagnetic oscillations formed on a metal surface by free electrons and photons, where the interaction of free electrons and electromagnetism results in electron-dense waves propagating along the metal surface. Such surface plasmons can propagate long distances along the surface of metal nanoparticles [13]. Due to the ohmic heating effect of the metal, its energy drops rapidly, resulting in a rapid reduction in its propagation distance. The SPP electric field strength decays exponentially with increasing distance from the metal surface.The schematic diagram of surface plasmon propagation on metal and dielectric surfaces is shown in Figure1.Figure 1
Schematic diagram of surface plasmon propagation on metal and dielectric surfaces.Surface plasmons are electromagnetic evanescent waves propagated along the metal surface by the interaction of free electrons with an electromagnetic field. The surface plasmon shown in Figure1 propagates along the surface of the metal-dielectric structure, which clearly shows an exponential decay trend in the direction perpendicular to the propagation.Surface plasmons can also be excited in other geometries. It is not only excited in dielectric-metal planar interfaces, such as voids and metal particles of various topologies [14]. Localized surface plasmons (LSPs) are surface plasmons that represent bounded geometries. The frequencies of LSPs in the electrostatic approximation can be determined by appropriate boundary conditions of the Laplace formula. In order to ignore the retardation effect, the wavelength corresponding to the frequency of the LSPs must be larger than the characteristic size of the system. A schematic diagram of a uniform sphere in an electrostatic field is shown in Figure 2.Figure 2
Schematic diagram of a uniform sphere in an electrostatic field.In Figure2, a metal sphere has radius R, the center is at the origin, and εω is the dielectric function. Nonlinear plasmonic surface excitation is achieved by utilizing nonlinear metal processes to achieve matched phase and plasmonic surface excitation. The directional excitation of the plasmonic surface does not require any special external structures or excitation devices, but simply exploits nonlinearities. The reason why the plasmonic surface can be separated from the excitation beam by a filter is that the wavelength of the excitation beam is different from that of the plasmonic surface produced by nonlinear excitation [15]. The Otto and Kretschmann excitation devices are commonly used in linear excitation devices, as shown in Figure 3.Figure 3
Linearly excited surface plasmon device.Figure3 is the Kretschmann and Otto excitation devices, both of which are linear excitations. The Kretschmann excitation device cannot directly activate the plasma surface because the light wave vector in air is smaller than that of the plasma surface. In order to activate the plasmonic surface, the wave vector of the plasmonic surface can only appear at the lower refractive index between the parallel components along the metal and the medium. The total reflection angle of the wave at this time of the prism is smaller than the incident angle of light passing through the high refractive index. The Otto excitation device is a total reflection device. It generates comfortable waves in prisms and aerodynamic structures, and generates surface plasmons by exciting small channels between prisms and metal films.


### 3.2. Molecular Dynamics Simulation Calculation Method

The understanding of multiple systems by electrons and nuclei is a dynamic molecular simulation. Computers are simulating nuclear motion. According to the nature and structure of the computer system, it simulates the motion of atoms and molecules under Newton’s laws [16]. The flow chart of the molecular dynamics simulation method is shown in Figure 4.Figure 4
Flow chart of the molecular dynamics simulation method.The basic principle of molecular dynamics simulation is to first give a certain number of particles, and initialize the coordinates and velocities of these particles to simulate a system similar to the actual material. Through the interaction between particles, the physical and chemical properties of all particles in the system are calculated at specific time intervals to determine whether the entire system has reached an equilibrium state [17]. When the system reaches the equilibrium state, the physical and chemical properties of the material can be obtained according to the simulated system.Cutoff radius: when the nearest mirror method is introduced in the calculation, the concept of cutoff radius needs to be considered to calculate the force between particles.Periodic boundary conditions: the object simulated by the molecular dynamics method can be a cluster composed of dozens to hundreds of atoms, but it may also encounter a macroscopic object with a very large number of particles. Periodic boundary condition (PBC) is a kind of boundary condition, which reflects how to use the boundary condition to replace the influence of the surrounding (environment) by the selected part (system).Integral step size: in molecular dynamics simulation calculation, how to choose the appropriate integration step size so that the calculation can save time without losing the accuracy of the calculation results is a very important part.Nearest mirror method: when calculating the interatomic force, the nearest mirror method is used to make the atomic force at the edge of the model more complete, thereby eliminating the boundary effect [18].The key to computer molecular dynamics on parallel computers is the molecular dynamics simulation algorithm. Data analysis shows that the calculation of particle interaction forces in molecular dynamics calculations occupies approximately 90% of the entire simulation time. This shows that the parallelization of the molecular dynamics algorithm mainly solves the parallelization of force calculation and its realization on parallel computers.Molecular dynamics receives microscopic information, such as the position, velocity, and orientation of each particle, at times different from Newton’s equations, and macroscopic properties are derived using methods that apply average time. These calculations are separate from each other. The nature of molecular dynamics facilitates parallel implementation because the objects of computation are particle positions and forces. Force decomposition, atomic decomposition, and spatial decomposition are three methods for parallel computing molecular dynamics [19].Force decomposition: it not only reduces communication costs, but also has the advantages of atomic decomposition. This can be explained with subblocks instead of partition matrices.Atomic decomposition method: the atoms to be calculated are assigned to different processors for calculation. During the simulation process, the speed and position coordinates of the atoms are constantly updated, regardless of the physical space where the atoms are actually located.Spatial decomposition method: the locality of the force calculation occurs due to the use of truncation.The above several molecular dynamics parallel algorithms have their own advantages and disadvantages. The atomic decomposition method is the most direct, and the force decomposition algorithm is more complicated in force calculation. The key to the spatial decomposition algorithm lies in the realization of the data structure and the control of the load balance. The United States has a relatively mature product in molecular dynamics parallel computing [20].


## 3.1. Metal Nanostructure Research

When light of a specific wavelength is radiated to the interface between the metal and the medium, the electromagnetic waves interact with the free electrons on the metal surface. During the interaction, if the frequency of the light wave approaches the resonant frequency of the free surface electrons, large-scale collective oscillations occur. Such surface electromagnetic waves are generated by the rational interaction of free electrons and light waves on metal surfaces. The exponential drop indicates that the surface plasmons are oriented perpendicular to the surface and propagate along the surface of the metallic medium [12].Surface plasmons have two modes. Localized surface plasmons (LSPs) are a mode located on the surface of metal nanostructures. Surface plasmon polaritons (SPPs) propagating along metal-dielectric interfaces are another mode.Localized surface plasma: resonance occurs when the frequency of the incident light wave coincides with the oscillation frequency of free electrons on the metal surface, and the metal interacts strongly with the incident frequency of the electromagnetic wave. Surface plasmon resonance (SPR) refers to the state of resonance in which energy from an electromagnetic field can be converted into free collective electron kinetic energy on a metal surface. The electromagnetic field on the metal surface can get very big benefits. Since this phenomenon is limited by the size of the structure, localized surface plasmons (LSPs) are free electron oscillations on metal surfaces.Surface plasmon polaritons: surface plasmon polaritons are electromagnetic oscillations formed on a metal surface by free electrons and photons, where the interaction of free electrons and electromagnetism results in electron-dense waves propagating along the metal surface. Such surface plasmons can propagate long distances along the surface of metal nanoparticles [13]. Due to the ohmic heating effect of the metal, its energy drops rapidly, resulting in a rapid reduction in its propagation distance. The SPP electric field strength decays exponentially with increasing distance from the metal surface.The schematic diagram of surface plasmon propagation on metal and dielectric surfaces is shown in Figure1.Figure 1
Schematic diagram of surface plasmon propagation on metal and dielectric surfaces.Surface plasmons are electromagnetic evanescent waves propagated along the metal surface by the interaction of free electrons with an electromagnetic field. The surface plasmon shown in Figure1 propagates along the surface of the metal-dielectric structure, which clearly shows an exponential decay trend in the direction perpendicular to the propagation.Surface plasmons can also be excited in other geometries. It is not only excited in dielectric-metal planar interfaces, such as voids and metal particles of various topologies [14]. Localized surface plasmons (LSPs) are surface plasmons that represent bounded geometries. The frequencies of LSPs in the electrostatic approximation can be determined by appropriate boundary conditions of the Laplace formula. In order to ignore the retardation effect, the wavelength corresponding to the frequency of the LSPs must be larger than the characteristic size of the system. A schematic diagram of a uniform sphere in an electrostatic field is shown in Figure 2.Figure 2
Schematic diagram of a uniform sphere in an electrostatic field.In Figure2, a metal sphere has radius R, the center is at the origin, and εω is the dielectric function. Nonlinear plasmonic surface excitation is achieved by utilizing nonlinear metal processes to achieve matched phase and plasmonic surface excitation. The directional excitation of the plasmonic surface does not require any special external structures or excitation devices, but simply exploits nonlinearities. The reason why the plasmonic surface can be separated from the excitation beam by a filter is that the wavelength of the excitation beam is different from that of the plasmonic surface produced by nonlinear excitation [15]. The Otto and Kretschmann excitation devices are commonly used in linear excitation devices, as shown in Figure 3.Figure 3
Linearly excited surface plasmon device.Figure3 is the Kretschmann and Otto excitation devices, both of which are linear excitations. The Kretschmann excitation device cannot directly activate the plasma surface because the light wave vector in air is smaller than that of the plasma surface. In order to activate the plasmonic surface, the wave vector of the plasmonic surface can only appear at the lower refractive index between the parallel components along the metal and the medium. The total reflection angle of the wave at this time of the prism is smaller than the incident angle of light passing through the high refractive index. The Otto excitation device is a total reflection device. It generates comfortable waves in prisms and aerodynamic structures, and generates surface plasmons by exciting small channels between prisms and metal films.


## 3.2. Molecular Dynamics Simulation Calculation Method

The understanding of multiple systems by electrons and nuclei is a dynamic molecular simulation. Computers are simulating nuclear motion. According to the nature and structure of the computer system, it simulates the motion of atoms and molecules under Newton’s laws [16]. The flow chart of the molecular dynamics simulation method is shown in Figure 4.Figure 4
Flow chart of the molecular dynamics simulation method.The basic principle of molecular dynamics simulation is to first give a certain number of particles, and initialize the coordinates and velocities of these particles to simulate a system similar to the actual material. Through the interaction between particles, the physical and chemical properties of all particles in the system are calculated at specific time intervals to determine whether the entire system has reached an equilibrium state [17]. When the system reaches the equilibrium state, the physical and chemical properties of the material can be obtained according to the simulated system.Cutoff radius: when the nearest mirror method is introduced in the calculation, the concept of cutoff radius needs to be considered to calculate the force between particles.Periodic boundary conditions: the object simulated by the molecular dynamics method can be a cluster composed of dozens to hundreds of atoms, but it may also encounter a macroscopic object with a very large number of particles. Periodic boundary condition (PBC) is a kind of boundary condition, which reflects how to use the boundary condition to replace the influence of the surrounding (environment) by the selected part (system).Integral step size: in molecular dynamics simulation calculation, how to choose the appropriate integration step size so that the calculation can save time without losing the accuracy of the calculation results is a very important part.Nearest mirror method: when calculating the interatomic force, the nearest mirror method is used to make the atomic force at the edge of the model more complete, thereby eliminating the boundary effect [18].The key to computer molecular dynamics on parallel computers is the molecular dynamics simulation algorithm. Data analysis shows that the calculation of particle interaction forces in molecular dynamics calculations occupies approximately 90% of the entire simulation time. This shows that the parallelization of the molecular dynamics algorithm mainly solves the parallelization of force calculation and its realization on parallel computers.Molecular dynamics receives microscopic information, such as the position, velocity, and orientation of each particle, at times different from Newton’s equations, and macroscopic properties are derived using methods that apply average time. These calculations are separate from each other. The nature of molecular dynamics facilitates parallel implementation because the objects of computation are particle positions and forces. Force decomposition, atomic decomposition, and spatial decomposition are three methods for parallel computing molecular dynamics [19].Force decomposition: it not only reduces communication costs, but also has the advantages of atomic decomposition. This can be explained with subblocks instead of partition matrices.Atomic decomposition method: the atoms to be calculated are assigned to different processors for calculation. During the simulation process, the speed and position coordinates of the atoms are constantly updated, regardless of the physical space where the atoms are actually located.Spatial decomposition method: the locality of the force calculation occurs due to the use of truncation.The above several molecular dynamics parallel algorithms have their own advantages and disadvantages. The atomic decomposition method is the most direct, and the force decomposition algorithm is more complicated in force calculation. The key to the spatial decomposition algorithm lies in the realization of the data structure and the control of the load balance. The United States has a relatively mature product in molecular dynamics parallel computing [20].


## 4. Experiments and Results of Molecular Dynamics Simulation Calculations of Metal Nanostructures

### 4.1. Theoretical Model and Simulation Method of Metal Nanostructures

Simulation is the use of a model to reproduce the essential process that occurs in the actual system, and it helps study the existing or designed system through experiments on the system model, also known as simulation. The 3D-FDTD method is used to perform relevant simulation calculations, and the calculation model is divided into calculation areas according to Figure5. The FDTD region division of the scattering problem is shown in Figure 5.Figure 5
FDTD region division for the scattering problem.The Raman scattering spectra of DA molecules and the SERS spectra near Ag NPs dimers were simulated and calculated by the DFT method for the analysis of the SERS enhancement mechanism [21, 22]. This work is mainly done using the software Gaussian 09, using the B3LYP hybrid exchange correlation function and the LanL2DZ basis set. The geometry of the molecule was optimized before the calculation, and the correction factor used in the simulation calculation was 0.981.In order to more accurately calculate the SERS enhancement factor of Ag NPs dimers, DDA, Mie scattering, and FDTD methods were used to simulate the optical properties of Ag NPs dimers. This is mainly due to the extinction spectrum and the distribution of the local electric field. The excitation wavelength used in the calculations is 532 nm, which corresponds to the actual experimental conditions. The excitation direction of the excitation light plane wave is along the direction of the long axis of the dimer. The relevant calculations of DDA are all calculated using the DDSCAT 7.3 package. The results of the Mie scattering simulation of the absorption, scattering, and extinction spectra of Ag NPs and the FDTD simulation of the local electric field distribution were calculated using a script file written by MATLAB software [23].Regarding the adsorption process of molecules on the surface of Ag NPs, the adsorption model can be used for reference.The degree of coverage of the Ag NPs dimer surface by the molecule to be tested can be represented byθ, and the relationship between the SERS spectrum obtained by the experiment and the coverage degree can be expressed as(1)θ=ICsImax.InICSCS is the intensity of the Raman peak to be analyzed at the concentration. Imax is the saturation value of the SERS intensity at the same peak position. Combining the above two formulas, we get(2)ICs=ImaxMCS1+MCS.The binding constant M was used as a fitting parameter to fit the functional relationship between the Raman peak area and analyte concentration. The binding constant M is related to the Gibbs adsorption free energy (ΔG) as follows:(3)ΔG=−RTlnM.M is the ideal gas constant with a value of 8.3143 kJ/kmol∗M, and T is the temperature in M. The temperature condition in the experiment is 25°C, which is 298.15 M.To evaluate the utility and specificity of this method, 5 interferors (phenethylamine, tryptophan, tyrosine, levodopa, and bovine serum albumin) were tested for selectivity under the same conditions. With DA concentration of 300 nM and other species concentrations of 1μM, the SERS intensity of Ag NP dimer containing 300 nM DA at 767 cm−1 was about 5 times higher than that of the five species. The selective experiment of DA detection based on SERS technology is shown in Figure 6.Figure 6
Selectivity experiment of DA detection based on SERS technology.As can be seen from Figure6, these interfering species did not show a significant enhancement of SERS intensity even at high concentrations. To further confirm the specificity of this method, these five interfering chemicals were mixed as standard samples for DA detection. The obtained experimental results further confirmed the good selectivity of DA detection. Therefore, this method has good specific identification for the detection of DA.


### 4.2. Molecular Dynamics Simulation Method and Conclusion

The molecular dynamics simulation process generally includes the following steps: 1. It is necessary to establish the research object, establish a model according to the research object, and set the initial coordinate value and initial velocity of the atom or molecule through the initial temperature and structural characteristics required by the model; 2. It is necessary to select an appropriate simulation time step; 3. It is necessary to select an appropriate potential energy function between atoms; 4. It is necessary to determine the relevant parameters such as boundary conditions, integration algorithm, and ensemble, then start the calculation, and finally process the calculation results through the relevant software to extract the relevant parameters [24, 25].Two aspects are generally considered when selecting boundary conditions. On the one hand, in order to reduce the amount of computation, the simulated system needs to be as small as possible. At the same time, in order to avoid the disturbance caused by dynamics to the greatest extent, the simulation system needs to be built larger to ensure statistical reliability. On the other hand, the coupling of volume change, stress balance, strain characteristics, etc. with reality needs to be considered from the actual physical nature.The important characteristics of molecular dynamics simulation are that the motion is relatively independent, the time is long, the action can be superimposed and the short-range correlation is large, and the molecular information is simple. According to these characteristics, GPU simulation is very suitable for molecular dynamics simulation.GPU is short for Graphics Processing Unit. CUDA extends C in five main ways: (1) The function type classifier, which determines whether the function is executed on the host side or the device side, and whether the function is called on the host side or the device side. (2) The variable type is used to define the type of memory stored by the variable. (3) Built-in vector types, CUDA provides vector types such as char1, uchar1, char2, uchar2, short1, ushort1, short2, ushort2, short3, and ushort3. (4) Four built-in variables. Blockldx and threadldx are used to identify threads and thread blocks, and griddim and blockdim are used to size grid and thread blocks. 5. It introduces the <<<>>> operator, such as Test<<<1,N>>>(a, b, c), to specify the dimensions of the thread block and grid block, and to pass parameters to the Kernel function. The CUDA variable description table is shown in Table 1.Table 1
CUDA variable description.
Variable declarationMemoryScopeLifetime_device__local_Int LocalVar;Local memoryThreadThread_device__shared_Int SharedVar;Shared memoryBlockBlock_device_Int GlobalVar;Global memoryGridProgram_device__constant_Int ConstantVar;Constant memoryGridProgramCUDA provides three variable-type qualifiers: _device_, _shared_, and _constant_. The variable-type qualifier _device_ has a different meaning than the function-type qualifier _device_. _device_ declares a variable located on the device. At most one of _shared_ and _constant_ can be used with the _device_ qualifier to specify which memory space the variable belongs to. _constant_ can be used with _device_. _shared_ can optionally be used with _device_. The CUDA memory model is shown in Figure7.Figure 7
CUDA memory model.It can be seen from Figure7 that during program execution, a thread can access data from multiple memory areas. Each thread has its own local and shared memory. Each thread block has a shared memory. All threads in the network can access the same global memory.Each SM (Streaming Multiprocessor) of the GPU has thousands of registers, each SM has multiple SPs (Streaming Processors), and all the work is processed on the SPs. GPU threads cannot directly access the system main memory, and the accessed data must be stored in the GPU device memory. The on-chip GPU cache is read-only and does not cause coherency issues. The main function of the tower is to reduce the number of memory accesses, not to delay memory accesses. The GPU device memory space is shown in Figure8.Figure 8
GPU device memory space.It implements CPU and GPU algorithms to extract pressure and average potential energy of individual atoms on a PC for CPU, time, and error analysis at different molecular scales. The calculation time is the average of multiple experimental results. The running times of the CPU and GPU algorithms for pressure extraction and single-atom average potential energy extraction are shown in Tables2 and 3.Table 2
CPU algorithm and GPU algorithm running time for pressure extraction.
Particle numbersCPU (ms)GPU (ms)GPU(Opt) (ms)64009071916128003556723325600140092827938400312286571735120055048115829976800123181256367310240021933745631173Table 3
Running time of CPU algorithm and GPU algorithm for single-atom average potential energy extraction.
Particle numbersCPU (ms)GPU (ms)GPU(Opt) (ms)64009071916128003556723325600140092827938400312286571735120055048115829976800123181256367310240021933745631173It can be seen from Tables2 and 3 that as the system scale increases, the GPU-based thermodynamic extraction rate also increases. When the number of molecules reaches a certain number, the computational efficiency is not significantly improved. Compared with the CPU, the GPU can achieve a 190-fold acceleration effect.The error analysis of the GPU algorithm relative to the CPU algorithm for pressure extraction and single-atom average potential energy extraction is shown in Figures9 and 10.Figure 9
Error analysis of the GPU algorithm for pressure extraction relative to the CPU algorithm.Figure 10
Error analysis of the GPU algorithm relative to the CPU algorithm for single-atom average potential energy extraction.It can be seen from the combined data in Figures9 and 10 that the absolute and relative errors of pressure and single-atom average potential energy extraction increase with the increase in molecular scale. When the molecular scale reaches 100k, the errors of pressure and single-atom average potential energy reach 0.32 and 0.052, respectively. However, compared with the pressure and single-atom average potential energy extracted by the CPU algorithm, the error of the results extracted by the GPU algorithm is only 1.55% and −1.45%. This is because this lab does not support double-precision floating-point operations. If double-precision floating-point calculation can be added, the problem of error accumulation can be effectively avoided, and the calculation results can be made more accurate while obtaining better performance.


## 4.1. Theoretical Model and Simulation Method of Metal Nanostructures

Simulation is the use of a model to reproduce the essential process that occurs in the actual system, and it helps study the existing or designed system through experiments on the system model, also known as simulation. The 3D-FDTD method is used to perform relevant simulation calculations, and the calculation model is divided into calculation areas according to Figure5. The FDTD region division of the scattering problem is shown in Figure 5.Figure 5
FDTD region division for the scattering problem.The Raman scattering spectra of DA molecules and the SERS spectra near Ag NPs dimers were simulated and calculated by the DFT method for the analysis of the SERS enhancement mechanism [21, 22]. This work is mainly done using the software Gaussian 09, using the B3LYP hybrid exchange correlation function and the LanL2DZ basis set. The geometry of the molecule was optimized before the calculation, and the correction factor used in the simulation calculation was 0.981.In order to more accurately calculate the SERS enhancement factor of Ag NPs dimers, DDA, Mie scattering, and FDTD methods were used to simulate the optical properties of Ag NPs dimers. This is mainly due to the extinction spectrum and the distribution of the local electric field. The excitation wavelength used in the calculations is 532 nm, which corresponds to the actual experimental conditions. The excitation direction of the excitation light plane wave is along the direction of the long axis of the dimer. The relevant calculations of DDA are all calculated using the DDSCAT 7.3 package. The results of the Mie scattering simulation of the absorption, scattering, and extinction spectra of Ag NPs and the FDTD simulation of the local electric field distribution were calculated using a script file written by MATLAB software [23].Regarding the adsorption process of molecules on the surface of Ag NPs, the adsorption model can be used for reference.The degree of coverage of the Ag NPs dimer surface by the molecule to be tested can be represented byθ, and the relationship between the SERS spectrum obtained by the experiment and the coverage degree can be expressed as(1)θ=ICsImax.InICSCS is the intensity of the Raman peak to be analyzed at the concentration. Imax is the saturation value of the SERS intensity at the same peak position. Combining the above two formulas, we get(2)ICs=ImaxMCS1+MCS.The binding constant M was used as a fitting parameter to fit the functional relationship between the Raman peak area and analyte concentration. The binding constant M is related to the Gibbs adsorption free energy (ΔG) as follows:(3)ΔG=−RTlnM.M is the ideal gas constant with a value of 8.3143 kJ/kmol∗M, and T is the temperature in M. The temperature condition in the experiment is 25°C, which is 298.15 M.To evaluate the utility and specificity of this method, 5 interferors (phenethylamine, tryptophan, tyrosine, levodopa, and bovine serum albumin) were tested for selectivity under the same conditions. With DA concentration of 300 nM and other species concentrations of 1μM, the SERS intensity of Ag NP dimer containing 300 nM DA at 767 cm−1 was about 5 times higher than that of the five species. The selective experiment of DA detection based on SERS technology is shown in Figure 6.Figure 6
Selectivity experiment of DA detection based on SERS technology.As can be seen from Figure6, these interfering species did not show a significant enhancement of SERS intensity even at high concentrations. To further confirm the specificity of this method, these five interfering chemicals were mixed as standard samples for DA detection. The obtained experimental results further confirmed the good selectivity of DA detection. Therefore, this method has good specific identification for the detection of DA.


## 4.2. Molecular Dynamics Simulation Method and Conclusion

The molecular dynamics simulation process generally includes the following steps: 1. It is necessary to establish the research object, establish a model according to the research object, and set the initial coordinate value and initial velocity of the atom or molecule through the initial temperature and structural characteristics required by the model; 2. It is necessary to select an appropriate simulation time step; 3. It is necessary to select an appropriate potential energy function between atoms; 4. It is necessary to determine the relevant parameters such as boundary conditions, integration algorithm, and ensemble, then start the calculation, and finally process the calculation results through the relevant software to extract the relevant parameters [24, 25].Two aspects are generally considered when selecting boundary conditions. On the one hand, in order to reduce the amount of computation, the simulated system needs to be as small as possible. At the same time, in order to avoid the disturbance caused by dynamics to the greatest extent, the simulation system needs to be built larger to ensure statistical reliability. On the other hand, the coupling of volume change, stress balance, strain characteristics, etc. with reality needs to be considered from the actual physical nature.The important characteristics of molecular dynamics simulation are that the motion is relatively independent, the time is long, the action can be superimposed and the short-range correlation is large, and the molecular information is simple. According to these characteristics, GPU simulation is very suitable for molecular dynamics simulation.GPU is short for Graphics Processing Unit. CUDA extends C in five main ways: (1) The function type classifier, which determines whether the function is executed on the host side or the device side, and whether the function is called on the host side or the device side. (2) The variable type is used to define the type of memory stored by the variable. (3) Built-in vector types, CUDA provides vector types such as char1, uchar1, char2, uchar2, short1, ushort1, short2, ushort2, short3, and ushort3. (4) Four built-in variables. Blockldx and threadldx are used to identify threads and thread blocks, and griddim and blockdim are used to size grid and thread blocks. 5. It introduces the <<<>>> operator, such as Test<<<1,N>>>(a, b, c), to specify the dimensions of the thread block and grid block, and to pass parameters to the Kernel function. The CUDA variable description table is shown in Table 1.Table 1
CUDA variable description.
Variable declarationMemoryScopeLifetime_device__local_Int LocalVar;Local memoryThreadThread_device__shared_Int SharedVar;Shared memoryBlockBlock_device_Int GlobalVar;Global memoryGridProgram_device__constant_Int ConstantVar;Constant memoryGridProgramCUDA provides three variable-type qualifiers: _device_, _shared_, and _constant_. The variable-type qualifier _device_ has a different meaning than the function-type qualifier _device_. _device_ declares a variable located on the device. At most one of _shared_ and _constant_ can be used with the _device_ qualifier to specify which memory space the variable belongs to. _constant_ can be used with _device_. _shared_ can optionally be used with _device_. The CUDA memory model is shown in Figure7.Figure 7
CUDA memory model.It can be seen from Figure7 that during program execution, a thread can access data from multiple memory areas. Each thread has its own local and shared memory. Each thread block has a shared memory. All threads in the network can access the same global memory.Each SM (Streaming Multiprocessor) of the GPU has thousands of registers, each SM has multiple SPs (Streaming Processors), and all the work is processed on the SPs. GPU threads cannot directly access the system main memory, and the accessed data must be stored in the GPU device memory. The on-chip GPU cache is read-only and does not cause coherency issues. The main function of the tower is to reduce the number of memory accesses, not to delay memory accesses. The GPU device memory space is shown in Figure8.Figure 8
GPU device memory space.It implements CPU and GPU algorithms to extract pressure and average potential energy of individual atoms on a PC for CPU, time, and error analysis at different molecular scales. The calculation time is the average of multiple experimental results. The running times of the CPU and GPU algorithms for pressure extraction and single-atom average potential energy extraction are shown in Tables2 and 3.Table 2
CPU algorithm and GPU algorithm running time for pressure extraction.
Particle numbersCPU (ms)GPU (ms)GPU(Opt) (ms)64009071916128003556723325600140092827938400312286571735120055048115829976800123181256367310240021933745631173Table 3
Running time of CPU algorithm and GPU algorithm for single-atom average potential energy extraction.
Particle numbersCPU (ms)GPU (ms)GPU(Opt) (ms)64009071916128003556723325600140092827938400312286571735120055048115829976800123181256367310240021933745631173It can be seen from Tables2 and 3 that as the system scale increases, the GPU-based thermodynamic extraction rate also increases. When the number of molecules reaches a certain number, the computational efficiency is not significantly improved. Compared with the CPU, the GPU can achieve a 190-fold acceleration effect.The error analysis of the GPU algorithm relative to the CPU algorithm for pressure extraction and single-atom average potential energy extraction is shown in Figures9 and 10.Figure 9
Error analysis of the GPU algorithm for pressure extraction relative to the CPU algorithm.Figure 10
Error analysis of the GPU algorithm relative to the CPU algorithm for single-atom average potential energy extraction.It can be seen from the combined data in Figures9 and 10 that the absolute and relative errors of pressure and single-atom average potential energy extraction increase with the increase in molecular scale. When the molecular scale reaches 100k, the errors of pressure and single-atom average potential energy reach 0.32 and 0.052, respectively. However, compared with the pressure and single-atom average potential energy extracted by the CPU algorithm, the error of the results extracted by the GPU algorithm is only 1.55% and −1.45%. This is because this lab does not support double-precision floating-point operations. If double-precision floating-point calculation can be added, the problem of error accumulation can be effectively avoided, and the calculation results can be made more accurate while obtaining better performance.


## 5. Molecular Dynamics Simulation Analysis of Metal Nanostructures

### 5.1. Surface Plasmons in Metal Nanostructures

Surface plasmons are electromagnetic oscillations with surface charges and electromagnetic waves, mainly composed of free electrons and photons coupled. Based on the action of the external electric field, 1/τ represents the probability of collision of free electrons per unit time. τ is the relaxation time, which has nothing to do with the speed or position of the electron. Thermal equilibrium is achieved by generating collisions using the surrounding environment and electrons. Based on the action of the external field, the formula of motion of a single free electron can be expressed as(4)xdm2dt2+xγdmdt=−eE.Among them,m represents the displacement of free electrons, and e represents the elementary charge. Assuming that the electric field E is in the form of a harmonic of =E0e−iωt , the particular solution to the formula of motion is(5)mt=m0e−iωt.Substituting formula (5) into formula (4) yields(6)mt=exω2+iγωEt.The polarization strengthP = −nex is obtained as(7)P=ye2xω2+iγωE.According to the relationshipD=ε0E+P between the electric displacement vector D and P, we can get(8)D=ε01−ωp2ω2+iγωE,ωp2=ne2/ε0x is the surface plasmon oscillation frequency of the free electron gas. The relative permittivity of the metal is(9)εω=1−ωp2ω2+iγω=ε1ω+iε2ω.It can be seen from the above formula that the real partε1ω and the imaginary part ε2ω of the complex permittivity of metals can be expressed as(10)ε1ω=1−ωp2τ21+ω2τ2,ε2ω=ωp2τω1+ω2τ2.Based on the relevant properties of the metal,ω<ωp will be assumed in the discussion. As ωτ≫1 tends to higher frequencies, the losses are negligible since the losses are relatively small. The imaginary part of Eωis relatively small, and hence it can be regarded as a real number. The dielectric constant of lossless free electrons is obtained as(11)εω=1−ωp2ω2.Asωp tends to lower frequencies, ω≪τ−1, then ε2≫ε1, and Eω the real and imaginary parts are approximately equal:(12)y≈k=ε22=τωp22ω.The metal has a strong absorption capacity in the frequency range, and the absorption coefficient isα:(13)α=2ωp2τωc2.In the free electron gas model, whenω≫ωp, ε⟶1. The response of metals in this frequency range depends mainly on free electrons in the s state. Therefore, for d-level noble metals close to the Fermi level (such as Au, Ag, Cu, etc.), the model in this frequency range needs to be corrected because noble metals contain positive ions, and positive ions produce remanent polarization effects. Therefore, the polarization caused by the electron oscillation can be expressed as(14)P∞¯=ε0ε∞−1.The dielectric constant at this time can be obtained as(15)εω=ε∞−ωp2ω2+iγω.In summary, the metal-free electron gas model can well explain the dielectric response of metals in a wide frequency range.


### 5.2. Molecular Dynamics Numerical Simulation Analysis

Numerical simulation techniques are commonly used to study various “field” problems, including stress fields, displacement fields, temperature fields, electromagnetic fields, and more. The research questions can be summarized as: It solves his domain equations (differential equations or partial differential equations) under certain conditions. In some cases, the process of solution is relatively simple, and the existence of boundary rules makes the solution more precise. In most cases, the resolution process is complex and needs to be simplified. In some cases, numerical simulation techniques are employed to resolve. Due to the existence of Maxwell’s equations, the study of electromagnetic fields has been deeply developed and can be well applied to various fields. Composite metal nanostructures are usually complex and it is difficult to solve Maxwell’s equations precisely. Therefore, in most cases, in order to solve the electromagnetic field accurately, it is necessary to use some numerical simulation method. The commonly used methods are the finite element method, discrete element method, and time domain finite difference method. The plate and shell problem is suitable for using the boundary element method developed in recent years. However, there are some limitations in use. At present, the most widely used numerical simulation methods are the time domain finite difference method and the finite element method.Finite difference time domain (FDTD) is a very common method for calculating electromagnetic fields in the time domain.The finite element method (FEM) is a numerical method for approximately solving boundary value problems (systems of partial differential equations) in mathematical physics. It decomposes a complex problem into several related tiny units, sets an approximate solution with parameters in each unit, and then solves the equations of each unit simultaneously and as a whole through mutual relationships. The finite element method has been more widely used in electromagnetic field calculation due to its high precision and suitability for complex geometries. It is good at solving multiband electromagnetic control coupling and multiphysics coupling problems, and was even used in aircraft design in the 1950s.Molecular dynamics is a discrete model system consisting of a large number of interacting particles, each of which has a mass. Its position is represented by a geometric point, and its motion follows Newton’s equations of motion. Newtonian mechanics takes the particle as the research object and focuses on the relationship of force. When dealing with the problem of the particle system, it emphasizes considering the force on each particle separately, and then infers the motion state of the entire particle system. It utilizes kinetic calculations to describe the behavior of each particle to represent the behavior of the system directly or through statistics and combinations.It assumes that a system consists of N particles, and the state of this system is marked by the particle's position 1 and momentum 2 or velocity 3.The energy of the system is 1, and its formula of motion is(16)∂∂tpa=−∂∂rH.Or(17)∂∂tra=−∂∂pH.In practical applications, the above formula can be transformed into Newton’s formula(18)H=12∑a=1Nxava2+Vra,xad2dt2ra=−∂∂raVra,xa is the mass of particle a, and Vra is the interaction potential between particles.Molecular dynamics is to decompose a continuous process into multiple discrete time stepst0,t1,t2,t3,...,. In each step, the above formula is used to obtain the trajectory of the system state evolution to space.(19)r1,pat0,ra,pat1,ra,p1t2,....In turn, the valueQra,pa of other physical quantities of interest can be calculated.


## 5.1. Surface Plasmons in Metal Nanostructures

Surface plasmons are electromagnetic oscillations with surface charges and electromagnetic waves, mainly composed of free electrons and photons coupled. Based on the action of the external electric field, 1/τ represents the probability of collision of free electrons per unit time. τ is the relaxation time, which has nothing to do with the speed or position of the electron. Thermal equilibrium is achieved by generating collisions using the surrounding environment and electrons. Based on the action of the external field, the formula of motion of a single free electron can be expressed as(4)xdm2dt2+xγdmdt=−eE.Among them,m represents the displacement of free electrons, and e represents the elementary charge. Assuming that the electric field E is in the form of a harmonic of =E0e−iωt , the particular solution to the formula of motion is(5)mt=m0e−iωt.Substituting formula (5) into formula (4) yields(6)mt=exω2+iγωEt.The polarization strengthP = −nex is obtained as(7)P=ye2xω2+iγωE.According to the relationshipD=ε0E+P between the electric displacement vector D and P, we can get(8)D=ε01−ωp2ω2+iγωE,ωp2=ne2/ε0x is the surface plasmon oscillation frequency of the free electron gas. The relative permittivity of the metal is(9)εω=1−ωp2ω2+iγω=ε1ω+iε2ω.It can be seen from the above formula that the real partε1ω and the imaginary part ε2ω of the complex permittivity of metals can be expressed as(10)ε1ω=1−ωp2τ21+ω2τ2,ε2ω=ωp2τω1+ω2τ2.Based on the relevant properties of the metal,ω<ωp will be assumed in the discussion. As ωτ≫1 tends to higher frequencies, the losses are negligible since the losses are relatively small. The imaginary part of Eωis relatively small, and hence it can be regarded as a real number. The dielectric constant of lossless free electrons is obtained as(11)εω=1−ωp2ω2.Asωp tends to lower frequencies, ω≪τ−1, then ε2≫ε1, and Eω the real and imaginary parts are approximately equal:(12)y≈k=ε22=τωp22ω.The metal has a strong absorption capacity in the frequency range, and the absorption coefficient isα:(13)α=2ωp2τωc2.In the free electron gas model, whenω≫ωp, ε⟶1. The response of metals in this frequency range depends mainly on free electrons in the s state. Therefore, for d-level noble metals close to the Fermi level (such as Au, Ag, Cu, etc.), the model in this frequency range needs to be corrected because noble metals contain positive ions, and positive ions produce remanent polarization effects. Therefore, the polarization caused by the electron oscillation can be expressed as(14)P∞¯=ε0ε∞−1.The dielectric constant at this time can be obtained as(15)εω=ε∞−ωp2ω2+iγω.In summary, the metal-free electron gas model can well explain the dielectric response of metals in a wide frequency range.


## 5.2. Molecular Dynamics Numerical Simulation Analysis

Numerical simulation techniques are commonly used to study various “field” problems, including stress fields, displacement fields, temperature fields, electromagnetic fields, and more. The research questions can be summarized as: It solves his domain equations (differential equations or partial differential equations) under certain conditions. In some cases, the process of solution is relatively simple, and the existence of boundary rules makes the solution more precise. In most cases, the resolution process is complex and needs to be simplified. In some cases, numerical simulation techniques are employed to resolve. Due to the existence of Maxwell’s equations, the study of electromagnetic fields has been deeply developed and can be well applied to various fields. Composite metal nanostructures are usually complex and it is difficult to solve Maxwell’s equations precisely. Therefore, in most cases, in order to solve the electromagnetic field accurately, it is necessary to use some numerical simulation method. The commonly used methods are the finite element method, discrete element method, and time domain finite difference method. The plate and shell problem is suitable for using the boundary element method developed in recent years. However, there are some limitations in use. At present, the most widely used numerical simulation methods are the time domain finite difference method and the finite element method.Finite difference time domain (FDTD) is a very common method for calculating electromagnetic fields in the time domain.The finite element method (FEM) is a numerical method for approximately solving boundary value problems (systems of partial differential equations) in mathematical physics. It decomposes a complex problem into several related tiny units, sets an approximate solution with parameters in each unit, and then solves the equations of each unit simultaneously and as a whole through mutual relationships. The finite element method has been more widely used in electromagnetic field calculation due to its high precision and suitability for complex geometries. It is good at solving multiband electromagnetic control coupling and multiphysics coupling problems, and was even used in aircraft design in the 1950s.Molecular dynamics is a discrete model system consisting of a large number of interacting particles, each of which has a mass. Its position is represented by a geometric point, and its motion follows Newton’s equations of motion. Newtonian mechanics takes the particle as the research object and focuses on the relationship of force. When dealing with the problem of the particle system, it emphasizes considering the force on each particle separately, and then infers the motion state of the entire particle system. It utilizes kinetic calculations to describe the behavior of each particle to represent the behavior of the system directly or through statistics and combinations.It assumes that a system consists of N particles, and the state of this system is marked by the particle's position 1 and momentum 2 or velocity 3.The energy of the system is 1, and its formula of motion is(16)∂∂tpa=−∂∂rH.Or(17)∂∂tra=−∂∂pH.In practical applications, the above formula can be transformed into Newton’s formula(18)H=12∑a=1Nxava2+Vra,xad2dt2ra=−∂∂raVra,xa is the mass of particle a, and Vra is the interaction potential between particles.Molecular dynamics is to decompose a continuous process into multiple discrete time stepst0,t1,t2,t3,...,. In each step, the above formula is used to obtain the trajectory of the system state evolution to space.(19)r1,pat0,ra,pat1,ra,p1t2,....In turn, the valueQra,pa of other physical quantities of interest can be calculated.


## 6. Conclusions

With the advancement of science and technology, molecular dynamics simulation methods have been applied more and more. The research on molecular dynamics simulation calculation methods is also of great significance for promoting the current scientific development. In chemical engineering, although they are mostly used in thermodynamic studies, studies on transport properties are also taking off. In the field of materials, previous methods can only give the positions of atoms. However, with the development of the first molecular dynamics method, it can simultaneously give the structure and properties of the ground state of the crystal, and also provide a reference for the design of composite materials. In the case of drugs, the actual composition of cell membranes is more complex and cannot be considered in much detail in current simulation calculations. In contrast to the past, however, molecular dynamics simulation methods allow the study of drug-membrane interactions at the atomic level. Molecular dynamics technology has received more and more attention in different countries. Molecular dynamics simulations are expected to be used for more sophisticated studies and become more widespread in the future.



---

*Source: 6264256-2022-08-21.xml*