Modeling crystal growth by gas-solid phase transition at atomic level