[Chimera-users] Ligand selection information
Elaine Meng
meng at cgl.ucsf.edu
Wed Oct 15 14:33:50 PDT 2014
Hi Korbin,
I'm not sure if you meant you just wanted to access the information programmatically, in which case somebody else who knows python should respond, but one possibility instead of writing a file is to send the information to the Reply Log. You can do that by specifying the writesel output filename as "-" (just the dash, no quotes).
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/writesel.html>
I wouldn't expect the residues you listed to be considered "ligand" so I opened 2izh and tried it, which just gives me the two BTN residues.
Best,
Elaine
----------
Elaine C. Meng, Ph.D.
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco
On Oct 15, 2014, at 1:58 PM, Korbin West <khwest16 at wabash.edu> wrote:
> Hello.
>
> I'm fairly new to Chimera and Python programming, I'm still trying to pick up a lot of it as I go. I'm going through some data and am trying to get the information about a ligand in a protein. So in my script I'm using the runCommand function to get the info on the ligand, but I'd like a way to do so without writing it to a file.
>
> Here's what I have at the moment, writing the information to a file.
>
> runCommand('open 2izh')
> runCommand('sel ligand')
> runCommand("writesel ~/Desktop/testligand.txt")
>
> And here's an excerpt of the testligand.txt file:
>
> #1 BTN 300.B
> #1 HOH 1777.B
> #1 HOH 1778.B
> #1 BTN 300.D
> #2 ACY 801.B
> #2 SER 308.C
> #3 BTN 300.B
>
>
> Is there a way I can just access this information as a list or something so I don't have to write the file then open the file to see the info? I'd like to continue the script to sort out through some of this information but I'm dealing with a lot of pdb files so I'd prefer not to have write a file, open it, read it, then rewrite it and repeat a ton of times.
>
> Thanks so much,
>
> Korbin West
More information about the Chimera-users
mailing list