Created Python API for ring polymer contraction