Phase diagram and properties of silica: Lattice and molecular dynamics study