| 查看: 2430 | 回复: 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论文润色/翻译怎么收费?
已经有240人回复
0702一志愿吉大B区求调剂 本科期间发表一篇Sci
已经有0人回复
北京纳米能源与系统研究所王中林院士/曹南颖研究员课题组招收2026硕士研究生1名
已经有0人回复
山西大同大学物理学硕士研究生招收调剂生
已经有0人回复
[调剂信息]211智能人工感知方向国家青年特聘专家课题组招收调剂研究生
已经有0人回复
[调剂信息]211智能人工感知方向国家青年特聘专家课题组招收调剂研究生
已经有0人回复
[调剂信息]211智能人工感知方向国家青年特聘专家课题组招收调剂研究生
已经有0人回复
一志愿物理所凝聚态物理352求调剂
已经有0人回复
» 抢金币啦!回帖就可以得到:
汕头大学胡良胜课题组招收化学、化工、材料方向调剂研究生3名
+1/183
南京大学夏可宇课题组诚聘光学方向实验博士后
+1/178
【招聘】温州医科大学/附属医院/瓯江实验室李校堃院士团队诚聘博士后和科研人员
+2/176
河北大学分析化学招收多名调剂考生
+2/130
原子层沉积装备18817872921
+1/92
2026江西科技师范大学申亮组招硕士研究生
+1/85
山东青岛-导师招生
+1/51
【考研调剂】华侨大学发光材料与信息显示研究院接收专硕和学硕调剂
+1/48
研究生调剂招生(44名)
+1/46
上海交大化院邓楠楠课题组招收26年秋季入学申请考核博士
+1/39
西安工程大学材料学院杨杰课题组招收考研调剂生
+1/39
三峡大学国家青年人才课题组招2026年化学/材料/化工类硕士调剂生
+1/38
河南工业大学化学化工学院 2026 年硕士调剂正在进行!
+1/37
三峡大学材化学院李东升校长团队接收化学类硕士调剂
+1/16
欢迎加入我们的团队!招博士 半导体光电子器件与集成
+1/9
西安工程大学能源化工新材料研发项目组接收2026年计算机类调剂研究生
+1/8
武汉纺织大学-国家工程实验室王金凤教授课题组招收研究生,线上面试无笔试
+1/8
齐鲁工业大学(山东省科学院) 谷亚威老师课题组拟招2026年调剂研究生
+1/7
NTU招聘生物微机电系统/微流控/3D打印/可穿戴器件方向全奖博士
+1/4
杭州师范大学-浙江省湿地智慧监测与生态修复重点实验室团队硕士调剂公告
+1/4
4楼2022-06-22 14:07:45
简单回复
2020-09-16 14:37
回复
cnzs(金币+1): 谢谢参与
1 发自小木虫IOS客户端
psylhh3楼
2020-09-17 17:32
回复
cnzs(金币+1): 谢谢参与














回复此楼