[Biopython] Variation in distance calculation between Bio.PDB and PyMol
Salma Yahia <[email protected]> Tue, 27 Feb 2024 23:48:51 +0200
| Newsgroups | gmane.comp.python.bio.general |
|---|---|
| Message-ID | <CAGu746eN2zTAsj5PQ9Uv+Ogj8rZ8dbDd=dSxO4ii7waFOGsz2A@mail.gmail.com> |
--000000000000e29c440612632c6f Content-Type: multipart/alternative; boundary="000000000000e29c400612632c6d" --000000000000e29c400612632c6d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Sir/Madam, I hope all is well. I am asking about a problem when analyzing a specific structure using the Bio.PDB module. I am trying to calculate the distance between the manganese atom(Mn) and the surrounding ligands within a 2.4=C4= =82 radius (for oxygen-evolving complex OEX) in the photosystem II (PSII) protein complex, then calculate the average distance for all the resulting distances. The problem is that the calculated average distance is less than expected, so I checked the distance between MN-Ligands of the OEX complex using PyMol. I found that 90% of the distance calculated in the code is always less than what=E2=80=99s in PyMol. For example, if the distance in the code Between MN1 and O1 ( ligand) is 1.75, it is 1.8 in PyMol, and sometimes the variation is wider than just 0.05! So, what might cause this variation between PyMol and the code using Bio.PDB and this is not happening for only 1 PDB file; this problem is with 10 different PDB files! Any useful insights from you would be appreciated; I am attaching my code for more clarification. Thank you for your time and consideration. I am looking forward to hearing from you soon. Warm regards, Salma Yehia --000000000000e29c400612632c6d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><span style=3D"font-family:Calibri,sans-serif;font-size:14= .6667px">Dear Sir/Madam,</span><br style=3D"font-family:Calibri,sans-serif;= font-size:14.6667px"><br style=3D"font-family:Calibri,sans-serif;font-size:= 14.6667px"><span style=3D"font-family:Calibri,sans-serif;font-size:14.6667p= x">I hope all is well. I am asking about a problem when analyzing a specifi= c structure using the Bio.PDB module. I am trying to calculate the distance= between the manganese atom(Mn) and the surrounding ligands within a 2.4=C4= =82 radius (for oxygen-evolving complex OEX) in the photosystem II (PSII) p= rotein complex, then calculate the average distance for all the resulting d= istances.</span><br style=3D"font-family:Calibri,sans-serif;font-size:14.66= 67px"><span style=3D"font-family:Calibri,sans-serif;font-size:14.6667px">Th= e problem is that the calculated average distance is less than expected, so= I checked the distance between MN-Ligands of the OEX complex using PyMol. = I found that 90% of the distance calculated in the code is always less than= what=E2=80=99s in PyMol.</span><br style=3D"font-family:Calibri,sans-serif= ;font-size:14.6667px"><span style=3D"font-family:Calibri,sans-serif;font-si= ze:14.6667px">For example, if the distance in the code Between MN1 and O1 (= ligand) is 1.75, it is 1.8 in PyMol, and sometimes the variation is wider = than just 0.05!</span><br style=3D"font-family:Calibri,sans-serif;font-size= :14.6667px"><br style=3D"font-family:Calibri,sans-serif;font-size:14.6667px= "><span style=3D"font-family:Calibri,sans-serif;font-size:14.6667px">So, wh= at might cause this variation between PyMol and the code using Bio.PDB and = this is not happening for only 1 PDB file; this problem is with 10 differen= t PDB files!=C2=A0</span><br style=3D"font-family:Calibri,sans-serif;font-s= ize:14.6667px"><br style=3D"font-family:Calibri,sans-serif;font-size:14.666= 7px"><span style=3D"font-family:Calibri,sans-serif;font-size:14.6667px">Any= useful insights from you would be appreciated; I am attaching my code for = more clarification. Thank you for your time and consideration. I am looking= forward to hearing from you soon.</span><br style=3D"font-family:Calibri,s= ans-serif;font-size:14.6667px"><br style=3D"font-family:Calibri,sans-serif;= font-size:14.6667px"><span style=3D"font-family:Calibri,sans-serif;font-siz= e:14.6667px">Warm regards,</span><br style=3D"font-family:Calibri,sans-seri= f;font-size:14.6667px"><span style=3D"font-family:Calibri,sans-serif;font-s= ize:14.6667px">Salma Yehia</span><br><br><br><br><img width=3D"0" height=3D= "0" class=3D"mailtrack-img" alt=3D"" style=3D"display:flex" src=3D"https://= mailtrack.io/trace/mail/e44d634a26d9e0d2de7011c4bdf74dd57bde7a3a.png?u=3D10= 005938"></div> --000000000000e29c400612632c6d-- --000000000000e29c440612632c6f Content-Type: text/x-python; charset="US-ASCII"; name="Average_distance.py" Content-Disposition: attachment; filename="Average_distance.py" Content-Transfer-Encoding: base64 Content-ID: <f_lt4wgjc00> X-Attachment-Id: f_lt4wgjc00 ZnJvbSBCaW8uUERCIGltcG9ydCBQREJQYXJzZXINCmZyb20gQmlvLlBEQiBpbXBvcnQgTmVpZ2hi b3JTZWFyY2gNCmltcG9ydCBudW1weSBhcyBucA0KDQpkZWYgZ2V0X2F0b21zKHBhdGgsIHJhZGl1 cyk6DQogICAgcmVzdWx0c19mb3JfYWxsX2ZpbGVzID0gW10NCg0KICAgIGZvciBwZGJfcGF0aCBp biBwYXRoOg0KICAgICAgICBwYXJzZXIgPSBQREJQYXJzZXIoKQ0KDQogICAgICAgIHN0cnVjdHVy ZSA9IHBhcnNlci5nZXRfc3RydWN0dXJlKCJwcm90ZWlucyIsIHBkYl9wYXRoKQ0KICAgICAgICBy ZXN1bHRzX2Zvcl9vbmVfZmlsZSA9IFtdDQoNCiAgICAgICAgYWxsX2F0b21zID0gbGlzdChzdHJ1 Y3R1cmUuZ2V0X2F0b21zKCkpDQoNCiAgICAgICAgZm9yIG1vZGVsIGluIHN0cnVjdHVyZToNCiAg ICAgICAgICAgIGZvciBjaGFpbiBpbiBtb2RlbDoNCiAgICAgICAgICAgICAgICBmb3IgcmVzaWR1 ZSBpbiBjaGFpbjoNCiAgICAgICAgICAgICAgICAgICAgZm9yIGF0b20gaW4gcmVzaWR1ZToNCiAg ICAgICAgICAgICAgICAgICAgICAgIGlmIGF0b20uZ2V0X25hbWUoKS5zdGFydHN3aXRoKCJNTiIp OiAgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgbW5fY29vcmRpbmF0ZXMgPSBucC5hcnJh eShhdG9tLmdldF9jb29yZCgpKQ0KDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgDQogICAg ICAgICAgICAgICAgICAgICAgICAgICAgbnMgPSBOZWlnaGJvclNlYXJjaChhbGxfYXRvbXMpDQog ICAgICAgICAgICAgICAgICAgICAgICAgICAgbmVpZ2hib3JzID0gbnMuc2VhcmNoKG1uX2N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XMpDQogICAgICAgICAgICBhdmVyYWdlX2Rpc3RhbmNlID0gcm91bmQoc3Vt X2Rpc3RhbmNlcyAvIGxlbmd0aCwgMykNCiAgICAgICAgICAgIGF2ZXJhZ2VfZGlzdGFuY2VzLmFw cGVuZChhdmVyYWdlX2Rpc3RhbmNlKQ0KICAgICAgICBlbHNlOg0KICAgICAgICAgICAgYXZlcmFn ZV9kaXN0YW5jZXMuYXBwZW5kKG5wLm5hbikgIA0KDQogICAgcmV0dXJuIGF2ZXJhZ2VfZGlzdGFu Y2VzDQoNCg0KcGF0aCA9IFsiL2NvbnRlbnQvZHJpdmUvTXlEcml2ZS9JbnRlcm5zaGlwL3N0cnVj dHVyZXMvNXdzNi5wZGIiXQ0KcmFkaXVzID0gMi40DQoNCg0KcmVzdWx0c19zMyA9IGdldF9hdG9t cyhwYXRoLCByYWRpdXMpDQphdmVyYWdlX2Rpc3RhbmNlc19zMyA9IGNhbGN1bGF0ZV9hdmVyYWdl X2Rpc3RhbmNlKHJlc3VsdHNfczMpDQoNCnByaW50KGF2ZXJhZ2VfZGlzdGFuY2VzX3MzKQ== --000000000000e29c440612632c6f Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Biopython mailing list - [email protected] https://mailman.open-bio.org/mailman/listinfo/biopython --000000000000e29c440612632c6f--