On the Effects of Local Environment on Active Galactic Nucleus (AGN) in the Horizon Run 5 Simulation

We use the Horizon Run 5 cosmological simulation to study the effect of galaxy intrinsic properties and the local environment on AGNs characterized by their threshold of the accretion rate. We select galaxies in the stellar mass range $10^{9.5} \le M^{}{*}/M^{}{\odot} \le 10^{10.5}$ in the snapshot at redshift $z$=0.625. Among various intrinsic properties, we find that the star formation rate of the host galaxy is most correlated to the AGN activity. To quantify the environment, we use background galaxy number density (large-scale environment) and distance and morphological type of the nearest neighbors (small-scale environment), and study their relative effects on the AGN properties. We find that, compared to the background density, the nearest neighbor environment is the dominant quantity determining the bolometric luminosity, star formation rate, and kinematic properties of AGNs and better dictates the gas mass of the host galaxy. We show that the cold gas content in the host galaxies is crucial in triggering AGN activity. However, when the nearest neighbor environment effects start to act at the neighbor distance of less than about half the virial radius of the neighbor, the neighbor environmental effects are the most dominant factor for quasar activity.


INTRODUCTION
Observations have shown that the star formation rate density in the Universe has declined in the current epoch (Hopkins 2004;Behroozi et al. 2013;Madau & Dickinson 2014). One of the key mechanisms proposed for the quenching of massive galaxies is feedback from the Active Galactic Nucleus (AGN Di Bower et al. 2006;Schawinski et al. 2007;Cano-Díaz et al. 2012;Maiolino et al. 2012;Fabian 2012;Dubois et al. 2012Dubois et al. , 2013Beckmann et al. 2017;Zhang et al. 2021). The gas inside a galaxy loses the angular momentum and falls towards the supermassive black hole residing inside the galaxy. The energy released from the accretion heats the surrounding gas and is thought to quench the star formation (Antonuccio-Delogu & Silk 2010;Wagner et al. 2013). One of the ways to classify AGNs as quasar mode (radiationally efficient; Shakura & Sunyaev 1973) and radio mode (radiationally inefficient; Hine & Longair 1979) is based on the rate of accretion. 1 Quasar mode AGNs are associated with actively star-forming disk galaxies, and radio mode is mostly associated with passively star-forming elliptical galaxies (Heckman & Best 2014, and references within). The trigger mechanisms of AGN have been a subject of debate since their discovery.
It has been suggested that AGNs can be triggered by internal and external factors. Internal properties like gas content of the host galaxy, kinematics, and morphology could potentially play a role in regulating the accretion of gas onto the supermassive black hole at the center (for example; Gavignaud et al. 2010;Dubois et al. 2014;Ruffa et al. 2019;Shangguan et al. 2020;Ellison et al. 2021). The environment of a galaxy, e.g., how many galaxies it has in its vicinity, on small and large scales, has been observed to play a critical role in regulating the galaxy properties like star formation rate, gas content, and stellar and gas metallicity (Binggeli et al. 1988;Dressler et al. 1997;Kauffmann et al. 2004;Porter et al. 2008;Weinmann et al. 2009;Mahajan et al. 2010;Peng et al. 2012;Alpaslan et al. 2015;Kuutma et al. 2017;Mahajan et al. 2018;Asano et al. 2020;Singh et al. 2020;Gouin et al. 2021). Galaxies can acquire gas from its environment fueling AGNs (Allen et al. 2006;Hardcastle et al. 2007;Ineson et al. 2015). Similarly, interaction with the neighbors has been shown to regulate the gas content and morphology of the galaxies undergoing interaction. The gravitational interaction can funnel the gas toward the center of a galaxy (Hernquist 1989; Barnes & Hernquist 1992;Hopkins et al. 2008;Comerford et al. 2015;Sharma et al. 2021). Therefore, it is important to study the effect of these external processes on the AGNs.
The prevalence of AGNs in different environments has been studied extensively over the past decade (Gilmour et al. 2007;Bradshaw et al. 2011;Hwang et al. 2012;Malavasi et al. 2015). Padilla et al. (2010) showed that at fixed background density, AGN host galaxies are relatively redder compared to similar galaxies with weak or no AGN, which hints at an environmental effect on AGNs. Donoso et al. (2014) reported that obscured AGNs are preferably found in the denser environment at z ∼ 1. Argudo-Fernández et al. (2016) used optical and radio AGNs to report that optical AGNs are not affected by background density, whereas radio AGNs are strongly affected by it. At higher redshifts (1.4 ≤ z ≤ 2.5), Bornancini & García Lambas (2020) studied obscured and unobscured AGNs and QSOs, reporting the correlation of different AGN types with the environment. Santos et al. (2021) using AKARI North Ecliptic Pole Wide field reported that at redshift (0.7 ≤ z ≤ 1.2), AGN activity increases with an increase in environmental density. Ellison et al. (2011) used SDSS to show that the fraction of AGN galaxy with a close companion is higher compared to a control sample and concluded that interaction plays a role in triggering AGN activity. Hong et al. (2015) found that 17 of 39 AGNs at low redshift showed signs of mergers in the past. Treister et al. (2012) used multi-wavelength observations of AGNs in redshift range (0 < z < 3) to study relation between AGNs and major mergers. They concluded that the most luminous AGNs are driven by major mergers, and less luminous AGNs are powered by secular processes. Satyapal et al. (2014) found that the fraction of AGNs increases as the distance to neighbors decreases, and mergers can enhance the AGN activity. Recently, Zhang et al. (2021) using SDSS showed that AGNs are mostly found in starburst and green-valley phases. They found that AGNs are surrounded by more neighbors compared to star forming galaxies. The results support the scenario that interaction could trigger AGN activity.
Hydrodynamical cosmological simulations have been used to model the effects of AGNs and compare them with observations. Di  performed merger simulations to study the role of mergers in triggering AGNs. They concluded that mergers apart from intense star formation also lead to gas inflow to the central black holes, which can power the quasars. Bhowmick et al. (2020) used IllustrisTNG simulation (Nelson et al. 2015;Pillepich et al. 2018) to study the AGN environment within 0.01-1 h −1 Mpc and found that interaction increases the AGN activity but plays a minor role. Kristensen et al. (2021) used TNG100-1 run (with box size 75 Mpc h −1 , 1820 3 dark matter particles with particle mass resolution of ≈ 10 6 M ⊙ ) to study the environment of dwarf AGN host galaxies. They found intermediate AGN activity in the galaxies that experienced recent minor mergers.
It is clear from the discussion above that simulations, like the observations, have different conclusions on what role galaxy properties and environment play in dictating the activity of the central black holes. For example, is the aggregated effect of many galaxy interactions, like in a group environment, more important? Or does one-to-one interaction matter for AGNs? Furthermore, How the activity of the central black hole relate to the intrinsic host galaxy properties like star formation rate, gas mass, and metallicity? In this study, we try to answer these critical questions by performing a statistical study of AGN activity with galaxy properties and the local environment.
Horizon Run 5 simulation (HR5; Lee et al. 2020;Park et al. 2022) has a large box with advanced numerical techniques that allow us to have a high enough number of galaxies in different modes of AGN activity. HR5 enables us to probe the AGNs with a good variation in evolutionary history and environments. In Section 2 we outline the methodology used in the paper. We present our results in Section 3 followed by a discussion in Section 4.

