No atoms present in a region

Hello,

I have a diamond matrix with CNT inserted at the centre. Then I defined 2 regions : one for the lower part and one for the upper part of the matrix. But after running the program there are no atoms in the upper region . How can this be possible? Can someone tell me why this is happening?

Thanks in advance
Lavanya

The code which I used is given below:

units real
dimension 3
boundary p p m

atom_style atomic

neighbor 2.0 bin
neigh_modify delay 5

create geometry

lattice diamond 3.57
region diamondBox block 0 40 0 40 0 32 units box

create_box 5 diamondBox
create_atoms 1 region diamondBox

group matrix region diamondBox

mass * 12.0107

LJ potentials

pair_style lj/cut 2.5

pair_coeff * * 1.0 1.0 2.5

#region

region 1 cylinder z 20 20 13.1 0 32 units box

delete_atoms region 1 compress no

read_data dat.ninefift add merge shift 20 20 2

group CNT region 1

region 2 block 0 40 0 40 2 16
group lower region 2

region 3 block 0 40 0 40 16 30
group upper region 3

region 4 block 0 40 0 40 0 2
group lowerb region 4

region 5 block 0 40 0 40 30 32
group upperb region 5

group lower subtract lower CNT
group upper subtract upper CNT
group lowerb subtract lowerb CNT
group upperb subtract upperb CNT

group boundary union lowerb upperb

group mobile subtract all boundary

set group CNT type 1
set group lower type 2
set group upper type 3
set group lowerb type 4
set group upperb type 5

velocity upper set 0.0 0.0 0.3
velocity mobile ramp vz 0.0 0.3 z 27 28 sum yes

fix 1 all nvt temp 0.05 0.05 500
run 200

fix 2 boundary setforce 0.0 0.0 NULL
run 500

timestep 0.003
thermo 200

neigh_modify exclude type 2 3

dump 1 all atom 500 dump.end
dump 2 all custom 100 dump.end_carb id type x y z fx fy fz

run 5000
print “WORKING”

Please someone point out the mistakes in it.

Thanks

note:

it is
velocity upperb set 0.0 0.0 0.3
velocity mobile ramp vz 0.0 0.3 vz 2 30 sum yes

please pay attention to the “units” keyword when defining the regions.