An algorithm to generate Rosetta like fragments using PCSs