[chimera-dev] how can i delete solovent and ligand from pdb file?
Eric Pettersen
pett at cgl.ucsf.edu
Wed Feb 26 13:37:25 PST 2014
On Feb 24, 2014, at 6:44 AM, unwicky <unwicky at 126.com> wrote:
> hello,i want to delete solvent and ligand from a pdb file,but to use chimera command line,it has to load to many components,can you show me the pure source code to to this?thank you
Hi,
I'm guessing your question means: "I have a bunch of PDB files that I need to remove the solvent and ligand from and therefore need to automate the process. How do I do that?". If that's not right, let me know. Anyway, the Chimera commands to remove solvent and ligand are:
del solvent
del ligand
and therefore in Python can be called by:
from chimera import runCommand as rc
rc("del solvent")
rc("del ligand")
In Chimera's Programmer's Guide (http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html) there is a basic primer for looping through a bunch of data files and doing something on each one. You would just take the example in the basic primer and modify it to do the above (and write out the results). The direct link to the basic primer is here:
http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
http://www.cgl.ucsf.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20140226/d06315ac/attachment.html>
More information about the Chimera-dev
mailing list