Is there a script to tweak individual segments? I can only turn complete strands at a time.
The tweak tool is available only in the user interface. Long ago, there were tweak functions that recipes could use. These functions have now been removed. For a long time, the tweak functions didn't do anything.
You might be interested in what I call "the Timo swap", a technique Timo van der Laan demonstrated in a "black belt folding" video.
The Timo swap involves using structure mode to change a sheet (strand) to a helix or a helix to a sheet. (In the original interface, use structure mode to apply and "paint" secondary structure. In the selection interface, you select the segments you want to change, then use the structures tool to apply a new secondary structure.)
Once you've made the swap, you can use the "rotate" function for a helix on what is actually a sheet. Similarly, you can use the "shift" function for a sheet to flip what is actually a helix.
The actual shape of the segments doesn't matter, only the currently defined secondary structure. You can change the secondary structure most of the time, with some exceptions for locked segments and ligands.
When flipping or rotating, you'll probably want to use cutpoints on either end of the section you're working on.
So you could define a single segment as sheet or helix, and make the segments on either side loop. By making cuts on either side, you can then flip or rotate just one segment. I don't think I've tried working on just one segment this way, so I'd add "in theory" to that.
For reference, the removed functions were:
It's not clear when these functions actually did anything. I started at the end of 2012, and I don't recall them ever working. They were "unimplemented" for years, possibly to avoid breaking recipes. It appears they have now been removed entirely, probably in the last year or so.