# initializing particles¶

Overview

 espressopp.tools.lattice espressopp.tools.replicate(bonds, angles, x, ...) Replicates configuration in each dimension. espressopp.tools.topology espressopp.tools.velocities espressopp.tools.warmup(system, integrator) Warm up for a system with a density of 0.85.

Details

## espressopp.tools.lattice¶

espressopp.tools.lattice.createCubic(N, rho, perfect=True, RNG=None)

Initializes particles on the sites of a simple cubic lattice. By setting perfect=False the particle positions will be given random displacements with a magnitude of one-tenth the lattice spacing.

espressopp.tools.lattice.createDiamond(N, rho, perfect=True, RNG=None)

Initializes particles on the sites of a diamond lattice.

## espressopp.tools.replicate¶

espressopp.tools.replicate.replicate(bonds, angles, x, y, z, Lx, Ly, Lz, xdim=1, ydim=1, zdim=1)

Replicates configuration in each dimension.

This may be used to increase the size of an equilibrated melt by a factor of 8 or more.

Presently this routine works only for semiflexible polymers. A general class should be written to deal with files containing coordinates and topology data.

xdim = ydim = zdim = 1 returns the original system not replicated. xdim = ydim = zdim = 2 returns the original system replicated to 8x. xdim = ydim = zdim = 3 returns the original system replicated to 27x. xdim = ydim = 1, zdim = 2 returns the original system replicated in the z-direction.

## espressopp.tools.topology¶

espressopp.tools.topology.polymerRW(pid, startpos, numberOfMonomers, bondlength, return_angles=False, return_dihedrals=False, mindist=None, rng=None)

Initializes polymers through random walk

## espressopp.tools.velocities¶

espressopp.tools.velocities.gaussian(T, N, particle_mass=None, zero_momentum=True, seed=7654321, kb=1.0)

Generates velocities with temperature T according to a Maxwell-Boltzmann distribution.

Args:
T: The desired temperature expre. N: The number of particles. particle_mass: The list of particle mass if not then every particle has mass 1.0 zero_momentum: Remove the center-of-mass motion. seed: The seed for the random number generator. kb: The Boltzmann constant.
Returns:
The tuple with lists of x,y,z components of the velocity.

## espressopp.tools.warmup¶

espressopp.tools.warmup.warmup(system, integrator, number=80)

Warm up for a system with a density of 0.85.

The method needs the following parameters:

• system, integrator ESPResSo system which schoul be warmed up and the correspondig integrator e.g.:

>>> system, integrator = espressopp.standard_system.LennardJones(100,(10,10,10))

• number number of steps of the warm up

for a system with a density of 0.85, if it explodes try a higher number