Molecular dynamics of small alkanes in an external force field