twisting CNT using script

Dear everyone,

I am trying to build a model of twisted carbon nanotubes as shown in the figure. I know that we can twist it with a movements module, but when it comes to larger models or larger twisting laps, this job becomes difficult. I wonder if there are some scripts that can make it easy. However, I am really new to how to write scripts. So if someone will give me some help, I will be very grateful.

Thanks in advance,

Jamie