want to select all atoms instead of only Calpha atoms

Issue #297 resolved
Ayesha kanwal created an issue

in this code only all C-alpha atoms for trajectory frame superposition are selected ca.inds <- atom.select(pdb, elety="CA") but i want to select all atoms also for trajectory frame then how can i select it please guide me.

Comments (3)

  1. Lars Skjærven

    Hi Ayesha, atom.select allows you to select the atoms you want. you can use various input arguments to this function. e.g. atom.select(pdb, "noh") will select all non-hydrogen atoms in your PDB. Use help(atom.select) for a more complete overview of your options here.

    Below is an example where I superimpose to the backbone atoms. Note that this assumes that your pdb and trajectory file contains the same number (and order) of atoms.

    # select backbone
    sele <- atom.select(pdb, "backbone")
    
    # access backbone coordinates 
    # trj[1, sele$xyz]
    
    # fit trajectory coordinates
    xyz <- fit.xyz(fixed = trj[1, ], mobile = trj, fixed.inds = sele$xyz, mobile.inds = sele$xyz)
    

    Hope this helps.

  2. Log in to comment