METHOD
In the following subsections, we will briefly describe the details of HR5 simulation (2.1). We refer the reader to Lee et al. (2020) for further details. We will describe our selected sample for the study in 2.2. We describe morphology, local environment and neighbor selection in Sections 2.3, 2.4 and 2.5 respectively.

Horizon run 5 simulation
Horizon Run 5 (HR5) is a hydrodynamical simulation run using Adaptive Mesh Refinement (AMR) code (RAMSES; Teyssier 2002). The box size of HR5 is (1049 cMpc) 3 with zoom-in region of 1049 × 127 × 119 cMpc 3 crossing the center of the box. The grids are refined to an AMR level of 20 to achieve a spatial resolution down to 1 kpc in a zoomed region. The initial condition of the simulation uses the parameters compatible with those of Planck (Planck Collaboration et al. 2016) for cosmology (Ω m = 0.3, Ω Λ = 0.7, Ω b = 0.047, σ 8 = 0.816, and h 0 = 0.684) with a linear power spectrum generated using the CAMB package (Lewis et al. 2000).

Physical processes
The gas is allowed to cool down to a temperature of 10 4 K using cooling functions proposed by Sutherland & Dopita (1993). The metal-rich gas is further allowed to cool down to a temperature of 750 K using cooling rates given by Dalgarno & McCray (1972) in the presence of uniform UV background (Haardt & Madau 1996) to mimic reionization at z = 10.
The star formation up to z = 21 follows an approach similar to Rasera & Teyssier (2006) in which stars are formed in the cells with gas number density n g > 55ρ crit , where ρ crit is the critical density of the universe. After z = 21, the star-formation criterion is set to n g > 0.1 H cm −3 (Hydrogen atoms per cubic centimeter) for the cells with the temperature lower than 2000 K. The assigned mass of the stellar particles is given by: where f b = Ω b Ωm and ∆x res is the spacial resolution at highest refinement level. N * is a random variable picked up from a Poisson distribution, and the m * is mass in code units (total mass of matter set equal to unity). Based on a Schmidt law (Schmidt 1959) the star formation rate is given by: where ρ g is the local gas density in the cell marked for star formation,ρ * is the star formation rate, and ϵ * (= 0.02) is the star formation efficiency, and G is the gravitational constant. In order to prevent excessive gas depletion, no more than 90 % of the gas in the cell is allowed to convert into stars.

Feedback processes
HR5 implements various stellar feedback recipes that mimic winds from the Asymptotic Giant Branch (AGB) stars, supernova type-Ia, and type-II. The energy released per supernova event is set to 2 × 10 51 ergs. Young particles contribute to the supernova type-II feedback by depositing a certain fraction of their energies in kinetic (f k = 0.3) and rest as thermal energy. Ejected mass and energy are deposited in a radius of 2 times the one-dimensional size of the most refined gas cells (∼ 1 kpc). In the aged stellar particles, the feedback is continued in the form of supernova type-Ia and AGB winds in the form of thermal deposition in nearby cells.
In the region with gas density n H,0 ≥ 0.1 H cm −3 and without black holes (BHs) within 50 kpc, a BH is created with a seed mass of 10 4 M ⊙ at the center of the gas cell of interest. BHs experience a drag force (Dubois et al. 2014). BHs are allowed to coalesce when the separation between them becomes less than 4∆x, where ∆x is the size of the cell. BHs grow by gas accretion following boosted Bondi-Hoyle-Lyttleton accretion rate (Hoyle & Lyttleton 1939;Bondi & Hoyle 1944;Bondi 1952;Booth & Schaye 2009) given by: where ϵ r is the spin-dependent radiative efficiency (Dubois et al. 2014),c s andū are the kernel-weighted sound speed and local gas velocity respectively,ρ is the kernel-weighted gas density of the local medium, and α is a dimensionless boost factor (≥ 1). The accretion rate is capped at the Eddington accretion rate given byṀ Edd = 4πGM BH m p /(ϵ r σ T c) where σ T is the Thomson cross-section and v is the velocity of the BH relative to the ambient medium, m p is the mass of a proton, c is the speed of light in vacuum. Depending on the Eddington ratio (χ =Ṁ BH /Ṁ Edd ) the feedback is delivered in two modes (Merloni & Heinz 2008;Dubois et al. 2012): quasar (χ > 0.01) and radio (χ ≤ 0.01).
In quasar mode, a geometrically thin, radiatively efficient disk is assumed (Shakura & Sunyaev 1973). The gas is ejected isotropically in a sphere with an energy ejection rate given by: where ϵ f,h is the thermal efficiency set to 0.15. In the radio mode, BH spin evolution is assumed to have magnetically choked accretion flow solution (McKinney et al. 2012). The energy ejection rate is given by: with the thermal coupling efficiency (ϵ f,j ) distribution has a U-shape with a maximum of 100% for maximally spinning BHs and 0.01 for non-rotating BHs (Dubois et al. 2021). This energy is injected into the neighboring cells in a bipolar manner along the axis of the spinning BH with no opening angle and a mass loading factor of η =Ṁ J /Ṁ BH = 100, whereṀ J is the rate of mass deposition.

Galaxy identification
To identify the FOF halos as usually dealt with in the standard halo finding methods in the snapshots of HR5, we treat the gas cells as 'gas-particles' using mean density and level of refinement. These, along with stellar, dark matter, and BH, were used by extended Friends-of-Friends (FoF; Huchra & Geller 1982;Press & Davis 1982;Davis et al. 1985) algorithm with variable linking length to identify virialized structures composed of multiple matter species. The linking length is given by: where m par is the mass of a particle, ρ c is the critical density of the Universe, Ω m0 is the baryonic density parameter at z = 0. For linking particles with different masses, average linking lengths are used. The virial radius of the neighbor galaxy is defined as R vir = (3M vir /4πρ 200 ) 1/3 , where ρ 200 is 200 times the critical density of the universe. Galaxies in the FoF halos have been identified using the PSB-based Galaxy Finder (pGalF) algorithm based on Kim & Park (2006). Instead of dark matter, pGalF uses stellar particles as they are more concentrated, making them better suited for identifying the internal structures of galaxies. The seeds from the stellar distribution are used for identifying structures of other components of the galaxy. We give a very brief introduction to pGalF in the following paragraph. For details of the algorithm, we refer the reader to Lee et al. (2020). pGalF identifies galaxies in four steps: • Create a network of nearest neighbors.
• Identifying peaks of stellar density and identifying core particles. Core members are identified as the particles residing in a region identified by monotonically lowering the density threshold till the isodensity surface encloses another peak.
• Grouping the non-core particles using the watershed algorithm.
• Membership check using tidal radius and total energy of particles in identified regions.
A total of 158754 galaxies with stellar mass M * ≥ 2×10 9 M ⊙ are identified at the snapshot corresponding to z = 0.625, the last snapshot of HR5. The galaxies are those at least 3 cMpc away from the regions containing low-level particles to avoid potential boundary effects.

