Computational Studies of Structural Motifs And Cotranslational Folding Mechanisms In Membrane And Soluble Proteins