Abstract
Context. Cold, dense cores are unique among structures found in the interstellar medium, as they harbor a rich chemical inventory, including complex organic molecules (COMs), which future evolutionary stages, such as protostellar envelopes and protoplanetary disks, will inherit. These molecules exist both in the gas phase and as ices accreted onto grain surfaces.Aims. To model these environments, we present PEGASIS: a new, fast, and extensible three-phase astrochemical code designed to explore the chemistry of cold cores, with an emphasis on the role of diffusive and nondiffusive chemistry in shaping their gas and grain chemical compositions.Methods. We incorporate the latest developments in interstellar chemistry modeling by utilizing the 2024 Kinetic Database for Astrochemistry chemical network and comparing our results with current state-of-the-art astrochemical models. Using a traditional rate-equation-based approach, we implement both diffusive and nondiffusive chemistry, coupled with either an inert or a chemically active ice mantle.Results. We identify crucial reactions that enhance the production of COMs through nondiffusive mechanisms on the grain surface, as well as the mechanisms through which they can accumulate in the gas phase. Across all models with nondiffusive chemistry, we observe a clear enhancement in the concentration of COMs on both the grain surface and in the grain mantle. Finally, our model broadly reproduces the observed abundances of multiple gas-phase species for the Taurus Molecular Cloud (TMC-1) and provides insights into its chemical age.Conclusions. Our work demonstrates the capabilities of PEGASIS in exploring a wide range of grain surface chemical processes and modeling approaches for three-phase chemistry in the interstellar medium, providing robust explanations for observed abundances in cold cores, such as TMC-1 (CP). In particular, it highlights the role of nondiffusive chemistry in the production of gas-phase COMs on grain surfaces, which are subsequently chemically desorbed, especially when the precursors involved in their formation on the surfaces are heavier than atomic hydrogen.