assistance on bundle writting

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

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

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<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 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 <mailto:pett@cgl.ucsf.edu>> Sent: 24 January 2025 17:58 To: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk <mailto:C.Nguyen4@liverpool.ac.uk>> 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] 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 <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 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/

Okay, Thank you so much for your help. 🙂 ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu> Sent: 27 January 2025 18:37 To: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk> Cc: ChimeraX Users Help <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 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<mailto:pett@cgl.ucsf.edu>> Sent: 24 January 2025 17:58 To: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk<mailto:C.Nguyen4@liverpool.ac.uk>> 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] 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<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 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/

Hi, I was wondering if I could get some more help. The code below is what I currently have. pbg = self.session.pb_manager.get_group("crosslinks") pbg.display = True a1 = AtomsArg.parse("/A:18@ca", self.session) a2 = AtomsArg.parse("/A:5@ca", self.session) pb = pbg.new_pseudobond(a1[0][0], a2[0][0]) pb.display = True pb.radius = 3 self.session.logger.info(str(pb)) This is the output that I am getting: /A ASN 18 CA ↔ GLN 5 CA I was wondering if you could tell me how I can display pseudo bond between the two atoms? Thank you in advance, Catherine ________________________________ From: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk> Sent: 29 January 2025 17:07 To: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] assistance on bundle writting Okay, Thank you so much for your help. 🙂 ________________________________ From: Eric Pettersen <pett@cgl.ucsf.edu> Sent: 27 January 2025 18:37 To: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk> Cc: ChimeraX Users Help <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 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<mailto:pett@cgl.ucsf.edu>> Sent: 24 January 2025 17:58 To: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk<mailto:C.Nguyen4@liverpool.ac.uk>> 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] 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<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 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/

Hi Catherine, If the get_group() call needs to create a group (rather than return a pre-existing group), then you need to add the group to the models open in the session. So after the get_group() call, do this: if pbg.id <http://pbg.id/> is None: session.models.add([pbg]) --Eric Eric Pettersen UCSF Computer Graphics Lab
On Feb 14, 2025, at 6:23 AM, Nguyen, Catherine via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
I was wondering if I could get some more help. The code below is what I currently have.
pbg = self.session.pb_manager.get_group("crosslinks") pbg.display = True
a1 = AtomsArg.parse("/A:18@ca", self.session) a2 = AtomsArg.parse("/A:5@ca", self.session) pb = pbg.new_pseudobond(a1[0][0], a2[0][0]) pb.display = True pb.radius = 3 self.session.logger.info <http://self.session.logger.info/>(str(pb))
This is the output that I am getting: /A ASN 18 CA ↔ GLN 5 CA
I was wondering if you could tell me how I can display pseudo bond between the two atoms?
Thank you in advance, Catherine
From: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk <mailto:C.Nguyen4@liverpool.ac.uk>> Sent: 29 January 2025 17:07 To: 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] assistance on bundle writting
Okay, Thank you so much for your help. 🙂 From: Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> Sent: 27 January 2025 18:37 To: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk <mailto:C.Nguyen4@liverpool.ac.uk>> Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu <mailto: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 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 <mailto: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 <mailto:pett@cgl.ucsf.edu>> Sent: 24 January 2025 17:58 To: Nguyen, Catherine <C.Nguyen4@liverpool.ac.uk <mailto:C.Nguyen4@liverpool.ac.uk>> 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] 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 <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/
_______________________________________________ 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
-
Nguyen, Catherine