The TOPAS Tool for Particle Simulation was developed to make Geant4 Monte Carlo simulation more readily available for research and clinical physicists. Before releasing this new tool to the proton therapy community, several test have been performed to ensure accurate simulations in a variety of proton therapy setups. TOPAS can model a passive scattering or scanning beam treatment head, model a patient geometry based on CT images, score dose, fluence, etc., save and replay a phase space, provides advanced graphics, and is fully four-dimensional (4D) to handle variations in beam delivery and patient geometry during treatment. An innovative control system meets requirements for ease of use, reliability and repeatability without sacrificing flexibility. To test the TOPAS code, we modeled proton therapy treatment examples including the UCSF eye treatment beamline (UCSFETB), the MGH STAR radiosurgery beamline and the MGH gantry treatment head in passive scattering and scanning modes. The simulations included time-dependent geometry and time- dependent beam current delivery. At the UCSFETB, time- dependent depth dose distributions were accurately simulated with time- varying energy modulation from a rotating propeller. At the MGH STAR beamline, distal and proximal ranges agreed within measurement uncertainty and the shape of the simulated SOBP followed measured data. For the MGH gantry treatment head in passive scattering mode, SOBPs were simulated for the full set of range modulator wheel and second scatterer combinations. TOPAS simulation was within clinical required accuracy. For the MGH nozzle in scanning mode, a variety of scan patterns were simulated with fluence maps generated for cases including beam current modulation, energy modulation and target tracking. Our results demonstrate the functionality of TOPAS. They show agreement with measured data and demonstrate the capabilities of TOPAS in simulating beam delivery in 3D and 4D. This work was supported by IH/NCI under R01 CA 140735-01.