| Description |
Linked cell algorithm is used, therefore, the computational cost is linear vs. the number of atoms.
Periodic boundary condition can be activated as an option.
A cubic region should be defined for generating the neighborlist.
Atomic coordinates can be ONLY in 3D format, as row vectors.
% [nebrTab, nebrLen] = md_neighlist_cube( x, nx, rc, srgdat, bctyp, frc) %
% ----------------------------------------------------------------------
% Create neighbor list for atomic system in a cubic %region
% WZ. Shan
%-----------------------------------------------------------------------
% input:
% x : atom coords, [ px, py, pz]
% nx : num. of atoms, = size( x, 1)
% rc : cutoff radius
% srgdat : region data [ srg_o(1:3), W, H, D]
% : [ srg_o(1:3), W, H, D, x, y, z] if bctyp == 2,
% srgdat defines the cubic region, where
% srg_o: coordinates of the lower-left-back corner
% [W, H, D]: dimension of the cube in x,y,z-direction.
%
% bctyp : types of boundary, 1: free, 2: periodic
% frc : cell size factor( optional)
% output:
% nebrTab : interaction pairs, [p1, p2]
% nebrLen : size( nebrTab, 1)
% ncell : global cell coordinates
% id_cell : cell coordinates |