Preparation of long monatomic carbon chains: Molecular dynamics studies