I had a look at the code of computeJacobianCenterOfMass and it seems pretty easy to compute the jacobian of a subtree from the existing code. I see two options:
add an argument in Pinocchio (the root index of the subtree, 0 by default),
do my own algorithm in hpp-pinocchio.
Are the Pinocchio developpers ( @nmansard@jcarpent ) interested in the option 1 ?
The velocity of the com of a certain joint is influences by the velocity of its supporting joints, like the jacobians.
But, in the case of the com subtree, it also influenced by the CoM of its children, by definition. I'm not sure if I'm clear.
You may have look to the algo centerOfMass(model,data,q,v) which computes both the CoMs and their velocities with a forward and a backward steps.
I implemented the correct version if you want
https://github.com/jcarpent/pinocchio/tree/topic/subtree-com
I think it is interested to move it inside Pinocchio directly. I can also add a method which uses the result of jacobianCenterOfMass without further computations. Are you interested?