new algorithem to calculate structure factor for output of model_plot
new algorithem to cal structure factor (f4) and now able to switch between long full slab and short full layer slab