产生碳纳米管坐标的Matlab 程序 以下是一个产生任意(m,n)碳管坐标的一个Matlab 程序。只需把下面的程序copy,存成creatCNT.m,即可用 Matlab 直接运行。比如在 Matlab 提示符下输入 >>creatCNT(8,0) 则产生(8,0)碳纳米管的坐标,输出文件为 nanotube.xyz和 nanotube.pdb 格式。可以用其他的可视化软件打开。 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [X TransVec NumAtom Diameter ChiralAngle]=createCNT(n,m) %This function creates the coordinates of a (n,m) nanotube, with n>m %Usage: % [X TransVec NumAtom Diameter ChiralAngle]=createCNT(8,0); % X -- coordinates of atoms in the nanotube unit cell % TransVec -- Translational Vector T of the nanotube % NumAtom -- Number of atoms in one unit cell of nanotube % Diamter -- diameter of the nanotube % ChiralAngle -- chiral angle of the nanotube % by bshan 2005 %change order if n0)&&(j1