you may try build structure that option, also you can sketch it. Please check there are some available built-in structures too. Then, you may choose CASTEP for running the simulation.
You can build heterostructure system like the g- C3N4/TiO2 in CASTEP, in two steps
The First step,
1. Build → Build layers.
2. Chose the layer 1, g- C3N4.
3. Chose the layer 2, TiO2
4. Chose (builds layered structure as a surface) → Build
The second step is to add a suitable vacuum, you must add a vacuum space larger than 20 Å in the vertical direction to prevent the interaction between the neighbouring layers, as following:.
1. Build → crystals → build vacuum slab crystal→ change vacuum thicknesses to 20 Å or higher → Build
But, you must consider in mind that there is an important condition must be available in any heterostructure which is: the lattice mismatch between g- C3N4 and TiO2 is smaller than 5%. If this percent more than 5%, this heterostructure may be not stable.