Commit 85997bb4 authored by Pieter van Velde's avatar Pieter van Velde

fixed git error

parent 4a564531
# Import libaries/functions
import numpy as np
from matplotlib import pyplot as plt
import time
from functions import add_bead
# Simultion constants
# Simulation constants
# Simulation parameters
n_beads = 100 #number of beads
n = 6 #number of angles
# Initialization
n = 6 # number of phis
T_dim = 0.001
pos = np.array([[0, 0], [1, 0]])
n_beads = 30
n_beads = 100
T_dim = 1
# Physical parameters
T_dim = 0.1 #T * (Kb / eps) # Non-dimensional temperature
# Preallocate arrays
pos = np.zeros([n_beads, 2])
pos[1] = np.array([1, 0])
w_jl = 1
w_l = 1
for j in range(n_beads):
# Initialization
pos[1] = np.array([1, 0]) #bead 1: pos[0, 0]. bead 2: pos[1, 0]
w_jl = 1 #start value of weight w_j
w_l = 1 #start value of weight W
pos = add_bead(pos, n, T_dim)
# Make polymer of lenght n_beads
for j in range(2,n_beads):
pos, w_jl, w_l = add_bead(pos, n, T_dim, j, w_jl, w_l)
P = w_jl/w_l
plt.plot(pos[:,0], pos[:,1], marker= ".", markersize=20, color="k" )
plt.show()
P = w_jl/w_l #Weight per polymer
# Plot polymer
plt.plot(pos[:,0], pos[:,1], marker= ".", markersize=20, color="k" )
plt.show()
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