# ProteinRibbons - twisting

**URL:** https://discourse.vtk.org/t/proteinribbons-twisting/12459
**Category:** Development
**Created:** [October 9, 2023, 10:27pm UTC](https://discourse.vtk.org/t/proteinribbons-twisting/12459 "2023-10-09T22:27:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nicholas\_Yue](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nicholas_yue/32/3751_2.png) [@Nicholas\_Yue](https://discourse.vtk.org/u/Nicholas_Yue)
#### Post date: [October 9, 2023, 10:27pm UTC](https://discourse.vtk.org/t/proteinribbons-twisting/12459/1 "2023-10-09T22:27:44Z")

</div>

I have an interest in understanding more about ProteinRibbons.

I came across this example.

[https://examples.vtk.org/site/Cxx/Visualization/ProteinRibbons/](https://examples.vtk.org/site/Cxx/Visualization/ProteinRibbons/)

I built the example and started looking at the generated ribbon geometries.

I noticed that for some of the ribbons, some section of the ribbon appears to be twisted.

I’d like to dive deeper into the method/algorithm that was use to generate those ribbon geometries, I am specifically interested in the inputs to the engine/algorithm where those geometries are being created to understand what is going on.

Can someone with a knowledge of ProteinRibbons be able to point me in the right direction to dive deeper (in the C++ source code) ?

 ![Screen Shot 2023-10-09 at 15.22.27](https://discourse.vtk.org/uploads/default/original/2X/1/1d56adfd0532edd19a344df67ca4988ab85f8f22.jpeg)

---

<div class="post-metadata">

### Author: ![Nicholas\_Yue](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nicholas_yue/32/3751_2.png) [@Nicholas\_Yue](https://discourse.vtk.org/u/Nicholas_Yue)
#### Post date: [October 14, 2023, 4:04pm UTC](https://discourse.vtk.org/t/proteinribbons-twisting/12459/2 "2023-10-14T16:04:43Z")

</div>

@mwestphal Do you know who I may contact to investigate further ?

---

<div class="post-metadata">

### Author: ![Nicholas\_Yue](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nicholas_yue/32/3751_2.png) [@Nicholas\_Yue](https://discourse.vtk.org/u/Nicholas_Yue)
#### Post date: [October 14, 2023, 11:44pm UTC](https://discourse.vtk.org/t/proteinribbons-twisting/12459/3 "2023-10-14T23:44:32Z")

</div>

I think I have found a location to dive deeper

`vtkProteinRibbonFilter::CreateThinStrip`

[https://gitlab.kitware.com/vtk/vtk/-/blob/master/Domains/Chemistry/vtkProteinRibbonFilter.cxx?ref\_type=heads#L312](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Domains/Chemistry/vtkProteinRibbonFilter.cxx?ref_type=heads#L312)

---

<div class="post-metadata">

### Author: ![oyster](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/a4c791/32.png) [@oyster](https://discourse.vtk.org/u/oyster)
#### Post date: [October 17, 2023, 3:52am UTC](https://discourse.vtk.org/t/proteinribbons-twisting/12459/4 "2023-10-17T03:52:41Z")

</div>

I guess it might be ‘simulated’ with the vtkRuledSurfaceFilter, by which a twist surface can be extruded from, say, two line-segments-connected splines.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.vtk.org/user_avatar/discourse.vtk.org/mwestphal/32/19_2.png) [@mwestphal](https://discourse.vtk.org/u/mwestphal)
#### Post date: [October 23, 2023, 12:26pm UTC](https://discourse.vtk.org/t/proteinribbons-twisting/12459/5 "2023-10-23T12:26:23Z")

</div>

maybe @Joachim_P has some inputs
