Calculate Radius of Gyration [python 3]
0
0
Entering edit mode
7.1 years ago
ac.research ▴ 30

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.

biopython PDB Radius of Gyration python protein • 6.4k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Hmmm, 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).

ADD REPLY
0
Entering edit mode

I 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

ADD REPLY
0
Entering edit mode

I know it's been a long time since this been discussed. Anyways, I did a script of mine to calculate the gyration radius for a couple of PDB files I have and I noticed the value im getting differs on the one your script gets. I started looking around since it doesn't seem to be any difficult calculations involved and I was curious why we didn't get the same result. Then I notice how you parse your PDB file. I do it with Biopython and that way I get access to each atom id, mass, etc. On the other hand you parse it manually and search for specific atoms strings such as "N", "C", "O", etc. If the protein is only conformed by the atoms you take into account in your script then it should probably work just fine. In my case however I am working with hemoglobins and they have the heme group which I have to consider as well since I wanna know the COM of the overall protein including it's ligands and other chemical functional groups. I believe that's the reason why this script wasn't necessary working for me, but maybe im wrong. Anyways I would recommend accessing to each atom properties via Biopython.Parser and not manually, since Biopython already developed a parsing feature and it always worked perfectly for me.

Best Regards!

ADD REPLY
0
Entering edit mode

Hello Franco. I am very much new with bioinformatics but I have been tasked with studying the radius of gyration of a timeseries of a protein contained in a pdb file. I managed to learn to use biopython and parse the pdb file into all the successive models but I am struggling to understand how I could implement it in the code above like you described. How do you access each atom id, mass and positions and how does one implements it in the code above? Thak you for your help.

ADD REPLY

Login before adding your answer.

Traffic: 1580 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6