5.0

5.0 | 1 rating Rate this file 9 Downloads (last 30 days) File Size: 2.94 KB File ID: #24411

Neighborlist building routine for molecular dynamics

by Wenzhe Shan

 

11 Jun 2009

This routine returns interaction pairs for a given set of atoms in 3D space.

| Watch this File

File Information
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

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
22 Jun 2011 Daniel Lagos

Hello Wenzhe, I dont undertand how to run your program, could you give me an example, please?

18 Jul 2011 Song Lin  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
simulation Wenzhe Shan 11 Jun 2009 10:00:05
molecular dynamics Wenzhe Shan 11 Jun 2009 10:00:05

Contact us at files@mathworks.com