[Chimera-users] Chimera pH

Eric Pettersen pett at cgl.ucsf.edu
Mon Aug 3 17:25:12 PDT 2009

On Aug 3, 2009, at 5:01 PM, Elaine Meng wrote:

> If you did want the exact charges from PDB2PQR, you could reformat
> those charges (next-to-last column in the original PQR file) into an
> attribute assignment file and reassign them with Define Attribute (or
> command defattr), after reading in the edited PDB files (PQR files
> with last 2 columns removed).

In this vein, I wrote a Python script (pqr2chimera.py) that will read  
a PQR file and output a PDB file that Chimera can read (chimera.pdb)  
and a defattr file (chimera.defattr) that could be used to assign the  
PQR charges to the model, if for some reason you prefer them to the  
charges that Chimera would assign.  The script is attached.  You run  
it from a Unix shell like this:

	python pqr2chimera.py my_pqr_file.pqr

The two output files will appear in the directory you run it in.  One  
caveat is that since the defattr output file uses "@/serialNumber=" as  
it's atom selector, defining the charge attribute in Chimera using  
that file is kind of slow -- it looks through the list of atoms every  
time to locate the one with the matching serial number.  It probably  
would be faster if the selector were written in the ":res at atom" form,  
but since I'm not even sure you care about the defattr part I took the  
lazy road.


                         Eric Pettersen
                         UCSF Computer Graphics Lab

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20090803/b47ceaa2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pqr2chimera.py
Type: text/x-python-script
Size: 577 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20090803/b47ceaa2/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20090803/b47ceaa2/attachment-0001.html>

More information about the Chimera-users mailing list