Structural Underpinnings Of Magnetic And Electronic Behavior In Transition Metal Oxides And Chalcogenides