A molecule is a set of atoms connected by covalent bonds. A bond, of course, is not an actual physical structure but an energetic restriction on the position of atoms. This definition is quite easily translated into a computational geometry definition: a molecule is a set of points, whose positions are restricted by various properties, including distace and angle between them.
Even though bonds are not "real" structures, it is easiest and most useful to visualize a molecule as a set of points connected by rigid edges, whose angles and lengths are restricted. In other words, a molecule is a linkage, with certain restrictions.
A protein could be modelled this way, but since proteins are very large molecules, such a model would be extremely complicated to make. Furthermore, any computer simulation of folding using a model that included all atoms and bonds would be prohibitively inefficient. Nonetheless, complicated models are more realistic and are useful and accurate for predicting the conformations of small molecules. To understand this method of modelling, the water molecule provides a simple example:
A water molecule has 2 hydrogen (H) atoms and one oxygen (O) atom, which are connected like this: H-O-H. This structure can be represented in the following matrix:
H(1) H(2) O H(1) N N S(c1) H(2) N N S(c1) O S(c1) S(c1) N
N means no bond, S means single bond, and c1 is the length of the bond. What about bond angles? Every set of three atoms forms a triangle a1a2a3, and the angle of this triangle can be represented by a single constant, the distance from a1 to a3. Water has only 3 atoms, so some constant c is sufficient to describe the angle. Thus, with the matrix and the constant c, the structure of water can be determined.
(This information, including the matrix for water, came from reference 1 below.)
Once the structure is known mathematically, it is possible to determine the conformation space--that is, the space encompasing all possible positions of the molecule. Many organic molecules can exist in several different shapes, or conformations. One example is cyclohexane (a ring of six carbon atoms.) Methods used to determine conformation space of cyclohexane mathematically, when using the actual atomic bond-angle restrctions, result in different "families" of shapes. These families ("chair" and "boat") correspond to the known actual conformations of cyclohexane. These conformations, in simplified linkage form (carbon atoms are points, bonds are lines, and hydrogen atoms are ingored) are shown below.
As can be seen from these applets, a boat can change to a chair and vice versa. Furthermore, if no restrictions are imposed on bond angles, then a "knotted" conformation can be achieved, something which would never occur in a real molecule.