| 查看: 2429 | 回复: 3 | |||
| 【有奖交流】积极回复本帖子,参与交流,就有机会分得作者 cnzs 的 7 个金币 ,回帖就立即获得 1 个金币,每人有 1 次机会 | |||
[交流]
VASP数据使用ovito官网脚本分析voronio
|
|||
|
1.能不能用ovito处理AIMD的XDATCAR文件? 2.如果可以为什么我用官网提供的Python脚本只能得出第一个离子步的数据? 3.有没有大佬可以帮忙改进一下Python脚本? # Import OVITO modules. from ovito.io import * from ovito.modifiers import * from ovito.pipeline import * # Import NumPy module. import numpy # Load a simulation snapshot of a Cu-Zr metallic glass. pipeline = import_file("D:/ovito/400/XDATCAR",multiple_frames = True) # Set atomic radii (required for polydisperse Voronoi tessellation). atom_types = pipeline.source.data.particles['Particle Type'].types atom_types[0].radius = 1.28 # atomic radius (atom type 1 in input file) atom_types[1].radius = 1.55 # atomic radius (atom type 2 in input file) # Set up the Voronoi analysis modifier. voro = VoronoiAnalysisModifier( compute_indices = True, use_radii = True, edge_threshold = 0.1 ) pipeline.modifiers.append(voro) # Let OVITO compute the results. data = pipeline.compute() # Access computed Voronoi indices. # This is an (N) x (M) array, where M is the maximum face order. voro_indices = data.particles['Voronoi Index'] # This helper function takes a two-dimensional array and computes a frequency # histogram of the data rows using some NumPy magic. # It returns two arrays (of equal length): # 1. The list of unique data rows from the input array # 2. The number of occurences of each unique row # Both arrays are sorted in descending order such that the most frequent rows # are listed first. def row_histogram(a): ca = numpy.ascontiguousarray(a).view([('', a.dtype)] * a.shape[1]) unique, indices, inverse = numpy.unique(ca, return_index=True, return_inverse=True) counts = numpy.bincount(inverse) sort_indices = numpy.argsort(counts)[::-1] return (a[indices[sort_indices]], counts[sort_indices]) # Compute frequency histogram. unique_indices, counts = row_histogram(voro_indices) # Print the ten most frequent histogram entries. for i in range(10): print("%s\t%i\t(%.1f %%)" % (tuple(unique_indices), counts, 100.0*float(counts)/len(voro_indices))) result: (0, 0, 0, 2, 8, 4, 0, 0) 11 (5.5 %) (0, 0, 0, 3, 6, 4, 0, 0) 7 (3.5 %) (0, 0, 0, 0, 12, 0, 0, 0) 6 (3.0 %) (0, 0, 0, 1, 10, 3, 0, 0) 5 (2.5 %) (0, 0, 0, 2, 8, 1, 0, 0) 5 (2.5 %) (0, 0, 0, 4, 6, 4, 0, 0) 5 (2.5 %) (0, 0, 0, 2, 8, 5, 0, 0) 5 (2.5 %) (0, 0, 0, 1, 10, 2, 0, 0) 5 (2.5 %) (0, 0, 0, 2, 8, 0, 0, 0) 4 (2.0 %) (0, 0, 0, 4, 4, 6, 0, 0) 3 (1.5 %) |
» 猜你喜欢
重庆交大26年硕士生招生拟调剂通知已出!欢迎加入光子学微结构与器件课题组。
已经有0人回复
UJN物理学专业调剂
已经有12人回复
物理学I论文润色/翻译怎么收费?
已经有180人回复
0702一志愿吉大B区求调剂 本科期间发表一篇Sci
已经有0人回复
北京纳米能源与系统研究所王中林院士/曹南颖研究员课题组招收2026硕士研究生1名
已经有0人回复
山西大同大学物理学硕士研究生招收调剂生
已经有0人回复
[调剂信息]211智能人工感知方向国家青年特聘专家课题组招收调剂研究生
已经有0人回复
[调剂信息]211智能人工感知方向国家青年特聘专家课题组招收调剂研究生
已经有0人回复
[调剂信息]211智能人工感知方向国家青年特聘专家课题组招收调剂研究生
已经有0人回复
一志愿物理所凝聚态物理352求调剂
已经有0人回复
» 抢金币啦!回帖就可以得到:
【招聘】温州医科大学/附属医院/瓯江实验室李校堃院士团队诚聘博士后和科研人员
+2/171
【调剂信息】山东科技大学材料助剂研究团队招收调剂硕士研究生
+1/86
大连大学-六盘水师范学院联合培养研究生接收调剂
+2/80
天津科大轻工学院国家级人才团队招收化学、材料、食品调剂
+1/40
华南师范大学(211)招收物理、生物、生物医学工程调剂生
+1/37
中国科学院深圳先进院唐永炳研究员团队诚聘电化学/电池方向博士后
+1/36
湖州师范大学信息工程学院2026年硕士研究生招生调剂公告
+1/21
济南大学水利与环境学院赵艳侠教授简介
+1/18
招收调剂
+1/18
材料/化学/环境 5-10人专硕, A类线,武汉纺织大学材料学院,能源高分子方向
+1/16
五邑大学药学与食品工程学院 | 刘宇茸课题组 调剂招生
+5/15
招聘科研助理——储能方向(储能、流体传热、CFD模拟)
+1/9
福建理工大学材料学院招收2026硕士研究生
+1/8
重庆工商大学 教育部研究中心招收化工/环境/材料/石油/机械方向2026年调剂研究生
+1/7
杰青/长江团队招收硕士调剂
+1/6
诚聘博士科研人员(有机合成化学方向)
+1/5
大湾区大学李军课题组招收生物信息学、人工智能方向博士后
+1/4
苏州科技大学胡老师课题组招2026年硕士生若干名
+1/3
南通大学-交通与土木工程学院 招调剂学生
+1/3
哈工大韩飞课题组招收3D微纳加工、光学工程、纳米化学等方向博士生及博后(长期有效)
+1/1
4楼2022-06-22 14:07:45
简单回复
2020-09-16 14:37
回复
cnzs(金币+1): 谢谢参与
1 发自小木虫IOS客户端
psylhh3楼
2020-09-17 17:32
回复
cnzs(金币+1): 谢谢参与














回复此楼