Hi Catherine,
If you just want the pseudobond length in your Python code, it would be pb.length .  If you want to show distance annotations on the pseudobonds graphically, that is on a per-group basis and would be session.pb_dist_monitor.add_group(pbg) .  The distances will update if the endpoint atoms move relative to one another.  You can stop distance monitoring with session.pb_dist_monitor.remove_group(pbg) .

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jan 27, 2025, at 2:31 AM, Nguyen, Catherine via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Can I also ask you what I could add to measure the distance of the pseudobonds? Could the distance monitor  be called?

Thank you,

Catherine

From: Eric Pettersen <pett@cgl.ucsf.edu>
Sent: 24 January 2025 17:58
To: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk>
Cc: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] assistance on bundle writting
 
Caution: This email originated from outside of the University. Do not click links or open attachments unless you recognise the source of this email and know the content is safe. Check sender address, hover over URLs and don't open suspicious email attachments.
Hi Catherine,
If all the pseudobonds you intend to add are within one structure (call it 's'), then the code would be:

pbg = s.pseudobond_group("name of pseudobond group")
pbg.new_pseudobond(atom1, atom2)

If at least some of the pseudobonds are between structures, then instead:

pbg = session.pb_manager.get_group("name of pseudobond group")
pbg.new_pseudobond(atom1, atom2)

You don't say whether this pseudobond is meant to convey that those CAs are in the same chain but that the structure between them is missing.  If so, than you should specifically create "missing structure" pseudobonds, with:

pbg = s.pseudobond_group(s.PBG_MISSING_STRUCTURE)
pbg.new_pseudobond(atom1, atom2)

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jan 24, 2025, at 8:30 AM, Nguyen, Catherine via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hello, 

I was hoping to get your help. I am trying to write a bundle and I am struggling to figure out how I can add psuedo-bonds using python as I want to connect two amino acids by the CA. Would you be able to help me find a way to do this?

I hope to hear from you soon,

Best wishes, 
Catherine

_______________________________________________
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/

_______________________________________________
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/