Discrete molecular dynamics studies of the folding of a protein-like model