Structural flexibility plays an important role in protein function and is essential for the protein-protein and protein-ligand recognition mechanisms known as induced- and selected-fit. Surface loops, which typically participate in such processes, can prevail in flexibility states ranging from a random coil to a well defined structure, where a loop resides in a single wide microstate (WM), defined by local structural fluctuations. A loop can also exhibit intermediate flexibility, where several WMs are populated significantly in thermodynamic equilibrium. To date structure determination of large loops is still an unsolved problem in homology studies. None of the existing approaches has addressed the problem of loop flexibility in a systematic way. A statistical mechanics methodology for treating flexibility was developed recently by us and applied successfully to predict the solution structures and populations of cyclic peptides in DMSO. In this project it will be extended to protein loops in water. This methodology consists of (1) a novel optimization of atomic solvation parameters (ASPs), (2) an extensive conformational search using our local torsional deformations (LTD) method for identifying the most stable WMs, and (3) simulating these WMs by Monte Carlo and calculating their free energies (hence populations) with our local states (LS) method. The loop energy is defined by a force field and a solvation term which depends on the ASPs. The optimized ASPs are those for which the global energy minimum structure of the loop becomes the loop's X-ray structure. This procedure differs from the common derivation of ASPs, which is based on the free energy of transfer of small molecules from the gas phase to water. We have already optimized ASPs for a loop of ribonuclease A based on the OPLS and AMBER force fields. Exceptionally good results obtained with AMBER. The transferability of the ASPS will be tested by studying hypervariable loops of antibodies and other known loop structures. Problems addressed by CASP5 will be attacked as well. We shall concentrate on the intermediate flexibility of loops participating in enzyme binding, catalysis, and recognition processes that are important in rational drug design. To be able to treat long loops, the efficiency of the LTD and LS methods will be enhanced. Our unique tools are applicable to a wide range of problems in structural biology, such as protein engineering, docking, and threading.