A deformable Gay-Berne model for the simulation of liquid crystals and soft materials