chemiscope icon indicating copy to clipboard operation
chemiscope copied to clipboard

Feature Request: Periodic boundary conditions included in atomic environment display

Open jduerholt opened this issue 2 years ago • 4 comments

Hi,

I was wondering how complex it would be to include PBCs in the calculation and display of atoms within the cutoff radius for an atom. At least from my perspective, it would be super helpful. Ideally the structure would then also be centered around the atom of interest so that the environment is shown as one piece.

Is it somehow clear, what I mean?

Best,

Johannes

P.S.: Special greeting to Guillaume ;)

jduerholt avatar Mar 04 '22 14:03 jduerholt

Hi Johannes! Greetings to you as well!

The easiest way to include PBC in the local environments is to replicate the cell (set supercell to 3x3x3) in the structure viewer settings. You can do this automatically when generating the file by using something like:

import chemiscope

chemiscope.write_input(
    ...,
    settings={"structure": [{"supercell": [3, 3, 3]}]}
)

The different settings are documented here: https://chemiscope.org/docs/tutorial/input-reference.html


Since this is not the first time someone ask how to do this (#133), let's keep this issue open until we have either better documentation on this question or a better way to handle it.

Luthaf avatar Mar 04 '22 14:03 Luthaf

Great, it worked perfectly!

jduerholt avatar Mar 04 '22 14:03 jduerholt

Hello, just wanted to add here that I was experiencing the same issue recently.

Would it make sense if the routine is modified so that the necessary unit cell replications are already made to guarantee a full highlighting of the atomic environment? I can see that it might be a bit complicated given that the user has the freedom to tune the environment radius. But, I thought this was still worth bringing up.

Thanks for a great software nonetheless! Quite helpful I must say :)

Best, Raymond

SanggyuChong avatar Feb 05 '23 22:02 SanggyuChong

Defaulting to a 3x3x3 supercell (or whatever is needed for the current cutoff size) when visualizing environments would be a nice way to fix this. I would keep the option to pick the number of supercells when visualizing a single cell the same as now, since that's where it is the most useful.

Luthaf avatar Feb 20 '23 14:02 Luthaf