Ship density is widely accepted as a basic and major indicator to reflect the marine traffic situation, but it has some limitations in representing the compactness and complexity of ship traffic. To overcoming these limitations, the paper proposes a novel ship density model based on the radial distribution function in molecular dynamics. The proposed model can identify the density and compactness of traffic around each ship and then map the ship density from a microscopic perspective. In addition, the proposed model can identify the global density and the complexity of ship traffic to some extent in the macroscopic perspective. Utilising case studies, the effectiveness of the proposed model is validated through the analysis of ship density in several regions in the Bohai Strait area. The proposed model is developed to help marine surveillance operators gain a better understanding of the traffic situation and to assist them in their work, eventually contributing to navigational safety.