Question: Calculate Radius of Gyration [python 3]

0

ac.research •

**10**wrote:Hello Everyone,

I am trying to find a way to calculate the Rg (Radius of Gyration) of a protein.

I searched through Biopython but I could not find a way to do it.

Is it possible to do this calculation from Biopython? Is there a script someone has written that I can use, even if it uses a library different then Biopython?

Thank you for your help.

Hi, maybe you can try PyMOL library. There is a python example to do this calculation: Radius_of_gyration

190Hmmm, the script from pymol does not work out of the box, but I modified it and it works now. Thanks.

But the issue is that I cannot call it from within another python script (in other words I cannot run the script with python3 scriptname.py rather pymol -c scriptname.py) which means I cannot include it in other non-pymol python scripts.

So it is a temporary fix for now, but I would still rather use a better function, something from biopython or if possible a raw mathematical function (I understand how Rg works, but I am having difficulty implementing the math in python).

10I fixed the PyMol script to make it a stand alone script capable of running on python3 independent of PyMol. Here is a link to it in case someone wants to use it in the future :-)

https://github.com/sarisabban/Rg

10