Analyse, Code, Profile, Code

I am happy to meet you again in my second blog post. As I mentioned in my previous blog post, we implement the marching tetrahedra algorithm on the GPU to visualize the molecular surface.
First, the density at the grid points needs to be calculated. Since this process includes intensive computation, the process is done on the GPU.
How is the density calculated on a grid point?
The idea is to calculate the densities in each local grid and then aggregate them into the global grid. After obtaining the coordinates of the atoms in the PDB (protein data bank) file, the closest point for the global grid is calculated. Then atom density is calculated for each point in the local grid. One of the important points here is that the distance on the local grid needs to be converted to Bohr Radius. To compute an atom’s density at a grid point, Slater’s rule is applied. Slater Orbitals are an approximation of realistic orbitals. Since each atom has its own unique atomic number, the density of each atom must be calculated separately.
I mentioned the general idea to obtain densities on the global grid. Meanwhile, I mentioned some terms which are the local grid, the global grid and the densities of atoms. At this point, I am working on optimization by considering firstly the GPU architecture, paying attention to the per-grid floating-point instruction, per-grid memory access, branching diversity, the ratio of floating-point computation to global memory access metrics. While using these metrics, I use Nsight Compute as Profiling Tool. I am excited to share the results with you as soon as possible.
Thank you all of you for taking the time to read my blog. If you have any questions, I will be happy to answer them. You can write your ideas and questions in the comment. I hope to see you again in my next posts.
Leave a Reply