Magnetic interactions in compounds based on nickel phthalocyanines and pyridine