atom.select(pdb, "backbone")

Issue #160 resolved
Lars Skjærven created an issue

function atom.select currently returns all atoms with name N,CA,C,O. e.g. a bunch of water molecules are returned in the following example (129 C-alpha atoms):

pdb = read.pdb("1hel")
sel = atom.select(pdbfull, "back")
trim.pdb(pdb, sel)


 Call:  trim.pdb(pdb = pdb, sel)

   Total Models#: 1
     Total Atoms#: 701,  XYZs#: 2103  Chains#: 1  (values: A)

     Protein Atoms#: 516  (residues/Calpha atoms#: 129)
     Nucleic acid Atoms#: 0  (residues/phosphate atoms#: 0)

     Non-protein/nucleic Atoms#: 185  (residues: 185)
     Non-protein/nucleic resid values: [HOH (185) ]

   Protein sequence:
      KVFGRCELAAAMKRHGLDNYRGYSLGNWVCAAKFESNFNTQATNRNTDGSTDYGILQINS
      RWWCNDGRTPGSRNLCNIPCSALLSSDITASVNCAKKIVSDGNGMNAWVAWRNRCKGTDV
      QAWIRGCRL

+ attr: atom, helix, sheet, seqres, xyz,
        calpha, call

Comments (2)

  1. Xinqiu Yao

    Good spot! We need to add "prot.aa" to the amino acid field. Have done it with the latest commit

    pdb = read.pdb("1hel")
    sel = atom.select(pdb, "back")
    trim.pdb(pdb, sel)
    
    
     Call:  trim.pdb(pdb = pdb, sel)
    
       Total Models#: 1
         Total Atoms#: 516,  XYZs#: 1548  Chains#: 1  (values: A)
    
         Protein Atoms#: 516  (residues/Calpha atoms#: 129)
         Nucleic acid Atoms#: 0  (residues/phosphate atoms#: 0)
    
         Non-protein/nucleic Atoms#: 0  (residues: 0)
         Non-protein/nucleic resid values: [ () ]
    
       Protein sequence:
          KVFGRCELAAAMKRHGLDNYRGYSLGNWVCAAKFESNFNTQATNRNTDGSTDYGILQINS
          RWWCNDGRTPGSRNLCNIPCSALLSSDITASVNCAKKIVSDGNGMNAWVAWRNRCKGTDV
          QAWIRGCRL
    
    + attr: atom, helix, sheet, seqres, xyz,
            calpha, call
    
    tail(trim.pdb(pdb, sel)$atom)
    
        type eleno elety  alt resid chain resno insert       x      y     z o     b
    984 ATOM   984     C <NA>   ARG     A   128   <NA> -15.116 19.387 4.645 1 19.23
    985 ATOM   985     O <NA>   ARG     A   128   <NA> -14.626 18.345 5.078 1 29.24
    993 ATOM   993     N <NA>   LEU     A   129   <NA> -15.775 20.226 5.404 1 22.75
    994 ATOM   994    CA <NA>   LEU     A   129   <NA> -15.976 19.869 6.811 1 33.38
    995 ATOM   995     C <NA>   LEU     A   129   <NA> -17.449 19.906 7.141 1 72.70
    996 ATOM   996     O <NA>   LEU     A   129   <NA> -18.191 20.465 6.277 1 49.87
        segid elesy charge
    984  <NA>     C   <NA>
    985  <NA>     O   <NA>
    993  <NA>     N   <NA>
    994  <NA>     C   <NA>
    995  <NA>     C   <NA>
    996  <NA>     O   <NA>
    
  2. Log in to comment