modify writePOSCAR to output POSCAR 5