Adding amino acids to end of chain

Alexis Rohou asked on Twitter In @UCSFChimeraX <https://twitter.com/UCSFChimeraX> 1.1.1 and #Isolde <https://twitter.com/hashtag/Isolde?src=hashtag_click> by @CrollTristan <https://twitter.com/CrollTristan> is there an easy way to add aa residues to the end of a chain? https://twitter.com/AlexisRohou/status/1386171500604977152 <https://twitter.com/AlexisRohou/status/1386171500604977152> Elaine says: There isn't an "add amino acid" yet in ChimeraX, only Chimera.... unless ISOLDE can do it (I don't know). So maybe it's an ISOLDE question. ChimeraX itself has building peptides from scratch but not sticking them on to the end of an existing peptide. Build Structure, Start Structure: peptide <https://rbvi.ucsf.edu/chimerax/docs/user/tools/buildstructure.html#start <https://rbvi.ucsf.edu/chimerax/docs/user/tools/buildstructure.html#start>> or command "build start peptide" <https://rbvi.ucsf.edu/chimerax/docs/user/commands/build.html#start <https://rbvi.ucsf.edu/chimerax/docs/user/commands/build.html#start>> Elaine

I hope Tristan won’t mind, but since the question is now on the list, below is the recipe that Tristan sent me directly. If it works, Tristan gets credit. If it doesn’t, then my bad for sharing it - please don’t blame Tristan. It worked for me, but <insert standard lawyer speak to lower expectations and avoid future blame for your troubles>. Cheers, Alexis
You can add an amino acid to your chain using the following approach. First, select any atom from the residue you want to attach it to. Then in the shell:
m = session.isolde.selected_model from chimerax.atomic import selected_residues from chimerax.isolde.atomic.building.build_utils import add_amino_acid_residue # if you're adding an ARG to the C-terminal end: add_amino_acid_residue(m, 'ARG', prev_res=selected_residues(session)[0]) # if you're adding to the N-terminal end: add_amino_acid_residue(m, 'ARG', next_res=selected_residues(session)[0])
It currently makes no attempt to pre-optimise geometry so that'll be pretty crap, but it's usually good enough to easily settle into place (you might occasionally need to "isolde ignore" one or two residues for the first sim). There are a few known bugs:
when adding into a gap, occasionally the "missing structure" pseudobonds will fail to update correctly, leaving the old pseudobond in place. This doesn't cause any immediate harm, but can mess up the structure on saving if not corrected. To do so, select the atoms on either end of the offending pseudobond, then: pbg = m.pseudobond_group[m.PBG_MISSING_STRUCTURE, create_type=None) from chimerax.atomic import selected_atoms pbg.pseudobonds[pbg.pseudobonds.between_atoms(selected_atoms(session))].delete()
very occasionally, and for reasons that still remain mysterious, saving to mmCIF will lead to one or more of the new residues being duplicated - which can be really confusing at first because the coordinates for the new residue will be identical to the old. If it happens, this can be fixed by taking advantage of the fact that the "extra" residue is not bonded to anything: m = session.isolde.selected_model from collections import defaultdict rmap = defaultdict(list) for r in m.residues: sig = (r.chain_id, r.number, r.insertion_code) rmap[sig].append(r) for rlist in rmap.values(): if len(rlist) > 1: for r in rlist: if len(r.neighbors) == 0: r.delete()
On Apr 26, 2021, at 10:12 AM, Tom Goddard <goddard@sonic.net> wrote:
Alexis Rohou asked on Twitter
In @UCSFChimeraX <https://twitter.com/UCSFChimeraX> 1.1.1 and #Isolde <https://twitter.com/hashtag/Isolde?src=hashtag_click> by @CrollTristan <https://twitter.com/CrollTristan> is there an easy way to add aa residues to the end of a chain?
https://twitter.com/AlexisRohou/status/1386171500604977152 <https://twitter.com/AlexisRohou/status/1386171500604977152>
Elaine says:
There isn't an "add amino acid" yet in ChimeraX, only Chimera.... unless ISOLDE can do it (I don't know). So maybe it's an ISOLDE question.
ChimeraX itself has building peptides from scratch but not sticking them on to the end of an existing peptide.
Build Structure, Start Structure: peptide <https://rbvi.ucsf.edu/chimerax/docs/user/tools/buildstructure.html#start <https://rbvi.ucsf.edu/chimerax/docs/user/tools/buildstructure.html#start>>
or command "build start peptide" <https://rbvi.ucsf.edu/chimerax/docs/user/commands/build.html#start <https://rbvi.ucsf.edu/chimerax/docs/user/commands/build.html#start>>
Elaine

