Commit f3be7eca authored by Laurien's avatar 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):
return lowlimit, uplimit
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
dx = np.zeros(shape=(L, L-1))
......@@ -91,7 +99,7 @@ def endtoend(position, maxbead):
return e2e
def calc_mean(obs, weight):
weightedobs = obs * weight
weightedobs = np.multiply(obs, weight)
meanvalue = np.sum(weightedobs, axis=1) / np.sum(weight, axis=1)
return meanvalue
......@@ -105,7 +113,27 @@ def calc_std(obs, weight):
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):
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!
Please register or to comment