Text this: Simulation of Structural Transformations in Modified Near-Surface Layers of Crystals