## 2 Method  
Our work was carried out using classical molecular dynamics simulations, which were proven to be able to efficiently model the separation of gas mixtures by means of a graphene membrane [26]. All computations were performed using the Large-scale Atomic/Molecular Massively Parallel Simulator (LAMMPS) software [27]. The \"in silico\" experimental setup employed to address gas filtration efficiency of porous graphene membranes is reported in Figure 1 and it follows a well-established computational approach [26]. The nanoporous graphene membrane is located in the middle of the supercell. The left side, referred to as feed, contains 400 molecules, divided equimolarlybetween two gas species among CO\({}_{2}\), H\({}_{2}\)S and CH\({}_{4}\), while the right part, the permeate, is left empty at the beginning of the simulation. In the feed, a graphene piston is also placed to generate the pressure that pumps the gas during the experiments. During the simulation, the piston compresses the gas at a pressure of 100 bar, pushing the gas molecules toward the membrane. A theoretical study reported that nanoporous graphene can withstand pressures larger than 500 bar [19]. Graphene membranes are therefore expected not to break during the gas purification process which usually involves much lower pressures. The simulation box dimensions are 42 \(\times\) 42 \(\times\) 340 A, with periodic boundaries conditions along the \(x\) and \(y\) directions and reflecting walls along the \(z\) direction. The temperature is maintained constant at the value of 300 K using a Nose-Hoover thermostat. The simulations are carried out for 51 ns with a timestep of 0.3 fs. Before the separation phase starts, an equilibration step is conducted applying a small piston pressure. After about 0.1 ns the system can be considered to be at the equilibrium and the separation process starts increasing the pressure generated by the piston to 100 bar. During the simulation we counted the number of molecules that passed through the pore of the graphene membrane, in order to calculate membrane permeance and selectivity. The permeance is defined as the amount of molecules that crosses the membrane per unit of pressure, time and area of the membrane, and it is expressed in Gas Permeation Units (GPU; 1 GPU = 3.35\(\times\)10\({}^{-10}\) mol s\({}^{-1}\) m\({}^{-2}\) Pa\({}^{-1}\)). The selectivity is the ratio between the permeances of the two gases from which the feed is composed. The pair interactions between carbon and hydrogen atoms in graphene and methane are modeled by the AIREBO potential [28]. For the H\({}_{2}\)S and CO\({}_{2}\) molecules we used a combination of Lennard-Jones and Coulombic potential for the interatomic interaction whereas a harmonic potential for the bonded interactions [4]. We employed the Lorentz-Berthelot mixing rule to evaluate the cross parameters. We studied four types of nanoporous membranes having different pores referred to as pore P1, P2, P3 and P3 OH as shown in Figure 2.  
P1 is a nearly circular pore obtained by removing 13 carbon atoms from the graphene lattice and passivating the unsaturated carbons with hydrogen atoms. P2 is obtained removing 14 carbon atoms from the graphene lattice forming a more elongated shape with respect to P1. As before, carbon dangling bonds are passivated with hydrogen atoms. P3 is the largest pore, obtained removing 16 carbon atoms and it is functionalized with hydrogens as for the other pores. The last pore, P3 OH, corresponds to the pore P3 but with a different functionalization at the pore edges constituted by alternating hydroxyl groups and hydrogens. We highlight that experimentally it is possible to alter the shape, size and functionalization of the graphene pores so as to reproduce the types of pore we are analyzing. For instance, tilting the angle of the electron beam, which is used to locally knock the carbon atoms off the sheet, is said to give rise to more elongated pores [29]. Exposing graphene to  
Figure 1: Example of a structure modeling the gas separation process.