Dear Csongor,

as far as I know it is not well documented how you can access the python objects and its methods or data structures created by the PyMOL API. For many tasks one usually finds some information, often PyMOL or python scripts. Concerning your example of the hydrogen bonds determined by the distance command, the following python script may provide hints:


https://pymolwiki.org/index.php/Get_raw_distances

and: https://pymol-users.narkive.com/zHPUseVG/pymol-is-there-a-way-to-count-hydrogen-bond-interactions

When working with the PyMOL distance command to determine hydrogen bonds please note that the algorithm is very generous concerning non-linearity of the D-H...A angles if you use the default parameters. In addition, it will miss some perfect hydrogen bonds.

See
https://research.uni-leipzig.de/straeter/pymol/pymol_hbond.html
and
https://github.com/schrodinger/pymol-open-source/pull/374

Best wishes,

Norbert

Am 22.01.2025 um 15:21 schrieb Csongor MATYAS via PyMOL-users:
Hey everyone,

I am trying to use pymol from python to have some repetitive tasks done. I've managed to get some basic functions running but I'm running into walls frequently. I couldn't find a tutorial or documentation about this. Am I missing something? I know it's under development but I would assume that some basic instructions would be available somewhere, otherwise the conda package isn't very useful.

I've managed to sort out the cmd.select() function for example but I can't use the data, there is no object or output. All I can do is to cmd.save() selection into a .pdb file. I've managed to select ligand, and then residues around it, I've also been able to use show_contacts() (from link below) between two selections, but I can't access the pairs that suggest hydrogen bonding, it is only a visual thing. Even from pymol, the software, if I do it manually, I don't know how to save those (unless I save it as a pymol session file that is not human readable).

https://wiki.pymol.org/index.php/Show_contacts

Please, if anyone has advice, anything is appreciated 😄

Csongor

DISCLAIMER

Prezentul mesaj și orice documente atașate pot conține informații confidențiale sau sensibile care aparțin Universității Babeș-Bolyai din Cluj-Napoca. Conținutul mesajului nu poate fi dezvăluit sau utilizat de către altcineva decât destinatarul, persoană fizică sau juridică. Dacă ați primit acest mesaj dintr-o eroare, vă rugăm să ne anunțati imediat, ca răspuns la mesajul de față, și să ștergeți apoi din sistemul dvs. mesajul fără a-l copia sau deschide. Prin prezenta vi se notifică faptul că orice dezvaluire, copiere, distribuire sau inițierea/omiterea unor acțiuni pe baza prezentelor informații sunt strict interzise și atrag răspunderea civilă și/sau penală (art. 302 Noul Cod Penal). UBB nu este răspunzătoare pentru modificările care pot fi aduse prezentului mesaj și nici pentru întârzierile care pot surveni în recepționarea acestuia. De asemenea, nu putem garanta integritatea mesajului și nici că acesta este lipsit de viruși, interceptări sau interferențe de orice natură. ================= The contents of this email message and any attachments may contain confidential and/or privileged information belonging to Babeș-Bolyai University of Cluj-Napoca. This information is intended solely for the addressee, natural or legal person, and is legally protected from disclosure and may not be used by anyone other than the intended recipient. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply email and then delete this message and any attachments. You are hereby notified that any use, dissemination, copying, or storage of this message or its attachments as well as taking any action in reliance on the contents of this information is strictly prohibited and entails civil and/or criminal liability (under Art. 302 of the New Criminal Code). UBB accepts no liability for any errors or omissions in the contents of this message. Email transmission cannot be guaranteed to be secure or error-free, as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.

UBBCLUJ <https://www.ubbcluj.ro/ro/politici/>



_______________________________________________
PyMOL-users mailing list
Archives:http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe:https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Reply via email to