The global pandemic of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) has become an urgent public health problem. Spike (S) protein mediates the fusion between the virus and the host cell membranes, consequently emerging as an important target of drug design. The lack of comparisons of in situ full-length S homotrimer structures in different states hinders understanding the structures and revealing the function, thereby limiting the discovery and development of therapeutic agents. Here, the steady-state structures of the in situ full-length S trimer in closed and open states (Sclosed and Sopen) were modeled with the constraints of density maps, associated with the analysis of the dynamic structural differences. Subsequently, we identified various regions with structure and property differences as potential binding pockets for ligands that promote the formation of inactive trimeric protein complexes. By using virtual screening strategy and a newly defined druggable cavity, five ligands were screened with potential bioactivities. Then molecular dynamic (MD) simulations were performed on apo protein structures and ligand bound complexes to reveal the conformational changes upon ligand binding. Our simulation results revealed that sulforaphane (SFN), which has the best binding affinity, could inhibit the conformational changes of S homotrimer that would occur during the viral membrane fusion. Our results could aid in the understanding of the regulation mechanism of S trimer aggregation and the structure-activity relationship, facilitating the development of potential antiviral agents.