The only way I could think is by manipulating the data file. I.e strip the atom coordinates from a data file. Use awk script to create bonds based on some condition. print the newly created bonds in the bonds section. Similarly you have to identify the angles dihedrals that will be created and print that in the respective sections of the datafile.
Thanks for your answer, I will try.