Description Usage Arguments Value Examples
Provides documentation for some basic useful selection criteria. For more advanced selection options, see the Official Documenation
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 
| model | a single model or list of models from which atoms should be selected. Can also specify by numerical creation order. Reverse indexing is allowed (-1 specifies last added model). | 
| resi | Residue number/s. (vector) | 
| resn | Parent residue name as 3-letter code (e.g. "ALA", "GLY", "CYS"...) | 
| invert | Logical, if  | 
| chain | String, chain this atom belongs to (e.g. 'A' for chain A) | 
| elem | element abbreviation (e.g 'H', 'Ca', etc) | 
| atom | Atom name, may be more specific than 'elem' (e.g. 'CA' for alpha carbon) | 
| byres | Logical, if  | 
| b | Atom b factor data | 
| expand | Expand selection to include atoms within a specified distance from current selection. all atoms of any residue that has any atom already selected. | 
| bonds | overloaded to select number of bonds, e.g.  | 
| ss | Secondary structure identifier. 'h' for helix, 's' for beta-sheet. | 
| clickable | Set this flag to true to enable click selection handling for this atom | 
| callback | Callback click handler function to be executed on this atom and its parent viewer. | 
sel list() for selecting atoms.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | library(r3dmol)
## Not run: 
r3dmol() %>%
  m_add_model(data = m_fetch_pdb("1bna")) %>%
  m_add_style(
    style = m_style_stick(),
    sel = m_sel(resi = 1:2)
  ) %>%
  m_zoom_to(sel = m_sel(resi = 1))
# Expand example
r3dmol() %>%
  m_add_model(data = m_fetch_pdb("1bna")) %>%
  m_add_style(
    style = m_style_stick(),
    sel = m_sel(
      resi = 1,
      expand = 10,
      byres = TRUE
    )
  ) %>%
  m_zoom_to(sel = m_sel(resi = 1))
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.