Theoretical studies on relation among structures, electric structures and magnetic interactions in MMX complexes