madscatt / zazzie

development branch
GNU General Public License v3.0
2 stars 3 forks source link

Graph traversal may be broken #146

Closed madscatt closed 1 year ago

madscatt commented 1 year ago
    Graph traversal may be broken BUT check setup iteritems() replaced by items() as the error is a keyerrok

File "/home/curtisj/anaconda3/lib/python3.9/site-packages/sassie/simulate/torsion_angle_monte_carlo/monte_carlo_utilities/tamc_utilities/graph_traversal.py", line 200, in traverse_graph_for_pivot for child in graph[pivot[1]]:

Originally posted by @madscatt in https://github.com/madscatt/zazzie/issues/145#issuecomment-1338231063

madscatt commented 1 year ago

The testing code in graph_traversal.py was not completed even in Python 2.7.X. Fixed the mistakes in the testing code and was able to run the tests (in both Python 2.7.X and 3.9.X) and that module gives the same results now for ten_mer.

Note that a single line with the python 2 correct syntax

number_of_bonds_this_line = len(words)/2

now, in python 3 needs to be

number_of_bonds_this_line = len(words)//2

Note the double "divisor". This is troublesome as there could be many other subtle errors in our code base due to this language change.

I will close this ticket as the same results for ten_mer were achieved.