fixed write pdbs best score
fixed masses bug
added get_position_terminal_residue