aiidalab / aiidalab-widgets-base

Reusable widgets for AiiDAlab applications
MIT License
6 stars 17 forks source link

Weird artifacts when displaying gas phase molecules #586

Closed danielhollas closed 2 months ago

danielhollas commented 2 months ago

Just noticed the following quirk in my app with the latest AWB

image

I suspect this might be due to the bond-drawing code added in 2.1? (I am still on 2.0) I need to investigate more, since this happens only in certain scenarios, but I want to document this for now.

CC @cpignedoli @yakutovicha @superstar54 in case you saw something like this...

superstar54 commented 2 months ago

It's actually not a bug. I guess you have a small unit cell with the periodic boundary condition (pbc). What's the unit cell of your molecule, I guess these weird bonds will disappear if you use a large unit cell, or switch off the pbc because it's a molecule.

danielhollas commented 2 months ago

@superstar54 your were right, thanks. I was a victim of a very strange behaviour of TrajectoryData, where it would by default assume PBC=(True, True,True) when converting to StructureData. I opened an issue here: https://github.com/aiidateam/aiida-core/issues/6376

Here's a fix in my app: https://github.com/ispg-group/aiidalab-ispg/pull/242/commits/d26297c705d54f0e31cd9c38d93eb7f2141097e3