Hi Enrico,
I have no idea what would cause this.  Perhaps you could use Help→Report a Bug and attach a few frames of your trajectory and a recipe to reproduce this problem.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jan 23, 2026, at 6:31 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:

Hi Eric,
One more question: 
I’ve noticed that in my system, when multiple water molecules cross the simulation box, there is a brief brightness “blink” in the visualization. Even after removing artificial bonds and hiding crossing waters, this blinking effect still persists.

Is there any command that can be applied within the per-frame settings to fix this issue?

I've tried to disable the shadows of reflected objects but it did not work ..

Many thanks in advance!

Enrico

Il giorno gio 22 gen 2026 alle ore 09:20 Enrico Martinez <jmsstarlight@gmail.com> ha scritto:
Thanks so much Eric!
I've already asked the Amber mailing list about my problem with the re-imaging. Briefly I've tried 'autoimage' and the water molecules move very fast near the ligand binding pocket, especially when I average snapshots for smoothing motions. I've tried also MDtraj pipeline for reimaging with multiple step and it produced reasonable things near ligand binding site BUT water still cross PBC in some point splitting atoms ( for example oxygen it one part and hydrogens in another), which produces those artificial long bonds 🙃
If you know other method for reimagining that could work for water analysis near the binding site, I would be happy to try it on my system. 
Many thanks in advance!
Enrico


Il giorno gio 22 gen 2026 alle ore 01:57 Eric Pettersen <pett@cgl.ucsf.edu> ha scritto:
Hi Enrico,
One normally wouldn't use this approach at all.  Instead, in whatever MD package you're using you post-process the trajectory so that molecules cross the periodic boundary as a unit rather than atom by atom (typically referred to as "re-imaging" the trajectory).  For instance, the AMBER package provides a CPPTRAJ program with autoimage and image commands for doing this.  Gromacs has similar capabilities. I believe most major MD packages do.
If for some reason you don't want to do this, you can use this ChimeraX Recipe to select residues that cross the periodic boundary at any point and hide them.
You could use Python to loop through the water residues and hide or show them based on their bond lengths.  It would be faster than the commands you're using, but it's still computation at every step that may or may not be fast enough.  Off the top of my head (i.e. untested), the code would be:

from chimerax.atomic import all_atomic_structures
for s in all_atomic_structures(session):
for r in s.residues:
if r.name != "HOH":
continue
for a in r.atoms:
for b in a.bonds:
if b.length > 5:
r.atoms.displays = False
break
else:
continue
break
else:
r.atoms.displays = True

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jan 21, 2026, at 1:34 PM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Dear ChimeraX users!

I am working on the visualization of an MD trajectory where some water molecules are broken due to PBC artifacts, causing oxygen and hydrogen atoms to be separated over large distances. To address this, I currently use the following workflow:

  1. Remove all bonds in water molecules near the ligand.

  2. Rebuild only reasonable bonds, avoiding artifactually long bonds.

  3. Remove water atoms that have no bonds per frame:

perframe "~bond :HOH & :LIG :<5.0; bond :HOH & :LIG :<5.0 reasonable true; hide :HOH & @@num_bonds=0 target a" interval 1

This works well to fix visualization artifacts, but the workflow is computationally heavy, as it rebuilds bonds in every frame. Is there a way to achieve the same in a single step by simply removing waters with stretched bonds?

Many thanks in advance!

Enrico

_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/