Google Summer of Code 2024

We are currently in the process of applying for Google Summer of Code 2024.

That doesn’t mean we’ll get accepted as a mentoring organization. So please don’t ask about applying as a contributor yet.

On the other hand, I’m curious for community ideas for needed projects. This isn’t limited to code. I’ll also apply to Google Season of Docs to attract some technical writers / editors.

Some ideas:

  • Implementing simple molecular dynamics (integrators, thermostats, etc.) in the new force field framework
  • Improved rendering, including Geometry Shaders / Depth of Field and dynamic level-of-detail
  • Improved selection / find-and-replace / fill region (e.g., creating shells of nanoparticles)
  • Improved scripting / automation
  • Cartoons for nucleic acids / sugars / polymers
  • Integrated FastAPI results server (with cclib)

What are some big (or small) needs? Projects that you’d like to see or want someone else to build for you? :wink:

2 Likes

Hi @ghutchis ,I’m really excited about participating in GSoC this year and I’ve got some great plans for the projects. I’d love to discuss how we can bring these ideas to life. Additionally, I’d appreciate your input and guidance on refining my thoughts and insights regarding the projects.

I was also wondering if it would be possible for me to share a draft proposal with you. Your feedback would be incredibly valuable in helping me shape my proposal into something strong and compelling.

Can you please let me know, are all the idea lists are high priority? Can you please tell me what we actually want for this one? Improved rendering, including Geometry Shaders / Depth of Field and dynamic level-of-detail

Since there are many interested students / contributors, I try to include the same information to everyone to be fair.

You can find suggestions and sample proposals at Applying to GSoC - wiki.openchemistry.org

We are happy to provide feedback on drafts shared before the final week of submissions (i.e., before Tuesday 26 March) because the volume of submissions increases dramatically.

In a proposal, you should emphasize the work you wish to do, as well as a realistic timeline for the project period, including time to test, debug, and optimize code. You should also discuss your background and ability to carry out the work, including links to relevant code and/or pull requests.

In the project you mentioned, there are several rendering tasks, including evaluating the current shaders, adding depth-of-field rendering such as fog or blur, and adding geometry shaders to enable dynamic level of detail for large models. You may wish to do some or all of these tasks, depending on the time you think would be required and whether you propose a medium or large project.

We’re happy to share several examples of rendering appearance and/or published articles on these features.

1 Like

Hello sir, I wanted to know more about the project “tools for interactive molecular dynamics” as the mentioned detail and “expected results” seem vague to me. Could you provide me with some more details and cite some examples. Interactive Molecular Dynamics.
Does this website depict something I have to make (in 3d). And would that not be computationally expensive?

I will point to my post above.

In the project you mentioned, Avogadro already calculates energies and gradients / forces for geometry optimization and interactive 3D rendering. The project includes implementing a molecular dynamics integrator (e.g. velocity Verlet), thermostat (ideally something better than a Berendsen thermostat) as well as tools to add water or solvent, and additional analysis tools.

If you have not already, I suggest trying Avogadro 1.2, which implements interactive molecular optimization through the Auto Optimize tool. This project would involve re-implementing and improving that tool in the Avogadro2 codebase.

I just have one final question @ghutchis . Do you think it’s a good idea to include both depth blur and fog in one proposal for the 175-hour project? Or should we also consider adding geometry shaders to allow for dynamic level of detail for larger models within the 350-hour timeframe? I’d love to hear your thoughts on this.

The choice of the length of the project is up to the contributor (i.e., you). It depends in part on your availability. Some students, for example, have summer courses or an internship, and can only participate for 175 hours. If you believe you have the time, we would certainly love to see a range of shaders.

Hi @ghutchis I apologize if my question seems trivial and silly, but I’m pondering whether tessellation could be a more suitable option for our requirements. From my understanding I think Geometry shaders are ideal for scenarios where operations need to be performed on entire triangles rather than individual vertices, and where access to all three vertices in the triangle is necessary for those operations. However, dynamically generating additional triangles isn’t optimal due to the performance limitations and constraints of geometry shaders.

It would be great if you can guide me on this? Also would be nice of you if you share me some examples on complex molecules after dynamic level of details.:slight_smile: Sorry for bothering you again on this.

I’m going based on previous work / papers and you may be right that they used a tesselation shader. (I thought it was a progressive refinement on the triangle mesh, but it’s been a while.) If you send me an e-mail, I can share the archive of papers.

Ooh…Thanks. This is my email permindersingh089@gmail.com
It would be great if you send me those papers. I’ll go through that:)

Oh I swear @ghutchis this would be the last doubt haha. Actually, Why do we need tessellation shaders too? If our aim is to enable dynamic level of detail for large models, wouldn’t using multiple levels of detail (LODs) and then instancing them be a more efficient approach for our scenario? it’s not like we need an infinite number of LODs, few set ones should be more than good enough. We could create several models of a sphere on the CPU and then instance them based on distance. For example, you can check out this demo implementing an algorithm called ‘Instanced LOD’ at https://strange-forest.netlify.app/. "

Apologies if I’ve missed any possibilities. It’s just a thought. I’d love hearing your thoughts on this approach as well. It might prove to be more efficient than tessellation.

It’s not for spheres. We already have perfect spheres through impostors.

Dynamic level of detail serves for molecular surfaces.

Consider for example the case in which you want to see the isosurface of a protein interacting with a drug molecule with molecular dynamics. So you want to render the whole scene as a movie in close to real time.

You don’t want to pre-compute the whole surface at multiple levels of detail. Maybe you have the whole COVID spike protein … tens of thousands of atoms.

