Generating chemical fingerprints of polymers