Exemplo n.º 1
0
# monomers per chain
MPC = 15

# length for Kremer-Grest chain
bond_length = 0.966

# The physical distance beween nodes such that a line of monomers "fit" needs to be worked out.
# This is done via the unit diamond lattice size parameter "a".
a = (MPC + 1) * bond_length / (0.25 * np.sqrt(3))

# Lastly, the created periodic connections requires a specific simulation box.
system.box_l = [a, a, a]
print("box now at ", system.box_l)

# We can now call diamond to place the monomers, crosslinks and bonds.
diamond.Diamond(a=a, bond_length=bond_length, MPC=MPC)

#############################################################
#      Warmup                                               #
#############################################################

print("Warming up...")
warm_steps = 10
lj_cap = 1
system.force_cap = lj_cap
act_min_dist = system.analysis.min_dist()

# warmp with zero temperature to remove overlaps
system.thermostat.set_langevin(kT=0.0, gamma=1.0)

# slowly ramp up the cap
Exemplo n.º 2
0
from espressomd import integrate
from espressomd import interactions
from espressomd import diamond
import numpy

# System parameters
#############################################################

system = espressomd.System()


# system.seed=numpy.random.randint(low=1,high=2**31-1,size=system.n_nodes)
# if no seed is provided espresso generates a seed
# print system.seed


system.time_step = 0.01
system.skin = 0.4
system.box_l = [100, 100, 100]
system.thermostat.set_langevin(1.0, 1.0)
system.cell_system.set_n_square(use_verlet_lists=False)

system.non_bonded_inter[0, 0].lennard_jones.set_params(
    epsilon=1, sigma=1,
    cutoff=2**(1. / 6), shift="auto")

fene = interactions.FeneBond(k=10, d_r_max=2)
system.bonded_inter.add(fene)

diamond.Diamond(a=20, bond_length=2, MPC=20)