We give a full description of the code NBODY2 for direct integration of the
gravitational N-body problem. The method of solution is based on the neigh
bour scheme of Ahmad and Cohen [J. Comput. Phys. 12 (1973) 389] which speed
s up the force calculation already for quite modest particle numbers. Deriv
ations of all the relevant mathematical expressions are given, together wit
h a detailed discussion of the algorithms. The code may be used to study a
wide variety of self-consistent problems based on a small softening of the
interaction potential. (C) 2001 Published by Elsevier Science B. V.