I’m using a program called Kinfold which produces different output each time I call it. It’s possible to generate the same output, but it is very unlikely especially across 10 files.
I’m calling Kinfold in a loop like so:
$ for i in {1..10}; do echo "GACUAGCUAUCGUCGA" | Kinfold --time=100 --stop > SequenceOverTime/Fold$i.txt; done
When I check the last few lines of these files, they’re all identical. Furthermore, the entire files are identical.
If I was to write this 10 times:
echo "GACUAGCUAUCGUCGA" | Kinfold --time=100 --stop > SequenceOverTime/Fold$i.txt
Replacing $i myself with 1 to 10, I’d get different results which is what I want.
Is Kinfold by any chance seeding its random number generator with the current time? If it is, it may only be using the nearest second and this loop is fast enough that it is being reseeded with the same seed every time.
As an experiment, add a “sleep 2” call at the end of each loop iteration and see if you get better results.