dfpt和有限角位移和角加速度公式有什么不同

&figure&&img src=&https://pic3.zhimg.com/v2-835ed64e01c56c8d43c9f8cb81cdc2e1_b.jpg& data-rawwidth=&651& data-rawheight=&367& class=&origin_image zh-lightbox-thumb& width=&651& data-original=&https://pic3.zhimg.com/v2-835ed64e01c56c8d43c9f8cb81cdc2e1_r.jpg&&&/figure&&p&分享一篇文章,原文是&a href=&https://link.zhihu.com/?target=http%3A//www.cnblogs.com/softwaretesting/archive//2104435.html& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Vim命令合集&/a&。&/p&&h2&&b&命令历史&/b&&/h2&&p&以:和/开头的命令都有历史纪录,可以首先键入:或/然后按上下箭头来选择某个历史命令。&/p&&h2&&b&启动vim&/b&&/h2&&p&在命令行窗口中输入以下命令即可&/p&&p&vim 直接启动vim&/p&&p&vim filename 打开vim并创建名为filename的文件&/p&&h2&&b&文件命令&/b&&/h2&&p&打开单个文件&/p&&p&vim file&/p&&p&同时打开多个文件&/p&&p&vim file1 file2 file3 ...&/p&&p&在vim窗口中打开一个新文件&/p&&p&:open file&/p&&p&在新窗口中打开文件&/p&&p&:split file&/p&&p&切换到下一个文件&/p&&p&:bn&/p&&p&切换到上一个文件&/p&&p&:bp&/p&&p&查看当前打开的文件列表,当前正在编辑的文件会用[]括起来。&/p&&p&:args&/p&&p&打开远程文件,比如ftp或者share folder&/p&&p&:e ftp://192.168.10.76/abc.txt&/p&&p&:e \\qadrive\test\1.txt&/p&&h2&&b&vim的模式&/b&&/h2&&p&正常模式(按Esc或Ctrl+[进入) 左下角显示文件名或为空&br&插入模式(按i键进入) 左下角显示--INSERT--&br&可视模式(不知道如何进入) 左下角显示--VISUAL--&/p&&h2&&b&导航命令&/b&&/h2&&p&% 括号匹配&/p&&h2&&b&插入命令&/b&&/h2&&p&i 在当前位置生前插入&/p&&p&I 在当前行首插入&/p&&p&a 在当前位置后插入&/p&&p&A 在当前行尾插入&/p&&p&o 在当前行之后插入一行&/p&&p&O 在当前行之前插入一行&/p&&h2&&b&查找命令&/b&&/h2&&p&/text  查找text,按n健查找下一个,按N健查找前一个。&/p&&p&?text  查找text,反向查找,按n健查找下一个,按N健查找前一个。&/p&&p&vim中有一些特殊字符在查找时需要转义  .*[]^%/?~$&/p&&p&:set ignorecase  忽略大小写的查找&/p&&p&:set noignorecase  不忽略大小写的查找&/p&&p&查找很长的词,如果一个词很长,键入麻烦,可以将光标移动到该词上,按*或#键即可以该单词进行搜索,相当于/搜索。而#命令相当于?搜索。&/p&&p&:set hlsearch  高亮搜索结果,所有结果都高亮显示,而不是只显示一个匹配。&/p&&p&:set nohlsearch  关闭高亮搜索显示&/p&&p&:nohlsearch  关闭当前的高亮显示,如果再次搜索或者按下n或N键,则会再次高亮。&/p&&p&:set incsearch  逐步搜索模式,对当前键入的字符进行搜索而不必等待键入完成。&/p&&p&:set wrapscan  重新搜索,在搜索到文件头或尾时,返回继续搜索,默认开启。&/p&&h2&&b&替换命令&/b&&/h2&&p&ra 将当前字符替换为a,当期字符即光标所在字符。&/p&&p&s/old/new/ 用old替换new,替换当前行的第一个匹配&/p&&p&s/old/new/g 用old替换new,替换当前行的所有匹配&/p&&p&%s/old/new/ 用old替换new,替换所有行的第一个匹配&/p&&p&%s/old/new/g 用old替换new,替换整个文件的所有匹配&/p&&p&:10,20 s/^/
/g 在第10行知第20行每行前面加四个空格,用于缩进。&/p&&p&ddp 交换光标所在行和其下紧邻的一行。&/p&&h2&&b&移动命令&/b&&/h2&&p&h 左移一个字符&br&l 右移一个字符,这个命令很少用,一般用w代替。&br&k 上移一个字符&br&j 下移一个字符&br&以上四个命令可以配合数字使用,比如20j就是向下移动20行,5h就是向左移动5个字符,在Vim中,很多命令都可以配合数字使用,比如删除10个字符10x,在当前位置后插入3个!,3a!&Esc&,这里的Esc是必须的,否则命令不生效。&/p&&p&w 向前移动一个单词(光标停在单词首部),如果已到行尾,则转至下一行行首。此命令快,可以代替l命令。&/p&&p&b 向后移动一个单词 2b 向后移动2个单词&/p&&p&e,同w,只不过是光标停在单词尾部&/p&&p&ge,同b,光标停在单词尾部。&/p&&p&^ 移动到本行第一个非空白字符上。&/p&&p&0(数字0)移动到本行第一个字符上,&/p&&p&&HOME& 移动到本行第一个字符。同0健。&/p&&p&$ 移动到行尾 3$ 移动到下面3行的行尾&/p&&p&gg 移动到文件头。 = [[&/p&&p&G(shift + g) 移动到文件尾。 = ]]&/p&&p&f(find)命令也可以用于移动,fx将找到光标后第一个为x的字符,3fd将找到第三个为d的字符。&/p&&p&F 同f,反向查找。&/p&&p&跳到指定行,冒号+行号,回车,比如跳到240行就是 :240回车。另一个方法是行号+G,比如230G跳到230行。&/p&&p&Ctrl + e 向下滚动一行&/p&&p&Ctrl + y 向上滚动一行&/p&&p&Ctrl + d 向下滚动半屏&/p&&p&Ctrl + u 向上滚动半屏&/p&&p&Ctrl + f 向下滚动一屏&/p&&p&Ctrl + b 向上滚动一屏&/p&&h2&&b&撤销和重做&/b&&/h2&&p&u 撤销(Undo)&br&U 撤销对整行的操作&br&Ctrl + r 重做(Redo),即撤销的撤销。&/p&&h2&&b&删除命令&/b&&/h2&&p&x 删除当前字符&/p&&p&3x 删除当前光标开始向后三个字符&/p&&p&X 删除当前字符的前一个字符。X=dh&/p&&p&dl 删除当前字符, dl=x&/p&&p&dh 删除前一个字符&/p&&p&dd 删除当前行&/p&&p&dj 删除上一行&/p&&p&dk 删除下一行&/p&&p&10d 删除当前行开始的10行。&/p&&p&D 删除当前字符至行尾。D=d$&/p&&p&d$ 删除当前字符之后的所有字符(本行)&/p&&p&kdgg 删除当前行之前所有行(不包括当前行)&/p&&p&jdG(jd shift + g)
删除当前行之后所有行(不包括当前行)&/p&&p&:1,10d 删除1-10行&/p&&p&:11,$d 删除11行及以后所有的行&/p&&p&:1,$d 删除所有行&/p&&p&J(shift + j)  删除两行之间的空行,实际上是合并两行。&/p&&h2&&b&拷贝和粘贴&/b&&/h2&&p&yy 拷贝当前行&/p&&p&nyy 拷贝当前后开始的n行,比如2yy拷贝当前行及其下一行。&/p&&p&p
在当前光标后粘贴,如果之前使用了yy命令来复制一行,那么就在当前行的下一行粘贴。&/p&&p&shift+p 在当前行前粘贴&/p&&p&:1,10 co 20 将1-10行插入到第20行之后。&/p&&p&:1,$ co $ 将整个文件复制一份并添加到文件尾部。&/p&&p&正常模式下按v(逐字)或V(逐行)进入可视模式,然后用jklh命令移动即可选择某些行或字符,再按y即可复制&/p&&p&ddp交换当前行和其下一行&/p&&p&xp交换当前字符和其后一个字符&/p&&h2&&b&剪切命令&/b&&/h2&&p&正常模式下按v(逐字)或V(逐行)进入可视模式,然后用jklh命令移动即可选择某些行或字符,再按d即可剪切&/p&&p&ndd 剪切当前行之后的n行。利用p命令可以对剪切的内容进行粘贴&/p&&p&:1,10d 将1-10行剪切。利用p命令可将剪切后的内容进行粘贴。&/p&&p&:1, 10 m 20 将第1-10行移动到第20行之后。&/p&&h2&&b&退出命令&/b&&/h2&&p&:wq 保存并退出&/p&&p&ZZ 保存并退出&/p&&p&:q! 强制退出并忽略所有更改&/p&&p&:e! 放弃所有修改,并打开原来文件。&/p&&h2&&b&窗口命令&/b&&/h2&&p&:split或new 打开一个新窗口,光标停在顶层的窗口上&/p&&p&:split file或:new file 用新窗口打开文件&/p&&p&split打开的窗口都是横向的,使用vsplit可以纵向打开窗口。&/p&&p&Ctrl+ww 移动到下一个窗口&/p&&p&Ctrl+wj 移动到下方的窗口&/p&&p&Ctrl+wk 移动到上方的窗口&/p&&p&关闭窗口&/p&&p&:close 最后一个窗口不能使用此命令,可以防止意外退出vim。&/p&&p&:q 如果是最后一个被关闭的窗口,那么将退出vim。&/p&&p&ZZ 保存并退出。&/p&&p&关闭所有窗口,只保留当前窗口&/p&&p&:only&/p&&p&录制宏&/p&&p&按q键加任意字母开始录制,再按q键结束录制(这意味着vim中的宏不可嵌套),使用的时候@加宏名,比如qa。。。q录制名为a的宏,@a使用这个宏。&/p&&h2&&b&执行shell命令&/b&&/h2&&p&:!command&/p&&p&:!ls 列出当前目录下文件&/p&&p&:!perl -c script.pl 检查perl脚本语法,可以不用退出vim,非常方便。&/p&&p&:!perl script.pl 执行perl脚本,可以不用退出vim,非常方便。&/p&&p&:suspend或Ctrl - Z 挂起vim,回到shell,按fg可以返回vim。&/p&&h2&&b&注释命令&/b&&/h2&&p&perl程序中#开始的行为注释,所以要注释某些行,只需在行首加入#&/p&&p&3,5 s/^/#/g 注释第3-5行&/p&&p&3,5 s/^#//g 解除3-5行的注释&/p&&p&1,$ s/^/#/g 注释整个文档。&/p&&p&:%s/^/#/g 注释整个文档,此法更快。&/p&&h2&&b&帮助命令&/b&&/h2&&p&:help or F1 显示整个帮助&br&:help xxx 显示xxx的帮助,比如 :help i, :help CTRL-[(即Ctrl+[的帮助)。&br&:help 'number' Vim选项的帮助用单引号括起&br&:help &Esc& 特殊键的帮助用&&扩起&br&:help -t Vim启动参数的帮助用-&br&:help i_&Esc& 插入模式下Esc的帮助,某个模式下的帮助用模式_主题的模式&br&帮助文件中位于||之间的内容是超链接,可以用Ctrl+]进入链接,Ctrl+o(Ctrl + t)返回&/p&&h2&&b&其他非编辑命令&/b&&/h2&&p&. 重复前一次命令&/p&&p&:set ruler?  查看是否设置了ruler,在.vimrc中,使用set命令设制的选项都可以通过这个命令查看&/p&&p&:scriptnames  查看vim脚本文件的位置,比如.vimrc文件,语法文件及plugin等。&/p&&p&:set list 显示非打印字符,如tab,空格,行尾等。如果tab无法显示,请确定用set lcs=tab:&-命令设置了.vimrc文件,并确保你的文件中的确有tab,如果开启了expendtab,那么tab将被扩展为空格。&/p&&p&&b&Vim教程&/b&&/p&&p&在Unix系统上&br&$ vimtutor&br&在Windows系统上&br&:help tutor&br&:syntax 列出已经定义的语法项&br&:syntax clear 清除已定义的语法规则&br&:syntax case match 大小写敏感,int和Int将视为不同的语法元素&br&:syntax case ignore 大小写无关,int和Int将视为相同的语法元素,并使用同样的配色方案&/p&&hr&&p&你想更深入了解学习Linux知识体系,你可以看一下我们花费了一个多月整理了上百小时的几百个知识点体系内容: &/p&&p&&a href=&https://link.zhihu.com/?target=http%3A//www.magedu.com/74163.html%3Flinux_wenzhang_zhihu_jinke_tiaocaobibei40ti_& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&【超全整理】《Linux云计算从入门到精通》linux学习入门教程系列实战笔记&/a&&/p&
分享一篇文章,原文是。命令历史以:和/开头的命令都有历史纪录,可以首先键入:或/然后按上下箭头来选择某个历史命令。启动vim在命令行窗口中输入以下命令即可vim 直接启动vimvim filename 打开vim并创建名为filename的文件文件命令打开单个文件v…
&p&本文分别介绍 Materials Studio 中的 Castep 模块和 vasp+phonopy 使用 Finite difference method 和 DFPT 方法进行声子谱计算。&/p&&h2&Castep&/h2&&p&以 Ge 和 Fe 为例,介绍 Castep 模块的声子谱计算方法。&/p&&h2&线性响应或密度泛函微扰理论(DFPT)&/h2&&p&线性响应或密度泛函微扰理论是点阵动力学从头开始计算中最受欢迎的方法之一,尽管如此,这种方法的应用已经扩充到对振动属性的研究。线性响应提供了一种分析方法用于计算给定混乱的二级派生的整体能量。可以计算出许多属性,主要依赖于混乱的种类。在离子位置的混乱可以引起动力矩阵和声子;在磁场中引起NMR效应;在单位晶格矢量中产生弹性常数;在电场中引起非传导性效应等。 &/p&&p&此部分以锗为例,使用 castep 进行线性响应声子谱计算。包含以下内容:&/p&&ol&&li&优化 Ge 单胞结构&/li&&li&计算声子谱及态密度&/li&&li&显示声子谱及态密度&/li&&li&显示热力学属性&/li&&/ol&&h2&1. 优化 Ge 单胞结构&/h2&&p&导入锗的结构,在菜单栏中选择 File | Import。遵循下列路径 structures/metals/pure metals 选中 Ge.xsd。将其转换为原胞,使得计算速度加快。从菜单栏中选择Build | Symmetry | Primitive Cell。接下来优化锗的几何机构。&/p&&figure&&img src=&https://pic1.zhimg.com/v2-090d3b2c3bba5a2f71aa86b_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&879& data-rawheight=&425& class=&origin_image zh-lightbox-thumb& width=&879& data-original=&https://pic1.zhimg.com/v2-090d3b2c3bba5a2f71aa86b_r.jpg&&&/figure&&p&菜单栏中选择 Modules | CASTEP | Calculation。&/p&&ol&&li&在Setup标签上,把 Task 从 Energy 改为 Geometry Optimization,把 Functional 改为 LDA ,不选 Metal 。&/li&&li&选中 Electronic 标签,把 Energy cutoff 设置为 Ultra-fine,把 SCF tolerance 设置为
Ultra-fine,把 k-point set 设置为 Fine 以及把 Pseudo-potentials 设置为 Norm-conserving。&/li&&li&选中 Job Control 标签。选择你想要在其上运行工作的 Gateway location。把 Runtime optimization 设置为 Speed。&/li&&li&按下Run按钮开始运行。&/li&&/ol&&p&工作提交后开始运行。它大概需要2分钟时间,这主要取决于你的电脑的速度。结果放在一个被称为 Ge CASTEP GeomOpt 的新文件夹中。&/p&&h2&2. 计算声子谱及态密度&/h2&&p&为了计算声子散射和声子的能态密度,在从 CASTEP Calculation 对话框的 Properties 标签选定适当的属性后,我们必须完成一个单点能量计算。&/p&&figure&&img src=&https://pic4.zhimg.com/v2-afd0b801cfe102c0d1b6_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&922& data-rawheight=&435& class=&origin_image zh-lightbox-thumb& width=&922& data-original=&https://pic4.zhimg.com/v2-afd0b801cfe102c0d1b6_r.jpg&&&/figure&&ol&&li&确定 Ge CASTEP GeomOpt 文件夹中的 Ge.xsd 文件示激活文档。&/li&&li&选中 CASTEP Calculation 对话框中的 Setup 标签,把 Task 设置为 Energy。&/li&&li&在 CASTEP Calculation 对话框中选定 Properties 标签。选择 Phonon,勾选 Both,按下 More… 按钮,勾选 Use Interpolation,并且 把Dispersion,Density of states 设置为 fine。&/li&&li&选中 Job Control 标签。选择你想要在其上运行工作的 Gateway location,提交作业。&/li&&/ol&&p&在 Ge CASTEP GeomOpt 文件夹中创建了一个名为 Ge CASTEP Energy 的新文件。当能量计算完成后,两个新文件 Ge&i&PhononDisp.castep 和 Ge&/i&PhononDOS.castep 放在此文件夹中。 &/p&&h2&3. 显示声子谱及态密度&/h2&&p&声子散射曲线显示出声子能量沿着布里渊区高对称性方向如何依赖于 q 向量。此信息可以从单晶的中子散射实验中获得。只有为数不多的物质可以获得这样的信息,所以用来确定建模方法是否正确的理论偏差曲线对于论证从头开始计算方法的预测性能力是非常有用的。在一定情形下,它可能测量态密度而不是声子散射。而且与声子的态密度有直接关系的电子—声子交感作用可以通过隧道实验直接测量。所以能够从第一原理计算出声子的态密度是非常重要的。&/p&&p&Materials Studio 可以从任何 .phonon CASTEP 输出文件中产生声子散射图和态密度图。这些文件隐藏在 Project Explorer 里,但是一个 .phonon 文件会和每一个拥有 PhonDisp 或 PhonDOS 后缀的 .castep 文件一起产生。接下来使用先前的计算结果来创建声子散射图。&/p&&p&从 Materials Studio 的菜单栏中选择 Modules | CASTEP | Analysis。从属性列表中选择 Phonon dispersion。确定 Results file 选择框中显示的是 Ge_PhononDisp.castep。从 Units 下拉列表中选择 cm-1。从 Graph style 下拉列表中选择 Line。按下 View 按钮。&/p&&p&在结果文档中创建了一个新的图形文档 Ge Phonon Dispersion.xcd。它应和下图相似:&/p&&figure&&img src=&https://pic3.zhimg.com/v2-d552b7ff40ee0d00b5f8ab_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&773& data-rawheight=&365& class=&origin_image zh-lightbox-thumb& width=&773& data-original=&https://pic3.zhimg.com/v2-d552b7ff40ee0d00b5f8ab_r.jpg&&&/figure&&p&声子散射的实验图如下所示:&/p&&figure&&img src=&https://pic4.zhimg.com/v2-499e49e45ed0b4c60a63b8fcfc850b36_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&505& data-rawheight=&216& class=&origin_image zh-lightbox-thumb& width=&505& data-original=&https://pic4.zhimg.com/v2-499e49e45ed0b4c60a63b8fcfc850b36_r.jpg&&&/figure&&p&预测的频率可从Ge_PhononDisp.castep文件中得到。&/p&&p&在 Project Explorer 中双击 Ge_PhononDisp.castep 。按 CRTL+F 键,搜索 Vibrational Frequencies。结果文件中的部分内容如下所示:&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&==============================================================================
Vibrational Frequencies
-----------------------
+ Performing frequency calculation at
40 wavevectors (q-pts)
+ ========================================================================== +
+ -------------------------------------------------------------------------- +
0...750000)
+ -------------------------------------------------------------------------- +
Acoustic sum rule correction &
0.010115 cm-1 applied
Frequency irrep.
114.755657
114.755657
204.802542
204.802542
274.989890
274.989890
+ .......................................................................... +
Character table from group theory analysis of eigenvectors
Point Group =
+ .......................................................................... +
| --------------------
&/code&&/pre&&/div&&p&每一个q点和每一个分支(纵向光波或声波(LO/LA),横向光波或声波(TO/TA)的频率以 cm-1 给出,同时也给出了 q 点在倒易空间中的位置。高对称性点 G, L 和 X 在倒易空间中的位置各自为(0 0 0), (0.5 0.5 0.5) 和 (0.5 0 0.5)。这些点和 q 点12, 6 以及19相对应。预测的频率(cm-1)和实验的频率(cm-1)如下:&/p&&figure&&img src=&https://pic1.zhimg.com/v2-53bca5930f4adffdc592d_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&558& data-rawheight=&339& class=&origin_image zh-lightbox-thumb& width=&558& data-original=&https://pic1.zhimg.com/v2-53bca5930f4adffdc592d_r.jpg&&&/figure&&p&总体来说,计算的精度是可以接受的。通过对更好的 SCF k 点格子的计算,我们可以获得更加另人满意的实验结果。&/p&&p&现在创建声子态密度图:&br&从 Materials Studio 菜单栏中选择 Modules | CASTEP | Analysis 。从属性列表中选择 Phonon density of states。确定 Results file
选择框中显示的是 Ge&i&PhononDOS.castep。把 DOS display 设置为 Full。按 View 按钮。创建了一个新的图形文档 Ge&/i&PhonDOS Phonon DOS.xcd,如下图:&/p&&figure&&img src=&https://pic4.zhimg.com/v2-1fdda947ff3df4a2bcb3797_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&847& data-rawheight=&365& class=&origin_image zh-lightbox-thumb& width=&847& data-original=&https://pic4.zhimg.com/v2-1fdda947ff3df4a2bcb3797_r.jpg&&&/figure&&p&&br&&/p&&h2&4. 显示热力学属性&/h2&&p&在CASTEP中的声子计算可以用来评价近似准谐波晶体的焓,熵,自由能,格子的热容对于温度的依赖性。可以用这些结果和实验数据(如,热容的测量)相比较以预测不同的结构经过修正后的相稳定性和相转变。&/p&&p&所有与能量相关的属性均画在同一种曲线图中,并且零点能量的计算值也包括在内。热容被独自画在图表的右侧。现在使用声子计算的结果创建热力学属性图表。&/p&&p&从 Materials Studio 菜单栏中选择 Modules | CASTEP | Analysis 。从属性列表中选择 Thermodynamic properties。确定 Results file 选择框中显示的是 Ge_PhononDOS.castep。勾选上 Debye temperature 图,按下 View 按钮。在结果文件夹中创建了两个新的图形文档 Ge Thermodynamic Properties.xcd 和 Ge Debye Temperature.xcd。所示图形如下:&/p&&figure&&img src=&https://pic1.zhimg.com/v2-61b1351ecc64ad127dac0_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&879& data-rawheight=&365& class=&origin_image zh-lightbox-thumb& width=&879& data-original=&https://pic1.zhimg.com/v2-61b1351ecc64ad127dac0_r.jpg&&&/figure&&figure&&img src=&https://pic4.zhimg.com/v2-4aecf22715_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&879& data-rawheight=&365& class=&origin_image zh-lightbox-thumb& width=&879& data-original=&https://pic4.zhimg.com/v2-4aecf22715_r.jpg&&&/figure&&p&&br&&/p&&p&没有非谐性的实验结果表明在高温极限的 Debye 温度是395(3)K。模拟的 Debye 温度是396 K,很好的与实验值相符。考虑到所完成的计算的级别(given the level of calculation performed),这个结果还是可以接受的。使用更好的k点格子可以提高精确度。通过实验,推导出 Debye 温度在低温极限时的数值为374K,而 CASTEP 的预测值为460K。&/p&&p&我们也应该注意到类似的谐波近似是声子计算的基础,但是当温度高于 Debye 温度的三分之一时,类似的谐波近似是无效的。结果,在温度高于 Debye 温度时,非谐性影响出现,不能够仅仅依靠量的改变来解释。&/p&&p&尽管如此,总的来说,实验图表和由 CASTEP 产生的图表在质量上是非常相似的。当 Debye
最低温度达到255K时,在实验图表上会骤然降低25K;
CASTEP 显示出温度骤降出现在相同的位置并且预测出 Debye 温度的最小值大约为270K。&/p&&h2&有限位移法 (Finite difference method)&/h2&&p&在点阵动力学计算中有两种主要的方法:密度泛函微扰理论(DFPT)和有限位移方法。第一种方法通常比较快速并且更加精确,但是它的执行是有问题的,并且受到一系列的限制。目前,在 CASTEP 中 DFPT 只能用于具有 fixed occupancies (绝缘体)、没有自旋极化并且只能对 norm-conserving 赝势使用。这样,对广泛的材料种类 (包括磁性材料和金属),声子计算只能通过采用有限位移算法来执行。&/p&&p&此部分以铁为例,使用 castep 进行有限位移声子谱计算。包含以下内容:&/p&&ol&&li&优化 Fe 晶胞结构&/li&&li&计算声子谱及态密度&/li&&li&显示声子谱及态密度&/li&&li&显示热力学属性&/li&&/ol&&h2&1. 优化 Fe 晶胞结构&/h2&&p&导入铁的结构,菜单栏选择 File | Import...,定位到 Structures/metals/pure metals 并选择 Fe.msi。通过将晶胞转化为原胞通常能减少计算时间。&br&从菜单栏选择 Select Build | Symmetry | Primitive Cell。从工具栏选择CASTEP工具,然后选择 Calculation,或者从菜单栏选择 Modules | CASTEP | Calculation。&/p&&p&&br&&/p&&figure&&img src=&https://pic1.zhimg.com/v2-a88e0bf77beebfa844db4550feb13c54_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&879& data-rawheight=&365& class=&origin_image zh-lightbox-thumb& width=&879& data-original=&https://pic1.zhimg.com/v2-a88e0bf77beebfa844db4550feb13c54_r.jpg&&&/figure&&p&&br&&/p&&p&在 Setup 选项卡上,将 Task 从 Energy 改为 Geometry Optimization,设置 Quality 为 Medium,设置 Functional 为 LDA。选中 Spin polarized 复选框,取消选择 Use formal spin as initial。设置 Initial spin 值为2。&/p&&p&LDA/CA-PZ 局域交换关联泛函被认为是可获得的最准确的描述之一,将 initial spin 值设为2是因为我们正在模拟铁磁性的 Fe 晶体。&/p&&p&几何优化的默认值不包含晶胞的优化。&/p&&ol&&li&点击 More... 按钮,在 CASTEP Geometry Optimization 对话框上,选中 Optimize cell,关闭对话框。&/li&&li&选择 Electronic 选项卡并设置 Pseudopotentials 值为 Ultrasoft。&/li&&li&选择 Job Control 选项卡,为 job 选择 Gateway 位置并设置 Runtime optimization 为 Memory。&/li&&li&击More...按钮,打开 CASTEP Job Control Options 对话框,在 Live updates 区域取消选择所有选项,关闭对话框。&/li&&li&点击 Run 按钮启动 job。&/li&&/ol&&h2&2. 计算声子谱及态密度&/h2&&p&为了计算声子散射和声子态密度,必须执行单点能量计算,并为计算选择适当的性能。&/p&&ol&&li&确保 Fe CASTEP GeomOpt 目录中的 Fe.xsd 是活动文档。&/li&&li&在 CASTEP Calculation 对话框上选择 Setup 选项卡,并设置 Task 为 Energy 。&/li&&li&在 Properties 选项卡上,选择 Phonons 复选框,选择 Both
选项以选中态密度和散射。取消选择 Calculate LO-TO splitting,将 Method 选为 Finite displacement。&/li&&li&点击 More... 按钮,显示 CASTEP Phonon Properties Setup 对话框。确保 Method 为 Finite displacement。设置 Supercell defined by cutoff radius 值为3.6 ?。将 Dispersion 和 Density of states 的 Quality 值都设置为 Fine。关闭 CASTEP Phonon Properties Setup 对话框。&/li&&li&选择 Job Control 选项卡并为计算选择 Gateway。&/li&&li&点击 More... 按钮,打开 CASTEP Job Control Options 对话框并选中所有 Live update s选项,关闭对话框。&/li&&li&点击Run按钮。&/li&&/ol&&p&注意:纵向光学横向光学(LO)劈裂不能对金属进行计算,因为它们在Γ-point是相同的。有限位移方案被设计用于金属和自旋极化系统(以及为那些具有高效超软势能的系统)。对铁磁性Fe这是理想的计算声子势能的方法。&/p&&p&Cutoff radius 的选择对有限位移运算是至关重要的参数。当使用较大的 cutoff radius 值时精度较高,因为这时考虑了更多的近邻。然而,随着该值的增加,计算时间增加的非常迅速。出于实际原因,在本教程中,对该参数选择了较小的值。声子频率的收敛作为 cutoff radius 的函数在执行有意义的实验计算时应该被研究。&/p&&p&Job 被提交并开始运行。一个叫做 Fe CASTEP Energy 的新目录被建立在 Fe CASTEP GeomOpt 目录中。当能量计算结束时,新的结果文件被放置在该目录中,包括 Fe&i&PhonDisp.castep 和 Fe&/i&PhonDOS.castep。&/p&&h2&3. 显示声子谱及态密度&/h2&&p&生成声子谱&/p&&ol&&li&从 Materials Studio 菜单栏选择 Modules | CASTEP | Analysis,从性能列表中选择 Phonon dispersion,确保 Results file 选择器显示 Fe_PhononDisp.castep。&/li&&li&从 Units 下拉列表选择 cm-1,从 Graph style 下拉列表选择 Line。&/li&&li&点击View按钮。&/li&&/ol&&p&生成声子态密度曲线。&/p&&ol&&li&从 Materials Studio 菜单栏选择 Modules | CASTEP | Analysis ,从性能列表中 选择 Phonon density of states,确保 Results file 选择器显示 Fe_PhonDOS.castep。&/li&&li&设置 DOS display 为 Full,点击 More...
按钮,打开 CASTEP Phonon DOS Analysis Options 对话框,选择 Interpolation 作为 Integration method,设置 Accuracy level 为 Fine。点击 OK 按钮。&/li&&li&在 CASTEP Analysis 对话框上点击 View 按钮。&/li&&/ol&&h2&4. 显示热力学属性&/h2&&p&现在使用声子计算的结果创建热力学属性图表。&/p&&ol&&li&从 Materials Studio 菜单栏中选择 Modules | CASTEP | Analysis 。从属性列表中选择 Thermodynamic properties。确定 Results file
选择框中显示的是 Fe_PhononDOS.castep。&/li&&li&勾选上 Debye temperature 图,按下 View 按钮。&/li&&/ol&&p&在结果文件夹中创建了两个新的图形文档 Fe Thermodynamic Properties.xcd 和 Fe Debye Temperature.xcd。 &/p&&h2&Vasp + Phonopy&/h2&&ol&&li&Phonopy 安装&/li&&li&DFPT&/li&&li&Finite difference method&/li&&/ol&&h2&1. Phonopy 安装&/h2&&p&Phonopy 是一款由 Python 编译,基于第一性原理进行声子计算的开源软件。常规安装需要各种依赖与相应配置,繁琐复杂。安装 Anaconda 则可大大减少其复杂程度。&/p&&ol&&li&Anaconda 安装&/li&&li&Phonopy 安装&/li&&/ol&&h2&Anaconda 安装&/h2&&p&下载 Anaconda &a href=&https://link.zhihu.com/?target=https%3A//mirrors.tuna.tsinghua.edu.cn/help/anaconda/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&清华镜像&/a& (国内下载速度快),本文以 Anaconda3-5.0.1-Linux-x86_64.sh 为例进行安装。&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&bash Anaconda3-5.0.1-Linux-x86_64.sh
&/code&&/pre&&/div&&p&按照提示进行安装,当提示是否添加添加环境变量时,输入 yes。或输入:&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&echo 'export PATH=&~/anaconda3/bin:$PATH&' && ~/.bashrc
source ~/.bashrc
&/code&&/pre&&/div&&p&终端输入 &code&conda&/code& 查看是否安装成功,显示&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&[yourname@localhost ~]$ conda
usage: conda [-h] [-V] command ...
conda is a tool for managing and deploying applications, environments and packages.
..........
&/code&&/pre&&/div&&h2&Phonopy 安装&/h2&&p&至&a href=&https://link.zhihu.com/?target=https%3A//pypi.python.org/pypi/phonopy& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&官网下载&/a& Phonopy,本文以 phonopy-1.11.2.tar.gz 版本为例,提供&a href=&https://link.zhihu.com/?target=https%3A//pan.baidu.com/s/1IrcAX98aycXNLGyQhLEvcQ& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&百度云下载&/a&,解压&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&tar xzvf phonopy-1.11.2.tar.gz
&/code&&/pre&&/div&&p&进入安装目录,安装&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&python setup.py install
&/code&&/pre&&/div&&p&输入 &code&phonopy&/code& 查看是否安装成功,显示&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&[yourname@localhost ~]$ phonopy
_ __ | |__
| '_ \| '_ \ / _ \| '_ \ / _ \ | '_ \| | | |
| |_) | | | | (_) | | | | (_) || |_) | |_| |
| .__/|_| |_|\___/|_| |_|\___(_) .__/ \__, |
Crystal structure file of POSCAR (default file name) could not be found.
___ _ __ _ __ ___
/ _ \ '__| '__/ _ \| '__|
| | | (_) | |
&/code&&/pre&&/div&&h2&2. DFPT&/h2&&p&此部分以&a href=&https://link.zhihu.com/?target=https%3A//atztogo.github.io/phonopy/vasp-dfpt.html& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&官网算例 NaCl&/a& 介绍,做简单翻译补充。&/p&&h2&1. 准备原胞,命名为 &code&POSCAR-unitcell&/code&&/h2&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&Na Cl
&/code&&/pre&&/div&&h2&2. 扩胞&/h2&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&phonopy -d --dim=&2 2 2& -c POSCAR-unitcell
&/code&&/pre&&/div&&h2&3. vasp 计算力常数&/h2&&p&以上一步生成的 SPOSCAR 为 POSCAR,准备 KPOINTS、POTCAR 和 INCAR,进行 vasp 计算。&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&mv SPOSCAR POSCAR
&/code&&/pre&&/div&&p&INCAR&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&PREC
= Accurate
IBRION = 8
ISMEAR = 0
ADDGRID= .TRUE.
LCHARG = .FALSE.
&/code&&/pre&&/div&&h2&4. 收集力常数&/h2&&p&用 vasp 计算得到的 vasprun.xml 生成力常数文件 FORCE_CONSTANTS。&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&phonopy --fc vasprun.xml
&/code&&/pre&&/div&&h2&5. phonopy 后处理&/h2&&p&需要准备输入文件&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&# band.conf
ATOM_NAME = Na Cl
DIM = 2 2 2
PRIMITIVE_AXIS = 0.0 0.5 0.5
0.5 0.0 0.5
0.5 0.5 0.0
BAND = 0.0 0.0 0.0
0.5 0.0 0.0
0.5 0.5 0.0
0.0 0.0 0.0
0.5 0.5 0.5
FORCE_CONSTANTS = READ
$ phonopy --dim=&2 2 2& -c POSCAR-unitcell band.conf
#band plot
&/code&&/pre&&/div&&p&NOTE: &br&1. 后处理时加参数 &code&--factor=521.471&/code& 可将频率单位转换为 cm-1。&br&2. bandplot --gnuplot band.yaml & band.dat 可以把声子的结构转化成 da t文件用 oringin 来画图&/p&&h2&3. Finite difference method&/h2&&p&同以&a href=&https://link.zhihu.com/?target=https%3A//atztogo.github.io/phonopy/vasp.html& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&官网算例&/a&介绍&/p&&h2&1. 准备原胞,扩胞&/h2&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&Si O
&/code&&/pre&&/div&&p&创建一系列有限位移的超胞&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&phonopy -d --dim='2 2 3'
&/code&&/pre&&/div&&p&产生 disp.yaml
phonopy_disp.yaml
POSCAR-001
POSCAR-002
POSCAR-003
SPOSCAR&/p&&h2&2. vasp 计算力常数&/h2&&p&准备输入文件KPOINTS、POTCAR、POSCAR和INCAR,使用脚本批量计算,&code&generation.sh&/code& (根据所产生 POSCAR 数量修改)&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&#!/bin/bash
for i in 1 2 3; do
cp POSCAR-00$i $i/POSCAR
cp INCAR KPOINTS POTCAR $i/
&/code&&/pre&&/div&&p&INCAR&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&PREC
= Accurate
IBRION = -1
ISMEAR = 0
LCHARG = .FALSE.
&/code&&/pre&&/div&&h2&3. 收集力常数&/h2&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&phonopy -f 1/vasprun.xml 2/vasprun.xml 3/vasprun.xml
&/code&&/pre&&/div&&h2&4. phonopy 后处理&/h2&&p&声子态密度,热性质(自由能,熵,等压热容)的计算需要准备 mesh.conf 文件,投影态密度的计算准备 pdos.conf 文件,声子谱计算准备 band.conf 文件&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&# mesh.conf
ATOM_NAME = Si O
DIM = 2 2 3
MP = 8 8 8
$ phonopy -p mesh.conf
$ phonopy -t mesh.conf
#thermal properties print
$ phonopy -t -p mesh.conf
#thermal properties print and plot
# pdos.conf
ATOM_NAME = Si O
DIM = 2 2 3
MP = 8 8 8
PDOS = 1 2, 3 4 5 6
$ phonopy -p pdos.conf
#pdos plot
# band.conf
ATOM_NAME = Si O
DIM = 2 2 3
BAND = 0.5 0.5 0.5 0.0 0.0 0.0 0.5 0.5 0.0 0.0 0.5 0.0
$ phonopy -p band.conf
#band plot
&/code&&/pre&&/div&&p&本文主要来源网络资源收集整理,参考资料如下:&/p&&a href=&https://link.zhihu.com/?target=http%3A//blog.sciencenet.cn/blog-178.html& data-draft-node=&block& data-draft-type=&link-card& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&VASP-DFPT+phonopy 计算声子谱:最好的老师是英文手册&/a&&a href=&https://zhuanlan.zhihu.com/p/& data-draft-node=&block& data-draft-type=&link-card& class=&internal&&妖锘:vasp+phonopy计算的两种方法&/a&&a href=&https://link.zhihu.com/?target=https%3A//wenku.baidu.com/view/ac0c26ee0b4e767f5bcfce3c.html& data-draft-node=&block& data-draft-type=&link-card& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&第六讲第一原理计算方法简介及Materials Studio中Castep使用&/a&&a href=&https://link.zhihu.com/?target=https%3A//atztogo.github.io/phonopy/vasp-dfpt.html& data-draft-node=&block& data-draft-type=&link-card& data-image=&https://pic3.zhimg.com/v2-ed707dd81a2_180x120.jpg& data-image-width=&812& data-image-height=&612& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&VASP-DFPT & phonopy calculation&/a&&a href=&https://link.zhihu.com/?target=https%3A//atztogo.github.io/phonopy/vasp.html& data-draft-node=&block& data-draft-type=&link-card& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&VASP & phonopy calculation&/a&&p&&/p&
本文分别介绍 Materials Studio 中的 Castep 模块和 vasp+phonopy 使用 Finite difference method 和 DFPT 方法进行声子谱计算。Castep以 Ge 和 Fe 为例,介绍 Castep 模块的声子谱计算方法。线性响应或密度泛函微扰理论(DFPT)线性响应或密度泛函微扰理论…
&figure&&img src=&https://pic1.zhimg.com/v2-b32c04b826d1d39e4845_b.jpg& data-rawwidth=&640& data-rawheight=&400& class=&origin_image zh-lightbox-thumb& width=&640& data-original=&https://pic1.zhimg.com/v2-b32c04b826d1d39e4845_r.jpg&&&/figure&&blockquote&TensorFlow 是 Google 研发的第二代人工智能学习系统,是 Google 为了帮助全球开发者们更加方便和高效地开发机器学习 (Machine Learning)和人工智能 (AI) 应用而开发的一整套开发平台和框架。被广泛应用于语音识别和图像识别等多项机器学习、深度学习领域。开发者可以使用 TensorFlow 轻松进行模型的构建和训练。&br&为了方便开发者和研究人员了解学习和使用 TensorFlow,我们准备了下列内容。并为大家提供了 &b&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow 中文文档&/a&&/b&。&/blockquote&&h2&TensorFlow 中文文档说明
&/h2&&p&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow Docs&/a& 是由&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&掘金翻译计划&/a&实时维护的 TensorFlow 官方文档中文版,维护者由全球各大公司开发人员和各著名高校研究者及学生组成。欢迎大家加入维护团队,欢迎提 Issue 和 PR。&/p&&blockquote&详细内容请见 &/blockquote&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs& data-draft-node=&block& data-draft-type=&link-card& data-image=&https://pic3.zhimg.com/v2-0d4abb57fce89d887e18d6_ipico.jpg& data-image-width=&180& data-image-height=&180& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&xitu/tensorflow-docs&/a&&figure&&img src=&https://pic2.zhimg.com/v2-334c2c0b9adb57927a67_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&2016& data-rawheight=&1124& class=&origin_image zh-lightbox-thumb& width=&2016& data-original=&https://pic2.zhimg.com/v2-334c2c0b9adb57927a67_r.jpg&&&/figure&&p&&br&&/p&&h2&教程
&/h2&&blockquote&如果你还没有安装 TensorFlow,可以按照以下教程进行安装:&/blockquote&&ol&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/install/install_linux.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&在 Ubuntu 上安装 TensorFlow&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/install/install_mac.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&在 macOS 中安装 TensorFlow&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/install/install_windows.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&在 Windows 上安装 TensorFlow&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/install/install_sources.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&通过源码安装 TensorFlow&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/install/install_c.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&安装 TensorFlow for C&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/install/install_go.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&安装 Go 版本 Tensorflow&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/install/install_java.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&安装 TensorFlow for Java&/a&&/li&&/ol&&blockquote&接下来,如果你对 TensorFlow 还不熟悉,请阅读下面链接中的文档,其中包括:为机器学习新手准备的指南、为有机器学习经验的读者准备的指南、高阶 API 中的关键功能介绍和适用于进阶用户的介绍:&/blockquote&&ol&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/get_started/index.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&开始使用 TensorFlow 介绍&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/tree/zh-hans/get_started& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow Docs Get_Started&/a&&/li&&/ol&&blockquote&接下来学习如何在真实世界中部署模型:&/blockquote&&ol&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/deploy/distributed.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&如何创建一个 TensorFlow 服务器集群&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/deploy/hadoop.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&如何在 Hadoop 上运行 Tensorflow&/a&&/li&&/ol&&blockquote&接下来可以学习在 TensorFlow 中进行各种特定任务的教程:包括图像识别,序列,数据的表示和非机器学习类内容&/blockquote&&ol&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/tutorials/index.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow 中进行各种特定任务的教程目录&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/tutorials& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow Docs Tutorials&/a&&/li&&/ol&&blockquote&进一步的文档会深入介绍 TensorFlow 的工作细节。包括顶层 API、底层 API、机器学习概念、TensorFlow 调试器、TensorBoard 和其他内容。&/blockquote&&ol&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/programmers_guide/index.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&开发者指南教程目录&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/programmers_guide& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow Docs Programmers_Guide&/a&&/li&&/ol&&blockquote&在训练机器学习模型时,性能往往是一个值得关注的问题。接下来你可以学习数种优化性能的方法:&/blockquote&&ol&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/performance/index.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&性能优化方法教程目录&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/performance& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow Docs Performance&/a&&/li&&/ol&&blockquote&最后可以学习如何向 TensorFlow 添加功能等更加深入的问题:&/blockquote&&ol&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/extend/index.md& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow 功能拓展教程目录&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/blob/zh-hans/extend& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow Docs Extend&/a&&/li&&/ol&&p&此外还有前段时间 Google 官方推出的 &a href=&https://link.zhihu.com/?target=https%3A//developers.google.cn/machine-learning/crash-course/%3Fhl%3Dzh-CN& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&机器学习速成课程&/a&。&/p&&h2&Q&A
&/h2&&p&&b&问:掘金为什么翻译 TensorFlow 官方文档?&/b&&/p&&p&答:网上有各种版本的 TensorFlow 中文文档,但存在质量差、版本旧和不维护等问题,为了解决这些痛点,为 TensorFlow 学习者提供更可靠的学习资源,降低 TensorFlow 的门槛,让更多开发者能够触及新兴技术,掘金翻译计划进行了这次文档的翻译。&/p&&p&&b&问:我可以加入文档维护吗?&/b&&/p&&p&答:当然可以,你需要先了解掘金翻译计划,学习 &a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner/wiki& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&译者教程&/a&,在 &a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&这儿&/a& 申请加入翻译计划,申请通过后先进行一篇以上的文章校对(为了熟悉流程),然后学习 &a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/wiki%23%25E6%E6%25A1%25A3%25E7%25BB%25B4%25E6%258A%25A4%25E8%25A7%%258C%2583& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow 中文文档维护说明&/a&,之后就可以在 &a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/issues& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&这儿&/a& 和 &a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs/pulls& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&这儿&/a& 进行文档翻译和校对任务。也可以发现文档有不足发起 Pull Request 进行修改。&/p&&p&&b&问:我可以和掘金翻译计划合作么?&/b&&/p&&p&答:当然可以,对于翻译计划相关的活动,掘金会给足量的曝光。联系请加微信: 或 扫描&a href=&https://link.zhihu.com/?target=http%3A//oiiyyn1t0.bkt.clouddn.com/wechat-.jpg& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&二维码&/a&。&/p&&hr&&blockquote&下面为大家提供些 Tensorflow 相关学习资源&/blockquote&&h2&权威资源
&/h2&&ol&&li&
官网&a href=&https://link.zhihu.com/?target=https%3A//www.tensorflow.org/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&:www.tensorflow.or&/a&g&/li&&li&
中文版文档&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&:TensorFlow Doc&/a&s&/li&&li&
Google+&a href=&https://link.zhihu.com/?target=https%3A//plus.google.com/communities/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&:TensorFlow Google+ 社&/a&群&/li&&li&
Github:&a href=&https://link.zhihu.com/?target=https%3A//github.com/tensorflow& class=& external& target=&_blank& rel=&nofollow noreferrer&&&span class=&invisible&&https://&/span&&span class=&visible&&github.com/tensorflow&/span&&span class=&invisible&&&/span&&/a&&/li&&li&
Twitter:&a href=&https://link.zhihu.com/?target=https%3A//twitter.com/tensorflow& class=& external& target=&_blank& rel=&nofollow noreferrer&&&span class=&invisible&&https://&/span&&span class=&visible&&twitter.com/tensorflow&/span&&span class=&invisible&&&/span&&/a&&/li&&li&
Slack:&a href=&https://link.zhihu.com/?target=https%3A//tensor-flow-talk-invite.herokuapp.com/invite& class=& external& target=&_blank& rel=&nofollow noreferrer&&&span class=&invisible&&https://&/span&&span class=&visible&&tensor-flow-talk-invite.herokuapp.com&/span&&span class=&invisible&&/invite&/span&&span class=&ellipsis&&&/span&&/a&&/li&&/ol&&h2&视频
&/h2&&ol&&li&&a href=&https://link.zhihu.com/?target=https%3A//www.coursera.org/specializations/deep-learning& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Deep Learning | Coursera&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//www.coursera.org/learn/machine-learning& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Machine Learning | Coursera&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//www.coursera.org/learn/ml-foundations& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Machine Learning Foundations: A Case Study Approach | Coursera&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//www.youtube.com/playlist%3Flist%3DPLXO45tsB95cKI5AIlf5TxxFPzb-0zeVZ8& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Tensorflow tutorials (Eng Sub) 神经网络系列教程 | YouTube&/a&&/li&&/ol&&h2&相关开源库
&/h2&&ol&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/tensorflow/tensorboard& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Tensorboard: TensorFlow's Visualization Toolkit&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/tensorflow/tensor2tensor& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Tensor2tensor: A library for generalized sequence to sequence models&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/tensorflow/tensorboard-plugin-example& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Tensorboard-plugin-example&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/tensorflow/playground& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Playground: Play with neural networks&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/tensorflow/skflow& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Skflow: Simplified interface for TensorFlow for Deep Learning&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/tensorflow/fold& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Flod: Deep learning with dynamic computation graphs in TensorFlow&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/aymericdamien/TensorFlow-Examples& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow-Examples: TensorFlow Tutorial and Examples for Beginners with Latest APIs&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/tflearn/tflearn& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&tflearn: Deep learning library featuring a higher-level API for TensorFlow&/a&&/li&&/ol&&h2&感谢以下译者
&/h2&&ul&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/pkuwwt& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&pkuwwt&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/JohnJiangLA& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&JohnJiangLA&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/lsvih& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&lsvih&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/foxxnuaa& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&foxxnuaa&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/leviding& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&leviding&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/edvardhua& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&edvardhua&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/XatMassacrE& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&XatMassacrE&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/changkun& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&changkun&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/shi-xiaopeng& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&shi-xiaopeng&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/charsdavy& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&charsdavy&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/romeo0906& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&romeo0906&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/carriecc& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&carriecc&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/wzy816& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&wzy816&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/windhaunting& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&windhaunting&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/tobiaslee& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&tobiaslee&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/MRNIU& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&MRNIU&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/caoyi0905& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&caoyi0905&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/joyking7& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&joyking7&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/jasonxia23& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&jasonxia23&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/vuuihc& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&vuuihc&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/xiaoxi666& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&xiaoxi666&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/bobmayuze& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&bobmayuze&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/cacppuccino& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&cacppuccino&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/filosfino& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&filosfino&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/witmax& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&witmax&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/missmisslonely& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&missmisslonely&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/gzponline& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&gzponline&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/San-greal& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&San-greal&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/owenlyn& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&owenlyn&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/SallyGo& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&SallyGo&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/ppp-man& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&ppp-man&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/Quorafind& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Quorafind&/a&,&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/elijahxyc& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&elijahxyc&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/linbaiwpi& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&linbaiwpi&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/zcgeng& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&zcgeng&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/whatbeg& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&whatbeg&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/asdf2014& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&asdf2014&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/MoutainOne& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&MoutainOne&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/LilianYe& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&LilianYe&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/Raoul1996& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Raoul1996&/a&,&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/mnikn& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&mnikn&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/PeterChenYijie& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&PeterChenYijie&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/jaymz1439& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&jaymz1439&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/xfffrank& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&xfffrank&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/luffydream& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&luffydream&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/GanymedeNil& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&GanymedeNil&/a&, &a href=&https://link.zhihu.com/?target=https%3A//github.com/liaodalin19903& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&liaodalin19903&/a&,&/li&&/ul&&h2&相关活动
&/h2&&blockquote&我们会在&b&&a href=&https://link.zhihu.com/?target=https%3A//www.weibo.com/xitucircle& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&掘金官方微博&/a&&/b&和&b&沸点&/b&中进行送书活动,共有&a href=&https://link.zhihu.com/?target=http%3A//www.ituring.com.cn/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&图灵社区&/a&提供的五种机器学习相关书籍,欢迎关注。&/blockquote&&p&&br&&/p&&figure&&img src=&https://pic3.zhimg.com/v2-4154aef07cdf1d66f3b38_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&800& data-rawheight=&200& class=&origin_image zh-lightbox-thumb& width=&800& data-original=&https://pic3.zhimg.com/v2-4154aef07cdf1d66f3b38_r.jpg&&&/figure&&p&&br&&/p&&h2&更多信息
&/h2&&ul&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/tensorflow-docs& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&TensorFlow 中文文档入口&/a&&/li&&li&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&掘金翻译计划入口&/a&&/li&&/ul&&blockquote&&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&掘金翻译计划&/a& 是一个翻译优质互联网技术文章的社区,文章来源为 &a href=&https://link.zhihu.com/?target=https%3A//juejin.im/& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&掘金&/a& 上的英文分享文章。内容覆盖 &a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner%23android& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&Android&/a&、&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner%23ios& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&iOS&/a&、&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner%23react& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&React&/a&、&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner%23%25E5%E7%25AB%25AF& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&前端&/a&、&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner%23%25E5%E7%25AB%25AF& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&后端&/a&、&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner%23%25E4%25BA%25A7%25E5%& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&产品&/a&、&a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner%23%25E8%25AE%25BE%25E8%25AE%25A1& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&设计&/a& 等领域,想要查看更多优质译文请持续关注 &a href=&https://link.zhihu.com/?target=https%3A//github.com/xitu/gold-miner& class=& wrap external& target=&_blank& rel=&nofollow noreferrer&&掘金翻译计划&/a&。&/blockquote&
TensorFlow 是 Google 研发的第二代人工智能学习系统,是 Google 为了帮助全球开发者们更加方便和高效地开发机器学习 (Machine Learning)和人工智能 (AI) 应用而开发的一整套开发平台和框架。被广泛应用于语音识别和图像识别等多项机器学习、深度学习领域。…
&figure&&img src=&https://pic4.zhimg.com/v2-8c8a3c57eb396e8e971fb8_b.jpg& data-rawwidth=&700& data-rawheight=&233& class=&origin_image zh-lightbox-thumb& width=&700& data-original=&https://pic4.zhimg.com/v2-8c8a3c57eb396e8e971fb8_r.jpg&&&/figure&&p&「Microsoft Loves Linux!」&/p&&p&说出这句话的不是所谓的 IT 领域那些技术专家或者是意见领袖,而是时任微软 CEO 的萨蒂亚· 纳德拉,在 2015 年的一次活动中,这位第三任微软 CEO 脱口而出的这句话,让这个曾经开源界最大敌人的微软,正式拥抱这个开源世界最大的操作系统:Linux。&/p&&figure&&img src=&https://pic1.zhimg.com/v2-c0d06dee1be91dbbbf8968_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&1200& data-rawheight=&800& class=&origin_image zh-lightbox-thumb& width=&1200& data-original=&https://pic1.zhimg.com/v2-c0d06dee1be91dbbbf8968_r.jpg&&&/figure&&p&其实在云计算领域,微软很早之前就让其 Azure 支持多个流行的 Linux 发行版,但对于普通消费者而言,真正的变化发生在后面的 Windows 10:微软宣布将会在 Windows 10 内置 Linux,而采用的技术上并非是所谓的「虚拟化」技术——也就是说,这个子系统的 Linux 完全是原生运行在 Windows 10 上的。&/p&&figure&&img src=&https://pic2.zhimg.com/v2-d61fbdcd06ecff6401d49bea_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&955& data-rawheight=&538& class=&origin_image zh-lightbox-thumb& width=&955& data-original=&https://pic2.zhimg.com/v2-d61fbdcd06ecff6401d49bea_r.jpg&&&/figure&&p&而微软给这个 Linux 系统命名为:Windows Subsystem for Linux,而对于有些系统极客而言,这个名字实在太熟悉了,因为在 Windows 7 之前,微软也曾经内置过一个 UNIX 子系统,可以原生运行 UNIX 二进制程序,他的名字叫做:Windows Services for UNIX。&/p&&p&即便如此,对于很多普通用户而言,Windows Subsystem for Linux 也只是尝鲜的玩物罢了,但对于不少软件开发、系统极客而言,无需通过虚拟机以及双系统的形式体验 Linux ,并且可以实现系统级别的文件互操作,实在是太具有吸引力了。而今天我们就一起来体验探索一番。&/p&&h2&如何启动 Linux 子系统&/h2&&p&微软从 Windows 10 周年更新(build 14393)开始内置 Windows Subsystem for Linux 组件框架,只不过这项功能当时还只能称作是 Beta 版,而在 Windows 秋季创意者更新中,安装 Linux 子系统变的更为简单——可以直接通过 Microsoft Store 来下载子系统,而可选择的发行版也从最初的只有 Ubuntu 变成可以选择 Suse、Ubuntu、Debian、甚至是用来进行网络安全工作 Kail Linux。&/p&&figure&&img src=&https://pic4.zhimg.com/v2-8705235cbfa15b5b2cf863514feb63f3_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&1366& data-rawheight=&721& class=&origin_image zh-lightbox-thumb& width=&1366& data-original=&https://pic4.zhimg.com/v2-8705235cbfa15b5b2cf863514feb63f3_r.jpg&&&/figure&&p&只不过如果你想要体验这些发行版还需要进行一些简单操作,毕竟 Windows Subsystem for Linux 组件框架并非是默认选中的。&/p&&p&首先我们需要确认自己的 Windows 10 版本,以下的操作方法只适用与 Windows 10 秋季创意者更新(Windows 10 build 16299)以上版本,如果你是 Windows 10 周年更新,安装 Linux 子系统的安装办法你可以检索「 Bash on Windows」自行探索安装方法。此外,系统必须是 64 位操作系统。&/p&&figure&&img src=&https://pic1.zhimg.com/v2-3fe6b16bc53f803b68c8255c9baaf8ef_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&1122& data-rawheight=&588& class=&origin_image zh-lightbox-thumb& width=&1122& data-original=&https://pic1.zhimg.com/v2-3fe6b16bc53f803b68c8255c9baaf8ef_r.jpg&&&/figure&&p&以上均确认后,打开 「控制面板」—& 「程序和功能」,在左边的「启用和关闭 Windows 功能」里面勾选「适用于 Linux 的 Windows 子系统」,然后点击确定(这一步有可能需要重启)。&/p&&figure&&img src=&https://pic3.zhimg.com/v2-53f23715ceaf3b5b66c232_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&1366& data-rawheight=&730& class=&origin_image zh-lightbox-thumb& width=&1366& data-original=&https://pic3.zhimg.com/v2-53f23715ceaf3b5b66c232_r.jpg&&&/figure&&p&接着打开 Microsoft Store,搜索喜欢的 Linux 发行版,这里我选择的是我比较熟悉的 Linux 发行版 Ubuntu,然后点击安装。对于初学者来说,Ubuntu/ Debian 系的发行版具有非常完善的包管理系统,方便新手快速上手。&/p&&figure&&img src=&https://pic1.zhimg.com/v2-d470ecc35a79daae53761d_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&780& data-rawheight=&542& class=&origin_image zh-lightbox-thumb& width=&780& data-original=&https://pic1.zhimg.com/v2-d470ecc35a79daae53761d_r.jpg&&&/figure&&p&安装完毕之后,你就可以在 Windows 开始菜单中找到「Ubuntu」这个应用了!换言之,现在你的 Windows 10 中就已经成功安装发行版为 Ubuntu 的 Linux 子系统。&/p&&h2&Ubuntu 子系统设置与基本命令&/h2&&p&在开始菜单中打开 Ubuntu 后,Ubuntu 会进行较长时间的安装和初始化,之后会提示你设置 Linux 的用户名和密码,需要注意的是这个用户名和密码和 Windows 并不通用。&/p&&figure&&img src=&https://pic2.zhimg.com/v2-ff0f0e012fa820bf_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&997& data-rawheight=&544& class=&origin_image zh-lightbox-thumb& width=&997& data-original=&https://pic2.zhimg.com/v2-ff0f0e012fa820bf_r.jpg&&&/figure&&p&设置密码是非明文的,不会像 Windows 那样使用「*** 」替代,所以你只要盲打点击确认即可,建议密码使用复杂密码,有些发行版会有强制要求。&/p&&p&输入完成之后,系统会提示你如何提权操作,之后会自动以刚才新设置的用户名登录 Ubuntu。&/p&&p&我安装 Linux 第一件事就是查看内核版本以及系统系统版本,在 Ubuntu 下直接输入以下命令来查看内核版本号:&/p&&p&&code&uname -r&/code&&/p&&p&这时系统会显示:4.4.0-43-Microsoft,这表示Linux 内核版本为:4.4.0-43。&/p&&p&至于系统版本号,可以使用:&code&sudo lsb_release -a&/code& 来查看,系统会输出:&/p&&figure&&img src=&https://pic4.zhimg.com/v2-b4b15b22f4017afb583ef3_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&749& data-rawheight=&519& class=&origin_image zh-lightbox-thumb& width=&749& data-original=&https://pic4.zhimg.com/v2-b4b15b22f4017afb583ef3_r.jpg&&&/figure&&p&这表示 Ubuntu 版本为 16.04。为 Ubuntu 的长期支持版本。&/p&&h2&更换 Linux 子系统的软件源并更新软件&/h2&&p&之前我说过使用 Ubuntu /debian 系最大的好处就是可以使用「软件源」进行软件安装,使用 Ubuntu 自带的 deb 包管理系统安装软件可以减少直接下载源码编译的麻烦,所以这里就要用到「apt-get」系列命令了。&/p&&p&因为默认的软件源是 Ubuntu 的官方源,我们可以选择替换为国内的软件源,比如说阿里云镜像的软件源。&/p&&p&在当前命令行下面输入:&/p&&p&&code&sudo-i&/code&&/p&&p&提权后输入密码,使用 root 权限登录。然后接下来备份当前源,输入以下命令:&/p&&p&&code&cp /etc/apt/sources.list /etc/apt/sources.list.old&/code&&/p&&p&不难看出管理源的文件就是 sources.list,我们选择编辑它,编辑器我这里选用的是 vim,所以命令是:&/p&&p&&code&vim /etc/apt/sources.list&/code&&/p&&p&使用 vim 后会进入命令模式,敲键盘上的 「i」键键入编辑模式,然后复制下面这段代码(拷贝代码,然后在编辑器上鼠标右击就可以复制):&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span& # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 ()]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
&/code&&/pre&&/div&&p&完成之后再敲键盘上的「esc」退出编辑模式,然后再输入&code&:wq&/code&点击保存并退出编辑器 vim。&/p&&figure&&img src=&https://pic1.zhimg.com/v2-bbe5cdde73d115e83266b0_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&966& data-rawheight=&506& class=&origin_image zh-lightbox-thumb& width=&966& data-original=&https://pic1.zhimg.com/v2-bbe5cdde73d115e83266b0_r.jpg&&&/figure&&p&紧接着我们更新软件源让编辑的文件生效:&/p&&p&&code&apt-get update&/code&&/p&&p&这里我们就将 Ubuntu 的软件源切换到阿里云的源了。&/p&&p&之后再输入:&code&apt-get upgrade&/code& 对当前系统的软件和类库进行来更新。如果不出意外系统会自动对现有的软件包进行更新,经过这一系列的操作,目前 Ubuntu 的软件以及类库都是最新的,而系统版本也升级到 Ubuntu 16.04.4 LTS。&/p&&h2&启用 SSH 并使用SSH 客户端登录&/h2&&p&虽说通过 App 或者应用的形式在 Windows 10 上体验 Linux 是一个不赖的选择,但对于很多软件开发的朋友而言,使用 Windows 内置的 CMD 或者 PowerShell 来操作Linux 依旧有着很多不习惯。而最为关键的是当需要对文件进行操作时,使用交互命令远不如使用 SFTP 来的更为「简单粗暴」。因此只要通过配置 SSH 远程登录,就可以像管理远程服务器那样来操作这个 Linux 系统了。&/p&&p&首先,因为 Ubuntu 系统限制,所以我们需要可以为 root 用户设置新密码,这里输入:&/p&&p&&code&sudo passwd root&/code&&/p&&p&配置好之后,未来使用 SSH 客户端或者 SFTP 客户端登录系统时,我们就可以直接使用 root 权限进行登录,就不用使用之前的 &code&sudo -i&/code& 提权操作了。&/p&&p&其次按照常规,我们使用&code&cp&/code& 命令将 SSH 相关配置文件进行备份:&/p&&p&&code&sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak&/code&&/p&&p&之后使用 vim 编辑器编辑 「sshd_config」文件:&/p&&p&&code&sudo vim /etc/ssh/sshd_config&/code&&/p&&p&键盘上点击 「i」后进入编辑模式,编辑并调整以下设置项:&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span&
Port 8022(因为 Windows 10 的 SSH 端口已经默认被占用,所以我换成了一个新的端口)
(去掉前面的 #)ListenAddress 0.0.0.0
UsePrivilegeSeparation no(原来是 yes 改成 no)
PermitRootLogin yes(修改成 yes)
(在前面加上 #)StrictModes yes
PasswordAuthentication yes(原来是 no,改成 yes)
&/code&&/pre&&/div&&p&之后点击 「Esc」退出编辑模式,直接输入 &code&:wq&/code& 退出并保存。&/p&&figure&&img src=&https://pic3.zhimg.com/v2-fc4d4daf6f681ba0a20f535ce5b39eeb_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&650& data-rawheight=&221& class=&origin_image zh-lightbox-thumb& width=&650& data-original=&https://pic3.zhimg.com/v2-fc4d4daf6f681ba0a20f535ce5b39eeb_r.jpg&&&/figure&&p&然后输入命令:&code&service ssh start&/code& 启动 SSH。&/p&&p&如何验证已经可以访问呢?我们首先打开 SSH 客户端,比如我目前使用 Xshell,选择「新建会话」。&/p&&p&之后在新建的会话设置框的「连接」中添加如下内容:&/p&&div class=&highlight&&&pre&&code class=&language-text&&&span&&/span& 名称:WSL(这个随便填)
主机:127.0.0.1(本机环回接口)
端口号:8022
&/code&&/pre&&/div&&p&之后在「用户身份验证」中输入验证方法,方法选择 「Password」,然后在输入用户名:root,密码选择刚才新设置的 root 密码,最后点击确定。&/p&&figure&&img src=&https://pic3.zhimg.com/v2-02c8e23ec19ce8ad5eaacb_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&650& data-rawheight=&310& class=&origin_image zh-lightbox-thumb& width=&650& data-original=&https://pic3.zhimg.com/v2-02c8e23ec19ce8ad5eaacb_r.jpg&&&/figure&&p&然后在左侧的会话管理器找到刚才设置的新会话,双击后如果显示如下图所示的界面就算是成功了!&/p&&figure&&img src=&https://pic3.zhimg.com/v2-28c628fc2fc07225cad44823_b.jpg& data-caption=&& data-size=&normal& data-rawwidth=&650& data-rawheight=&626& class=&origin_image zh-lightbox-thumb& width=&650& data-original=&https://pic3.zhimg.com/v2-28c628fc2fc07225cad44823_r.jpg&&&/figure&&p&除了使用 Xshell 这种 SSH 客户端进行服务器操作之外,还可以使用 Xftp 进行文件上传和管理,唯一的区别是在新建会话处,协议选择「SFTP」,端口号和之前 Xshell 使用的端口号一致即可,点击确认之后出现类似 FTP 管理的界面就算是成功了!这样你就可以使用更为直观的工具来访问 WSL 系统的文件目录。新建文件上传文件也变得更为简单。&/p&&figure&&img src=&https://pic4.zhimg.com/v2-34ec854f2ad1eee6d75e4_b.jpg& data-caption=&& data-size=&normal& data-rawwid

我要回帖

更多关于 角位移怎么求 的文章

 

随机推荐