<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>模拟计算 &#8211; 晨阳博客</title>
	<atom:link href="https://zhangchenyang.cn/category/hxcl/mnjs/feed" rel="self" type="application/rss+xml" />
	<link>https://zhangchenyang.cn</link>
	<description>欢迎来到张晨阳的博客</description>
	<lastBuildDate>Mon, 16 May 2022 13:51:24 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>【转】Materials Studio建模文件转换成Lammps识别的data坐标文件</title>
		<link>https://zhangchenyang.cn/220.html</link>
		
		<dc:creator><![CDATA[晨阳]]></dc:creator>
		<pubDate>Mon, 16 May 2022 13:51:24 +0000</pubDate>
				<category><![CDATA[模拟计算]]></category>
		<category><![CDATA[转载]]></category>
		<guid isPermaLink="false">http://zhangchenyang.cn/?p=220</guid>

					<description><![CDATA[1.导出坐标文件 首先在Materials Studio中导出建模文件时就要选择 Insightll&#8230; <a href="https://zhangchenyang.cn/220.html" class="more-link read-more" rel="bookmark">继续阅读 <span class="screen-reader-text">【转】Materials Studio建模文件转换成Lammps识别的data坐标文件</span><i class="fa fa-arrow-right"></i></a>]]></description>
										<content:encoded><![CDATA[<h1><span style="font-size: 14pt;">1.导出坐标文件</span></h1>
<p>首先在Materials Studio中导出建模文件时就要选择 Insightll Molecule Files(*.car，*.cor），此时会生成相应的 **.car 和 **.mdf 坐标文件。对于常见的cvff，compass力场，最好在 Forcite Tools 工具中选择 Calculation，在Energy选项中就确定好相应的力场文件之后run。方便lammps转换时生成准确的势函数参数。</p>
<h1><span style="font-size: 14pt;">2.转换 data 文件</span></h1>
<p>打开cmd，输入指令：<br />
<code>msi2lmp.exe *** -i -class 1 -frc cvff &gt; data.***</code><br />
指令中 **代表 .car 文件的命名，-i 代表忽略错误，1 代表势函数类型， -frc cvff 代表采用cvff.frc文件进行坐标编译。<br />
此时会生成 **.data 和 data.** 文件，其中 **.data 文件就是lammps能识别的坐标导入文件。一般来说，还需要自行修改相应的势函数参数，这个需要自行处理。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>LAMMPS+MPI+GPU (Ubuntu)</title>
		<link>https://zhangchenyang.cn/207.html</link>
		
		<dc:creator><![CDATA[晨阳]]></dc:creator>
		<pubDate>Tue, 15 Mar 2022 12:07:14 +0000</pubDate>
				<category><![CDATA[原创]]></category>
		<category><![CDATA[模拟计算]]></category>
		<guid isPermaLink="false">http://zhangchenyang.cn/?p=207</guid>

					<description><![CDATA[1. 安装所需的包 sudo apt-get install gcc sudo apt-get in&#8230; <a href="https://zhangchenyang.cn/207.html" class="more-link read-more" rel="bookmark">继续阅读 <span class="screen-reader-text">LAMMPS+MPI+GPU (Ubuntu)</span><i class="fa fa-arrow-right"></i></a>]]></description>
										<content:encoded><![CDATA[<h2><strong>1. 安装所需的包</strong></h2>
<p><code>sudo apt-get install gcc</code><br />
<code>sudo apt-get install g++</code><br />
<code>sudo apt-get install gfortran</code><br />
<code>sudo apt-get install make</code></p>
<h2><strong>2. 下载所需文件</strong></h2>
<p>1.在主文件夹下建立lmp文件夹</p>
<p><code>cd ~</code><br />
<code>mkdir lmp</code></p>
<p>2.进入lmp<br />
<code>cd lmp</code></p>
<p>3.下载cuda<br />
<code>wget https://developer.download.nvidia.com/compute/cuda/11.6.1/local_installers/cuda_11.6.1_510.47.03_linux.run</code></p>
<p>4.下载fftw<br />
<code>wget http://www.fftw.org/fftw-3.3.8.tar.gz</code></p>
<p>5.下载lammps<br />
<code>wget https://lammps.sandia.gov/tars/lammps-stable.tar.gz</code></p>
<h2><strong>3. 解压文件</strong></h2>
<p><code>1.tar -xvf fftw-3.3.8.tar.gz</code><br />
<code>2.tar -xvf lammps-stable.tar.gz</code></p>
<h2><strong>4. 安装</strong></h2>
<h3><strong>4.1 安装cuda</strong></h3>
<p>1.运行安装程序</p>
<p><code>sudo sh cuda_11.6.1_510.47.03_linux.run</code></p>
<p>2.安装除了驱动以外的组件</p>
<h3><strong>4.2 安装fftw</strong></h3>
<p><code>1.cd fftw-3.3.10</code><br />
<code>2.sudo ./configure --prefix=/usr/local --enable-float</code><br />
<code>3.sudo make -j</code><br />
<code>4.sudo make install</code><br />
<strong>4.3 安装mpich</strong><br />
进入\lammps-3Mar20\src\MAKE\OPTIONS路径，打开Makefile.g++_mpich_link文件，通过查看以下内容可知lammps默认mpich调用路径为/usr/local。</p>
<p><img decoding="async" class="alignnone size-full wp-image-210" src="https://zhangchenyang.cn/wp-content/uploads/2022/03/20200411135151529.png" alt="在这里插入图片描述" width="708" height="54" srcset="https://zhangchenyang.cn/wp-content/uploads/2022/03/20200411135151529.png 708w, https://zhangchenyang.cn/wp-content/uploads/2022/03/20200411135151529-300x23.png 300w" sizes="(max-width: 708px) 100vw, 708px" /><br />
<code>1.cd lammps/mpich-3.3.2</code><br />
<code>2.sudo ./configure --prefix=/usr/local</code><br />
<code>3.sudo make -j</code><br />
<code>4.sudo make install</code></p>
<p><strong>4.4 安装lammps</strong></p>
<p>1.进入lammps下lib/gpu文件夹<br />
<code>cd lammps-29Sep2021/lib/gpu/</code><br />
2.编辑Makefile.linux文件</p>
<p><code>sudo vim Makefile.linux</code><br />
修改以下内容<br />
NVCC = nvcc修改为：NVCC = /usr/loca/cuda/bin/nvcc<br />
CUDA_ARCH = -arch=sm_50修改为：CUDA_ARCH = -arch=sm_61#这里是需要根据实际GPU型号修改对应参数。<br />
保存退出</p>
<p><code>ESC</code></p>
<p><code>:wq</code></p>
<p>3.make一下Makefile.linux文件</p>
<p><code>sudo make -f Makefile.linux</code></p>
<p>如果想重新生成，需要进行clean</p>
<p><code>sudo make -f Makefile.linux clean</code></p>
<p>4.返回至lammps文件夹下，进入src</p>
<p><code>cd ..</code><br />
<code>cd src/</code></p>
<p>5.根据需求make模块</p>
<p><code>sudo make yes-***</code><br />
***这里根据需求添加依赖包<br />
如gpu，class2，kspace，mainbody&#8230;</p>
<p>6.make生成lmp_mpi文件<br />
<code>sudo make mpi -j</code></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[LAMMPS命令合集]units命令</title>
		<link>https://zhangchenyang.cn/151.html</link>
		
		<dc:creator><![CDATA[晨阳]]></dc:creator>
		<pubDate>Mon, 12 Apr 2021 08:55:51 +0000</pubDate>
				<category><![CDATA[模拟计算]]></category>
		<category><![CDATA[LAMMPS]]></category>
		<guid isPermaLink="false">http://zhangchenyang.cn/?p=151</guid>

					<description><![CDATA[units是LAMMPS中最常用的命令之一，其用途为设置模拟过程的单位 语法 units stytl&#8230; <a href="https://zhangchenyang.cn/151.html" class="more-link read-more" rel="bookmark">继续阅读 <span class="screen-reader-text">[LAMMPS命令合集]units命令</span><i class="fa fa-arrow-right"></i></a>]]></description>
										<content:encoded><![CDATA[<p>units是LAMMPS中最常用的命令之一，其用途为设置模拟过程的单位</p>
<h2>语法</h2>
<pre><span style="font-size: 10pt;">units stytle</span></pre>
<p>style = lj or real or metal or si or cgs or electron or micro or nano</p>
<h2>例子</h2>
<pre><span style="font-size: 10pt;"><span class="k">units</span> <span class="n">metal</span>
<span class="k">units</span> <span class="n">lj
</span></span></pre>
<h2>用法</h2>
<h3>style为real时</h3>
<table style="border-collapse: collapse; width: 100%; height: 336px;">
<tbody>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">mass = grams/mole</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">质量=克/摩尔</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">distance = Angstroms</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">距离=埃米（10<sup>-9</sup>米）</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">time = femtoseconds</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">时间=飞秒（10<sup>-15</sup>秒）</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">energy = Kcal/mole</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">能量=千卡/摩尔</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">velocity = Angstroms/femtosecond</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">速度=埃米/飞秒</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">force = Kcal/mole-Angstrom</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">力=能量/距离</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">torque = Kcal/mole</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">力矩=千卡/摩尔</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">temperature = Kelvin</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">温度=开尔文单位</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">pressure = atmospheres</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">压力=大气压</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">dynamic viscosity = Poise</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">动力学黏度=帕</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">charge = multiple of electron charge (1.0 is a proton)</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">电荷=电子电荷倍数（1.0就是一个质子）</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">dipole = charge*Angstroms</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">偶极子=电荷*埃米</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">electric field = volts/Angstrom</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">电场=伏/埃米</span></td>
</tr>
<tr style="height: 24px;">
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">density = gram/cm^dim</span></td>
<td style="width: 50%; height: 24px;"><span style="font-size: 10pt;">密度=克/平方厘米</span></td>
</tr>
</tbody>
</table>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>LAMMPS模拟命令顺序</title>
		<link>https://zhangchenyang.cn/144.html</link>
		
		<dc:creator><![CDATA[晨阳]]></dc:creator>
		<pubDate>Mon, 12 Apr 2021 08:00:39 +0000</pubDate>
				<category><![CDATA[模拟计算]]></category>
		<category><![CDATA[LAMMPS]]></category>
		<guid isPermaLink="false">http://zhangchenyang.cn/?p=144</guid>

					<description><![CDATA[LAMMPS模拟过程涉及较多的命令，一般来说主要分为以下几个流程 /////////////////&#8230; <a href="https://zhangchenyang.cn/144.html" class="more-link read-more" rel="bookmark">继续阅读 <span class="screen-reader-text">LAMMPS模拟命令顺序</span><i class="fa fa-arrow-right"></i></a>]]></description>
										<content:encoded><![CDATA[<p>LAMMPS模拟过程涉及较多的命令，一般来说主要分为以下几个流程</p>
<pre><span style="font-size: 10pt;"><span style="color: #ff9900;">/////////////////

//初始参数

/////////////////</span>

 

<span style="color: #009e00;">//模型初始化</span>

<a title="[LAMMPS命令合集]units命令" href="https://zhangchenyang.cn/151.html" target="_blank" rel="noopener">units</a>

boundary

atom_style

 

<span style="color: #009e00;">//设置键势类型</span>

bond_style

<span style="color: #009e00;">//设置键角类型</span>

angle_style

<span style="color: #009e00;">//设置二面角势类型</span>

dihederal_style

<span style="color: #009e00;">//设置对势类型</span>

pair_style

<span style="color: #009e00;">//读取结构数据</span>

read_data

 

<span style="color: #009e00;">//设置邻近原子参数</span>

neighbor

neigh_modify

 

<span style="color: #ff9900;">/////////////////

//计算区域

/////////////////</span>

<span style="color: #009e00;">//设置多久输出一次数据</span>

<span style="color: #009e00;">//弛豫</span>

nve

<span style="color: #009e00;">//温度设置</span>

 

<span style="color: #009e00;">//设置系综</span>

nve nvt npt

 

<span style="color: #009e00;">//热力学输出（显示在屏幕上）</span>

thermo_style

thermo

 

<span style="color: #009e00;">//设置步长</span>

timestep

 

<span style="color: #009e00;">//*将步数的计数器设置为指定值，设为0即清空</span>

reset_timestep 0

 

<span style="color: #009e00;">//开始计算</span>

run 1000（计算多少步，模拟时长为 步数*时间步长）
</span></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[转]region命令</title>
		<link>https://zhangchenyang.cn/139.html</link>
		
		<dc:creator><![CDATA[晨阳]]></dc:creator>
		<pubDate>Mon, 12 Apr 2021 07:08:57 +0000</pubDate>
				<category><![CDATA[模拟计算]]></category>
		<category><![CDATA[LAMMPS]]></category>
		<guid isPermaLink="false">http://zhangchenyang.cn/?p=139</guid>

					<description><![CDATA[region命令用于定义一个空间几何区域。 使用语法: region ID style args k&#8230; <a href="https://zhangchenyang.cn/139.html" class="more-link read-more" rel="bookmark">继续阅读 <span class="screen-reader-text">[转]region命令</span><i class="fa fa-arrow-right"></i></a>]]></description>
										<content:encoded><![CDATA[<p><strong>region命令用于定义一个空间几何区域。</strong></p>
<h2>使用语法:</h2>
<pre>region ID style args keyword arg ...</pre>
<ul>
<li>ID = 待定义区域的ID</li>
<li>style = <i>delete</i> / <i>block</i> / <i>cone</i> / <i>cylinder</i> / <i>plane</i> / <i>prism</i> / <i>sphere</i> / <i>union</i> / <i>intersect</i></li>
</ul>
<pre><i>delete</i> = no args
  <i>block</i> args = xlo xhi ylo yhi zlo zhi
    xlo,xhi,ylo,yhi,zlo,zhi = 各个维度上的范围值
  <i>cone</i> args = dim c1 c2 radlo radhi lo hi
    dim = <i>x</i> or <i>y</i> or <i>z</i> = 圆锥台轴线方向
    c1,c2 = 圆锥台轴线在另外两个维度上的坐标值
    radlo,radhi = 圆锥台上下底面的半径
    lo,hi = 圆锥台轴线方向的范围值
  <i>cylinder</i> args = dim c1 c2 radius lo hi
    dim = <i>x</i> or <i>y</i> or <i>z</i> = 圆柱体轴线方向
    c1,c2 = 圆柱体轴线在两位两个维度上的坐标值
    radius = 圆柱体半径，可以使用变量
    lo,hi = 圆柱体轴线方向的范围值
  <i>plane</i> args = px py pz nx ny nz
    px,py,pz = 平面上一个点的坐标
    nx,ny,nz = 平面法矢坐标
  <i>prism</i> args = xlo xhi ylo yhi zlo zhi xy xz yz
    xlo,xhi,ylo,yhi,zlo,zhi = 平行六面体在各个维度上的范围值
    xy = y方向在x方向的倾斜值
    xz = z方向在x方向的倾斜值
    yz = z方向在y方向的倾斜值
  <i>sphere</i> args = x y z radius
    x,y,z = 球心坐标
    radius = 球体半径，可以使用变量
  <i>union</i> args = N reg-ID1 reg-ID2 ...
    N = 要进行并集操作的区域的数目，必须大于等于2
    reg-ID1,reg-ID2, ... = 要进行并集操作的区域的ID
  <i>intersect</i> args = N reg-ID1 reg-ID2 ...
    N = 要进行交集操作的区域的数目，必须大于等于2
    reg-ID1,reg-ID2, ... = 要进行交集操作的区域的ID
</pre>
<ul>
<li>keyword = <i>side</i> or <i>units</i> or <i>move</i> or <i>rotate<br />
</i></li>
</ul>
<pre><i>side</i> value = <i>in</i> or <i>out</i>
    <i>in</i> = 指定几何体内侧作为区域
    <i>out</i> = 指定几何体外侧作为区域
  <i>units</i> value = <i>lattice</i> or <i>box</i>
    <i>lattice</i> = 以晶格距离作为几何距离单位
    <i>box</i> = 以模拟盒子作为几何距离单位
  <i>move</i> args = v_x v_y v_z
    v_x,v_y,v_z = x, y, z 方向的位移量，equal类型的变量
  <i>rotate</i> args = v_theta Px Py Pz Rx Ry Rz
    v_theta = 旋转角，equal类型的变量，弧度单位
    Px,Py,Pz = 旋转操作的中心点
    Rx,Ry,Rz = 旋转轴矢量</pre>
<h2>使用举例</h2>
<pre>region 1 block -3.0 5.0 INF 10.0 INF INF
region 2 sphere 0.0 0.0 0.0 5 side out
region void cylinder y 2 3 5 -5.0 EDGE units box
region 1 prism 0 10 0 10 0 10 2 0 0
region outside union 4 side1 side2 side3 side4
region 2 sphere 0.0 0.0 0.0 5 side out move v_left v_up NULL</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
