tubiana / TTClust

clusterize molecular dynamic trajectories (amber, gromacs, charmm, namd, pdb...)
Other
106 stars 36 forks source link

Using TTClust on Google Colab #29

Closed Marwa-Abdelkader closed 2 years ago

Marwa-Abdelkader commented 2 years ago

Hi, Can TTClust be used on Google Colab? if so how can I install it and get it working? I tried installing condacolab, and then using the following command : !mamba install -c tubiana -c conda-forge ttclust to install TTclust, but after that when I tried to run a TTclust command , it just throws errors, so I wonder if there's a method I can use it on Colab?

Thanks in advance

tubiana commented 2 years ago

That's interesting, I never tried to run it on google colab. But please, could you be more specific about which error did you have ? I cannot do anything without your code and your error messages.

Kind regards, Thibault Tubiana.

Marwa-Abdelkader commented 2 years ago

I attached the errors, and the colab notebook I was trying in. Execuse my I'm a biggener in Google colab, but I just wanted to get advantage of higher computational power than I have, which I discovered that I need when I had a long simulation with such a large size that my laptop crashed, not the same case as it was with shorter and smaller simulations.

https://colab.research.google.com/drive/1rEOfmEDhOrYD7gpnledx7JVqKPrrn7Jz?usp=sharing ttclust_colab_errors

Thanks again for your help and for your valuable contributed tools, Marwa

tubiana commented 2 years ago

ipykernel is missing, you can maybe try to install it with !pip install ipykernel ?

Marwa-Abdelkader commented 2 years ago

I tried this, and it looks like it worked, however another error is thrown: tcmalloc: large alloc 6885105664 bytes == 0x55bde4d2a000 @ 0x7f54eb8681e7 0x7f54e990db6e 0x7f54e990dc04 0x7f54e994e8c1 0x7f54e994f307 0x7f54e99e2b48 0x55bde1c49d5f 0x7f54e4448939 0x7f54e445236a 0x55bde1c49d5f 0x7f54e4423947 0x7f54e442f327 0x7f54e4434b65 0x55bde1c49d5f 0x7f54e443d7e2 0x55bde1c49d5f 0x7f54e4437813 0x55bde1c49d5f 0x55bde1d04734 0x55bde1c46af2 0x55bde1c75030 0x55bde1cd89c8 0x55bde1d001d9 0x55bde1c74e94 0x55bde1cd89c8 0x55bde1cff4ac 0x55bde1c74e94 0x55bde1cd89c8 0x55bde1cff4ac 0x55bde1c46af2 0x55bde1c47d09 tcmalloc: large alloc 5733122048 bytes == 0x55bf7f5fa000 @ 0x7f54eb8681e7 0x7f54e990db6e 0x7f54e990dc04 0x7f54e994e8c1 0x7f54e99e8289 0x7f54e99e89df 0x7f54e99e8b52 0x55bde1c49d5f 0x7f54e993d47c 0x55bde1cd73eb 0x55bde1cd8ad8 0x55bde1cff4ac 0x55bde1c46af2 0x55bde1c47d09 0x7f54e44250bc 0x7f54e442981f 0x7f54e44329ca 0x7f54e4434b65 0x55bde1c49d5f 0x7f54e443d7e2 0x55bde1c49d5f 0x7f54e4437813 0x55bde1c49d5f 0x55bde1d04734 0x55bde1c46af2 0x55bde1c75030 0x55bde1cd89c8 0x55bde1d001d9 0x55bde1c74e94 0x55bde1cd89c8 0x55bde1cff4ac tcmalloc: large alloc 10000400384 bytes == 0x55c0d5d94000 @ 0x7f54eb86a001 0x7f54e990dc96 0x7f54e990dd27 0x7f54e994e6f1 0x7f54e9952c1b 0x7f54e99e2cc8 0x55bde1cd74d9 0x55bde1cd8ad8 0x55bde1d001d9 0x55bde1c74e94 0x55bde1cd89c8 0x55bde1cff4ac 0x55bde1c74e94 0x55bde1cd89c8 0x55bde1cff4ac 0x55bde1c74e94 0x55bde1cd89c8 0x55bde1cff4ac 0x55bde1c74e94 0x55bde1cd89c8 0x55bde1cff4ac 0x55bde1c46af2 0x55bde1c47d09 0x55bde1d228ab 0x55bde1d86f53 0x55bde1d90fd7 0x55bde1d911ac 0x55bde1d91709 0x55bde1d9185c 0x7f54ea899bf7 0x55bde1d0e901 bash: line 1: 1350 Killed ttclust -f /content/drive/MyDrive/MD-fit-nopbc_noh2o.xtc -t /content/drive/MyDrive/conf.pdb -sa "resname MA4" -sr "resname MA4"

I think that is related to the size of the trajectory which is about 1.69 GB, I don't know how can I use TTClust on a trajectory of that size, any suggestions?

Thanks in advance, Marwa

tubiana commented 2 years ago

I'm not sure if it is linked to collab or not, but it should not require so much memory. I know that I have to work on memory optimisation, but unfortunately I will not have time to do that before a few weeks....

In the meantime, If you have the water in your trajectory you can first remove it, or if you have a lot of frames, you can skip some frames. For example if you have 100000 Frames and between your frames you only have 1ps or 10 ps, the difference will not be super high between 2 frames. So you can reduce the number of frame with the option -s (-s 5 will read every 5th frames)

Marwa-Abdelkader commented 2 years ago

Thanks so much, it eventually worked :). It's now running on colab. And really it would be a great addition if you enhanced the memory optimization, will be waiting eagerly for it!

Thanks again, Marwa

tubiana commented 2 years ago

Good to know :-) I will tag you when I will finally do it :-)

Thibault.