Dear users,
I have maked a dimer (one central particle+ one surface particle). But i am unable to make number of dimer using for loop. Lets i want to make 20 dimer, then how can i make it?
# for the warmup we use a Langevin thermostat with an extremely low temperature and high friction coefficient
# such that the trajectories roughly follow the gradient of the potential while not accelerating too much
system.thermostat.set_langevin(kT=0.00001, gamma=40., seed=42)
print("# Creating raspberry")
center = system.box_l / 2
colPos = center
# Charge of the colloid
q_col = -40
# Number of particles making up the raspberry (surface particles + the central particle).
n_col_part = int(1 + 1)
# Place the central particle
system.part.add(id=0, pos=colPos, type=0, q=q_col, fix=(1, 1, 1),
rotation=(1, 1, 1)) # Create central particle
# Create surface beads uniformly distributed over the surface of the central particle
for i in range(1, n_col_part):
colSurfPos = np.random.randn(2)
colSurfPos = colSurfPos / np.linalg.norm(colSurfPos) * radius_col
print(colPos)
colSurfPos = np.append(colSurfPos,0)
print(colSurfPos)
colSurfPos = colSurfPos + colPos
print(colSurfPos)
system.part.add(id=i, pos=colSurfPos, type=1)
system.part[i].add_bond((col_center_surface_bond, 0))
print("# Number of colloid beads = {}".format(n_col_part))
#print(colPos)
#print(system.part.pos)
# Relax bead positions. The LJ potential with the central bead combined with the
# harmonic bond keep the monomers roughly radius_col away from the central bead. The LJ
# between the surface beads cause them to distribute more or less evenly on the surface.
system.force_cap = 1000
system.time_step = eq_tstep
print("Relaxation of the raspberry surface particles")
for i in range(n_cycle):
system.integrator.run(integ_steps)
your help should be appriciated.
Thanks & Regards
Chandra Shekhar Maurya
Mechanical Eng. Dept.
Indian Institute of Technology Patna
Contact No:9793572837