Energy minimization is one of the main approaches to the computational determination of macromolecular structure. Due to the approximations in the empirical free-energy functions and due to the computational difficulties in locating their global minima, the problem is at present intractable when the only information available is the sequence of subunits forming the molecule. A less-demanding problem in terms of both physics and mathematics is constrained optimization, which uses additional but incomplete experimental information such as distances between certain atoms. This paper reviews methods for generating molecular structure using bond lengths and angles as variables and shows how the structure can be fully specified in terms of local geometry. The analysis permits precise statements to be made about the minimum set of distances that specify a unique structure without recourse to energy minimization. We then discuss the complementary situation, i.e., structure prediction with energy minimization based only on sequence information. Finally, we show how distance constraints can be incorporated into energy minimization methods.