So one big problem I experience in doing calculations with Quantum ESPRESSO is that many calculations require a lot of computing power: you need large RAM capacities and powerful processors especially when there are many atoms in a solid state model and the computation requires a dense k-point grid. It becomes really impractical for a desktop setup at some point.

Some peers of mine from the computer science department of our university said that since we don't have an HPC here (I'm from a 3rd world country), what they do is they run their programs (which they wrote themselves) in free cloud computing services such as the Google Colab.

My question is this: Is there a way to run Quantum Espresso on Google Colab?

  • 1
    $\begingroup$ Hi, the short answer to the question of whether it's possible to run QE on Google Colab is no. This is because to use Google Colab, one has their code in a "notebook" (very much like Jupyter notebooks). Notebooks are interactive terminal-type interfaces that combine code, documentation and output. So, it's not possible to run executables on Google Colab. Having said this, it might be possible to run other DFT codes that don't require compiled executables. $\endgroup$ – Mythreyi May 29 '20 at 10:18
  • 1
    $\begingroup$ Are there DFT codes that fit what you said: "dont require compiled executables"? I'm sorry for asking this as my only experience with DFT codes is QE. I've heard of VASP and Gaussian but as far as I know they are also executables. $\endgroup$ – jboy May 29 '20 at 10:32
  • $\begingroup$ There's python codes, see for example the question on this site with title "How do I get my feet wet with DFT..." $\endgroup$ – Nike Dattani May 29 '20 at 14:24
  • 1
    $\begingroup$ @Mythreyi Through notebook you can run bash commands, so you can run basic install scripts (something like !curl etc, similarly to Jupyter). Still, I do not think it works or it would worth the effort. $\endgroup$ – Greg May 29 '20 at 14:39
  • 1
    $\begingroup$ @Mythreyi That would be great! People are not supposed to ask 2 questions in one, anyway. We can remove the second question if necessary, and ask OP to write it as a separate question. $\endgroup$ – Nike Dattani May 31 '20 at 13:58

A little background on why I asked this question:

I have a desktop PC with an AMD Ryzen 5 processor, 4 cores 8 logical threads and 32GB DDR4 RAM. I'm trying to do DFT-GGA calculations on a 2D Xene with hydrogen atoms adsorbed at the surface. I'm using a 4x4 supercell as a model for a total of 32 atoms (16 for X and 16 for H). Without spin-orbit coupling (SOC), the total dynamically allocated RAM required for relaxation and SCF calculations is somewhere in the range of 4-6 GB. When I try to account for SOC, the memory required jumps to around 20 GB, so I'm guessing performing phonon or band calculations would require much much more than 30 GB, and enlarging the cell to 5x5 or 6x6 would require an even greater memory capacity. Not to mention, it would also require more processing power to finish the calculations at a decent amount of time.

So I checked out Google Colab some more, after seeing the replies to this question. While it looks really possible to install an executable like Quantum Espresso into Google Colab, the free RAM can be boosted only up to 25 GB, which is in my opinion, less RAM than what I would need.

Update/Edit: I actually also found a page which seems to walk you through how to do it: https://qiita.com/cometscome_phys/items/a31ab8a4a4f7217a70ff. It's in Japanese so I don't understand everything it says but I get the basic gist.

  • 2
    $\begingroup$ +1. So the answer is "Yes it's possible to install Quantum ESPRESSO on Google Colab, but only up to 25GB of RAM would be available" (you can correct me if I'm wrong). $\endgroup$ – Nike Dattani Jun 1 '20 at 1:51

You can check this article I've written on doing the same, but without using the ASE python library. Just create the input file as you would normally do along with the pseudo-potential files and keep them in a folder in your Google Colab content folder. The work-flow is much faster if you would like to use ASE but this method works without it as well.

I'll also include the link to the google colab notebook in just in case.

Hope it helps :)


I am also looking for something like this. But to run a PWSCF calculation on google colab seems next to impossible.

However, you should check this out: https://github.com/jkitchin/dft-book-espresso

  • $\begingroup$ Thanks for answering and welcome! Can you provide more details/summary of the link? Right now this is a "link only answer" which is hard to determine if useful. $\endgroup$ – Cody Aldaz Jun 24 '20 at 15:53
  • $\begingroup$ +1. Thank you for coming to our site, and for offering your help to our new but growing community!!! We hope to see much more of you! @CodyAldaz likely the user did not have enough reputation to write a comment. I agree that it would be useful for them to go more into detail about what part of that link might be useful. But also someone else can do it (edit the answer to make it better). $\endgroup$ – Nike Dattani Jun 24 '20 at 18:18
  • 1
    $\begingroup$ @NikeDattani Actually I think this comment GitHub notebook would be an excellent answer to my question $\endgroup$ – Cody Aldaz Jun 24 '20 at 22:34
  • $\begingroup$ Oh yeah I also saw that repo by dr kitchin's group. They work mostly using VASP but I guess they're now also using QE. They made a book on doing dft in python using VASP as a calculator. Maybe they're trying to do the same with QE. In any case I'll check the site too. Thanks for sharing. $\endgroup$ – jboy Jun 26 '20 at 8:21
  • $\begingroup$ @CodyAldaz From a rough browsing through that github repo, it introduces what you can do with the ASE package, not just DFT using Quantum Espresso. But yeah, it does answer a question you posted. $\endgroup$ – jboy Jun 26 '20 at 9:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.