Generate unfolded structures of the proteins
Unfolding can be done in a number of ways. One is to perform molecular dynamics simulations at high temperature of the folded structure and then geometry optimize randomly chosen structures. Another, which is the route chosen here, is to geometry optimize with a constraint that forces the proteins' N- and C-terminal residues to be a certain distance apart.
The example program chooses a value of 20 Å as the target constraint distance between the N atom of the N-terminal glycine and the C atom of the C-terminal glycine. This distance is actually about half the maximum that is possible between these atoms, but has been chosen so as to reduce the size of the water box that is necessary to adequately solvate both the folded and unfolded structures.