| 查看: 2318 | 回复: 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 %) |
» 猜你喜欢
【复旦大学】二维材料方向招收2026年博士研究生1名
已经有0人回复
北京纳米能源与系统研究所 王中林院士/曹南颖研究员课题组2026级硕/博/博后招生
已经有10人回复
物理学I论文润色/翻译怎么收费?
已经有239人回复
荷兰Utrecht University超快太赫兹光谱王海教授课题招收2026 CSC博士生
已经有23人回复
反铁磁体中的磁性切换:两种不同的机制已成功可视化
已经有0人回复
求标准粉末衍射卡号 ICDD 01-076-1802
已经有0人回复
新西兰Robinson研究所招收全奖PhD
已经有0人回复
石墨烯转移--二氧化硅衬底石墨烯
已经有0人回复
» 抢金币啦!回帖就可以得到:
散给需要的人
+5/9485
DIY科研工具交流
+1/213
新加坡国立大学张阳教授课题组招聘博士后(AI与生物医学方向)
+1/181
【宁德时代招聘】AI 物理学家
+1/178
《春节催婚季,90后男生在线“招募”战友,一起过个轻松年》
+1/161
天津大学化学系吴立朋课题组申请考核制博士招生/博后招聘
+1/89
山东第二医科大学和广州中医药大学药学硕士招生
+1/85
诚聘生物有化学方向博士后
+1/77
上海交通大学机械与动力工程学院周宝文课题组招收2025年硕士研究生
+1/29
诚招“先进材料与柔性电子(柔性储能或柔性天线)”方向联培博士生
+1/13
海南师范大学招收化学博士(光电功能材料课题组招收博士研究生)
+1/8
中南大学化学化工学院高性能聚合物团队2026年诚聘博士后或青年教师
+1/8
SCI计算机相关论文
+1/8
实验室研究员
+1/4
江西理工大学稀土磁性功能材料与物理示范研究生导师创新团队
+1/4
同济大学电信学院,肖李课题组预招2027春季与秋季博士生。
+1/3
英国兰卡斯特大学(Lancaster University)大模型、计算机视觉PhD招生
+1/2
SCI,计算机相关联系
+1/2
同济大学电信学院,肖李课题组招收2026年统考硕士生1-2名。
+1/1
中科院招收MEMS、惯性传感、ASIC设计、半导体等方向 博士/博士后
+1/1
4楼2022-06-22 14:07:45
简单回复
2020-09-16 14:37
回复
cnzs(金币+1): 谢谢参与
1 发自小木虫IOS客户端













回复此楼