Code and designs for 1-dimensional (chain) folding structures