Commit f3be7eca by Laurien

### Created log plot

parent 8a07999f
This source diff could not be displayed because it is too large. You can view the blob instead.
 ... @@ -72,6 +72,14 @@ def upperlowerlimit(alpha1, alpha2, w_lfinal, w_ave, lowlimit, uplimit): ... @@ -72,6 +72,14 @@ def upperlowerlimit(alpha1, alpha2, w_lfinal, w_ave, lowlimit, uplimit): return lowlimit, uplimit return lowlimit, uplimit def crossing(i, position): def crossing(i, position): """ **** Only used for checks, not implemented in the algorithm **** function: Makes sure the polymer beads are not allowed to come too close/overlap input: positions output: prints "crossing!" if polymer beads come too close """ cross = False cross = False dx = np.zeros(shape=(L, L-1)) dx = np.zeros(shape=(L, L-1)) ... @@ -91,7 +99,7 @@ def endtoend(position, maxbead): ... @@ -91,7 +99,7 @@ def endtoend(position, maxbead): return e2e return e2e def calc_mean(obs, weight): def calc_mean(obs, weight): weightedobs = obs * weight weightedobs = np.multiply(obs, weight) meanvalue = np.sum(weightedobs, axis=1) / np.sum(weight, axis=1) meanvalue = np.sum(weightedobs, axis=1) / np.sum(weight, axis=1) return meanvalue return meanvalue ... @@ -105,7 +113,27 @@ def calc_std(obs, weight): ... @@ -105,7 +113,27 @@ def calc_std(obs, weight): def function(x,a,b): def function(x,a,b): return a *(x)**(b) return a * x**b def enrich(PolWeight, NewWeight): NewWeight = 0.5 * PolWeight #print("Weight is halved!") return NewWeight def prune(PolWeight, NewWeight): R=np.random.rand(1) if(R<0.5): NewWeight = 2 * PolWeight return NewWeight ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!