adding functionality to write_cell_basis.py