Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Alexander Stukowski

Pages: 1 [2] 3 4 ... 25
Support Forum / Re: Centrosymmetry parmeter
« on: May 07, 2018, 01:40:28 PM »
Dear Digvijay,

The Centrosymmetry modifier computes the value of the centrosymmetry parameter for each atom and stores the results in a new particle property named "Centrosymmetry". To make these values visible, you could use the Color Coding modifier, for example. This modifier assigns a color to each atom based on the values of an existing particle property. Simply add the Color Coding modifier to the data pipeline after the Centrosymmetry modifier.


Support Forum / Re: rendering quality
« on: May 07, 2018, 08:00:10 AM »
Yes, the FOV parameter does control the "zoom level". For viewports using a perspective projection, this parameter specifies the angle of view, i.e. the opening angle of the camera's viewing frustum. A smaller FOV value will make the viewing frustum more narrow and objects will appear larger when projected.

For viewports with parallel (orthographic) projections, the FOV value controls the visible area of the projection. Again, smaller FOV values will make objects appear larger.

Note that in both cases the FOV value does not change the orientation or viewing direction of the virtual camera. Nor does is affect the position of the camera in  space.

Support Forum / Re: Calculating atomic density
« on: May 04, 2018, 05:27:31 PM »

Dividing the simulation box into bins along the z-axis and counting the atoms in each bin can be done with the Bin and Reduce modifier of OVITO. Note, however, that this modifier cannot actually "count" atoms. It rather sums up the values of a selected property for all particles in a bin. Thus, you might first have to use the Compute Property modifier to create a new property with the uniform value of 1 and assign it to each particle. You can then select this property as input for the Bin and Reduce modifier to sum over.


Support Forum / Re: Energy Difference
« on: May 03, 2018, 05:28:42 PM »
Dear Samaneh,

You will need to use two modifiers for that: Freeze Property and Compute property, in that order.

Please read the docs of the Freeze Property modifier ("Example 2" in particular), where you will find more hints how to obtain the potential energy change for each atom.


Support Forum / Re: Wall Visualization in OVITO
« on: April 27, 2018, 10:20:58 PM »
Hi Egor,

OVITO can import VTK files containing triangular meshes, letting your visualise arbitrary geometries in addition to the particles. This could provide a way to visualise your cylindrical wall.

You could use the free ParaView software to produce the VTK file to be imported in OVITO.

Here you can find an example VTK file containing color information, which can be read by OVITO:

Let me know if you have further questions.

Best regards,

Support Forum / Re: Python script for displacements
« on: April 27, 2018, 10:12:27 PM »
Note that these two lines each simply assign a Python string to a variable:
Code: [Select]
    selection1 = ('ParticleType==1 && c_8_4>0.5')
    selection2 = ('ParticleType==2 && c_8_4>0.5')
No evaluation of these string expressions is taking place and no particle selection is created. Nor will the subsequent call to count_nonzero() do anything meaningful. This simply is not how Numpy works. You need to pass a Numpy array to the count_nonzero() function instead of a Python string.

My suggestion is to use OVITO's SelectExpressionModifier instead to create the particle selection. This modifier will accept a Boolean expression in the form of a Python string and will evaluate it correctly:

Code: [Select]
node.modifiers.append(SelectExpressionModifier(expression = 'ParticleType==1 && c_8_4>0.5'))

In addition to creating the selection, this modifier will output the SelectExpression.num_selected global attribute to report the total number of particles matching the selection criterion. Next, you can insert a PythonScriptModifier to copy this attribute and give it the desired name under which it will be exported later:
Code: [Select]
def rename_attribute1(frame, input, output):
    output.attributes['Si_disp'] = input.attributes['SelectExpression.num_selected']
node.modifiers.append(PythonScriptModifier(function = rename_attribute1))

Finally, the above sequence of the two modifiers needs to be repeated to create the second selection and count the particles again:
Code: [Select]
node.modifiers.append(SelectExpressionModifier(expression = 'ParticleType==2 && c_8_4>0.5'))
def rename_attribute2(frame, input, output):
    output.attributes['C_disp'] = input.attributes['SelectExpression.num_selected']
node.modifiers.append(PythonScriptModifier(function = rename_attribute2))

The final pipeline consist of four modifiers. The two PythonScriptModifiers are needed, because the SelectExpressionModifier always outputs the selection count under the same attribute name. Thus, the second SelectExpressionModifier instance would overwrite the output of the first instance if we wouldn't save the attribute value under a new name in between.

Hi Mehrdad,

