hoomd.context.initialize("");
N=20;
L=50;
my_position=creaposi2D(N,L);
numpy.random.seed(0);
orientation=numpy.zeros([N,4])
inertiamomentum=numpy.zeros([N,3])
inertiamomentum[:,2]=1;
Lattice=hoomd.lattice.unitcell(N, [L,0,0], [0,L,0], [0,0,1], dimensions=2, position=my_position, type_name=None, mass=numpy.ones([N,1])[:,0]
, charge=None, diameter=numpy.ones([N,1])[:,0], moment_inertia=inertiamomentum, orientation=orientation)
system=hoomd.init.create_lattice(Lattice,1)
all = hoomd.group.all()
nl = hoomd.md.nlist.cell()
lj = hoomd.md.pair.lj(r_cut=2**(1/6), nlist=nl)
lj.pair_coeff.set('A', 'A', epsilon=12.0, sigma=1,alpha=1/2)
dip = hoomd.md.pair.dipole(r_cut=L/2.5, nlist=nl, name=None)
dip.pair_coeff.set('A', 'A', mu=6, A=1.0, kappa=0)
hoomd.md.integrate.mode_standard(dt=0.000002);
activity=[]
for i in range(N):
activity.append((5, 0,0))
hoomd.md.force.active(group=all,
seed=123,
f_lst=activity,
rotation_diff=3,
orientation_link=False, orientation_reverse_link=True,constraint=None);
hoomd.md.integrate.brownian(group=all, kT=1, seed=123)
hoomd.analyze.log(filename="log-output.log",quantities=['potential_energy', 'temperature'],period=20,overwrite=True);
hoomd.dump.gsd("trajectory.gsd", period=6e3, group=all, overwrite=True);
hoomd.run(1000000);