Hi Martin,
I think that Pymol indeed assumes PDB formatting, where the b-factor
and occupancy fields are float format %6.2f, whereas the PQR format
often uses %8.3f formatting in stead. That will make both approaches
fail. You'll have to do some scripting to get it right:
You can try the following function. Not tested though :p
def load_pqr(pqr,name=""):
if not name:
name = name.replace(".pqr","")
pdb = []
for i in open(pqr):
if i.startswith("ATOM") or i.startswith("HETATM"):
pdb.append(i[:54]+"%6.2f%6.2f\n"%(float(i[54:60]),float(i[60:66])))
else:
pdb.append(i)
cmd.read_pdbstr("".join(pdb),name=name)
cmd.extend("load_pqr",load_pqr)
Cheers,
Tsjerk
On Thu, Oct 13, 2011 at 9:12 AM, Martin Hediger <[email protected]> wrote:
> Thanks, Tsjerk
> However, the first set of commands does not seem to have any effect (neither
> produce an error). Is it supposed to be able to enter them at the PyMOL
> prompt just as you wrote? The spectrum command seems to have an effect but
> all atoms appear in red. One should be blue.
> Is there a restriction on how the PQR file is to be formatted? I was reading
> PQR is not as strict as PDB format, so I believe the file I posted should be
> a valid PQR format.
>
> Martin
>
>
>
>
>
>
>
> Am 13.10.11 06:17, schrieb Tsjerk Wassenaar:
>
> Hi Martin,
>
> You can use b and q as selection keywords (help selections):
>
> color red, b < 0
> color blue, b > 0
>
> Or you can use 'spectrum' (help spectrum):
>
> spectrum b, red_white_blue
>
> Hope it helps,
>
> Tsjerk
>
> On Oct 13, 2011 12:58 AM, "Martin Hediger" <[email protected]> wrote:
>
> Dear List
> I have the below model of three charged atoms (as a PQR file).
> ATOM 1 C ASP A 0.0 0.0 10.0 -2.0 4.0
> ATOM 2 C ASP A 0.0 0.0 0.0 -2.0 4.0
> ATOM 3 C ASP A 0.0 0.0 -10.0 2.0 4.0
>
> The last two numbers are the charge and the radius, it's supposed to be
> in pqr format.
> Can PyMOL display the negative atoms blue and the positive one red (or
> the other way around)?
>
> Thanks for any help.
> Martin
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> _______________________________________________
> PyMOL-users mailing list ([email protected])
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/[email protected]
>
>
--
Tsjerk A. Wassenaar, Ph.D.
post-doctoral researcher
Molecular Dynamics Group
* Groningen Institute for Biomolecular Research and Biotechnology
* Zernike Institute for Advanced Materials
University of Groningen
The Netherlands
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]