So you’d like to render the visible part at higher detail.

Or in another case, you start to show the whole surface at low resolution and progressively refine, so there’s no delay - right now it can take seconds to build the mesh depending on the resolution.

Apologies for the delay @ghutchis , I was caught up with university exams.

You’re right, I just noticed that we’re using perfect spheres rendered through impostors. Thanks.

My question is, today while working with the molecules of the COVID spike protein, I observed a decrease in frame-rate even when rendering just spheres ------>

or without the spheres (when rendering the ribbon structure)------>

Both structures exhibit similar performance.

I was imagining that rendering the second structure would have lower performance compared to the spheres, and for that, we were planning to implement tessellation. The idea was that as molecules move farther away from the camera, they should be less tessellated. I also intended to include culling so that molecules not in the camera’s view would have lower levels of detail.

Am I misunderstanding something? Could you please confirm whether we were planning to implement tessellation for the non-spheres like structure similar to second example? If so, I’m having trouble pinpointing the performance loss compared to spheres one. It seems to be the performance is similar to the spheres.

Or it could maybe also there are non spheres in that first image making it slow, but fully occluded by the spheres? not sure

Well, you’re showing the ribbon in both cases … and it looks like ball-and-stick or wireframe as well? Probably the best thing would be to turn on only one display type and test the frame rate.

We haven’t done any detailed profiling / benchmarking or optimization of the shaders or rendering performance. Certainly the shading / ambient occlusion shader causes a performance hit. IMHO it’s worth it, but on something like 6vxx it can be noticeable.

I can definitely see ribbon poking through in places. As I said above, make sure you’ve turned on only one display type.

I suspect that the secondary structure / ribbon view is fairly performant. After all, the concept is to turn lots of atoms into a reduced polygon mesh. Adding in some tessellation would make it faster (e.g., computing on-the-fly and adding resolution as needed).

Here’s where there’s a performance hit. You have the spike protein open. Go to Analysis ⇒ Create Surfaces… Pick “Solvent Excluded” (although any of these would work) and pick a resolution. Wait. If you want even slower, pick color by electrostatics, which maps colors onto the triangles.

Now imagine you want to watch an animation of the protein with the surface (and spheres and ribbon) updating in real time. Right now, we pre-compute the surfaces on the CPU (multithreading) with a set resolution.

That’s the challenge. Show >60 fps with the spheres, ribbon, and surfaces updating … ideally looking fantastic. :smile:

I’m sure with a bit of profiling and analysis, the current code has slowdowns. I did some last summer and found some hotspots, but I haven’t gone into the shaders much.

1 Like

Thankyou so much @ghutchis for explaining this so well, I think i have understood most of the things now.

Yes, you are correct. We are doing those stuffs (secondary structure / ribbon) on the CPU right now, so we can shift it to the gpu through tessellation.

You’re correct, and I believe I now understand what you were referring to in the previous messages :point_down:

I think it’d be a great idea for optimising these performance hit . I noticed in the code that how we’re handling things on the CPU, but we could step it up by using GPU tessellations for progressive refinement. Honestly, I’m not entirely sure about the rendering calculations, but there’s a chance we could shift them from the CPU to the GPU itself. That could seriously boost performance, especially for real-time rendering. It would mean no more delays when building those molecules, where we’re seeing a performance dip at the moment. Maybe using tessellation for progressive refinement we want for this case.

Do you believe I’m understanding things correctly? If not, please feel free to correct me. THANKS:)

Hi @ghutchis sir, I am Abhay an open-source enthusiast from INDIA. I am new to this repo and want to get into gsoc this year. Can you provide me a bit information about the topic

Improved scripting / automation

Do we need some kinda implementation of the AI for this idea?

No, that’s not the point at all.

You can find suggestions and sample proposals at Applying to GSoC - wiki.openchemistry.org

We are happy to provide feedback on drafts shared before the final week of submissions (i.e., before Tuesday 26 March) because the volume of submissions increases dramatically.

In a proposal, you should emphasize the work you wish to do, as well as a realistic timeline for the project period, including time to test, debug, and optimize code. You should also discuss your background and ability to carry out the work, including links to relevant code and/or pull requests.

In the project you mentioned, there are several related tasks to facilitate running script commands and an interactive Python console in Avogadro, a desktop GUI. The current code has Python integration through PyBind11 (e.g., avogadrolibs/python at master · OpenChemistry/avogadrolibs · GitHub). Extending the PyBind11 to additional C++ classes and methods would be welcome. In addition, integration between the PyBind11 classes and PySide would be great, to allow scripts to display UI dialogs, buttons, etc.

Finally, we have some code using QtTesting and other API to record UI events. It would be great to expand this to record user events into scripts.

It would be useful for a project proposal to show familiarity with PyBind11 and PySide (e.g., example code using PySide). Extending to the recording aspect should show some familiarity with Qt API and event logging.

I apologize @ghutchis for the recurring questions. I’m in the final stages of completing my proposal and have just reviewed some research papers. They discuss the Ray Marching algorithm for progressive refinement the molecular surfaces, specifically Solvent Excluded Surfaces (SES). From what I understand, the approach involves initially employing a lower resolution during marching cubes, then utilizing the tessellation shader to selectively enhance smoothness/resolution in certain parts. Is this the concept we’re considering? It seems they specifically address SES surfaces. Could you confirm if Ray-marching aligns with our idea?

Thanks… I was assuming that we have AI projects in this repo too since in gsoc we came across many AI projects. Can you tell me what can be the timeline for this project 90hrs? Or 175hrs or maybe 350hrs?

1 Like