New feature request: "shortCircuit" option for clashes command to terminate as soon as single clash is found
Hi team, I'd like to request new functionality for the clashes command. Specifically, I'd like to request for a new option called "shortCircuit that accepts a Boolean value: True or False. If True, then as soon as any clash is detected, the clashes command terminates; False, then behave the way it does now. For my particular use case, I am making collision checks between pairs of molecule configurations, thousands of pairs. The problem is the more clashes there are, the longer it takes for the clashes command to finish. This is a problem when I'm checking for collisions thousands of times. To have a feature where the clashes command exits early, as soon as it finds ANY clash/collision, would be extremely useful for my case. Thanks, --J
Hi Jon, This would not be difficult to implement, but seems pretty useless as a command option. Are you really running this clashes command from a ChimeraX script (.cxc) file, or are you actually using a Python script that is invoking the command? Knowing your exact usage case would clarify where it would be best to put in this option. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Apr 22, 2026, at 2:12 PM, Jon David via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi team,
I'd like to request new functionality for the clashes command. Specifically, I'd like to request for a new option called "shortCircuit that accepts a Boolean value: True or False. If True, then as soon as any clash is detected, the clashes command terminates; False, then behave the way it does now.
For my particular use case, I am making collision checks between pairs of molecule configurations, thousands of pairs. The problem is the more clashes there are, the longer it takes for the clashes command to finish. This is a problem when I'm checking for collisions thousands of times. To have a feature where the clashes command exits early, as soon as it finds ANY clash/collision, would be extremely useful for my case.
Thanks,
--J _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
Hi Eric, Thanks for the quick reply! I'm using a Python script (i.e. I use chimerax --script "myscript.py"). However, I should note I am using the run function like this: runCmd = f"clashes {model1_id} restrict {model2_id} distanceOnly {distanceThreshold} intraModel {isIntraModel} interModel {isInterModel} reveal {isRevealed} saveFile {ofname}" run( session_obj, runCmd ) This is inside one of my own functions, where I'm constantly loading two molecules, setting their configurations (positions/orientations), checking if they're in collision, then resetting the session to prepare a new pair of two molecules. Even a small update that quickly terminates the clashes command when a single clash is found would speed up my computations dramatically. --Jon PhD student Dept. Computer Science U. New Mexico ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu> Sent: Wednesday, April 22, 2026 3:37 PM To: Jon David <jchristiandavid@unm.edu> Cc: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] New feature request: "shortCircuit" option for clashes command to terminate as soon as single clash is found You don't often get email from pett@cgl.ucsf.edu. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> [EXTERNAL] Hi Jon, This would not be difficult to implement, but seems pretty useless as a command option. Are you really running this clashes command from a ChimeraX script (.cxc) file, or are you actually using a Python script that is invoking the command? Knowing your exact usage case would clarify where it would be best to put in this option. --Eric Eric Pettersen UCSF Computer Graphics Lab On Apr 22, 2026, at 2:12 PM, Jon David via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote: Hi team, I'd like to request new functionality for the clashes command. Specifically, I'd like to request for a new option called "shortCircuit that accepts a Boolean value: True or False. If True, then as soon as any clash is detected, the clashes command terminates; False, then behave the way it does now. For my particular use case, I am making collision checks between pairs of molecule configurations, thousands of pairs. The problem is the more clashes there are, the longer it takes for the clashes command to finish. This is a problem when I'm checking for collisions thousands of times. To have a feature where the clashes command exits early, as soon as it finds ANY clash/collision, would be extremely useful for my case. Thanks, --J _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu<mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu<mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
Hi Jon, I have implemented a hidden "shortCircuit true/false" option to the clashes/contacts commands that will be in tomorrow's daily builds. "Hidden" means that it is not documented and will not show up in the syntax shown by "usage" for the command, but that nonetheless you can supply the option to the command if you are aware of its existence. Seemed like the way to go for an option that only really makes sense if you are running the command from Python code. --Eric
On Apr 22, 2026, at 3:53 PM, Jon David via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Eric,
Thanks for the quick reply! I'm using a Python script (i.e. I use chimerax --script "myscript.py"). However, I should note I am using the run function like this:
runCmd = f"clashes {model1_id} restrict {model2_id} distanceOnly {distanceThreshold} intraModel {isIntraModel} interModel {isInterModel} reveal {isRevealed} saveFile {ofname}"
run( session_obj, runCmd )
This is inside one of my own functions, where I'm constantly loading two molecules, setting their configurations (positions/orientations), checking if they're in collision, then resetting the session to prepare a new pair of two molecules. Even a small update that quickly terminates the clashes command when a single clash is found would speed up my computations dramatically.
--Jon
PhD student Dept. Computer Science U. New Mexico
From: Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> Sent: Wednesday, April 22, 2026 3:37 PM To: Jon David <jchristiandavid@unm.edu <mailto:jchristiandavid@unm.edu>> Cc: chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> <chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu>> Subject: Re: [chimerax-users] New feature request: "shortCircuit" option for clashes command to terminate as soon as single clash is found
You don't often get email from pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>. Learn why this is important <https://aka.ms/LearnAboutSenderIdentification> [EXTERNAL] Hi Jon, This would not be difficult to implement, but seems pretty useless as a command option. Are you really running this clashes command from a ChimeraX script (.cxc) file, or are you actually using a Python script that is invoking the command? Knowing your exact usage case would clarify where it would be best to put in this option.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Apr 22, 2026, at 2:12 PM, Jon David via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi team,
I'd like to request new functionality for the clashes command. Specifically, I'd like to request for a new option called "shortCircuit that accepts a Boolean value: True or False. If True, then as soon as any clash is detected, the clashes command terminates; False, then behave the way it does now.
For my particular use case, I am making collision checks between pairs of molecule configurations, thousands of pairs. The problem is the more clashes there are, the longer it takes for the clashes command to finish. This is a problem when I'm checking for collisions thousands of times. To have a feature where the clashes command exits early, as soon as it finds ANY clash/collision, would be extremely useful for my case.
Thanks,
--J _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu <mailto:chimerax-users@cgl.ucsf.edu> To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu <mailto:chimerax-users-leave@cgl.ucsf.edu> Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (2)
-
Eric Pettersen -
Jon David