
Hi Shyamala, If you know how to do something using the Chimera command line, you can do the exact same thing in Python by using Chimera's runCommand() function, e.g.: from chimera import runCommand runCommand("pdbrun conect cat > " + fname + ".pdb") You only need to use the pdbrun command above if you need to write out CONECT records for both standard and non-standard residues for some reason. The normal command for saving PDBs ("write") will output CONECT records for non-standard residues. As for programming resources, there are some but not as many/much as we would like. First there is the Chimera Programmer's Guide which has examples and an FAQ. Second is to look at modules in <your chimera>/share that perform functions similar to what you want to do. Third is to search chimera-users for scripts that have been posted to see how they work. We want to put up a wiki page of scripts but haven't gotten to that yet. Last but not least is if you get stuck, post questions on the chimera-dev mailing list -- they should be answered quickly. --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu On Mar 13, 2009, at 3:08 PM, shyamala wrote:
Hi Chimera users,
I am sure there is a simple way to do this, but I need some help. I want to add CONECT records to a pdb file, given that the input file contains all necessary atom coordinate information. I need to do this within my shell script and I want to start chimera using the nongui option. Now, doing some google seach brought up this solution to add CONECT records (in the command line within CHIMERA gui) pdbrun nouser conect cat > filename.pdb
where filename.pdb is the name of the output file with CONECT records added.
the above mentioned command works when I pull up the file on GUI CHIMERA
My question is then how would I use such a command when I want to use it in the nogui option. I have multiple files (>100) for which I need to add CONECT records and I want to do it with a script.
Also, if someone could point me to a good resource for writing python scripts that can be then passed on to chimera, I would be grateful.
Thanks,
Shyamala
Shyamala Iyer Graduate Student Department of Microbiology PO BOX 357242 University of Washington Seattle, WA, 98195
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users