BACKGROUND: Beam modifying accessories for proton therapy often need to be placed in close proximity of the patient for optimal dosimetry. However, proton treatment units are larger in size and as a result the planned treatment geometry may not be achievable due to collisions with the patient. A framework that can accurately simulate proton treatment geometry is desired. PURPOSE: A quantitative framework was developed to model patient-specific proton treatment geometry, minimize air gap, and avoid collisions. METHODS: The patients external contour is converted into the International Electrotechnique Commission (IEC) gantry coordinates following the patients orientation and each beams gantry and table angles. All snout components are modeled by three-dimensional (3D) geometric shapes such as columns, cuboids, and frustums. Beam-specific parameters such as isocenter coordinates, snout type and extension are used to determine if any point on the external contour protrudes into the various snout components. A 3D graphical user interface is also provided to the planner to visualize the treatment geometry. In case of a collision, the frameworks analytic algorithm quantifies the maximum protrusion of the external contour into the snout components. Without a collision, the framework quantifies the minimum distance of the external contour from the snout components and renders a warning if such distance is less than 5 cm. RESULTS: Three different snout designs are modeled. Examples of potential collision and its aversion by snout retraction are demonstrated. Different patient orientations, including a sitting treatment position, as well as treatment plans with multiple isocenters, are successfully modeled in the framework. Finally, the dosimetric advantage of reduced air gap enabled by this framework is demonstrated by comparing plans with standard and reduced air gaps. CONCLUSION: Implementation of this framework reduces incidence of collisions in the treatment room. In addition, it enables the planners to minimize the air gap and achieve better plan dosimetry.