[Chimera-users] Ligand selection information

Korbin West khwest16 at wabash.edu
Wed Oct 15 13:58:34 PDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20141015/37625421/attachment.html>

More information about the Chimera-users mailing list