Michael,

        PyMOL's PDB handling is an attempt to navigate a minefield of
incompatible standards which exist in the conventions of various
software packages.  Amber in particular poses significant challenges, as
its PDB files are unusual.

        Since version 0.90, PyMOL's behavior has changed.  Nowadays,
your input data:

HETATM 1313 OA22 NAP   164      28.315  61.969  12.250       31.54
O 
HETATM 1314 OA23 NAP   164      26.554  62.174  14.275       21.05
O 
HETATM 1314 ABCD NAP   164      28.554  64.174  16.275       11.05
O 
HETATM 1314 XYZ  NAP   164      30.554  66.174  18.275        1.05
O 
HETATM 1314  LMN NAP   164      32.554  68.174  20.275       41.05
O

Would be returned as:

HETATM    1 OA22 NAP   164      28.315  61.969  12.250  0.00 31.54
O
HETATM    2 OA23 NAP   164      26.554  62.174  14.275  0.00 21.05
O
HETATM    3 ABCD NAP   164      28.554  64.174  16.275  0.00 11.05
O
HETATM    4  LMN NAP   164      32.554  68.174  20.275  0.00 41.05
O
HETATM    5  XYZ NAP   164      30.554  66.174  18.275  0.00  1.05
O
END

...which does preserve atom names, but not the order.  Note that
white-space in the atom names is not preserved (an inherent limitation
in PyMOL -- significant white-space within identifier is hell on users
and parsers).  

Conventionally, atom names of length 3 or less are placed in the second
column, not the first -- so your "LMN " atom may cause trouble.

Also note that by some conventions, "2OA2" in a PDB file really means
atom "OA22".  PyMOL used to work this way (up to 0.90).  Nowadays
(v0.91+), "2OA2" is treated as "20A2" unless pdb_literal_names is on, in
which case the old behavior returns.  

Note that in PyMOL, the PDB ATOM IDs are treated more as a property of
the PDB file than of the atoms themselves since TER records also have
unique IDs in that sequence and repeated MODELs sometimes do as well.
Furthermore, in your example, they are not unique (a mistake?).

However, I am trying to bend PyMOL around to meet your needs a bit
better.

Towards this end, I've created a new setting "pdb_retain_ids" which
preserves the original PDB serial numbers in the output file.

In future PyMOL versions, so long as

set retain_order, 1
set pdb_retain_ids, 1
set pdb_no_end_record, 1

The following behavior will be obtainable:

Assuming input of:

HETATM 1313 OA22 NAP   164      28.315  61.969  12.250       31.54
O 
HETATM 1314 OA23 NAP   164      26.554  62.174  14.275       21.05
O 
HETATM 1315 ABCD NAP   164      28.554  64.174  16.275       11.05
O 
HETATM 1316 XYZ  NAP   164      30.554  66.174  18.275        1.05
O 
HETATM 1317  LMN NAP   164      32.554  68.174  20.275       41.05
O

You'll get an output of:

HETATM 1313 OA22 NAP   164      28.315  61.969  12.250  0.00 31.54
O
HETATM 1314 OA23 NAP   164      26.554  62.174  14.275  0.00 21.05
O
HETATM 1315 ABCD NAP   164      28.554  64.174  16.275  0.00 11.05
O
HETATM 1316  XYZ NAP   164      30.554  66.174  18.275  0.00  1.05
O
HETATM 1317  LMN NAP   164      32.554  68.174  20.275  0.00 41.05
O

Which is as close as I think PyMOL is going to get...

Cheers,
Warren



--
mailto:war...@delanoscientific.com
Warren L. DeLano, Ph.D.
Principal Scientist
DeLano Scientific LLC
Voice (650)-346-1154 
Fax   (650)-593-4020

> -----Original Message-----
> From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-
> ad...@lists.sourceforge.net] On Behalf Of michael lerner
> Sent: Friday, September 26, 2003 8:44 AM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] why is PyMOL renaming my residues?
> 
> Hi,
> 
> If I load up a PDB file that looks like this:
> 
> HETATM 1313 OA22 NAP   164      28.315  61.969  12.250
> 31.54           O
> HETATM 1314 OA23 NAP   164      26.554  62.174  14.275
> 21.05           O
> HETATM 1314 ABCD NAP   164      28.554  64.174  16.275
> 11.05           O
> HETATM 1314 XYZ  NAP   164      30.554  66.174  18.275
> 1.05           O
> HETATM 1314  LMN NAP   164      32.554  68.174  20.275
> 41.05           O
> 
> and then save it from PyMOL, the resulting PDB file looks like this:
> 
> HETATM    1 2OA2 NAP   164      28.315  61.969  12.250  0.00
> 31.54           O
> HETATM    2 3OA2 NAP   164      26.554  62.174  14.275  0.00
> 21.05           O
> HETATM    3 DABC NAP   164      28.554  64.174  16.275  0.00
> 11.05           O
> HETATM    4  LMN NAP   164      32.554  68.174  20.275  0.00
> 41.05           O
> HETATM    5  XYZ NAP   164      30.554  66.174  18.275  0.00
> 1.05           O
> END
> 
> You'll note that OA22 has been renamed to 2OA2, OA23 has been renamed
to
> 3OA2 and ABCD has been renamed to DABC.  It looks to me like residue
> with a four-letter name is getting renamed.
> 
> No .. wait .. it's a little stranger than that .. if I open up the
> second file (the one with DABC) and save *it*, I get this:
> 
> HETATM    1 2OA2 NAP   164      28.315  61.969  12.250  0.00
> 31.54           O
> HETATM    2 3OA2 NAP   164      26.554  62.174  14.275  0.00
> 21.05           O
> HETATM    3 CDAB NAP   164      28.554  64.174  16.275  0.00
> 11.05           O
> HETATM    4  LMN NAP   164      32.554  68.174  20.275  0.00
> 41.05           O
> HETATM    5  XYZ NAP   164      30.554  66.174  18.275  0.00
> 1.05           O
> END
> 
> Note that ABCD went to DABC which went to CDAB, but OA22 went to 2OA2
> and stayed there.  LMN and XYZ weren't touched.
> 
> Is there a way to supress this behavior?  It causes me a bit of
trouble
> when, e.g., my AMBER parameter files expect residues to have certain
> names.
> 
> I'm not sure exactly when PyMOL decides to rename things .. if I
> shift-left-click on one of the residues in the first file (either
before
> or after saving), PyMOL says "You clicked NAP: /test1///164/OA23"
(i.e.
> it gives me the original name).
> 
> thanks,
> 
> -michael
> 
> --
> michael lerner
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users


Reply via email to