An algorithm which predicts the conformation of short lengths of chain in proteins