Molecular dynamics simulation of ion selectivity process in nanopores