Hi Jarrett,
Thank you very much for your kind and comprehensive advice, really appreciate
it!
I will try it out.
Kind regards,
Jessica Lim
________________________________
From: Jarrett Johnson <jarrett.john...@schrodinger.com>
Sent: Thursday, May 18, 2023 8:32 PM
To: #JESSICA LIM JIAYING# <jessicaj...@e.ntu.edu.sg>
Cc: pymol-users@lists.sourceforge.net <pymol-users@lists.sourceforge.net>
Subject: Re: [PyMOL] Generating of Rg for every state in PyMOL
Hi Jessica,
It seems in the gyradius psico script, by default it will calculate the radius
of gyration for the current state. You can provide a specific state to this
argument and generate the list yourself in a script.
```
from psico.querying import gyradius
from pymol import cmd
obj = "1nmr"
cmd.fetch(obj)
# for loop
for i in range(cmd.count_states(obj)):
print(f"State {i+1}: {gyradius(obj, state=i+1)}")
# list comprehension
gy_list = [gyradius(obj, state=i+1) for i in range(cmd.count_states(obj))]
print(gy_list)
```
Hope that helps,
Jarrett J
On Thu, May 18, 2023 at 8:05 AM #JESSICA LIM JIAYING# via PyMOL-users
<pymol-users@lists.sourceforge.net<mailto:pymol-users@lists.sourceforge.net>>
wrote:
Hi all,
I am having difficulty in trying to print out a list of the radius of gyration
for all states in my PDB file. I have several files of 100 states each and
would like to generate a list of the radius of gyration for every individual
state. However, I have only been successful at using the command gyradius as
part of the psico package in PyMOL but it only outputs a single value, and I
would have to click manually to the next state and re-enter the command to get
the next value. Hence, I would like to be able to obtain a list of values
without having to click through 100 different states.
Any advice or suggestions on how this can be done will be greatly appreciated,
thank you!
Kind regards,
Jessica Lim
_______________________________________________
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
--
Jarrett Johnson | Senior Developer, PyMOL
[https://drive.google.com/uc?id=1zOlB9fluGZyuInRUQgKsdjtjpR5L9z6R&export=download]
_______________________________________________
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