piezo electricity is the relation between length and electric field. Thus you might take a finite lenght carbon nanotube and imbed it in an electric field and calculate the lenght as a function of the electric field. This can be done in ATK
Some software can calculate the coefficient with pertubation theory, I think the pwscf code can do this.