Hi, I am running ovito python module on my linux cluster to generate dislocation structure of a system at different angle. I am rendering the snapshots (for different angles) using tachyon renderer. Here’s the code snippet of renderer setup I am using is:
mod = DislocationAnalysisModifier()
mod.defect_mesh_smoothing_level = 10
mod.color_by_type = False
mod.disloc_vis.line_width = 1
mod.defect_vis.enabled = False
pipeline.modifiers.append(mod)
data = pipeline.compute()
def modify(frame, data):
for index, line in enumerate(data.dislocations.lines):
data.dislocations_.set_line(index, custom_color=(0.2823529412, 0.6078431373, 0.1764705882))
pipeline.modifiers.append(modify)
data = pipeline.compute()
If you see the attached photo, you’ll find that after one degree of rotation, some of the dislocation junction completely disappears. The problem is when I make the video of full 360 rotation, these junctions pop up and disappear, although it’s from the same snapshot. Is there any solution for it?
Here is an explanation posted in the OVITO Pro forum in response to a a similar observation.
Currently, there is no guarantee that the results of the DXA function are invariant under rotation - at least not at the precise microscopic level. On the larger “mesoscopic” level, however, the result should of course be independent of the orientation, i.e., the rough structure of the dislocations should always remain similar. By the way, the same applies also to small perturbations to the atomic positions in the input structure. Such slight changes also generally lead to local changes in the dislocations but do not affect the large-scale structure of the dislocation network.
A reason is that some algorithm steps of the DXA are not completely invariant under rotation. One example is the Delaunay tessellation, which is performed as part of DXA. Although the topology of the tessellation is invariant under rotation (if we ignore numeric precision issues), the storage order of the tetrahedra generated by the Delaunay algorithm is not. These variations in the processing sequence in turn affect the final result of DXA, as dislocations are identified in a different sequence.
Although it is theoretically conceivable that the DXA method could work in a fully rotationally invariant manner, in practice this would require more effort. For instance, additional sorting steps would have to be introduced to ensure invariance at all stages. So far, this has been avoided for the sake of maximizing performance.
The large dislocation cell you show in the 3deg render most likely gets replaced by a large defective but non-dislocation volume in your 4deg snapshot. This could also be affected by other DXA parameters like the “Trial circuit length” or the “Circuit stretchability”.
If you want to perform this kind of rotation without any changes to dislocation network structure you have multiple options:
Apply the rotation using the “Affine Transformation Modifier” after the DXA so that the whole dislocation network gets rotated / transformed.
You can also visually rotate and translate a pipeline. without affecting any of the contained objects. There will be no changes to the simulation cell, the atomic positions, or the dislocation network.