Opened 18 months ago
Closed 18 months ago
#15074 closed defect (not a bug)
perframe/coordset: commands executed with old coordset
Reported by: | Owned by: | Tom Goddard | |
---|---|---|---|
Priority: | moderate | Milestone: | |
Component: | MD/Ensemble Analysis | Version: | |
Keywords: | Cc: | Elaine Meng, pett | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
I'm trying to visualize the hydrogen bonds of a small molecule in water over the trajectory of a molecular dynamics simulation, using the following commands:
alias evalhb hide solvent; hb :LIG reveal true coordsets false makePseudobonds true ; view
perframe evalhb; coordset #1 1,20 holdsteady :LIG; wait 20; ~perframe
However, this does not work as expected. Could you please help me with this issue?
Attachments (1)
Change History (10)
comment:1 by , 18 months ago
comment:2 by , 18 months ago
What does "this does not work as expected" mean? What did you expect and what did you see?
comment:3 by , 18 months ago
It means no H-bonds were shown because the hbonds command was executed on the "old" coordset.
comment:4 by , 18 months ago
One thing to consider is that the order of going to the next coordinate sets and computing hydrogen bonds. In your commands
perframe evalhb
coordset #1 1,20 holdseteady :LIG
it will update the hydrogen bonds, then change to the next time step, then show the frame (done by the wait command). Probably you want to advance to the next time and then update the hydrogen bonds, then render. So put the perframe after the coordset command.
coordset #1 1,20 holdseteady :LIG
perframe evalhb
comment:5 by , 18 months ago
Dear All,
thank you for your support. I'm attaching a sample trajectory file. For teaching, I would like to show the hydrogen bonds that the small molecule makes at every frame. The only thing that works is Eric's suggestion:
hide solvent; hb :LIG reveal true coordsets true makePseudobonds true
perframe "show :LIG" ; coordset #1 1,20 holdsteady :LIG; wait 20; ~perframe
However, it shows all water molecules that the ligand ever makes hydrogen bonds with over the trajectory, not only the ones that it forms hbonds with in a certain frame.
Kind regards,
Ute
comment:6 by , 18 months ago
Using your trajectory, Tom's suggestion works for me. Perhaps the formatting via mail made things confusing. Anyway, all on one line:
alias evalhb hide solvent; hb :LIG reveal true coordsets false makePseudobonds true ; view
Then all on the next line:
coordset #1 1,20 holdsteady :LIG ; perframe evalhb ; wait 20 ; ~perframe
BTW, you might want to remove the "view" from evalhb -- it fights the holdsteady in the coordset command.
comment:8 by , 18 months ago
Thank you, that's working indeed! Kind regards, Ute ________________________________ From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu> Sent: Wednesday, May 1, 2024 19:21 To: pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>; goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>; Ute Roehrig <Ute.Roehrig@sib.swiss> Cc: meng@cgl.ucsf.edu <meng@cgl.ucsf.edu> Subject: Re: [ChimeraX] #15074: perframe/coordset: commands executed with old coordset #15074: perframe/coordset: commands executed with old coordset -------------------------------------------+------------------------- Reporter: Ute.Roehrig@… | Owner: Tom Goddard Type: defect | Status: assigned Priority: moderate | Milestone: Component: MD/Ensemble Analysis | Version: Resolution: | Keywords: Blocked By: | Blocking: Notify when closed: | Platform: all Project: ChimeraX | -------------------------------------------+------------------------- Comment (by pett): Maybe before doing anything: "view :lig" -- Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/15074#comment:7> ChimeraX <https://www.rbvi.ucsf.edu/chimerax/> ChimeraX Issue Tracker
comment:9 by , 18 months ago
Resolution: | → not a bug |
---|---|
Status: | assigned → closed |
We discussed two ways to play through the trajectory showing hydrogen bonds. The main difference is that Eric's suggestsion with the hbond option "coordsets true" computes the the hydrogen bonds for the whole trajectory at the start, while the "coordsets false" approach you tried does computes them as each frame is displayed. Both work and I don't see any clear advantage of one over the other. Eric's suggestion to add "hide solvent" in the perframe command makes it so waters that no longer have hydrogen bonds to your ligand are hidden.
I worked with PDB 107D, which has a "DUO" ligand. Print statements in the hbond code revealed that it was on the old coordset when the command was executed.