[Chimera-users] find h bonds
pett at cgl.ucsf.edu
Tue Mar 31 14:45:14 PDT 2009
On Mar 31, 2009, at 6:28 AM, ROSETTA FORESTIERO wrote:
> I have a receptor and more ligands, I want find h-bond between
> and each ligand using a scripts shell but i have some problem.
> Can you help me?
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
If you need individual files for some reason, a script like this
open 0 receptor.pdb
open 1 ligand.001.pdb
hbonds intramodel false saveFile ligand.001.hbonds
open 1 ligand.002.pdb
hbonds intramodel false saveFile ligand.002.hbonds
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" %
You would put the above in a file ending in ".py" and execute it in
Chimera simply by opening the file.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users