Exemplo n.º 1
0
box = (Lx, Ly, Lz)
print 'System box size: ', box
print 'Number of particles = ', num_particles

#  Ewald summation parameters
#alphaEwald     = 1.112583061 #  alpha - Ewald parameter
alphaEwald = 0.660557
rspacecutoff = 4.9  #  rspacecutoff - the cutoff in real space
kspacecutoff = 30  #  kspacecutoff - the cutoff in reciprocal space

print 'Ewald parameters:'
print 'alfa=%f, rcutoff=%f, kcutoff=%d' % (alphaEwald, rspacecutoff,
                                           kspacecutoff)

#  P3M parameters
M = espressopp.Int3D(64, 64, 64)
P = 7
#alphaP3M       = 1.112583061 #  alpha - Ewald parameter
alphaP3M = 0.660557

print 'P3M parameters:'
print 'Mesh=', M, ', charge assignment order=%d,  alphaP3M=%lf' % (P, alphaP3M)

# a skin for Verlet list
skin = 0.2

# Coulomb prefactor parameters
bjerrumlength = 1.0
temperature = 1.0
coulomb_prefactor = bjerrumlength * temperature
Exemplo n.º 2
0
##############################################################################################
#                                                                                            #
#  ESPResSo++ Python script for fixing positions of particles within a L-J standard system   #
#                                                                          		     #
##############################################################################################

import espressopp

# create default Lennard Jones (WCA) system with 0 particles and cubic box (L=10)
system, integrator = espressopp.standard_system.LennardJones(
    0, (10 * 1.12, 10 * 1.12, 10 * 1.12))

C_FIXED = 1
C_FREE = 0
# fix x,y and z coord axis
fixMask = espressopp.Int3D(C_FREE, C_FIXED, C_FREE)

# create a particel group that will contain the fixed particles
fixedWall = espressopp.ParticleGroup(system.storage)

# add a particle wall
pid = 1
for k in range(10):
    for l in range(10):
        system.storage.addParticle(pid,
                                   espressopp.Real3D(k * 1.12, 5, l * 1.12))
        fixedWall.add(pid)
        pid += 1

# add also one free particle
system.storage.addParticle(0, espressopp.Real3D(5.8, 9, 5.5))