| 查看: 2631 | 回复: 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 %) |
» 猜你喜欢
什么时候开奖?
已经有13人回复
散金币祈福
已经有94人回复
物理学I论文润色/翻译怎么收费?
已经有238人回复
青基已中
已经有1人回复
散金币祈福
已经有186人回复
求助,如何提取ELK的rt-TDDFT在某一时刻的自旋密度分布和电子密度分布
已经有1人回复
澳门大学IAPME李海峰教授常年招收博士研究生
已经有0人回复
澳门大学IAPME李海峰教授常年招收博士研究生
已经有0人回复
澳门大学IAPME李海峰教授常年招收博士研究生
已经有0人回复
求助中医院临床中医中标的青年标书学习,谢谢
已经有3人回复
» 抢金币啦!回帖就可以得到:
韩国延世大学材料理论课题组(Materials Theory Group)招聘启事
+5/360
南京大学能源与资源学院景旭东院士团队博士后招聘公告(南京大学苏州校区)
+2/254
招收大湾区大学-哈工深联培博士1名
+1/186
中国科学院深圳先进技术研究院-深圳职业技术大学联合培养博士后招聘
+5/140
澳门大学智慧城市物联网全国重点实验室—智慧能源团队招2027年全奖电气工程博士生
+1/91
澳门大学智慧城市物联网全国重点实验室—智慧能源团队招2027年全奖电气工程博士生
+1/90
海南大学邓意达教授团队招收博士后和2027年入学博士生
+1/86
山东征女友,坐标济南
+1/49
【合肥】事业单位,42万年薪+50万启动经费 招材料、物理、化学方向的博士后
+1/37
浙江师范大学是怎么坑我的
+1/30
公司或高校科研机构哪里可以对外做菌株趋化实验
+1/11
上海交大材料学院拟招27年有机高分子/电化学/组织工程等生物材料方向普博生1-2名
+1/6
上海交大材料学院拟招27年高分子/电化学等生物材料方向普博生1-2名
+1/5
招聘材料计算,分子动力学模拟相关讲师
+1/4
合肥工业大学许婷婷老师招收2027年入学博士研究生,有机/高分子合成背景
+1/3
中性粒细胞来源 TNF‑α 通过 ACSL4 介导脂质过氧化参与肝切除术后肝损伤
+1/2
上海交大刘苏萌课题组招收集成电路专项硕士生(ALD前驱体方向,头部企业联培)
+1/2
Paris Saclay university, Dallerac教授团队招收2027CSC–Saclay合作奖学金博士生
+1/2
天津大学浙江研究院2026年第二批招聘公告:高分子等方向特聘青年研究员/博士后
+1/1
中国科学院兰州化学物理研究所青岛基地王楠楠课题组诚招联合培养硕士一名
+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): 谢谢参与









回复此楼