Different molecule builder tools have different ways of assigning angle, dihedral, and improper parameters according to atom type.
If you are using moltemplate, then the procedure is demonstrated graphically on slides 51-54 of this PowerPoint presentation:
…and explained in detail in chapter 6.2 the moltemplate manual:
The way you do this in topotools is explained here:
I’d add that doing this manually is somewhat unusual. When simulating a reasonably complex system it would be tedious to write these rules yourself (for every possible quarter of atom types in your molecules).
People frequently use force fields like OPLSAA, CHARMM, AMBER(GAFF,GAFF2), GROMOS, COMPASS, PCFF, CVFF, …
Moltemplate currently includes a database of all of the OPLS, GAFF, GAFF2, and COMPASS force field parameters (and angle, dihedral, improper generation rules, and in some cases, rules for generating partial charges.) These rules are written using the same syntax I mentioned above. Simple examples of force fields in moltemplate format are located here:
The EMC molecule builder includes the
Born, COMPASS, PCFF, CHARMM, OPLS, CVFF force fields.
In both programs some of the COMPASS, PCFF, CVFF parameters have to be omitted due to potential copyright issues.)
I hope this helps.
(Disclaimer: I wrote moltemplate, so I tend to explain how to use it in more detail.)