From: michael l. <ml...@um...> - 2003-09-26 17:19:31
|
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 |
From: michael l. <ml...@um...> - 2003-09-26 17:44:18
|
oops .. two problems with my last message: 1) i said "residue" a few times when i meant "atom" .. it should be obvious from the context of the message. 2) my email program seems to have messed up some of the formatting in the last message .. the original PDB file should look like this (assuming i can format it correctly this time): 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 in case that's still not formatted correctly, each line should begin with HETATM, and the point is that the atoms are named "OA22", "OA23", "ABCD", "XYZ " and " LMN" respectively. also, i noticed that PyMOL is changing the atom ID (OA22 was 1313 in the first file, but 1 in the second). that's not actually causing me any trouble, but i'm curious: is there a way to make PyMOL leave the IDs alone? thanks, -michael michael lerner wrote: > 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 > |
From: Warren L. D. <wa...@de...> - 2003-09-26 20:24:50
|
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:wa...@de... Warren L. DeLano, Ph.D. Principal Scientist DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 > -----Original Message----- > From: pym...@li... [mailto:pymol-users- > ad...@li...] On Behalf Of michael lerner > Sent: Friday, September 26, 2003 8:44 AM > To: pym...@li... > 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 > PyM...@li... > https://lists.sourceforge.net/lists/listinfo/pymol-users |
From: michael l. <ml...@um...> - 2003-10-02 20:00:24
|
Hi Warren, > PyMOL's PDB handling is an attempt to navigate a minefield of >incompatible standards which exist in the conventions of various >software packages. > Ugh. I know more about incompatable PDB files than I ever wanted to. I once wrote something much like Andrew Dalke's UPDB (see http://biopython.org/scriptcentral/). Unfortunately, my version ended up being very slow, so I didn't get a chance to give it to the biopython folks. I keep meaning to go back and speed it up, but I think they have a good PDB parser now. > Since version 0.90, PyMOL's behavior has changed. Nowadays, >your input data: > <snip> >Would be returned as: > > <snip> >...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. > That's fine with me. I just had "LMN " and " XYZ" in there so that I could figure out exactly what PyMOL was changing. >Also note that by some conventions, "2OA2" in a PDB file really means >atom "OA22". > I didn't know that. What conventions are those? >Furthermore, in your example, they [ATOM IDs] are not unique (a mistake?). > yup, 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 > That's absolutely fantastic. Right now, I have to use PyMOL, MOE and AMBER (sander and carnal are the real problems) on the same systems, and anything that makes this less painful is great! I'll probably set retain_order and pdb_retain_ids in my .pymolrc.py and upgrade to the CVS version within the next couple of days. Thanks! -michael -- michael lerner |
From: Warren L. D. <wa...@de...> - 2003-10-03 16:49:03
|
> >Also note that by some conventions, "2OA2" in a PDB file really means > >atom "OA22". > > > I didn't know that. What conventions are those? Well, PDB atom names are supposed to have the atomic symbol right justified in the first two columns followed by a remoteness indicator and then a branching number. However, that isn't a sufficient number of fields for all situations, such as when significant symmetry is present in a system, and so a third field is required. This numeric field occupies the first column when the atom symbol itself is only one character. With hydrogens, this first numeric field has the additional defined purpose of enumerating (NMR?) equivalent hydrogens, so you will see atoms like "2HD" and "3HD" in ARG for instance. However, in the Amber world, the atomic symbol always comes first. Thus a PDB hydrogen 2HH2 becomes HH22 in Amber. Going from PDB to Amber is easy, but the reverse is not trivial, since Amber "CD1" remains PDB "CD1", but Amber "HE2" becomes "2HE" and "HH22" becomes "2HH2". Ambiguity occurs when there is a four-letter atom name which is not a hydrogen. "OA22" in Amber would thus need to become "2OA2" in order to comply with the PDB convention of having the Atomic symbol right justified in the first two columns of the file. However, that convention is only explicitly enforced for amino acids, so in theory "OA22" would be legal for a non-amino acid, whereas "2OA2" is required if the residue is an amino acid. What a mess! Cheers, Warren -- mailto:wa...@de... Warren L. DeLano, Ph.D. Principal Scientist DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 > >Also note that by some conventions, "2OA2" in a PDB file really means > >atom "OA22". > > > I didn't know that. What conventions are those? > > >Furthermore, in your example, they [ATOM IDs] are not unique (a > mistake?). > > > yup, 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 > > > That's absolutely fantastic. Right now, I have to use PyMOL, MOE and > AMBER (sander and carnal are the real problems) on the same systems, and > anything that makes this less painful is great! I'll probably set > retain_order and pdb_retain_ids in my .pymolrc.py and upgrade to the CVS > version within the next couple of days. > > Thanks! > > -michael > -- > michael lerner > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > PyMOL-users mailing list > PyM...@li... > https://lists.sourceforge.net/lists/listinfo/pymol-users |