Frequently Asked Questions

What is the difference between a chilife.RotamerEnsemble and a chilife.SpinLabel?

A chilife.RotamerEnsemble is a more abstract class that can represent canonical amino acids as well as non-canonical amino acids and spin labels. We will often use chilife.RotamerEnsemble and chilife.SpinLabel interchangeably since chiLife is primarily an SDSL modeling application at this time. It is important to note that a chilife.SpinLabel can do anything a chilife.RotamerEnsemble can. Ideally chilife will support additional label types in the future (e.g. FRET labels) with specialized methods and properties that are unique to those kinds of labels.

How do I use my own PDB file?

chiLife uses MDAnalysis as a back end for protein structure and will accept MDAnalysis.Universe and MDAnalysis.AtomGroup objects as proteins, thus a protein can be loaded in using MDAnalysis:

import MDAnalysis as mda
my_protein = mda.Universe('Path/to/my/protein.pdb')

Many are likely already aware that MDAnalysis is generally used for trajectory analysis and can and will load in MD trajectories and multi-state PDBs. chiLife will ONLY create a label for the `active` frame of an MDAnalysis trajectory. To perform spin labeling over a trajectory you will have to manually loop through the frames and create new SpinLabel objects.

What spin labels and rotamer libraries are available?

Because chiLife rotamer libraries are portable, different users may have different libraries on their computers or even in different directories. To list all the available rotamer libraries just run the list_available_rotlibs() function which will output a table listing the available libraries and their locations. This function searches the chilife installation directory, any number of user defined directories (added via the add_rotlib_dir() function) and the current working directory. These are the exact same places chiLife will look when create new SpinLabel and RotamerEnsemble objects and their bifunctional analogs.

Note

Additional rotamer libraries can be made by the user, provided by colleagues/collaborators, or found in the curated chiLife_rotlibs GitHub repo.

How do I create my own rotamer libraries?

Custom rotamer libraries are created through the create_library() and create_dlibrary() functions. These functions accept multi-state PDB files that make up the libraries structural ensemble as well as several additional arguments to specify weights, mobile dihedrals, spin atoms and more. Check out create_library() and create_dlibrary() as well as the creating custom Creating Custom Rotamer Libraries section.

I created my own rotamer library or got one from a collaborator now how do I use it?

chiLife searches for rotamer libraries in 3 places. 1) the current working directory, 2) Any number of user defined folders , 3) The default chiLife rotamer library directory. In most cases you will just need to place the rotamer library in the directory you want to use it in and chiLife should find it. If there is some discrepancy between the rotamer library name and the 3 letter code used to represent the residue, then you can force the use of a specific rotamer library using the rotlib keyword argument:

xl.SpinLabel('R1A', 28, protein, rotlib='/path/to/my/specific/R1A_speciail_rotlib.npz')

Where can I find rotamer libraries for my spin label?

If you are looking rotamer libraries that do not ship with chiLife by default you can find several on the curated chiLife_rotlibs GitHub repo, you can make your own, get them from a collaborator, or reach out to for additional information.

How do I tell chiLife where I store my personal rotamer libraries?

You can set a user rotamer library directory or list of directories that chiLife will search before searching the default folders. This can be done using the add_rotlib_dir() command.

How do I emulate MMM and MTSSLWizard behavior?

MMM and MTSSLWizard behavior can be emulated using the chilife.SpinLabel.from_mmm() and chilife.SpinLabel.from_wizard() class methods respectively. Note that even though

How do I view my rotamer/spin label ensembles?

You can save your ensembles (and proteins) as a pdb file using the save() function and visualize using your favorite molecular visualization software (We recommend PyMol). The function save() accepts any number of protein, RotamerEnsemble and dRotamerEnsemble objects.

Warning

If only a SpinLabel is given to save(), chiLife will only save a SpinLabel. i.e. chilife will not save the protein that the spin label is attached to unless you pass the protein explicitly.

In addition to saving your ensemble, chilife will save a set of pseudo-atoms named NEN representing the localization of the unpaired electron density if saving a SpinLabel. The weight of the rotamer is mapped to the occupancy or q factor. We recommend visualizing using the following PyMol commands:

as surface, name NEN
spectrum q, white_red, name NEN
set transparency, 0.5

This will result in a surface representation with the weight of each rotamer mapped to the color intensity of the surface.

I opened 2 PDBs with labels in PyMol but it only shows labels for one of them

There is a good chance that the labels have the same object name in the two files and one is being overwritten when the second is loaded. You can alter the label name before saving, e.g.

omp = xl.fetch('1omp')
anf = xl.fetch('1anf')

# These labels will have the same name because they label the same site but they are different conformers
SL1 = xl.Spinlabel('R1M', 41, omp)
SL2 = xl.Spinlabel('R1M', 41, anf)

# Add identifier 'holo' to the name of the second label before saving
SL2.name += '_holo'

# Saved files will now open in the same pymol window with both labels present
xl.save(omp, SL1)
xl.save(anf, SL2)

Why don’t my label stay attached to my protein when I align it in pymol?

The labels are saved as separate objects in the PDB and will not move with the protein object it is associated with. You can realign rotamer ensembles with the protein using the pymol align command: e.g. align S238R1M, 1omp and resi 238 and name N+CA+C. This alignment works well enough for visualizing the rotamer ensemble but is tedious and does not work at all for the density objects. In general it is preferable to use pre-aligned structures or perform the alignment with python before spin labeling. Examples of aligning sturcures with MDAnalysis can be found in the MDAnalysis documentation.