How do we get to a molecular model of geometry?

Start with an approximate geometry, with atoms in roughly the right positions
relative to each other: modelling programs provide some means, usually
graphical, to build molecules

Need a method of calculating an energy for a geometry, which
will change as bond lengths and angles change: the program does this
calculation

The program changes the bond lengths and angles in small steps, usually
changing all of them a small amount in each step

After each step, the program calculates the energy again

The basic principle is: insofar as the method of calculating the
energy is a good one, then the geometry which gives the lowest energy,
i.e. the most stable structure, is the best model geometry