A protein molecule adopts a specific 3D structure, necessary for its function in the cell, through a process of folding. Modelling the folding process and predicting the final fold from the unique amino acid sequence remain challenging problems. We have previously described the application of L-systems, parallel rewriting rules, to modelling protein folding using two complementary approaches: a physics-based approach, using calculations of interatomic forces, and a knowledge-based approach, using data from fragments of known protein structures. Here we describe a model combining these two approaches creating an adaptive stochastic open L-systems model of protein folding. L-systems were originally developed to model growth and development. Here we also describe extensions of our L-systems models to investigate cotranslational protein folding, i.e. folding during protein biosynthesis on the ribosome, which is increasingly thought to play an important role. We demonstrate that cotranslational folding fits very naturally into the L-systems framework.