Commit 35c7edba authored by Pieter van Velde's avatar Pieter van Velde

Bug fixes in function.py

parent 85997bb4
......@@ -55,13 +55,13 @@ def add_bead(pos, n, T_dim, j, w_jl, w_l):
#if w == NaN:
#print('w = ', w)
w[np.isnan(w)] = 0
>>>>>>> 091ba0a1b4fdbe4d384f668da66d4166c26ff066
w = np.exp(-E/T_dim)
w[np.isnan(w)]=0
w_tot = np.sum(w)
<<<<<<< HEAD
P = w/w_tot
......@@ -70,7 +70,6 @@ def add_bead(pos, n, T_dim, j, w_jl, w_l):
pos = np.r_[pos, new]
=======
if w_tot == 0:
print('Help, I have nowhere to go')
print('w_tot = ', w_tot)
......@@ -86,6 +85,5 @@ def add_bead(pos, n, T_dim, j, w_jl, w_l):
print('w_idx = ', w_idx[0])
w_jl = w_jl * w[w_idx[0]]
w_l = w_l * w_tot
>>>>>>> 091ba0a1b4fdbe4d384f668da66d4166c26ff066
return pos
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment