Structure-property relationships of binary and ternary metal pnictides for energy applications