We derive the partition function of a nonrelativistic quantum string whose ends are
allowed to freely move along the two-angled straight solid rods. We first derive the
classical solution of the model and then use it to derive the partition function utilizing
the path integral method. We show that the vacuum energy is the sum of the Luscher
potential plus a term which depends on the relative angle between the rods.