Returns a structure in mcsqs rndstr.in format.
        :return (str):

def to_string(self):
        """
        Returns a structure in mcsqs rndstr.in format.
        :return (str):
        """
        # define coord system, use Cartesian
        output = ["1.0 0.0 0.0",
                  "0.0 1.0 0.0",
                  "0.0 0.0 1.0"]
        # add lattice vectors
        m = self.structure.lattice.matrix
        output.append("{:6f} {:6f} {:6f}".format(*m[0]))
        output.append("{:6f} {:6f} {:6f}".format(*m[1]))
        output.append("{:6f} {:6f} {:6f}".format(*m[2]))
        # add species
        for site in self.structure:
            species_str = []
            for sp, occu in sorted(site.species.items()):
                if isinstance(sp, Specie):
                    sp = sp.element
                species_str.append("{}={}".format(sp, occu))
            species_str = ",".join(species_str)
            output.append("{:6f} {:6f} {:6f} {}".format(site.frac_coords[0],
                                                        site.frac_coords[1],
                                                        site.frac_coords[2],
                                                        species_str))

        return "\n".join(output)