add "exact", "diag" as a choice for algo
updated the functions which is not directly related to generating the defect supercells