Characterization of the nonregular regions of proteins by a contortion index