The extensive spread of COVID-19 in every continent shows that SARS-CoV-2 virus has a higher transmission rate than SARS-CoV virus which emerged in 2002. This results in a global pandemic that is difficult to control. In this investigation, we analyze the interaction of N3 inhibitor and the main protease of SARS-CoV and SARS-CoV-2 by quantum chemistry calculations. Non-covalent interactions involved in these systems were studied using a model of 469 atoms. Density Functional Theory and Quantum Theory of Atoms in Molecules calculations lead us to the conclusion that non-conventional hydrogen bonds are important to describe attractive interactions in these complexes. The energy of these non-conventional hydrogen bonds represents more than a half of the estimated interaction energy for non-covalent contacts. This means that hydrogen bonds are crucial to correctly describe the bonds between inhibitors and the main proteases. These results could be useful for the design of new drugs, since non-covalent interactions are related to possible mechanisms of action of molecules used against these viruses.