You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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
Cite As
Wenzhe Shan (2026). Neighborlist building routine for molecular dynamics (https://www.mathworks.com/matlabcentral/fileexchange/24411-neighborlist-building-routine-for-molecular-dynamics), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (2.94 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
