Improved prediction of protein side-chain conformations with SCWRL4. SCWRL4 is based on a new algorithm and new potential function that results in improved accuracy at reasonable speed. This has been achieved through: 1) a new backbone-dependent rotamer library based on kernel density estimates; 2) averaging over samples of conformations about the positions in the rotamer library; 3) a fast anisotropic hydrogen bonding function; 4) a short-range, soft van der Waals atom-atom interaction potential; 5) fast collision detection using k-discrete oriented polytopes; 6) a tree decomposition algorithm to solve the combinatorial problem; and 7) optimization of all parameters by determining the interaction graph within the crystal environment using symmetry operators of the crystallographic space group. Accuracies as a function of electron density of the side chains demonstrate that side chains with higher electron density are easier to predict than those with low electron density and presumed conformational disorder. For a testing set of 379 proteins, 86% of chi1 angles and 75% of chi1+2 are predicted correctly within 40 degrees of the X-ray positions. Among side chains with higher electron density (25th-100th percentile), these numbers rise to 89% and 80%. The new program maintains its simple command-line interface, designed for homology modeling. To achieve higher accuracy, SCWRL4 is somewhat slower than SCWRL3 when run in the default flexible rotamer model (FRM) by a factor of 3-6, depending on the protein. When run in the rigid rotamer model (RRM), SCWRL4 is about the same speed as SCWRL3. In both cases, SCWRL4 will converge on very large proteins or protein complexes or those with very dense interaction graphs, while SCWRL3 sometimes would not.