This paper presents a virtual coupling (VC) train convoy composition optimization framework to create a multiple formation structure maximizing the capacity benefit while considering transportation requirements and system limitations. First, the operational constraints of VC trains in the convoy formation process are mapped as headway time transitions. A coordination strategy is proposed by utilizing the natural deceleration process at junctions to minimize the negative effects of the coupling process. Multiple composition structures are created by forming varied potential convoys that adhere to these constraints and transportation schedules. Second, a utility function for convoy composition is modeled using the coalition formation game theory to quantify the operational efficiency of VC trains passing through bottleneck sections. It reveals that coupling time and convoy structure are interdependent factors that jointly impact the capacity benefits. Thirdly, a train convoy formation algorithm is proposed to determine the optimal convoy composition by comparing formation structures, designing preference relations, and estimating lower bounds. This algorithm guarantees the convergence of the optimal structure result. Finally, the proposed framework is evaluated on four typical rail transit market segments and transportation organization scenarios. The application results demonstrate that the optimized convoy structures increase capacity benefits in the four typical market segments by 26.1%, 30.7%, 24.7%, and 18.9%, respectively. VC improves the capacity of the bottleneck sections by increasing the operating density. The present study lays a theoretical foundation for strategic-level applications of virtual coupling.