Galaxy sample & variables
For our initial analysis, we make use of all the galaxies at redshift (z) of 0.625 in HR5 zoom-in region with stellar mass M * greater than 2 × 10 9 M ⊙ . To calculate the bolometric luminosity of galaxies, we follow Griffin et al. (2019), and Amarantidis et al. (2019).
As explained earlier, the bolometric luminosity due to the accretion of gas is divided into two modes: the quasar mode and the radio mode. In quasar mode, the bolometric luminosity is given by L q bol = ϵ rṀBH c 2 , where ϵ r is the radiative efficiency,Ṁ BH is the accretion rate on the SMBH and c is the speed of light (Shakura & Sunyaev 1973). In the case of the radio mode, the L bol is dependent on an accretion threshold (χ crit,ν ), denoting the regime in which the electrons are heated by the transfer of viscously generated energy from the ions (Mahadevan 1997). The bolometric luminosity is given by: Figure 1. (top) Probability distribution function of stellar mass of the galaxies with M * ≥ 2 × 10 9 M ⊙ . The colors represent AGNs in radio (red) and quasar (blue) modes, with green indicating non-AGN galaxies. The distribution is similar in both modes suggesting galaxies hosting a radio mode AGN or a quasar mode AGN have a wide range of stellar mass. The black vertical dotted lines show the mass range of our selected sample S bin . (bottom) The bolometric AGN luminosity (L bol ) is plotted against stellar mass (M * ) for the sample of galaxies S all .The bolometric luminosity of AGNs in both modes varies significantly with stellar mass. In the log bolometric luminosity varies linearly with log stellar mass in the range of S bin is linear. We use the median bolometric luminosity for each stellar mass in this linear relation (L scale ) to normalize the bolometric luminosity for each mode.
where χ crit,ν = 0.001 δ 0.0005 Herer lso is the last stable orbit around a SMBH in the units of gravitational radius (GM BH /c 2 ), α is the Shakura-Sunyaev viscosity parameter (set here to 0.1), β is the fraction of gas pressure to total pressure (= 1−α/0.55), δ is the fraction of energy received by electrons in viscous dissipation in accretion flow (set here to 0.0005), and η edd Figure 2. (top) The bolometric AGN luminosity function for the sample of galaxies S all . The blue points are from Thorne et al. (2022) for the Deep Extragalactic VIsible Legacy Survey (DEVILS; Davies et al. 2018). The HR5 bolometric luminosity agrees well with the observation within 0.8-1 dex except at the low luminosity which shows a discrepancy of ∼ 1.5 dex. The difference at low luminosity can be attributed to the observational limitations in the detection of low-luminosity AGNs. (bottom) Normalized distribution of bolometric luminosity for HR5 simulation galaxies of the subsample S bin for two modes of AGN. The quasar expectedly shows higher bolometric luminosity distribution than radio-mode galaxies. Figure 3. Fraction of radio and quasar mode galaxies in active and passive galaxies. The black vertical dotted line shows the value, sSFRc = 1/tH0. Galaxies with specific star formation higher and lower than sSFRc are classified as active and passive, respectively. Quasar mode is more prevalent in star-forming galaxies, whereas radio mode is dominant in passive galaxies. The histogram on top shows the number of AGN galaxies in each bin for the two modes.  Table 1. Total number of galaxies in each subsample we have selected. See the text for detail. S all is the total sample containing all the galaxies with stellar mass M * ≥ 2 × 10 9 M⊙ and S bin is the subsample of galaxies in the stellar mass range 10 9.5 ≤ M * /M ⊙ ≤ 10 10.5 (see the text for description) used for analysis in the study.
is a free parameter which has been set to 4 (Amarantidis et al. 2019). This value gives similar luminosity in super-Eddington for a given mass accretion. This total sample of AGN galaxies is referred to as S all in the following sections. The star formation rate (SF R) for galaxies equal to zero was given the value of 10 −3 M ⊙ yr −1 . In Table 1 we show the number of galaxies sufficiently away from the regions contaminated by low-level particles in each mode for both samples. Figure 1(top) shows the probability distribution function of the stellar mass of the galaxies in our selected sample S all for both modes and non-AGNs. We note that most galaxies in both modes are distributed in the stellar mass range of 10 9.5 ≤ M * /M ⊙ ≤ 10 10.5 . In the bottom plot, the bolometric AGN luminosity (L bol ) is plotted against stellar mass (M * ). The bolometric luminosity of AGNs in both modes varies significantly with changes in stellar mass. The log bolometric luminosity varies linearly with log stellar mass in the range of 10 9.5 ≤ M * /M ⊙ ≤ 10 10.5 is linear. We select this mass range as beyond this stellar mass range, the variation of bolometric luminosity with stellar mass becomes highly non-linear for the quasar mode and any secular evolution will be difficult to disentangle from the environmental effects. Note, that galaxies with a stellar mass more than 10 10.5 M ⊙ can be present at the center of the groups and clusters, which are known to host radio-mode galaxies, but for our study, these have been neglected. Apart from the bolometric luminosities, other intrinsic properties also exhibit association with the stellar mass of galaxies. To study the relationship between AGN activity and properties of AGN host galaxies we have to remove the degeneracy with the secular variation due to the stellar mass.
We use the median bolometric luminosity for each stellar mass in this linear relation (L scale ) to normalize the bolometric luminosity for each mode. We take AGNs with stellar mass range 10 9.5 ≤ M * /M ⊙ ≤ 10 10.5 from the total S all and refer to it as S bin in the following sections. The selection retains a large number of galaxies for a statistical study. We have 8042 AGNs (∼ 7%) of total galaxies in S bin . We scale the internal properties of AGN host galaxies (e.g. X) with the median value of those properties from a stellar mass-matched sample of Non-AGN galaxies (e.g. X N onAGN ) with stellar mass bins of 0.01 dex. The selection and scaling criterion help in neglecting the effects of the secular evolution of galaxies (Kormendy & Kennicutt 2004) and study the effects of the environment and host galaxy properties on AGN activity.
In the top panel of Figure 2, we show the bolometric AGN luminosity function (ϕ) for galaxies in the sample S all and compare it with the data from Thorne et al. (2022) for the Deep Extragalactic VIsible Legacy Survey (DEVILS; Davies et al. 2018). The red line shows the values for L bol obtained from Equation 7 for the HR5 galaxies and the blue points show the data from observations. Two agree well within 0.8-1 dex except at the low luminosity bin which shows a discrepancy of ∼ 1.5 dex. The larger discrepancy at lower luminosity can be attributed to the observational limitations in the detection of low-luminosity AGNs. Given the limited size of the simulation box compared to the observation volume, it is good that the luminosity function matches well with observation for a significant luminosity range. Motivated by this we choose a cut-off of L bol ≥ 10 42 ergs s −1 for studying the AGNs in HR5. In the bottom panel of Figure 2, we show the bolometric luminosity distribution of the galaxies in the sample S bin for both modes. As expected, the quasar-mode galaxies show a higher bolometric luminosity than radio-mode galaxies. Table 1 shows the number of galaxies in each subsample we have taken for the study.
Galaxies can be classified as actively or passively star-forming based on their specific star formation rate (sSFR). In Figure 3 we divide the galaxies into active and passive depending on sSFR. The galaxies with sSFR < 1/t H0 and sSFR ≥ 1/t H0 are classified as active and passive galaxies respectively, where t H0 is the Hubble time. A value of sSFR < 1/t H0 means the time needed to form all stars in the galaxy was shorter than the Hubble time. It is clear that the radio mode AGNs are more prevalent in passive galaxies, and the quasar mode is dominant in the actively star-forming galaxies. . Background density at the locations of all HR5 galaxies with M * /M ⊙ ≥ 2 × 10 9 (S all ) in a slice with thickness 25 cMpc. The colors show background density (ρ20) obtained using an adaptive spline kernel smoothing (see text for details). The algorithm can capture the varying densities and complicated geometry in a good manner. The density decreases from dense groups and cluster environments to low-density void environments.

