# WCA between monomers system.non_bonded_inter[0, 0].wca.set_params(epsilon=1, sigma=1) # WCA counter-ions - polymer system.non_bonded_inter[0, 1].wca.set_params(epsilon=1, sigma=1) # WCA ions - polymer system.non_bonded_inter[0, 2].wca.set_params(epsilon=1, sigma=1) # WCA between ions system.non_bonded_inter[1, 2].wca.set_params(epsilon=1, sigma=1) # bonded interactions ################################################################ harmonic_bond = interactions.HarmonicBond(k=10, r_0=2) angle_harmonic_bond = interactions.AngleHarmonic(bend=10, phi0=np.pi) system.bonded_inter.add(harmonic_bond) system.bonded_inter.add(angle_harmonic_bond) # create monomer beads and bonds ########################################################################## init_polymer_pos = espressomd.polymer.linear_polymer_positions( n_polymers=1, beads_per_chain=N_MONOMERS, bond_length=2.0, seed=2, bond_angle=np.pi, min_distance=1.8, start_positions=np.array([system.box_l / 2.0])) system.part.add(pos=init_polymer_pos[0], q=-np.ones(N_MONOMERS))
# WCA ions - polymer system.non_bonded_inter[0, 2].wca.set_params( epsilon=1, sigma=1) # WCA between ions system.non_bonded_inter[1, 2].wca.set_params( epsilon=1, sigma=1) # Bonded interactions ################################################################ # fene = interactions.FeneBond(k=10, d_r_max=2) # system.bonded_inter.add(fene) harmonic = interactions.HarmonicBond(k=10, r_0=2) harmonicangle = interactions.AngleHarmonic(bend=10, phi0=np.pi) system.bonded_inter.add(harmonic) system.bonded_inter.add(harmonicangle) # Create Monomer beads and bonds ######################################################################################### n_monomers = 20 init_polymer_pos = np.dstack( (np.arange(n_monomers), np.zeros(n_monomers), np.zeros(n_monomers)))[0] + \ np.array([system.box_l[0] / 2 - n_monomers / 2, system.box_l[1] / 2, system.box_l[2] / 2]) system.part.add(pos=init_polymer_pos)