set unit_cell.lenghts if they are not given in trajectory.to_compound