debug fix calc_seq_energy