SunTzunami's Blog

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.

What is coming up next week?

Three goals for next week -

  1. Implement vtkProteinRibbonFilter usage without using vtkPDBReader.
  2. Make a class for vtkMolecule which can store molecular data and pass it on to different function for rendering purposes.
  3. Read papers on surface model.

Did you get stuck anywhere?

Implementing vtkProteinRibbonFilter usage via vtkPolyData without using vtkPDBReader has confounded me for some time now.

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 generating the coordinates of bonds 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 bond-stick models and 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

Weekly Check-in #2

SunTzunami
Published: 06/14/2021

First week of coding

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

What did you do this week?

I implemented the space filling model for proteins and created a PR for the same.
Preview (protein rendered: 3pgk) -
https://user-images.githubusercontent.com/65067354/121518963-b92cb580-ca0e-11eb-8232-3512edc04670.png
The PR has:

  • Actor for space_filling_model
  • Two examples where I show how to visualize the proteins-
    1. In example 1, I parse a PDBx file myself and extract the atomic info essential for constructing the model which is then used by the actor to visualize it.
    2. In example 2, I parse a PDB file by using Biopython module and extract the atomic info essential for constructing the model which is then used by the actor to visualize it.
  • I created a basic test for the actor which needs to be improved. I'll discuss how to improve the test with the mentors.

What is coming up next week?

I'll try to implement ball and stick model or ribbon model depending on which model is decided in the meeting with the mentors and try to improve the tests for space filling model. Writing an algorithm to generate bonds from structure data will be the challenge

Did you get stuck anywhere?

I tried to create a class in python which inherits from a vtkclass called vtkMoleculeReaderBase but was unsucessful in this endeavour. I'll try to find a workaround.

View Blog Post

Weekly Check-in #1

SunTzunami
Published: 06/08/2021

Welcome to my GSoC Blog!

Hi all! I'm Sajag Swami, a sophomore at Indian Institute of Technology, Roorkee. I will be working on adding a new functionality to FURY which shall enable users to visualise various types of proteins via different representations like Richardson aka Ribbon diagrams and molecular surface diagrams.

As a part of my stretch goals, I’ll try to expand protein diagrams via other representations including -
  • Stick
  • Ball and stick
  • Wire
  • Pipes and Planks
  • Sphere

What did you do during the Community Bonding Period?

I had weekly meetings with my mentors and other core team members. In the first meeting I got acquainted with the team members and learnt about the project and its goal/vision. In the later meetings we discussed about various representations of proteins and how to go about implementing them in FURY. We discussed about various libraries which can be used to parse PDB and PDBx files. I made a doc for the same to list pros and cons of using each library. I worked upon my previous PR too during the community bonding period and fixed its docstring syntax.

As my college ended early courtesy covid, I had extra time during which I experimented and learnt more about PDB and PDBx files - the details they contain and how to parse them. A small backbone visualisation of 1mb0 protein made on FURY by extracting coordinate data of its alpha carbons -
https://github.com/SunTzunami/gsoc2021_blog_data/blob/master/visuals/week1_backbone.png?raw=true

What is coming up next week?

I have two major goals for the next week -
  • Make an actor for the space filling model of the proteins and make PR for the same which will also include the unit tests and a small tutorial for the users.
  • Try understanding the documentation of ProteinRibbonFilter which will prove beneficial for generating Ribbon diagrams.

Did you get stuck anywhere?

I was having difficulty when dealing with large protein structures (how to visualise them) as it gets computationally taxing to render many molecules. FURY team was pretty helpful and instructed me to use shaders (luckily for me, the shader in question had been implemented by the community members). This resolved the issue of dealing with large files to a great extent.
View Blog Post