| 查看: 6301 | 回复: 8 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
[交流]
ovito软件分析Voronoi
|
|||
|
使用ovito分析Voronoi,输入参数后,怎么得到结果?不明白?有会的吗? 发自小木虫Android客户端 |
» 猜你喜欢
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有3人回复
参与限项
已经有3人回复
假如你的研究生提出不合理要求
已经有7人回复
实验室接单子
已经有4人回复
全日制(定向)博士
已经有4人回复
对氯苯硼酸纯化
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有12人回复
所感
已经有4人回复
要不要辞职读博?
已经有7人回复
北核录用
已经有3人回复
|
老师好,我把路径改了,在ovito图形界面,run scripts,但是ovito图形界面只是闪了下,没报错,也没结果,啥也没有,是脚本的问题吗?我用的是vasp的POSAR文件,下面是ovito计算voro的脚本,我直接复制的,不知道对不对 # Import OVITO modules. from ovito.io import * from ovito.modifiers import * # Import NumPy module. import numpy # Load a simulation snapshot of a Co-B metallic glass. node = import_file("E:/ovito/Co65B35/POSCAR" ![]() # Set atomic radii (required for polydisperse Voronoi tessellation). atypes = node.source.particle_properties.particle_type.type_list atypes[0].radius = 1.25 # Co atomic radius (atom type 1 in input file) atypes[1].radius = 0.82 # B atomic radius (atom type 2 in input file) # Set up the Voronoi analysis modifier. voro = VoronoiAnalysisModifier( compute_indices = True, use_radii = True, edge_count = 6, # Length after which Voronoi index vectors are truncated edge_threshold = 0.1 ) node.modifiers.append(voro) # Let OVITO compute the results. node.compute() # Make sure we did not lose information due to truncated Voronoi index vectors. if voro.max_face_order > voro.edge_count: print("Warning: Maximum face order in Voronoi tessellation is {0}, " "but computed Voronoi indices are truncated after {1} entries. " "You should consider increasing the 'edge_count' parameter to {0}." .format(voro.max_face_order, voro.edge_count)) # Note that it would be possible to automatically increase the 'edge_count' # parameter to 'max_face_order' here and recompute the Voronoi tessellation: # voro.edge_count = voro.max_face_order # node.compute() # Access computed Voronoi indices as NumPy array. # This is an (N)x(edge_count) array. voro_indices = node.output.particle_properties['Voronoi Index'].array # 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))) |
4楼2017-03-09 14:30:58
valenhou001
至尊木虫 (职业作家)
- 1ST强帖: 13
- 应助: 241 (大学生)
- 金币: 25701.7
- 散金: 602
- 红花: 166
- 帖子: 3782
- 在线: 873.8小时
- 虫号: 1007127
- 注册: 2010-04-27
- 专业: 凝聚态物性 II :电子结构
★ ★ ★ ★ ★ ★ ★ ★ ★ ★
meizhixin: 金币+10 2017-02-28 13:32:37
meizhixin: 金币+10 2017-02-28 13:32:37
|
采用python script来计算吧: https://www.ovito.org/manual/pyt ... ute-voronoi-indices |
2楼2017-02-28 12:52:46
3楼2017-02-28 13:31:52
tongaigao
新虫 (初入文坛)
- 应助: 0 (幼儿园)
- 金币: 108.5
- 帖子: 33
- 在线: 18.7小时
- 虫号: 4978420
- 注册: 2016-09-04
- 性别: MM
- 专业: 金属非晶态、准晶和纳米晶
5楼2017-05-18 15:49:20












回复此楼