
Elaine's second option is correct, but the first one would need "/G &" in more places, namely: sel /G & backbone & @n & @@num_explicit_bonds=1 ; sel add /G & backbone & @c & @@num_explicit_bonds=2 ; sel add /G & @oxt ; sel up Though her second solution seems simpler: sel backbone & @n & @@num_explicit_bonds=1 ; sel add backbone & @c & @@num_explicit_bonds=2 ; sel add @oxt ; sel up; ~sel ~ /G --Eric
On Nov 27, 2024, at 8:52 AM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Paul, You can just add your chain spec to the list of criteria, e.g.
sel /G & backbone & @n & @@num_explicit_bonds=1 ; sel add backbone & @c & @@num_explicit_bonds=2 ; sel add @oxt ; sel up
How to specify chains, residues, atoms... <https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html>
Or you could just use the command that does it for all chains (the one you were using before) and then deselect the parts that aren't chain G, e.g.
~sel ~ /G
Meaning "deselect parts that are not chain G" -- once you understand what the commands are doing, you can generalize and modify them.
Elaine
On Nov 27, 2024, at 8:16 AM, Paul Miller via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thanks, Eric, I tried this and it works, although I couldn't figure out how to make it do it for a single chain, e.g. chain G in 6HUO, but it did for all the chains, selecting the start and end residues, so still useful. Thanks again! Cheers, Paul
Paul Miller (he/him), PhD Associate Professor Department of Pharmacology University of Cambridge Tennis Court Road Cambridge CB2 1PD https://www.phar.cam.ac.uk/research/miller From: Eric Pettersen <pett@cgl.ucsf.edu> Sent: 26 November 2024 00:27 To: Paul Miller <pm676@cam.ac.uk> Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Closest distance list between residues/atoms; And selecting first/last residue in a chain Okay, when the chain isn’t complete, the selection syntax is more complicated, leveraging the fact that the N terminus has 1 bond (assuming the structure does not have hydrogens) and no missing-structure pseudobonds, and the C terminus has either @OXT or 2 bonds and no missing-structure pseudobonds. The command is:
sel backbone & @n & @@num_explicit_bonds=1 ; sel add backbone & @c & @@num_explicit_bonds=2 ; sel add @oxt ; sel up
—Eric
On Nov 25, 2024, at 2:45 PM, Paul Miller via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Elaine
Sure, that makes sense. Thanks for the explanation.
Cheers, Paul
Paul Miller (he/him), PhD Associate Professor Department of Pharmacology University of Cambridge Tennis Court Road Cambridge CB2 1PD https://www.phar.cam.ac.uk/research/miller From: Elaine Meng <meng@cgl.ucsf.edu> Sent: 25 November 2024 22:41 To: Paul Miller <pm676@cam.ac.uk> Cc: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Closest distance list between residues/atoms; And selecting first/last residue in a chain Hi Paul, The first residue in the coordinates is the real first residue in the sequence. The last residue in the coordinates is not the real last residue, as you can see in the attached screenshot: the missing residues are in a black outline box. In ChimeraX, this full sequence was shown with command "seq chain /G" -- the full sequence information is taken from the PDB file SEQRES records, or the equivalent information in mmCIF format. Elaine
<Screenshot 2024-11-25 at 2.38.40 PM.png>
On Nov 25, 2024, at 2:36 PM, Paul Miller via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Eric
Thanks for this. If I type in commandline:
open 6huo sel /G & backbone & (aliphatic-primary-amine | @oxt) ; sel up
It selects the first residue of Chain G but not the last. Maybe it doesn't have the oxt present.
Cheers, Paul
Paul Miller (he/him), PhD Associate Professor Department of Pharmacology University of Cambridge Tennis Court Road Cambridge CB2 1PD https://www.phar.cam.ac.uk/research/miller From: Eric Pettersen <pett@cgl.ucsf.edu> Sent: 25 November 2024 21:21 To: Paul Miller <pm676@cam.ac.uk> Cc: Alessio Nocentini via ChimeraX-users <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Closest distance list between residues/atoms; And selecting first/last residue in a chain Hi Paul, If the chains are complete (i.e. the true terminal residues aren’t missing), then you can select the starting and ending resides by their unique characteristics (the C terminus has atom OXT and the N terminus is a primary amine) with this command:
sel backbone & (aliphatic-primary-amine | @oxt) ; sel up
To restrict it to chain A, insert an “/A &” in the selection command.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Nov 25, 2024, at 1:07 PM, Paul Miller via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Elaine
No worries. Thanks for trying.
Cheers, Paul
Paul Miller (he/him), PhD Associate Professor Department of Pharmacology University of Cambridge Tennis Court Road Cambridge CB2 1PD https://www.phar.cam.ac.uk/research/miller From: Elaine Meng <meng@cgl.ucsf.edu> Sent: 25 November 2024 21:04 To: Paul Miller <pm676@cam.ac.uk> Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Closest distance list between residues/atoms; And selecting first/last residue in a chain Hi Paul, Yes, "start" and "end" are for use in ranges. Just now I tried ":start-start" but alas, it did not work!
Undoubtedly it could be done with python code, but that is beyond my skill set, sorry. I couldn't think of any way to do it directly in a command.
Elaine
On Nov 25, 2024, at 12:56 PM, Paul Miller via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thank you very much, Elaine. I'll take a look at the "contacts" info.
Regarding the first and last residue, I can see how that works for a residue range, e.g. from residue 45 to the end, but in my particular case, I wish to only show the singular first and last residues in a chain (e.g. I show a chain as Calphas in stick, and the first and last residues at spheres), without any specification or a range, and it doesn't work for that (or I cannot figure out the code from the weblink you sent). Just for feedback. No worries that it cannot do it.
Cheers, Paul
Paul Miller (he/him), PhD Associate Professor Department of Pharmacology University of Cambridge Tennis Court Road Cambridge CB2 1PD https://www.phar.cam.ac.uk/research/miller From: Elaine Meng <meng@cgl.ucsf.edu> Sent: 25 November 2024 17:03 To: Paul Miller <pm676@cam.ac.uk> Cc: chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Closest distance list between residues/atoms; And selecting first/last residue in a chain Hi Paul, The "Clashes" or "Contacts" tool (or "clashes" or "contacts" commands) all have an option to write output to a file or to the Log. I believe it is in order of greatest to least VDW overlap, but there is a center-to-center distance column as well that you could then sort by (e.g. if you wrote an output file). These also have an option to use center-to-center distance as the main criterion and ignore VDW overlap, and that would give results in order of distance. <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf....> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf....>
No, the above do not say what kind of interaction is involved. You would have to use your own chemical knowledge of atom types to tell (and also distinguish them from overly close, unfavorable "clashes" ... although that is what the VDW overlap value is meant to tell you in the first place).
If you use "H-Bonds" tool (command "hbonds") there are similar output options, except all of the lines are H-bonds. They also have an option to find only salt bridges (H-bonds that are also salt bridges). <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf....> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf....>
For start/end, you can use the words "start" and "end" as explained in the atomspec documentation: <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf....>
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
> On Nov 25, 2024, at 1:19 AM, Paul Miller via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote: > > Hi > > Is there a way by command line to generate a list of residue to residue (or atom to atom) distances ranked by closest to furthest, for say, all residues within 4A of each other at an interface between two protein chains? Can it also state the type of interaction, e.g. salt bridge, H-bond, vdW? > > Also, completely separately, is there a way by command line to select the first and last residue in a chain (without having to find their number)? > > No worries if not. Thanks so much! > > Cheers, Paul
_______________________________________________ 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/