Model Investigation of the Mechanism of Interaction between Ligands and Proteins in Hemoproteins