| ²é¿´: 5213 | »Ø¸´: 12 | ||
gtssongchiľ³æ (СÓÐÃûÆø)
|
[ÇóÖú]
ovitoÖдò¿ªpython½Å±¾´íÎó ÒÑÓÐ3È˲ÎÓë
|
|
|
´ó¼ÒºÃ£¬ÓÃovito¼ÆËãvoronoi¶àÃæÌåʱ£¬°´ÕÕÊÖ²á²ÉÓõÄpython½Å±¾¼ÆËã¡£ÊÖ²áÉϽű¾ÈçÏ # Import OVITO modules. from ovito.io import * from ovito.modifiers import * # Import NumPy module. import numpy # Load a simulation snapshot of a Cu-Zr metallic glass. node = import_file("../data/CuZr_metallic_glass.dump.gz" ![]() # Set atomic radii (required for polydisperse Voronoi tessellation). atypes = node.source.particle_properties.particle_type.type_list atypes[0].radius = 1.35 # Cu atomic radius (atom type 1 in input file) atypes[1].radius = 1.55 # Zr 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))) ÎÒÖ»Êǽ«ÆäÖеÄÎļþ·¾¶¸Ä±äÁË¡£ÔÚÔËÐÐʱȴÌáʾÈçÏ´íÎó£º Traceback (most recent call last): File "/home/csong/ovito.py", line 2, in <module> from ovito.io import * ImportError: No module named 'ovito.io'; 'ovito' is not a package ERROR: Failed to initialize Python interpreter. ÇëÎÊÕâÊÇʲôÔÒòÄØ£¿ |
» ²ÂÄãϲ»¶
Ò»Ö¾Ô¸»ªÄÏÀí¹¤´óѧ331·Ö²ÄÁÏÇóµ÷¼Á
ÒѾÓÐ11È˻ظ´
271Çóµ÷¼Á
ÒѾÓÐ40È˻ظ´
Çóµ÷¼ÁѧУ
ÒѾÓÐ3È˻ظ´
332Çóµ÷¼Á
ÒѾÓÐ15È˻ظ´
297Çóµ÷¼Á
ÒѾÓÐ25È˻ظ´
±¾¿ÆÎ÷¹¤´ó 324Çóµ÷¼Á
ÒѾÓÐ5È˻ظ´
297¹¤¿Æµ÷¼Á?
ÒѾÓÐ7È˻ظ´
µ÷¼Á
ÒѾÓÐ11È˻ظ´
08¹¤Ñ§ 309·ÖÇóµ÷¼Á
ÒѾÓÐ7È˻ظ´
¸÷λÀÏʦºÃ£¬Çóµ÷¼Á£¬±¾¿Æ211£¬Ò»Ö¾Ô¸Ìì½ò´óѧÉúÎïÓëҽҩѧ˶£¬²îÁ½Ãû¼ȡ¡£
ÒѾÓÐ9È˻ظ´
969354217
гæ (³õÈëÎÄ̳)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 47
- Ìû×Ó: 26
- ÔÚÏß: 16.5Сʱ
- ³æºÅ: 7369851
- ×¢²á: 2017-10-26
- ÐÔ±ð: MM
6Â¥2019-05-10 10:13:19
abinitio
°æÖ÷ (ÖøÃûдÊÖ)
- Ä£ÄâEPI: 2
- Ó¦Öú: 221 (´óѧÉú)
- ¹ó±ö: 0.093
- ½ð±Ò: 7365.2
- É¢½ð: 3917
- ºì»¨: 57
- Ìû×Ó: 1317
- ÔÚÏß: 485.2Сʱ
- ³æºÅ: 368545
- ×¢²á: 2007-05-11
- ÐÔ±ð: GG
- רҵ: Äý¾Û̬ÎïÐÔI:½á¹¹¡¢Á¦Ñ§ºÍ
- ¹ÜϽ: ·Ö×ÓÄ£Äâ
2Â¥2017-11-15 15:58:03
gtssongchi
ľ³æ (СÓÐÃûÆø)
- Ó¦Öú: 3 (Ó×¶ùÔ°)
- ½ð±Ò: 4373.1
- É¢½ð: 136
- ºì»¨: 2
- Ìû×Ó: 157
- ÔÚÏß: 99.5Сʱ
- ³æºÅ: 1137504
- ×¢²á: 2010-11-02
- ÐÔ±ð: GG
- רҵ: Äý¾Û̬ÎïÐÔ II £ºµç×ӽṹ
3Â¥2017-11-15 19:16:03
ÒÁÓÐÑÄ
гæ (СÓÐÃûÆø)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 389.4
- Ìû×Ó: 100
- ÔÚÏß: 32Сʱ
- ³æºÅ: 3709756
- ×¢²á: 2015-03-04
- רҵ: °ëµ¼ÌåÎïÀí

4Â¥2018-07-05 19:37:49
cuso4852cuoh
гæ (СÓÐÃûÆø)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 223.4
- É¢½ð: 20
- Ìû×Ó: 170
- ÔÚÏß: 49.6Сʱ
- ³æºÅ: 1481571
- ×¢²á: 2011-11-08
- רҵ: ¹¤³ÌÈÈÎïÀíÏà¹Ø½»²æÁìÓò
5Â¥2019-04-17 19:57:33
Áõ×Ó²»Ôγµ
½û³æ (³õÈëÎÄ̳)
|
±¾ÌûÄÚÈݱ»ÆÁ±Î |
7Â¥2019-12-30 00:23:50
|
±¾ÌûÄÚÈݱ»ÆÁ±Î |
8Â¥2019-12-31 11:15:26
|
±¾ÌûÄÚÈݱ»ÆÁ±Î |
9Â¥2020-01-02 14:17:08
|
±¾ÌûÄÚÈݱ»ÆÁ±Î |
10Â¥2020-01-03 15:54:03















»Ø¸´´ËÂ¥