SunTzunami's Blog

Weekly Check-in #7

SunTzunami
Published: 07/19/2021

Sixth week of coding

Welcome to the seventh weekly check-in. I'll be sharing my progress for the sixth week of coding.

What did you do this week?

  1. Updated Molecular module:
    • Made it more pythonic.
    • Implemented Ribbon representation.
    • Added support to pass atomic data in the form of numpy arrays. Earlier, the users were required to append molecular information one atom at a time.
  2. Created a PR to:
    • update the helical motion animation to use a single line actor, added textblocks to display velocity of the particle. Preview:

    • For brownian motion simulation, I removed rotation (azimuth) and box actor, added textblock to display the number of particles and to show the simulation steps. Preview:

  3. Updated surface animation (PR #362): used gridUI, added multiple animations). Preview:

  4. Created a topic on vtk discourse forum to query about gaps in bonds (tried resolving it by manipulating vtkProperties: BackfaceCulling, FrontfaceCulling but was unsuccessful)
  5. Read about molecular surface (theory).

What is coming up next week?

  1. Update molecular module by adding tests, ribbon actor
  2. More work on molecular surface representation
  3. Experiment to check if molecules can be interacted with.

Did you get stuck anywhere?

No.

View Blog Post

Weekly Check-in #6

SunTzunami
Published: 07/12/2021

Fifth week of coding

Welcome to the sixth weekly check-in. I'll be sharing my progress for the fifth week of coding.

What did you do this week?

  1. Generalised the vtkProteinRibbonFilter implementation. I'd like to thank Javier for helping me debug the code. We understood what kinda input vtkProteinRibbonFIlter requires over the course of the mid-week meeting. Refer to this link to understand what kinda PolyData is required by the filter. Latter half of the week was spent in manipulating the data according to the required input and I was able to use the filter to render ribbons. Refer to this link to understand how to send appropriate data to the filter.
  2. Updated the molecular module based on the feedback of team members and mentors.
  3. Updated animated surfaces PR.
    Preview of the animation:

What is coming up next week?

  1. Update molecular module based on team members' suggestions and add tests for the same.
  2. Add protein ribbon implementation to molecular module.
  3. Begin working on molecular surface model.

Did you get stuck anywhere?

No.

View Blog Post

Weekly Check-in #5

SunTzunami
Published: 07/05/2021

Fourth week of coding

Welcome to the fifth weekly check-in. I'll be sharing my progress for the fourth week of coding.

What did you do this week?

Created a PR for the molecular module. Enables the ability to create three types of molecular representations:

  1. Sphere Representation aka Space-filling model aka calotte model aka CPK model
  2. Stick Representation
  3. Ball and Stick Representation

What is coming up next week?

Mentors suggested changes to be made to the molecular module which shall be done by this week. A mid-week meeting with mentors has been scheduled to understand what kinda input vtkProteinRibbonFilter requires. Hopefully this will help me in implementing Ribbon model. Other goals will be decided after the meeting.

Did you get stuck anywhere?

I've been unsuccessful in sending protein data to vtkProteinRibbonFilter via a vtkPolyData.

View Blog Post

Weekly Check-in #4

SunTzunami
Published: 06/28/2021

Third week of coding

Welcome to the fourth weekly check-in. I'll be sharing my progress for the third week of coding.

What did you do this week?

I made a document with code snippets and visuals to show how one can use some vtk classes in python for molecular visualization. Classes of interest :

  • vtkMolecule (store atomic information about the molecule)
  • vtkSimpleBondPerceiver (calculate bonding info for a vtkMolecule)
  • vtkMoleculeMapper (mapper to draw vtkMolecule object)
  • vtkPeriodicTable (stores chemical data sourced from the Blue Obelisk Data).
Link to the document - Molecular_viz_vtk. In addition to the document, I read some research papers recommended by my mentors to understand some other (and potentially better) methods of ribbon visualization. Tried to implement vtkProteinRibbonFilter usage without using vtkPDBReader but was unsuccessful in this endeavour. It's kinda tough to understand what exactly vtkProteinRibbonFilter requires as input. I'll have to dig deeper into its documentation.

What is coming up next week?

Three goals for next week -

  1. Implement vtkProteinRibbonFilter usage without using vtkPDBReader.
  2. Make a class that inherits from vtkMolecule. It's instances will be used to store molecular data and pass it on to different functions for rendering purposes.
  3. Start reading the theory behind molecular surface representation.

Did you get stuck anywhere?

Implementing vtkProteinRibbonFilter usage via vtkPolyData without using vtkPDBReader has confounded me for some time now. Ribbon representation's code progress is at an impasse until I implement vtkProteinRibbonFilter.

View Blog Post

Weekly Check-in #3

SunTzunami
Published: 06/21/2021

Second week of coding

Welcome to the third weekly check-in. I'll be sharing my progress for the second week of coding.

What did you do this week?

I created an example to demonstrate how one can render multiple bonds (double and triple). This required me to write an algorithm to detect bonding. I used this as a reference and made a few tweaks of my own to detect the presence of double/triple bonds from interatomic distances. The math involved in bond detection was quite intriguing.
Preview (molecules rendered: Ethane, Ethene, Ethyne from left to right):

In addition to this, I tried understanding the codebase of vtkMolecule, vtkSimpleBondPerceiver, vtkMoleculeMapper, vtkPeriodicTable and was able to render ball and stick models, stick models using it. This will be of great help although it's rather slow in rendering large molecules (using shaders to improve its speed will be crucial if it's to be utilised).

  • Preview of Stick representation using vtkMoleculeMapper:
  • Preview of Ball and Stick representation using vtkMoleculeMapper:

What is coming up next week?

Try to implement the above models using shaders. Try implementing the ribbon model using the vtkProteinRibbonFilter. The rest will be decided in the meeting with the mentors.

Did you get stuck anywhere?

Predicting bonds had been a problem since the past few weeks, it was resolved to a large extent by vtkSimpleBondPerceiver (the only limitation of vtkSimpleBondPerceiver being its inability to predict multiple bonds).

View Blog Post