As described in the docs for the export_file() function, you need to use the multiple_frames flag:
Code: [Select]
export_file(node, "positions.txt", "lammps_dump", columns=["Particle Identifier", "Particle Type", "Position.X", "Position.Y", "Position.Z"], multiple_frames=True)
Note that this writes a single dump file containing all output frames. If you use a * in the filename, you can also write a sequence of files, one for each frame.

If you want to export just one specific frame, use the frame keyword option, which is also mentioned in the docs of export_file().


The CNA pictures suggests that the vacancy platelet hasn't turned into a vacancy dislocation loop yet. Maybe because they are too small for the two surfaces to collapse spontaneously, or because something else is wrong with the construction.

For the bcc simulations published in our Nature paper, we also cut vacancy loops into the crystal. Those loops had a hexagonal shape, with the habit plane parallel to {111}. The hexagonal region within which we deleted atoms from the perfect crystal had a thickness corresponding to exactly one 1/2<111> lattice vector. Then, during a short MD run, the two surfaces collapsed back to a perfect crystal lattice again due to their attraction, leaving behind a hexagonal 1/2<111> dislocation loop.

But our loops where certainly larger than yours, so the spontaneous collapse may not happen in your case and you need to assist it somehow.

Support Forum / Re: viewport
« on: April 19, 2018, 09:05:28 AM »
I'm not sure how you mean that. Normally, Ovito doesn't "compute" these values. The user controls them when moving the viewport camera using the mouse. The only function that computes a new camera position is the "zoom all" function, which is automatically invoked after importing a new dataset in order fully show it.

You can invoke this function from Python too, see the Viewport.zoom_all() method.

Note that this function only translates the virtual camera until all objects in the scene become fully visible. The viewing direction and the FOV angle are not changed by the function.

Support Forum / Re: segmentation fault
« on: April 18, 2018, 07:09:07 PM »

I need some more information:
  • Did you use the dump file posted by Emile?
  • What was the selection expression you used?
  • Which operating system do you use?
  • Did you try just Ovito version 2.9.0 or also others?



In this case you should take a step back and first analyse these defects by hand, not using DXA. Use the CNA to identify perfect bcc atoms and check the morphology of the defective atoms.

Keep in mind that the DXA will only determine that it is a dislocation if the vacancy cluster has collapsed into a loop-like shape (i.e. a defect core with torus topology). It will not find a dislocation if the vacancies form a simple cluster (i.e. a defect core with ball topology). There need to be perfect bcc atoms in the centre of the loop, which is probably easer in case of interstitials.

You wrote you removed the 89 atoms to create a vacancy loop. What was the shape of this group of sites you removed? Spherical or more like a platelet?

Support Forum / Re: viewport
« on: April 17, 2018, 07:34:35 AM »
Dear Kyu,

I'm not really sure how to define these parameters better than how it is already done in the Python docs:

These parameters control the position of the virtual camera relative to the dataset, the direction it is taking the picture, and the focal length of the camera.

In any case it is definitely a good idea to check out the Adjust View dialog in the graphical version of OVITO, see:

If you open this dialog for a viewport, it will show you the current values for these three parameters ("View position" corresponds to 'camera_pos', "View direction" corresponds to 'camera_dir', and "View angle" to the FOV (field of view) value). Note that the dialog displays the FOV angle in degrees, while in a Python script you would have to use radians.


Support Forum / Re: Ellipsoidal orientations problem
« on: April 16, 2018, 04:21:41 PM »
Hi Robin,

I can only speculate, but here is what I think is the problem:

OVITO doesn't know that the four columns named "qw", "qi", etc. in your file contain the orientation information. The reason is that LAMMPS doesn't seem to have a standard naming convention for these auxiliary properties. Thus, you need to tell the OVITO explicitly how to interpret these file columns. For OVITO to use the orientation information rotate the ellipsoids, the quaternion values from the file need to be mapped to OVITO's "Orientation" particle property. This is explained in the last paragraph on this page of the manual:

If you don't know where to find the "Edit column mapping" button, see the screenshot here:


Yes, that sounds reasonable and simple and is something you should try first.

An alternative approach that came to my mind is this:

Keep a counter for every defect cluster in the system. Initialize all counters to zero. Then visit all vertices of a given dislocation loop. For every vertex, find the closest cluster atom (use OVITO's NearestNeighborFinder for this). Increment the counter for the cluster this atom belongs to by one. The cluster with the highest count wins and is associated with the dislocation loop.

Hi Christophe,

can you post a typical picture of your defect structures, showing the point defect clusters and the corresponding dislocation loops (superimposed)? This would help us evaluate which kind of correlation strategies could work in your case.


Pages: 1 [2] 3 4 ... 25