Annanilsson-code / ProjectAppliedMolBiophys

Project in the course Applied Molecular Biophysics 2020
1 stars 1 forks source link

Code does not run #6

Closed Annanilsson-code closed 3 years ago

Annanilsson-code commented 3 years ago

https://github.com/Annanilsson-code/ProjectAppliedMolBiophys/blob/3740fe51845d61ba04cd757b608e49d4c2201327/cc_calculation.py#L79

Sometimes the infile seems to be written in a wrong way, so that the MDS algorithm cannot interpret it.

FilipeMaia commented 3 years ago

Try using a fixed random seed, e.g.:

import numpy as np
np.random.seed(0)
...
Annanilsson-code commented 3 years ago

Unfortunately it doesn't help... But after I run the code a couple of times, it produces a correct infile so I guess that's ok even if it takes some time

FilipeMaia commented 3 years ago

Be aware that all files produced will now be exactly identical.

Annanilsson-code commented 3 years ago

Ok, but how can they be identical?

FilipeMaia commented 3 years ago

I mean repeated runs of the script will produce exactly the same output, not that the multiple images within a run will be the same.

Annanilsson-code commented 3 years ago

Ok, I see