# ProteinRibbonFilter

**URL:** https://discourse.vtk.org/t/proteinribbonfilter/4545
**Category:** Support
**Created:** [November 1, 2020, 9:06pm UTC](https://discourse.vtk.org/t/proteinribbonfilter/4545 "2020-11-01T21:06:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Facundo\_Mercado](https://discourse.vtk.org/user_avatar/discourse.vtk.org/facundo_mercado/32/2549_2.png) [@Facundo\_Mercado](https://discourse.vtk.org/u/Facundo_Mercado)
#### Post date: [November 1, 2020, 9:06pm UTC](https://discourse.vtk.org/t/proteinribbonfilter/4545/1 "2020-11-01T21:06:00Z")

</div>

Hello! I have been using the vtkProteinRibbonFilter to render .pdb files. I managed for the visualization to work. A short snippet of what im doing:

```
    self._molecule_reader = vtk.vtkPDBReader()
    self._molecule_reader.SetFileName(file_path)
    self._molecule_filter = vtk.vtkProteinRibbonFilter()
    self._molecule_filter.SetInputConnection(self._molecule_reader.GetOutputPort())
    self._raw_polydata = self._molecule_filter.GetOutput()
    self._molecule_filter.Update()

```

I am managing to get the points by doing this:

point\_coordinates = dsa.WrapDataObject(self.\_raw\_polydata).Points

this returns a the xyz coordinates for each point in the molecule. However i am not being able to retrieve the remianing data in the pdb file, for example: Atom id, residue or atom name, aminoacid in which the atom is embedded. So to sum up i am failing to get all the remaining info in the pdb file apart from the coordinates. Can anyone shed some light into this? thank you!

---

<div class="post-metadata">

### Author: ![guaje](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/85f322/32.png) [@guaje](https://discourse.vtk.org/u/guaje)
#### Post date: [July 7, 2021, 5:55pm UTC](https://discourse.vtk.org/t/proteinribbonfilter/4545/2 "2021-07-07T17:55:31Z")

</div>

Hello Facundo,

I hope you have already figured this out. If not, my colleague (@SunTzunami) and I managed to read the content of the PDBReader in the following way:

```python
reader = vtk.vtkPDBReader()
reader.SetFileName(file_path)
polydata = reader.GetOutput()
reader.Update()

```

Then you could see the content of the polydata (e.g. `print(polydata.GetPointData())`) which will look like this:

```bash
vtkPointData (0x55fd420da540)
  Debug: Off
  Modified Time: 1364
  Reference Count: 2
  Registered Events: 
    Registered Observers:
      vtkObserver (0x55fd4215e330)
        Event: 33
        EventName: ModifiedEvent
        Command: 0x55fd42102b00
        Priority: 0
        Tag: 1
  Number Of Arrays: 10
  Array 0 name = atom_type
  Array 1 name = atom_types
  Array 2 name = residue
  Array 3 name = chain
  Array 4 name = secondary_structures
  Array 5 name = secondary_structures_begin
  Array 6 name = secondary_structures_end
  Array 7 name = ishetatm
  Array 8 name = rgb_colors
  Array 9 name = radius
  Number Of Components: 14
  Number Of Tuples: 458
  Copy Tuple Flags: ( 1 1 1 1 1 0 1 1 1 1 1 )
  Interpolate Flags: ( 1 1 1 1 1 0 0 1 1 1 1 )
  Pass Through Flags: ( 1 1 1 1 1 1 1 1 1 1 1 )
  Scalars: 
    Debug: Off
    Modified Time: 1354
    Reference Count: 2
    Registered Events: (none)
    Name: rgb_colors
    Data type: unsigned char

```

Where, as you can see the names of the arrays match with the arrays used in the ProteinRibbonFilter ([VTK/vtkProteinRibbonFilter.cxx at master · Kitware/VTK · GitHub](https://github.com/Kitware/VTK/blob/master/Domains/Chemistry/vtkProteinRibbonFilter.cxx)).

Hope this helps.
