def _create(star, dna, lower, upper, k, steps, start, stop):
    """
    Create a string to be written to a Colvars file.

    Parameters
    ----------
    star : int 
        number of atoms in star polymer
    dna : int
        number of atoms in dna molecule
    lower : float
        starting point for the collective variables
    upper : float
        endpoint for collective variable
    k : float
        spring constant
    steps : int
        number of simulation steps
    start : float
        starting point for spring position
    stop : float
        end point for spring position

    Returns
    -------
    output_string : str
        string that can be written to file
    """
    group1_end = star
    group2_start = star+1
    group2_end = star+dna
    colvar = "colvar {{\n  name dist\n  distance {{\n    group1 {{atomNumbersRange 1-{}}}\n    group2 {{atomNumbersRange {}-{}}}\n}}\n  lowerBoundary {}\n  upperBoundary {}\n}}".format(group1_end, group2_start, group2_end, lower, upper)
    harmonic = "harmonic {{\n  colvars dist\n  forceConstant {}\n  centers {}\n  targetCenters {}\n  targetNumSteps {}\n  writeTIPMF on\n}}".format(k, start, stop, steps)
    return "{}\n\n{}".format(colvar, harmonic)