CCL: XYZ grad to internal gradients

 Sent to CCL by: jmmckel-$
 I have a set of cartesian coordinates and the corresponding cartesian
 gradients, and the connectivities for each atom in a Z-matrix form.  Can
 someone point me to a routine or two that can be adapted to convert the
 cartesian gradients into internal gradients?
 Many thanks,
 John McKelvey