.. image:: https://developers.google.com/open-source/gsoc/resources/downloads/GSoC-logo-horizontal.svg
   :height: 50
   :align: center
   :target: https://summerofcode.withgoogle.com/projects/#6653942668197888

.. image:: https://www.python.org/static/community_logos/python-logo.png
   :width: 40%
   :target: https://blogs.python-gsoc.org/en/nibba2018s-blog/

.. image:: https://python-gsoc.org/logos/FURY.png
   :width: 25%
   :target: https://fury.gl/latest/community.html

Google Summer of Code Final Work Product
========================================

.. post:: August 23 2021
   :author: Sajag Swami
   :tags: google
   :category: gsoc

-  **Name:** Sajag Swami
-  **Organisation:** Python Software Foundation
-  **Sub-Organisation:** FURY
-  **Project:** `FURY: Ribbon and Molecular Surface Representations for
   Proteins <https://github.com/fury-gl/fury/wiki/Google-Summer-of-Code-2021>`_

Proposed Objectives
-------------------

* Ribbon Representation
* Molecular Surface Representation
* Stretch Goals:

  * Stick Representation
  * Ball and stick Representation
  * Wire Representation
  * Pipes and Planks Representation
  * Sphere Representation

Objectives Completed
--------------------


-  **Ribbon Representation**

   Ribbon diagrams, also known as Richardson diagrams,
   are 3D schematic representations of protein structure. Ribbon diagrams are
   generated by interpolating a smooth curve through the polypeptide backbone.
   α-helices are shown as coiled ribbons. β-strands as sheets, and non-repetitive
   coils or loops as lines or thin strips. It was implemented by using
   `vtkProteinRibbonFilter`. Generating a `vtkPolyData` of appropriate format
   required by `vtkProteinRibbonFilter` was initially unclear due to lack of
   examples. I was able to understand what kind of output the filter required
   after a meeting with mentors. Tests were added and a demo was created.

   *Pull Requests:*

   -  **Ribbon representation:** https://github.com/fury-gl/fury/pull/452
   -  **Ribbon Representation demo:** https://github.com/fury-gl/fury/pull/452


- **Ball and Stick Representation**

  The ball-and-stick model is a molecular model of a chemical substance which
  displays both the three-dimensional position of the atoms and the bonds between
  them. The atoms are typically represented by spheres, connected by tubes which
  represent the bonds. It was created by using  `vtkOpenGLMoleculeMapper`.
  Added `vtkSimpleBondPerceiver` for detection of bonds. Tests were added and a
  demo was created.

  *Pull Requests:*

  - **Ball and Stick Representation:** https://github.com/fury-gl/fury/pull/452
  - **Ball and Stick Representation demo:** https://github.com/fury-gl/fury/pull/452

- **Stick Representation**

  Stick model is a special case of Ball and Stick model where atomic radius of all
  molecules is set equal to the radius of tubes used to create bonds. It was created
  by using  `vtkOpenGLMoleculeMapper`. Tests were added and a demo was created.

  *Pull Requests:*

  - **Stick Representation:** https://github.com/fury-gl/fury/pull/452
  - **Stick Representation demo:** https://github.com/fury-gl/fury/pull/452

- **Sphere Representation**

  In chemistry, a space-filling model, also known as a calotte or sphere model, is a
  type of three-dimensional (3D) molecular model where the atoms are represented by
  spheres whose radii are proportional to the radii of the atoms. It was created by
  using `vtkOpenGLMoleculeMapper`. Tests were added and a demo was created.

  *Pull Requests:*

  - **Sphere Representation:** https://github.com/fury-gl/fury/pull/452
  - **Sphere Representation demo:** https://github.com/fury-gl/fury/pull/452



Objectives in Progress
----------------------

-  **Molecular Surfaces**

   There are three types of molecular surfaces:

   - Van der Waals
   - Solvent Accessible
   - Solvent Excluded

   Currently the first two molecular surfaces i.e. Van der Waals and Solvent
   Accessible are implemented. The code is based on the paper "Generating
   Triangulated Macromolecular Surfaces by Euclidean Distance Transform" by
   Dong Xu and Yang Zhang.

   *Pull Requests:*

   - **Molecular Surfaces Implementation:** https://github.com/fury-gl/fury/pull/492


Other Objectives
----------------

-  **2D Animated Surfaces**

   This was a simple demonstration that animated Two-Dimensional (2D) functions using FURY.
   Created a grid of x-y coordinates and mapped the heights (z-values) to the corresponding x, y
   coordinates to generate the surfaces. Used colormaps to color the surfaces.

   *Pull Requests:*

   - **Animated Surfaces:**  https://github.com/fury-gl/fury/pull/362

-  **Updated miscellaneous animations**

   -  Updated the demo of helical motion to stop using multiple line actors as discussed in the meeting.
   -  Updated the demo of brownian motion to make it more scientifically useful (removed unnecessary rotation of camera
      during animation and box actor).
   -  Display simulation data for brownian motion and helical motion animations (number of simulated steps for brownian
      motion and velocity of the particle for helical motion).
   -  Created utility functions to make the code understandable and used these in emwave, helical and brownian
      animations.

   *Pull Requests:*

   - **Updated helical, brownian, emwave animations:**  https://github.com/fury-gl/fury/pull/462

-  **GSoC weekly Blogs**

    Weekly blogs were added for FURY's Website.

    *Pull Requests:*

    - **First Evaluation:** https://github.com/fury-gl/fury/pull/475

    - **Second Evaluation:** https://github.com/fury-gl/fury/pull/493

Timeline
--------

+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Date                  | Description                                                      | Blog Link                                                                                          |
+=======================+==================================================================+====================================================================================================+
| Week 1(08-06-2021)    | Welcome to my GSoC Blog!                                         | `Weekly Check-in #1 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-1-11/>`__   |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 2(14-06-2021)    | First Week of coding: sphere model.                              | `Weekly Check-in #2 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-2-11/>`__   |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 3(21-06-2021)    | Bonding algorithms, Ball and Stick model progress.               | `Weekly Check-in #3 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-3-13/>`__   |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 4(28-06-2021)    | VTK molecular visualization classes.                             | `Weekly Check-in #4 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-4-14/>`__   |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 5(05-07-2021)    | Genesis of `molecular` module.                                   | `Weekly Check-in #5 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-5-13/>`__   |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 6(12-07-2021)    | Ribbon representation, updated `molecular` module (more pythonic)| `Weekly Check-in #6 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-6-18/>`__   |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 7(19-07-2021)    | More features to `molecular`, updated misc. animations.          | `Weekly Check-in #7 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-7-16/>`__   |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 8(26-07-2020)    | Ribbon to `molecular`, tests for `molecular`, animated surfaces. | `Weekly Check-in #8 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-8-11/>`__   |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 9(02-08-2021)    | Optimized `molecular` with mentors, GSoC blogs to FURY docs.     | `Weekly Check-in #9 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-9-11/>`__   |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 10(09-08-2021)   | Bounding box, `molecular` tutorial, molecular surfaces progress. | `Weekly Check-in #10 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-10-11/>`__ |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+
| Week 11(16-08-2021)   | Molecular Surfaces (VDW, SAS) implementation.                    | `Weekly Check-in #11 <https://blogs.python-gsoc.org/en/suntzunamis-blog/weekly-check-in-11-9/>`__  |
+-----------------------+------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+



Detailed weekly tasks and work done can be found
`here <https://blogs.python-gsoc.org/en/suntzunamis-blog/>`_.