Hopefully (he said plaintively), sometime soon I'll find the breathing space to flesh this out into a properly polished tool. For now, the approach Alexis outlined does work with a modicum of patience. ________________________________ From: ChimeraX-users <chimerax-users-bounces@cgl.ucsf.edu> on behalf of Alexis Rohou <a.rohou@gmail.com> Sent: 26 April 2021 19:12 To: Tom Goddard <goddard@sonic.net> Cc: chimeraX Users Help <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Adding amino acids to end of chain I hope Tristan won’t mind, but since the question is now on the list, below is the recipe that Tristan sent me directly. If it works, Tristan gets credit. If it doesn’t, then my bad for sharing it - please don’t blame Tristan. It worked for me, but <insert standard lawyer speak to lower expectations and avoid future blame for your troubles>. Cheers, Alexis You can add an amino acid to your chain using the following approach. First, select any atom from the residue you want to attach it to. Then in the shell: m = session.isolde.selected_model from chimerax.atomic import selected_residues from chimerax.isolde.atomic.building.build_utils import add_amino_acid_residue # if you're adding an ARG to the C-terminal end: add_amino_acid_residue(m, 'ARG', prev_res=selected_residues(session)[0]) # if you're adding to the N-terminal end: add_amino_acid_residue(m, 'ARG', next_res=selected_residues(session)[0]) It currently makes no attempt to pre-optimise geometry so that'll be pretty crap, but it's usually good enough to easily settle into place (you might occasionally need to "isolde ignore" one or two residues for the first sim). There are a few known bugs: * when adding into a gap, occasionally the "missing structure" pseudobonds will fail to update correctly, leaving the old pseudobond in place. This doesn't cause any immediate harm, but can mess up the structure on saving if not corrected. To do so, select the atoms on either end of the offending pseudobond, then: pbg = m.pseudobond_group[m.PBG_MISSING_STRUCTURE, create_type=None) from chimerax.atomic import selected_atoms pbg.pseudobonds[pbg.pseudobonds.between_atoms(selected_atoms(session))].delete() * very occasionally, and for reasons that still remain mysterious, saving to mmCIF will lead to one or more of the new residues being duplicated - which can be really confusing at first because the coordinates for the new residue will be identical to the old. If it happens, this can be fixed by taking advantage of the fact that the "extra" residue is not bonded to anything: m = session.isolde.selected_model from collections import defaultdict rmap = defaultdict(list) for r in m.residues: sig = (r.chain_id, r.number, r.insertion_code) rmap[sig].append(r) for rlist in rmap.values(): if len(rlist) > 1: for r in rlist: if len(r.neighbors) == 0: r.delete() On Apr 26, 2021, at 10:12 AM, Tom Goddard <goddard@sonic.net<mailto:goddard@sonic.net>> wrote: Alexis Rohou asked on Twitter In @UCSFChimeraX<https://twitter.com/UCSFChimeraX> 1.1.1 and #Isolde<https://twitter.com/hashtag/Isolde?src=hashtag_click> by @CrollTristan<https://twitter.com/CrollTristan> is there an easy way to add aa residues to the end of a chain? https://twitter.com/AlexisRohou/status/1386171500604977152 Elaine says: There isn't an "add amino acid" yet in ChimeraX, only Chimera.... unless ISOLDE can do it (I don't know). So maybe it's an ISOLDE question. ChimeraX itself has building peptides from scratch but not sticking them on to the end of an existing peptide. Build Structure, Start Structure: peptide <https://rbvi.ucsf.edu/chimerax/docs/user/tools/buildstructure.html#start> or command "build start peptide" <https://rbvi.ucsf.edu/chimerax/docs/user/commands/build.html#start> Elaine
participants (3)
-
Alexis Rohou
-
Tom Goddard
-
Tristan Croll