[Chimera-users] find h bonds

Eric Pettersen pett at cgl.ucsf.edu
Tue Mar 31 14:45:14 PDT 2009


On Mar 31, 2009, at 6:28 AM, ROSETTA FORESTIERO wrote:

> Hi
> I have a receptor and more ligands, I want find h-bond between  
> receptor
> and each ligand using a scripts shell but i have some problem.
> Can you help me?

Hi Rosetta,
	Depending on your situation you may not need a script.  Let's say you  
have the receptor open as model 0 and the ligands in models 1 and  
higher.  You could write all the ligand-receptor H bonds to a file  
named "hbonds.info" with:

	sel #1-end; hbonds selRestrict cross saveFile hbonds.info

The output should be pretty easy to use to find the H bonds to the  
individual ligands.
	If you need individual files for some reason, a script like this  
would work:

open 0 receptor.pdb
open 1 ligand.001.pdb
hbonds intramodel false saveFile ligand.001.hbonds
close 1
open 1 ligand.002.pdb
hbonds intramodel false saveFile ligand.002.hbonds
close 1
etc.

You would probably generate the script using some programming language  
you are familiar with.
	Lastly, you can use Python to get Chimera to execute the above  
commands directly, something like:

from chimera import runCommand
runCommand("open 0 receptor.pdb")
for ligNum in range(1, 1001):
	runCommand("open 1 ligand.%03d.pdb" % ligNum)
	runCommand("hbonds intramodel false saveFile ligand.%03d.hbonds" %  
ligNum)
	runCommand("close 1")

You would put the above in a file ending in ".py" and execute it in  
Chimera simply by opening the file.

--Eric


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20090331/95a57586/attachment.html>


More information about the Chimera-users mailing list