Analysis, design and modification of loop regions in proteins