Morphology of galaxies
The morphology of galaxies is quantified using two quantities: the Sérsic index (n; Sérsic 1963) and the asymmetry parameter (A/A NonAGN ). The galaxies' stellar particles are projected face-on. The Sérsic index (n) of galaxies is calculated by fitting the radial distribution with the Sérsic profile given by: where R is the projected radial distance from the center of a galaxy, R e is the radius containing half the stellar mass of the galaxy and I e is the intensity at this radius. n is called the Sérsic index describing the shape of the profile. The asymmetry parameter (A/A NonAGN ; Schade et al. 1995;Abraham et al. 1996;Conselice et al. 2000;Conselice 2003;Hernández-Toledo et al. 2008;Pawlik et al. 2016) is calculated in 3D using the equation: where I o is the mass density of the original distribution of stellar particles in 3D and I ϕ is the density when a galaxy is inverted by 180 about the galaxy center. Most galaxies in the HR5 have a Sérsic index (n) of 1.25 with a range of 0.15-2.25 and the asymmetry parameter (A/A NonAGN ) is in the range of 0.15-0.2.

Local Environment
To quantify the effect local environment, we use two parameters: distance to the neighbor and background density estimate.
For estimating the background density around the AGNs we use an adaptive spline-kernel smoothing with adapterkernel size (L'Huillier et al. 2015;Song et al. 2016). The number density at a given position (r 0 ) is given by: where W (|r 0 −r i |, h spl ) is a Spline function kernel, which depends on distance to the i-th nearest neighboring (|r 0 −r i |), and a smoothing length (h spl ) taken as half the distance to N nn th neighbor. Here we use 20 nearest neighbors, which is large enough to minimize the effect of short noise below 1% as demonstrated in Song et al. (2016). The kernel used for density estimation should satisfy the properties of normalization and compactness. In this work, we use the Spline function kernel proposed by Monaghan & Lattanzio (1985), given as: where q i = r i /h spl . In Figure 4 we show the density estimated using the method above. It shows that the density estimator used here can distinguish between low-density void regions and high-density group or cluster environments.

Neighbor selection
We take galaxies in sample S all for the finding of the neighbors. In order for a galaxy to be classified as a neighbor to an AGN, we use the following conditions: • Stellar mass of the neighbor should be more than half of AGN, i.e., M * ,neigh /M * ,AGN > 0.5. This choice is motivated by a major merger scenario in which a neighbour with comparable mass will have significant effect.
• The galaxy which has a minimum d neigh /R vir,neigh ratio is taken, where d neigh is the distance to the galaxy and R vir,neigh is the virial radius of the galaxy marked as the neighbor.
We note here that we consider only the effect of the nearest neighbor. In the literature, a distance cut is used within which all the neighbors are used for analysis, and a tidal force estimator (which depends on the ratio of mass, the radius of AGN host galaxy, and distance to the neighbor) is used to study the environmental effect (Sabater et al. 2013(Sabater et al. , 2015. Our method does not use such distance cuts for neighbor identification. Instead, the dependence on the mass of the neighbor comes through the virial radius of the neighbor (Park et al. 2007;). As will be discussed in Figure 7, the fraction of AGNs does not change with the background density. This supports our simple assumption that the nearest neighbor can capture the environmental effect of the most influencing neighbor rather than the collective effect of galaxies beyond the nearest neighbor.

RESULTS
In the following subsections, we will discuss the results of our analysis. In Section 3.1, we explore the effects of the intrinsic properties of AGN host galaxies on the bolometric luminosity of AGNs. We then study the impact of the environment in Section 3.2.

Intrinsic properties
The intrinsic properties we focus on in this study are specific star formation rate (sSFR), gas metallicity (Z gas /Z NonAGN ), morphology (A/A NonAGN ), and kinematics ((v rot /σ)/(v rot /σ) NonAGN ) of the host galaxy. As mentioned above all these properties have been scaled with the stellar mass-matched values from the Non-AGN galaxies.
Specific star formation activity: If the AGN activity of the galaxy is fuelled by the presence of gas in the galaxy, then it is expected that this gas present would also lead to an increase in the star formation activity in the galaxy. Choi et al. (2009) using SDSS reported that late-type galaxies are the dominant hosts of AGNs, and Eddington line ratio luminosity is higher for blue galaxies. Mullaney et al. (2012) performed a X-ray stacking analysis for star forming galaxies at z ∼ 1 and z ∼ 2. They reported no correlation between star formation rate (SFR) and AGN activity.
On the other hand, for the AGNs with high luminosity Lutz et al. (2008) used mid-infrared spectroscopy from Spitzer for 12 galaxies and found a correlation between AGN luminosity and star formation indicators PAH and FIR continuum. Rosario et al. (2012) using deep far-infrared (FIR) and X-ray data from Herschel and Chandra respectively found that a high star formation rate is correlated with high AGN activity at z < 1. Hickox et al. (2014) used the time variability of AGNs and concluded that SFR (measured using FIR) is weakly correlated with AGN luminosity in the redshift range 0 < z < 2.
In Figure 5 we show the correlation between specific star formation rate averaged over 100 Myr (sSFR 100 ) and the AGN bolometric luminosity (L bol /L scale ) in the subsample S bin . For both the modes, radio (red) and quasar (blue), the AGN bolometric luminosity increases with an increase in sSFR 100 . The median increase in quasar mode is more significant (0.5 dex) than in radio mode (≤ 0.25 dex). This indicates that the AGN bolometric luminosity is correlated to the star formation activity of the galaxy. We observe a half order of magnitude of change in the bolometric luminosity with sSFR 100 in the quasar mode. Our results compare well with Sijacki et al. (2015). They used the Illustris simulation to study the correlation between mock AGN hard X-ray luminosity with the star formation rates within the stellar half-mass radius. They also found a weak correlation with a large scatter, similar to our result. They compared their results with Azadi et al. (2015) for different redshifts and found the weak scatter and trend to be present up to z ∼ 1. The large scatter they concluded can be attributed to physical processes that act on time scales shorter than that of star formation (Hickox et al. 2014). Recently, Mountrichas et al. (2022), who studied the star formation rate of galaxies in the COSMOS-Legacy Survey in the redshift range 0 < z < 2.4. For the X-ray luminosities L X,2−10keV > 2 − 3 × 10 44 erg s −1 there is an increase of star formation rate of AGN compared to other star-forming galaxies. This result matches our finding of specific star formation being higher for high AGN luminosity.
Metallicity: The metallicity of the stars and gas in a galaxy is related to its cosmic history. A galaxy evolves its metallicity by recycling material via intrinsic star formation or via accreting gas from its environment. Gas metallicity in galaxies is weakly correlated with the galaxy luminosity by well-known metallicity-luminosity relation (Hamann & Ferland 1993;Shemmer & Netzer 2002). In Figure 5 we show the variation of bolometric luminosity of AGNs with gas metallicity in the subsample S bin . Quasar mode shows an increase in the bolometric luminosity with Z gas /Z NonAGN of ≃ 0.5 dex, whereas no change is observed for radio mode galaxies. If the origin of AGN activity is intrinsic (i.e., accretion from gas in the host galaxy) high metallicity gas can cool giving rise to an increase in bolometric luminosity. We explore the origin of AGN activity in later sections. The results indicate that quasar mode AGNs with more processed gas are more luminous. We observe a 0.25 dex increase in AGN activity for low metallicity but because of the limitation on the number of AGNs, it requires more investigation.
Kinematics and morphology: In the hierarchical model of galaxy formation, galaxies assemble mass by mergers throughout their evolution. These events significantly affect the kinematics and morphology of the galaxy. In the right panels of Figure 5, we show the relation between bolometric luminosity and kinematic properties of AGN host galaxies. The bolometric luminosity in quasar mode shows a mild increase of < 0.25 dex with the change in (v rot /σ)/(v rot /σ) NonAGN . Here v rot and σ d are the mass-weighted rotational velocity and velocity dispersion respec- Figure 6. Contours of bolometric luminosity in quasar mode in sSFR-A/ANonAGN plane and sSFR-Zgas/ZNonAGN plane. The red points show the distribution of quasars in the two planes. For a given value of bolometric luminosity, the contours are aligned vertically. Therefore, the specific star formation rate (sSFR) is the dominant intrinsic property determining the bolometric luminosity of the AGN in quasar mode. Note that for low sSFR (< 10 −10 yr −1 )and low gas metallicity, the contours are not vertical and bolometric luminosity changes with the decrease in gas phase metallicity.
tively. However, bolometric luminosity increases with the increase in an asymmetry of an AGN-host galaxy for quasar mode with a median change of ≃ 0.5 dex.
We find that bolometric luminosity in quasar mode is significantly correlated with specific star formation. On the other hand, the specific star formation rate, gas metallicity, and asymmetry of the host galaxy could have mutual correlations with the star formation. In order to study which one is the dominant property among them, in Figure 6 we plot the contours of bolometric luminosity in the sSFR 100 -Z gas /Z NonAGN and SFR 100 -A/A NonAGN planes. For a given value of bolometric luminosity, the contours are aligned vertically. As expected, the bolometric luminosity steadily increases from a low to a high specific star formation rate. Therefore, we conclude that the specific star formation rate of the host galaxy is the dominant intrinsic property correlated with the AGN activity, whereas bolometric luminosity increases weakly with gas metallicity and has no net dependence on the asymmetry of galaxies. Note that for low sSFR (< 10 −10 yr −1 ) and low gas metallicity the contours are not vertical and bolometric luminosity changes with the decrease in gas phase metallicity. Due to less number of galaxies in this region, this requires further investigation in future work.

Effects of local environment
We note that most AGNs of HR5 galaxies have bolometric luminosity lower than 10 45 erg s −1 , which is below the quasar definition widely used in observations: B-band absolute magnitude greater than -23 mag (≈ L bol ≳ 10 45 erg s −1 ). Therefore, the AGNs in HR5 are not expected to instantaneously make an observable impact on their hosts or the surrounding environment 2 . The top left panel of Figure 5 shows that HR5 quasars do not quench the SFR much instantaneously, complementing the results of Hopkins (2012) who reported that the delay in SFR and AGN activity could arise because of dynamical effects. Recently, Jun et al. (2021) studying the role of radiation pressure in blowing out obscured quasar observed the timescale of AGN activity to be smaller than the outflows. At z = 0.625, the radio mode feedback will not have a strong effect on the large-scale environment seen at low redshift (e.g. Fabian 2012). Hence, our study explores the environment's effect on AGN activity rather than vice-versa.
We study the effects of the local environment in the following subsections. First, we begin our discussion by examining the abundance of AGNs in different background densities in Section 3.2.1. Then we study the effects of the environment on different properties in Section 3.2.2.

Fraction of AGNs
In Figure 7 we show the fraction of galaxies hosting AGN compared to all the galaxies in different background density bins for the sample S all . The fraction of AGNs increases till intermediate background densities and decreases afterward. The fraction of radio and quasar mode galaxies are similar to each other for a range of background densities. At all the background densities the fraction of AGNs remains only between 1 − 5 % for each mode.
At the highest density bin, a fraction of AGNs in quasar mode is higher than in the radio mode. Previous works have shown the cold gas accretion to be associated with quasar mode and hot gas accretion to power the radio mode AGNs (for example Argudo-Fernández et al. (2016)). The hot gas in galaxies is stripped due to environmental effects in highdensity environments. This may lead to less number of radio mode AGNs to be found in high-density environments. We will explore this scenario of AGN triggering in the following sections. This conclusion agrees with Mishra & Dai (2020) using X-ray data from ROSAT at z < 0.5 showed that the fraction of AGNs in clusters (∼ 5%) is lower than the field (∼ 1%). They concluded that the relatively lower fraction is due to a dearth of cold gas due to environmental effects. Duplancic et al. (2021) for galaxies in redshift range (0.05 ≤ z ≤ 0.15) used data from SDSS and Wide-field Infrared Survey Explorer (WISE) to report a higher fraction of AGNs at intermediate densities (pairs and triplets) than the corresponding fraction in groups. Our results agree well with their finding.
The low variation in the fraction of galaxies with the environment has also been reported at low redshifts (z < 0.1). Carter et al. (2001), Miller et al. (2003), and Amiri et al. (2019), reported that the fraction of galaxies with an AGN remains similar from high-density clusters to the low-density field environment. At similar redshift, Man et al. (2019) defined AGN fraction as AGNs relative to star-forming galaxies and found its dependence on overdensity, central/satellite, and group halo mass to be very little.

Variation of AGN properties with local environment
In this subsection, we study how the local environment affects the properties of AGNs in S bin . We use the local number density around an AGN (ρ 20 ) and distance to the neighbor normalized by its virial radius (d neigh /R vir,neigh ) as the proxy for the effects of the environment. This comparative analysis will help us understand if the change in properties of the AGNs in both modes is driven by the cumulative effect of the number of galaxies present in the neighborhood or by one-to-one interaction with the most influential neighbor.
Bolometric Luminosity: In Figure 8 (top) we show the effect on the bolometric luminosity (L bol /L scale ) of AGNs by the local environment. We note that the quasar mode is significantly affected by the environment. There is a rise in bolometric luminosity in the quasar mode from low-density void to high background density groups or cluster environments of ≤ 0.25 dex. The radio mode shows no significant increase. We also observe a steep increase in the bolometric luminosity of ∼1 dex in the quasar mode if the host galaxy of AGN is very close to the one-third virial radius of a neighboring galaxy. The effect on the bolometric luminosity is negligible if the host galaxy is more than one one-third virial radius away from the neighbor. Radio mode, on the other hand, is unaffected by the presence of a nearby galaxy with variations ≤ 0.1 dex . Figure 7. Fraction of AGN galaxies in different bins of background density ρ20. The fraction of AGNs increases till intermediate background densities and decreases afterward. The fraction of radio and quasar mode galaxies are similar to each other for a range of background densities. Environmental effects can lead to a reduction in the gas supply (circumgalactic medium; CGM) believed to fuel the radio-mode AGN, resulting in a lower number of radio-mode galaxies in high-density environments. The fraction of AGNs remains only between 1 − 5 % for each mode.  Figure 5. We observe a mild rise of < 0.25 dex in quasar mode with background density. There is a significant (∼ 1 dex) increase in bolometric luminosity very close to the one-third virial radius of a neighboring galaxy for quasar mode. Radio mode shows no dependence on an increase in background density or distance to the neighbor. The gas mass in the host galaxy decreases for both modes in higher background density and smaller distances to the nearest neighbor. Figure 9. Contours of bolometric luminosity in quasar mode in ρ 20 − d neigh /R vir,neigh plane. The red points show the distribution of quasars in the plane. For a given background density, as the distance to the nearest neighbor is decreased, the bolometric luminosity increases. When log d neigh /R vir,neigh ≤ 0, L bol /L scale is a monotonically increasing function of d neigh /R vir,neigh . The contours are slanted horizontally indicating the distance to the neighbor is the dominating parameter. The non-horizontal features toward higher local density could be some additional environmental effects from the 2nd and 3rd(etc.) nearest neighbors as they are getting closer.
There is a degeneracy between the effect of background density and neighbor on the bolometric luminosity of quasar mode AGNs. To compare these two competing effects, in Figure 9 we show the contours of the bolometric luminosity in ρ 20 − d neigh /R vir,neigh plane. The contours are slanted horizontally indicating the distance to the neighbor is the dominating parameter. The low values of distance to neighbor correspond to galaxies having close interaction with their neighbor. The AGNs that have close neighbors (logd neigh /R vir,neigh < 0) also reside in high-density regions. We note that the contours show some non-horizontal features toward higher local density. It could be some additional environmental effects from the 2nd and 3rd(etc.) nearest neighbors as we go to high-density regions as they are getting closer.
Mass of gas: In Figure 8 (bottom), we plot the variation of the gas of the host galaxy with the parameters of the local environment. It shows that the gas mass in the host galaxy decreases for both modes in high background density by ∼0.4 dex compared to low background density. If the host galaxy is within one virial radius of a neighboring galaxy, the gas in the host galaxy also decreases significantly by ∼0.8 dex compared to the AGNs beyond one virial radius of the neighbor. In order to compare the effects of the two local parameters in Figure 10 we show the contours of M gas /M N onAGN in ρ 20 − d neigh /R vir,neigh plane. The contours are not either horizontal or vertical for both radio and quasar mode AGNs. This indicates that both high local density and interactions with near neighbors make AGN host galaxies exhaust their gas.
Specific star formation rate: Star formation activity of a galaxy is influenced by its environment. In Figure 11 (top), we show the variation of specific star formation rate averaged over 100 Myr (sSFR 100 ) with background density (left) and distance to neighbor (right) in the subsample S bin . The specific star formation activity in quasar modes increases with background density by 0.2 dex.The trend is evident but very weak, as the increase is within the scatter. In both modes, the sSFR increases significantly when the distance from the neighbor decreases. In the lowest local density bin and highest distance to neighbor bins there is an increase which can be due to recent mergers but we leave the further analysis for future as number of galaxies are less.
To explore the degeneracy in the quasar mode in Figure 12 we plot the contours of star formation rate (sSFR 100 ) in the ρ 20 − d neigh /R vir,neigh plane for quasar mode. The contours are horizontal indicating that d neigh /R vir,neigh is the dominant quantity in determining sSFR in presence of a close neighbor. The high values of sSFR at the low distances to the neighbor correspond to currently interacting major merger cases ). Figure 10. Contours of total gas mass ( Mgas M N onAGN ) in AGN host galaxies in ρ 20 − d neigh /R vir,neigh plane. The red points show the distribution of AGNs in the plane. Gas mass in the host galaxy of AGN decreases in high background density as the distance to the nearest neighbor decreases. The lack of vertical or horizontal alignment in the contours suggests that AGN host galaxies in the local high-density environment or undergoing interaction exhaust their gas. Figure 11. The specific star formation rate (top) in both modes shows an increase with background density. The rest of the details are the same as Figure 5. SFR in quasar mode increases significantly when the distance from the nearest neighbor decreases. The kinematic parameter ((vrot/σ)/(vrot/σ)NonAGN; bottom) increases with background density. It shows a significant decrease with a decrease in distance to the nearest neighbor.
Kinematics: We characterize the kinematics properties of the AGN host galaxies by the parameter ((v rot /σ)/(v rot /σ) NonAGN ). In the bottom panels of Figure 11, we show the variation of the kinematics parameter with the background density and the distance to the neighbor (d neigh /R vir,neigh ). It is evident that for both modes, the kinematics of the AGN host galaxies is affected by both the background density and distance to the neighbor. The AGN host galaxies become rotation dominated in the regions with high background density, but the trend is very weak and within the scatter. If the AGN host galaxy is within the virial radius of a neighboring galaxy, the discs Figure 12. Contours of specific star formation rate (sSFR100) in quasar mode in ρ 20 − d neigh /R vir,neigh plane. The red points show the distribution of quasars in the plane. For a given SFR100 value, contours are aligned horizontally, indicating that d neigh /R vir,neigh is the dominant quantity in determining SFR in presence of a close neighbor. The high values of sSFR at low neighbors correspond to currently interacting and recent major merger cases respectively.
become pressure-supported. The environment parameters, background density, and distance to neighbor thus have the opposite effect.
In Figure 13 we show the plot of contour of (v rot /σ)/(v rot /σ) NonAGN in the ρ 20 − d neigh /R vir,neigh plane for both the modes. For a given v rot /σ d , contours are aligned horizontally for two extreme values of log d neigh /R vir,neigh . The AGNs in the region with log ρ 20 < −1 and log d neigh /R vir,neigh > 0 are isolated with no or low merger rate (figure 3 of ). Therefore, they are expected to have rotation-dominated kinematics. AGN host galaxies with close neighbors have pressure-supported kinematics. Therefore, distance to the neighbor is the dominant parameter compared to background density. This indicates that the presence of the neighbor (d neigh /R vir,neigh ) regulates the kinematics of the AGN host galaxy in all the local environments. For the distance 0 < log d neigh /R vir,neigh < 1 the contours are not horizontal indicating the influence of neighbor fades off if the distance is more than one virial radius.

DISCUSSION
The large volume of HR5 enables us to explore different environment scales while maintaining a resolution of 1 kpc. The large box size also helps explore the AGNs in two modes in different stages of evolution. In studying the effect of the environment of AGNs, we are thus able to maintain a good statistical sample size in each bin even after distinguishing the two modes and removing the effects of secular evolution. We also note that thermal efficiency is about 10 times larger in kpc-scale resolution cosmological simulations compared to observations or isolated galaxy simulations (for example; Wang et al. 2011). This might yield biased quasar bolometric luminosities and number densities which in turn can bias the comparison between simulations and observations. Since our study only compares the luminosity/accretion rate trend rather than absolute numbers, this should not alter the results. In the following text, we compare our results with the existing literature.
In Section 3.1, we observed that the star formation rate is the fundamental property that is linked to the AGN activity. We showed in Section 3.2 that distance to the neighbor is the dominant property of the environment. The gas mass is less, and AGN activity is stronger closer to the neighbor. These results indicate that the gas supply inside the galaxy is fuelling the AGN activity. In this section, we explore the origin of this gas in the host galaxy, i.e., if it is intrinsic in nature or acquired from the environment.
In Figure 14 we divide the neighbors of the AGNs into gas-rich ( M gas,neigh M tot ≥ 0.06) and gas-poor ( M gas,neigh M tot < 0.06) where M tot is total mass of the subhalo. The value of 6 % is chosen to maintain a similar population in both bins of the gas fraction. It is evident that the trend of increase in bolometric luminosity is independent of the gas mass Figure 13. Contours of kinematics of host galaxy of AGNs characterised by (vrot/σ)/(vrot/σ)NonAGN in ρ 20 − d neigh /R vir,neigh plane. The red points show the distribution of AGNs in the plane. For a given (vrot/σ)/(vrot/σ)NonAGN, contours are aligned horizontally for two extreme values of log d neigh /R vir,neigh . The AGNs in the region with log ρ 20 < −1 and log d neigh /R vir,neigh > 0 are isolated with no or low merger rate, therefore, have rotation dominated kinematics. Host galaxies with close neighbors have pressure-supported kinematics. For the distance 0 < log d neigh /R vir,neigh < 1 the contours are not horizontal indicating the effect of the neighbor on host galaxy kinematics of AGN is not dominant if the distance to the neighbor is more than one virial radius. Figure 14. Bolometric luminosity (L bol ) of AGNs with distance to the neighbor for gas-rich and gas-poor neighbors. The rest of the details are the same as Figure 5. The increase in L bol is independent of the gas fraction in the neighbor. This indicates that the gas in the host galaxy of AGNs is not likely coming from the neighbor.
fraction of the neighbor. We conclude that the gas fuelling the AGN activity is not accreted from a near neighbor. As we show in Figure 7 that the fraction of AGNs does not change with the background environment density, we conclude that the gas fuelling in AGN activity has an intrinsic origin.
Assuming that AGNs are fueled by the accretion of cold gas in the vicinity (circumgalactic medium; CGM) of the galactic center. Since quasar mode has higher luminosity (higher accretion) the amount of cold gas present near the galactic center of the galaxy in quasar mode should be more than a galaxy in radio mode. has higher AGN activity and gas fuelling the AGN activity has an intrinsic origin, the host of quasar mode galaxies should have higher cold gas near the nuclear region. Figure 15. Total cold gas mass, the cold gas mass inside 3 ckpc from center, and total hot gas mass of the host galaxies in two modes. The horizontal lines in filled regions show the first quartile (Q1), median and third quartile (Q3) in increasing order.
Points represent values beyond the minimum (Q1 -1.5 × IQR) and maximum (Q3 + 1.5 × IQR) represented by horizontal lines in increasing order, where IQR is the interquartile range. The cold mass content in the quasar mode is more than in the radio mode, especially in the inner regions of the host galaxy.
In Figure 15, we show the gas present in the quasar and radio mode AGNs. The hot gas content (T > 10 4 K) and cold gas (T ≤ 10 4 K) of the AGN host galaxies are similar in both modes. The contrast becomes more striking when the gas within the inner 3 kpc of the center of galaxies is considered. Therefore, we conclude that the gas in the AGN activity is related to the cold gas within the vicinity (circumgalactic medium; CGM) of the nuclear region. The hot gas (T > 10 4 K) supply in the radio mode AGNs is higher than in the quasar mode. Figure 7 shows that the fraction of radio mode AGNs in high density decreases. In Figure 8 we observed low effect of interaction on radio mode AGNs. These results point to hot gas accretion from the vicinity (circumgalactic medium; CGM) as the fuelling mechanism of the radio mode AGNs.
In order to test if the cold gas inside the galaxy is being pushed to the center of the galaxy fueling the AGNs in quasar mode in Figure 16 (left) we show the effect of the distance to the neighbor on the cold gas fraction (= M cold,gas /M tot,gas ) in the inner 3 kpc (f cold,3kpc ) in the host galaxies for the two modes. It can be seen that for both modes, the cold gas fraction within the inner 3 kpc of the host galaxy increases by > 1 dex as the distance to the neighbor decreases. Thus, the presence of a neighbor helps decrease the angular momentum of the gas due to dynamical friction and tidal effects to funnel it toward the center (D'Onghia et al. 2006) of the galaxy in quasar mode more efficiently, leading to higher AGN activity.
We consider a cutoff distance of 3 cMpc from the AGN and use the tidal estimator, which compares the tidal forces with the internal binding force of the galaxy (Verley et al. 2007;Sabater et al. 2013) given by: where M AGN and M i is the total mass of the galaxy and i-th neighbor respectively, R AGN is the half stellar mass radius of the galaxy and d i,t is the distance to the i-th neighbor. In Figure 16 (right) we show the cold gas fraction inside the inner 3 ckpc of the galaxy with a tidal estimator. It is evident that with an increase in the strength of the tidal forces, the gas in the inner regions of the AGN increases by > 0.5 dex for both modes, but radio mode shows a large scatter. Therefore, we conclude that the tidal interaction with the neighbors pushes the gas inside the galaxy toward the central region, increasing the AGN activity.
As shown in the analysis above, distance to the neighbor and cold gas content of the host galaxies are shown to affect the AGN activity. We note that the cold gas content must be closely related to the interaction (especially at high Figure 16. Cold gas (T < 10 4 K) fraction (fg = M cold,gas /Mtot,gas) inside 3 ckpc from center AGNs with distance from the neighbor (left) and tidal force estimator (Q; right). The rest of the details are the same as Figure 5. With a decrease in the distance to the neighbor and an increase in the tidal interaction with neighbors, gas in the host galaxy is pushed toward the central regions of the galaxy. redshifts) with neighbors and mergers as satellites will bring new cold gas to the central. A direct comparison of the two therefore should be done in light of this information. We compare these the distance to the neighbour (d neigh /R vir,neigh ) and the fraction of cold gas mass (f cold = M cold /M gas ) in Figure 17. In the region where environmental effects become important (log d neigh /R vir,neigh ≤ 0) for galaxies which are cold gas-rich (log f cold > −2) the contours are vertical showing that AGN activity is determined by the cold gas fraction of host galaxies in the quasar mode. For the galaxies not rich in cold gas mass the contours are horizontal, showing that environmental effect becomes important in determining the AGN activity.
In Figure 18 we further explore the effect of the environment in the gas-poor galaxies with logf cold < −2.5 in the host galaxy of AGNs. We show the changes in the bolometric luminosity (L bol /L scale ) with a decrease in distance to the neighbor (d neigh /R vir,neigh ) for different morphology of the nearest neighbor. For visualization, we shift the radio mode values by 1 dex in y-axis. It is evident that for both modes with the late-type neighbor, with Sérsic index (n neigh ) < 1.5 the bolometric luminosity increases with a decrease in the distance to the neighbor within one half virial radius. The increase is 1 dex for quasar-mode galaxies and less than 0.5 dex for radio-mode galaxies. For an early-type morphology (n neigh ≥ 1.5) of neighbor there is no clear trend as the distance to neighbor decreases. Therefore, we conclude that although it does not change the overall trend with the environment, the morphology of the neighbor is also important in regulating the AGN activity.
Our interpretation of interaction playing a role in the quasar mode agrees with the previous studies Di Matteo et al. 2005). Kawata & Gibson (2005) who concluded that the AGN phase is triggered and regulated by the gas inflow in the nuclear region of the galaxies using high-resolution simulation. The results discussed here also match the results from Bhowmick et al. (2020), who used IllustrisTNG simulation and concluded that interaction increases the AGN activity but plays a minor role. Our results complement the findings of Trump et al. (2013) who reported that more luminous AGNs are associated with blue star-forming galaxies and concluded that the process fuels AGN and results in efficient star formation. Our results agree well with Ellison et al. (2011) who showed that AGN activity starts well before the mergers. Satyapal et al. (2014) also found that merger can increase the activity of the AGNs detected in infrared wavelengths. Duplancic et al. (2021) studied AGNs in pairs, triplets, and groups. They found twice the fraction of powerful AGNs residing in pairs and triplets than in regular AGNs. They reported that distance to the neighbor increases the AGN fraction in triplets but does not change it for galaxies in pairs. Our results complement these findings that the effect of a near neighbor would make AGNs more luminous and detectable in the observations. Man et al. (2019) using SDSS concluded that internal secular evolution is the dominant mechanism for AGN triggering and environment plays a minor role. At a low redshift, Smethurst et al. (2021) studied outflows from the AGNs to test the importance of mergers in triggering the AGNs. They concluded that the non-merger-driven processes (internal processes) are sufficient for triggering the AGNs. We find a similar trend in our analysis presence of cold gas in the Figure 17. Contours of bolometric luminosity (L bol /L scale ) in the f cold − d neigh /R vir,neigh plane for Quasar galaxies. f cold is the fraction of cold gas (T < 10 4 K) mass in the host galaxies. The red points show the distribution of AGNs in the plane. For galaxies that are cold gas-rich (log f cold > −2)for (d neigh /R vir,neigh ≤ 0) the contours are vertical showing that AGN activity is determined by the cold gas fraction content of host galaxies in the quasar mode. For the host galaxies not rich in cold gas the contours are horizontal, suggesting that environmental effects are important in determining the AGN activity. Figure 18. Bolometric luminosity of AGNs (L bol /L scale ) with total cold gas (T < 10 4 K) with distance from the neighbor (d neigh /R vir,neigh ). For visualization, we shift the radio mode values by 1 dex in y-axis. Quasar and radio mode with a late-type neighbor (n neigh < 1.5) show an increase in L bol /L scale with a decrease in the distance to the neighbor within one virial radius by 1 and < 0.5 dex respectively. For early-type morphology (n neigh ≥ 1.5) there is no clear trend.
AGN host galaxy is the dominant property, and the environment plays a role in funneling this gas toward the central black hole. We find complementary results to Sabater et al. (2013), who studied the environment of optical and radio galaxies. The analysis showed low nuclear activity in AGNs residing in high-density environments due to a lack of gas supply. Optical AGNs require the presence of cold gas, and one-to-one interaction enhances the presence of AGNs. They also found that radio mode AGNs are triggered by gas cooling from the environment. Treister et al. (2012) studied AGNs in the luminosity range 10 43 − 10 46 erg s −1 in the redshift range (0 < z < 3). They reported at higher redshift (z > 2), merger-triggered AGNs play a significant role in the growth of central black holes, whereas at low redshifts secular processes become important. For the low redshifts, they concluded the availability of gas plays a crucial role in determining the black hole growth. Their study matches the luminosities of AGNs in HR5 and supports our conclusions.
Recently, Uchiyama et al. (2022) studied the evolution environment around radio galaxies in the redshift range z = 0.3 − 1.4. They estimate the environment of galaxies with the k-neighbor density method. They reported that low mass radio galaxies (M * < 10 11 M ⊙ ) reside in similar environment (overdensity ∼ 1) as the control sample. The projected distance to the neighbor was similar for less massive radio galaxies compared to the control sample. They concluded that massive radio mode galaxies grew by experiencing mergers at redshift z > 1.4 whereas low mass radio galaxies grew by accretion. For the redshift and stellar mass range considered in our study, these results match well with our finding that radio mode AGNs grow by hot-mode accretion and environment plays a minor role.
Thus, with good statistical samples in all the environments and the study of AGNs in the two modes, this study thus provides a unique vantage point to compare with observations (which suffer from incompleteness) and simulations (which suffer from sample size). Our results favor the scenario of internal properties being the dominant factor in controlling nuclear activity, and the environment starts playing a role within a distance of half virial radius of the AGN host galaxy.

SUMMARY
In this work, we explored the effect of the local environment on the properties of AGN host galaxies in Horizon Run 5. We classify AGNs into radio and quasar mode galaxies based on their Eddington ratio. We study the effects on AGN activities of the intrinsic properties of host galaxies, background density, and distance to neighbor.
We demonstrated through our analysis that the AGN activity in quasar mode is correlated with the star formation rate and stellar metallicity of the host galaxy. The star formation rate is the property that is strongly correlated with the bolometric luminosity. The radio mode on the other hand shows much less variation in the AGN activity with these intrinsic parameters. Comparing various internal properties that correlate with AGN activity in quasar mode AGN, we demonstrated that the star formation rate has the strongest correlation.
We studied the effect of the environment using two parameters that capture the environment at two scales: the background density and distance to the neighbor. We found that the AGN activity of the galaxy shows an increase with both proximity to a neighbor and higher background density. Total gas mass, on the other hand, shows a decrease with the increase in background density and proximity to a neighbor. Star formation in quasar mode follows the same pattern of increase. Comparing the two environment parameters, we demonstrated proximity to the neighbor is the dominant parameter regulating the AGN activity and star formation rate in quasar mode. Interaction with neighbors also determines the gas content and kinematics of the host galaxies of AGN in both modes.
We found that the AGN activity in quasar mode relates to the gas content inside the host galaxy. The quasar mode AGN contains intrinsically more gas than the radio mode AGN. The cold gas content gas inside the 3kpc cut of the central black hole in the quasar mode is significantly more than the radio mode galaxies. We demonstrate that interaction with the environment helps the gas in the host galaxy to lose angular momentum and to fall towards the center in quasar mode triggering AGN activity more efficiently. We found that radio mode AGNs contain more hot gas than quasar mode. The fraction of radio mode in the high-density environment also decreases.
Our results support the scenario that the internal parameters, such as gas content, govern the AGN activity. Cold gas content inside the vicinity of the supermassive black hole predominantly governs the AGN activity in quasar mode, whereas radio mode is supported by gas accretion of hot gas inside the host halo. The environment becomes important in the quasar mode AGN by funneling the cold gas toward the central black hole when the nearest neighbor is within a distance of half the virial radius.
With the availability of new observations in the future, it will be interesting to compare these results with a statistically good sample at different redshifts and study the evolution of AGN in the Universe. Interaction with the neighbor makes the total gas inside the AGN get consumed. A fraction of gas is converted to stars, and the other is accreted on the central black hole powering the AGN. This fraction of gas varies for different galaxies and is a function of distance to the neighbor. Tracing the evolution of AGN undergoing an interaction in HR5 may reveal more details on this process, and we reserve this for future work.