Forum Navigation
You need to log in to create posts and topics.

Shift object under PBC

In atomistic modeling studies, periodic boundary condition (PBC) is generally used. It is often useful to check the atomistic structure at the boundaries of the models with PBC when doing visualization. A convenient way to do this is to shift the model relative to the frame of the simulation box, and wrap the atoms at the boundaries according to the PBC, so the regions of the model at the opposite sides of original boundaries can appear as joint within the box. Additionally, the inner part of the model can then appear at the surface of the simulation cell, which is very helpful if we want to check the atomistic structure of the inner part of the model. So is there any way to shift object/model under PBC like this in Ovito?  If not, is it possible to implement this function in the future? For example, a button can be designed in such way that, when clicked it will shift the model with PBC by mouse drag on the model.  Alternatively, the feature as implemented in AtomEye can be taken for reference:

""Shift + mouse drag to shift object under PBC. Shift+IMWheel (or Shift+Ctrl+IMWheel for quicker action) will shift object under PBC in the forward/backward direction. Press 'z' to recover the initial PBC state, where there is no shift."

 

Hi,

Thank you for this suggestion. Something similar can already be accomplished with the existing tools in OVITO. You have to insert two modifiers into the data pipeline for this:

  1. First, insert the Affine Transformation modifier. Make sure it only operates on the particle positions and not the cell boundaries. Untick the "Simulation cell" check box in the lower panel.
  2. Next, insert the modifier Wrap At Periodic Boundaries. This modifier has no parameters that need to be changed.

You can then go back to the Affine Transformation modifier and adjust the translation vector. This will shift the atoms in the given direction and the second modifier wraps them back into the periodic simulation box.

Note that you can press the mouse button on one of the little arrow buttons (the spinner controls) next to the numeric input fields for the translation vector. By dragging the mouse cursor up or down while holding the mouse button, you can then continuously shift the atoms.

Furthermore, note that OVITO lets you save the combination of the two modifiers described above as a modifier template. This allows you to insert the combination of modifiers with one click in the future.

The approach in AtomEye seems to be simpler, but OVITO gives you more flexibility, I think. Let us know if you have an idea how to further improve the current workflow in OVITO.

-Alex

Hi Alex,

Thanks for your kind reply and advice.

I've checked the workflow as you suggested, and it works perfectly well. I think this workflow should be enough for realization of the function which I was asked for. The design of user interface and operation of OVITO for visualization of atomistic models is unique indeed.

Liang