ChimeraX notes

Highlighting without silhouettes This is useful for making figures to 'highlight' a region without changing its color, but simply creating a thicker outline.

graphics selection color black width 6

Making convenient animation for 3D display of structures You can define the view by calling view name <name_your_view>. Here's an example for making a movie with changing views by 'flying' to from one to the next

movie record; view head_on; rock y 10 272; wait; fly head_on side_view 40;
wait; rock y 10 272; movie encode ~/Desktop/scratch/SUN2KASH2.mp4

Showing only backbone as sticks This is sometimes helpful when showing multimeric or complicated structures to 'thin' them out.

hide atoms
hide cartoons
show @CA,N,C atoms
style stick

Selecting only sidechain atoms If you want to select only the histidine sidechains in chain A:

select sidechain & #1/A:his

Styling cartoons for disordered proteins use the alias:

alias licorice car style protein modeh default arrows f xsect oval width 3 thick 3

Now you can type 'licorice' to use this styling

Find salt bridges To find salt bridges between chain A,C against chain X (e.g. say a dimer bound to another protein):

hb /a,c restrict /x reveal t show t saltOnly t

Find contacts To find contacting residues between chain A,C against chain X:

contacts /a,c restrict /x reveal t log t

Here we specify log t to print out the result in the log window, so you can further parse it for specific interactions along with overlap quantities.

Alternatively, you use interfaces

interfaces select #2/A contacting #2/B,C bothSides false

but this way, you can't really "print" out the residues in the log

Common operations

rename #1 alphafold_human_sun1

color byattribute *name* palette *paletteName*

#example
color bfactor #1 palette alphafold

Interface residues

interfaces select /X contacting /H both true
# or you can use the shorthand
inter sel /A,B contacting /C,D

Measure buried surface area

measure buriedarea /a&protein with /b&protein sel true cutoff 5

Changing cartoon appearance This is a personal favorite, to render cartoon representation into 'spaghetti'

cartoon style #1 modeh default arrows f xsect oval width 3.5 thick 2

Artificially connecting two chains (without changing chain identities) Use the command line "Shell" in ChimeraX

  1. Select two atoms that you want to connect.
  2. Open "Shell" Tools > General > Shell.
  3. Run the command below
from chimerax.atomic import selected_atoms
sel = selected_atoms(session)
m = sel.unique_structures[0]
m.new_bond(*sel)   

Now you can "straighten" any loop while maintaining the complex interface.

Structure 'sculpting' with isolde

  1. Start isolde. isolde start.
  2. Impose restraints isolde restrain distances #1 distanceCutoff 5 isolde restrain torsions #1 angleRange 60
  3. Start simulation. isolde sim start #1.
  4. To remove unwanted distance restraints, release them: isolde release distances sel.
  5. To help see things show only the alpha-carbons. hide ~@CA.

Saving pLDDT values into text file with in ChimeraX

The pLDDT values from values are saved into the b-factor column in the pdb file. Since each value is assigned to an atom, we can get the pLDDT value from any atoms from the same residue. You can write a simple Python command in the ChimeraX shell. Open the shell via : Tools > General > Shell

  # get the first model, index 0
  m = session.models[0]
  with open("/path/to/textfile.txt", "wt") as f:
      f.write("%6s\t%5s\t%10s\n" % ("resnum", "resname", "plddt"))
      for res in m.residues:
          f.write(f"{res.number:>12s}\t{res.name:>12s}\t{float(res.atoms[0].bfactor):>10.2f}\n")

Date: 2024-06-25

Author: Daniel Elnatan

Created: 2025-10-02 Thu 06:18

Validate