29 DOUBLE PRECISION DISTVEC(3), DIST, R_LM
32 DOUBLE PRECISION XPOS(2), YPOS(2), ZPOS(2), TMPPOS(3)
45 if (l .gt. 1) neighbor_index(l) = neighbor_index(l-1)
48 IF(is_nonexistent(l)) cycle
54 IF(is_nonexistent(ll)) cycle
56 r_lm = des_radius(l) + des_radius(ll)
57 r_lm = factor_rlm*r_lm
62 IF (des_periodic_walls)
THEN 63 xpos(:) = des_pos_new(ll,1)
64 ypos(:) = des_pos_new(ll,2)
69 IF(des_periodic_walls_x)
THEN 70 IF (des_pos_new(l,1) + r_lm >
xlength)
THEN 72 xpos(ii) = des_pos_new(ll,1) +
xlength 73 ELSEIF (des_pos_new(l,1) - r_lm <
zero)
THEN 75 xpos(ii) = des_pos_new(ll,1) -
xlength 78 IF(des_periodic_walls_y)
THEN 79 IF (des_pos_new(l,2) + r_lm >
ylength)
THEN 81 ypos(jj) = des_pos_new(ll,2) +
ylength 82 ELSEIF (des_pos_new(l,2) - r_lm <
ylength)
THEN 84 ypos(jj) = des_pos_new(ll,2) -
ylength 88 zpos(:) = des_pos_new(ll,3)
89 IF(des_periodic_walls_z)
THEN 90 IF (des_pos_new(l,3) + r_lm >
zlength)
THEN 92 zpos(kk) = des_pos_new(ll,3) +
zlength 93 ELSEIF (des_pos_new(l,3) - r_lm <
zero)
THEN 95 zpos(kk) = des_pos_new(ll,3) -
zlength 110 distvec(:) = tmppos(:) - des_pos_new(l,:)
111 dist = dot_product(distvec,distvec)
112 IF (dist.LE.r_lm)
EXIT outer
115 distvec(:) = tmppos(:) - des_pos_new(l,:)
116 dist = dot_product(distvec,distvec)
117 IF (dist.LE.r_lm)
EXIT outer
123 distvec(:) = des_pos_new(ll,:) - des_pos_new(l,:)
124 dist = dot_product(distvec,distvec)
128 IF (dist < r_lm**2)
THEN subroutine nsquare
Purpose: DES - N-Square neighbor search.
double precision, parameter zero
double precision function, public add_pair(ii, jj)