Second week of coding! ====================== .. post:: June 21 2021 :author: Sajag Swami :tags: google :category: gsoc 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 blog `_ 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: .. figure:: https://user-images.githubusercontent.com/65067354/122672109-7d040c80-d1e7-11eb-815d-1d07fe47bbc4.png :width: 300 :height: 300 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). .. figure:: https://github.com/SunTzunami/gsoc2021_blog_data/blob/master/visuals/week2_wire_rep.png?raw=true :width: 300 :height: 300 Stick representation using vtkMoleculeMapper .. figure:: https://raw.githubusercontent.com/SunTzunami/gsoc2021_blog_data/master/visuals/week2_bs_rep.png :width: 300 :height: 300 Ball and Stick representation using vtkMoleculeMapper What is coming up next week? ---------------------------- Try to see if the above models can be implemented 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). ``Au Revoir!``