In this study, the polymer membranes are modeled as flexible, with their integrity maintained using harmonic bond, angle, and dihedral potentials based on the DREIDING forcefield, which is a general forcefield that has been applied previously to study gas transport in polymeric membranes. It is important to note that improper dihedral angles from DRIED-ING are not included, as these potentials are not implemented in GROMACS. However, simulations indicate no significant changes in the polymer structures with or without the improper dihedral angles. A force constant of 10 kJ/mol is applied to a randomly selected carbon atom in the center of the membrane to maintain its position within the simulation box. Although the polymer consists of multiple chains, its integrity remains stable throughout the simulations, due to the entanglement of the polymer chains. The TRAPPE forcefield is employed for both N 2 and CO 2 gases, as it reliably reproduces the correct phase properties at the temperatures of interest.