This paper presents the design, implementation and application of a constraint programming framework on 3D crystal lattices. The framework provides the flexibility to express and resolve constraints dealing with structural relationships of entities placed in a 3D lattice structure in space. Both sequential and parallel implementations of the framework are described, along with experiments that highlight its superior performance with respect to the use of more traditional frameworks (e.g. constraints on finite domains and integer programming) to model lattice constraints. The framework is motivated and applied to address the problem of solving the protein folding prediction problem, i.e. predicting the 3D structure of a protein from its primary amino acid sequence. Results and comparison with performance of other constraint-based solutions to this problem are presented. Copyright ©2007 John Wiley & Sons, Ltd.