potential energy of a bond?



 Hi,
    I think this is rather a trivial question but
 never mind. I'd like to know how potential energy of
 a bond length or bond angle is calculated. The reason
 for this enquiry is that we want to calculate force field
 parameters from semi-empirical or ab-intio calculations.
 I thought that one possiblity is to take a known
 molecular structure and vary one aspect of it. For
 example shrink and stretch a bond length and from this
 calculate a energy/Angstrom force constant.
 Is this approach sensible or is there an easier way?
 Thanks
 Andy