I have developed an open-source code based on geant4.10.5 called g4linac_mt which facilitates the use of geant4 toolkit for the simulation of medical linear accelerator by using C++, Java and bash scripting. The hdf5c++ library has been used to produce phase space I/O routines based on hdf5 file format.
The code can be downloaded from:
Required dependencies for G4Linac_MT C++ code
ROOT data analysis framework (version 6.14.06)
gcc >= 5.4.0
cmake >= 3.13.2
HDF5 C++ API (hdf5-1.10.4)
Required dependencies for G4Linac_GUI Java-based application
I hope that geant4 developers will in near future contribute in the improvement of the present open source code.