Re: [PyMOL] when number of atoms changes, colors change in an uncontrolled manner
Hi Efrem, your PDB file doesn't have any atomic identifiers, except the ID column. The atom ID is not used to match atoms when loading multiple models, but basically all other atomic identifiers are (segi, chain, resi, resn, name). So if you assign for example a unique residue number (resi) to every atom, your file should load correct. You can copy the ID column to the resi column in your PDB file with this Python program: import sys for line in open('test.pdb'): if line.startswith('ATOM '): line = line[:22] + line[7:11] + line[26:] sys.stdout.write(line) Hope that helps. Cheers, Thomas On 30 Mar 2015, at 14:15, Efrem Braun efrem.br...@gmail.com wrote: Carsten, Yes, the same behavior results. I did: set auto_color, off load test.pdb set auto_color, off And the colors remained. (I set auto_color to off twice just to be sure). Efrem Braun On Mon, Mar 30, 2015 at 11:04 AM, Schubert, Carsten [JRDUS] cschu...@its.jnj.com wrote: Hi Efrem, do you still see the same behavior if you disable automatic change of colors when loading your PDBs? The relevant setting would be auto_color set to off. Does not quite answer your question, but could be a work-around. HTH Carsten From: Efrem Braun [mailto:efrem.br...@gmail.com] Sent: Friday, March 27, 2015 3:19 PM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] when number of atoms changes, colors change in an uncontrolled manner Hello, I'm running a Monte Carlo simulations in which the number of atoms in my simulation box changes over the course of the simulation. I print all atoms as Hydrogen, so the colors of them should all be white. When I load the resulting pdb file into PyMOL, the first frame has all atoms colored white, but by frame 3 some of the atoms have turned black, by frame 9 some atoms have turned orange or blue, and by frame 15 lots of purple atoms show up (the purple atoms disappear in frame 16 and reappear in frame 17 along with a whole bunch of other colors). I tried to troubleshoot this by typing iterate all, print color. It printed 29 for the 219 atoms it iterated over (at no frame does my simulation box contain 219 atoms; the first 10 frames contain 200, 206, 209, 213, 206, 209, 221, 238, 235, and 253 atoms, and the last 10 all contain more than 253 atoms). Since it doesn't appear to be iterating over all atoms, I suspect this indicates what the problem is, but I can't figure it out. I put frame 20 into its own pdb file and displayed it in pymol, and it displayed all 428 atoms as white. So the problem definitely appears to be coming from the fact that the number of atoms in the box is changing. With simulations in which the number of atoms remains constant, I've never had this problem. This occurs both when I run on Linux (Version 1.7.0.0) or on a Mac (Version 1.7.2.1). Any help would be greatly appreciated. Both pdb files are attached. Efrem Braun -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] when number of atoms changes, colors change in an uncontrolled manner
That works! Thanks! Efrem Braun On Wed, Apr 8, 2015 at 1:49 PM, Thomas Holder thomas.hol...@schrodinger.com wrote: Hi Efrem, your PDB file doesn't have any atomic identifiers, except the ID column. The atom ID is not used to match atoms when loading multiple models, but basically all other atomic identifiers are (segi, chain, resi, resn, name). So if you assign for example a unique residue number (resi) to every atom, your file should load correct. You can copy the ID column to the resi column in your PDB file with this Python program: import sys for line in open('test.pdb'): if line.startswith('ATOM '): line = line[:22] + line[7:11] + line[26:] sys.stdout.write(line) Hope that helps. Cheers, Thomas On 30 Mar 2015, at 14:15, Efrem Braun efrem.br...@gmail.com wrote: Carsten, Yes, the same behavior results. I did: set auto_color, off load test.pdb set auto_color, off And the colors remained. (I set auto_color to off twice just to be sure). Efrem Braun On Mon, Mar 30, 2015 at 11:04 AM, Schubert, Carsten [JRDUS] cschu...@its.jnj.com wrote: Hi Efrem, do you still see the same behavior if you disable automatic change of colors when loading your PDBs? The relevant setting would be auto_color set to off. Does not quite answer your question, but could be a work-around. HTH Carsten From: Efrem Braun [mailto:efrem.br...@gmail.com] Sent: Friday, March 27, 2015 3:19 PM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] when number of atoms changes, colors change in an uncontrolled manner Hello, I'm running a Monte Carlo simulations in which the number of atoms in my simulation box changes over the course of the simulation. I print all atoms as Hydrogen, so the colors of them should all be white. When I load the resulting pdb file into PyMOL, the first frame has all atoms colored white, but by frame 3 some of the atoms have turned black, by frame 9 some atoms have turned orange or blue, and by frame 15 lots of purple atoms show up (the purple atoms disappear in frame 16 and reappear in frame 17 along with a whole bunch of other colors). I tried to troubleshoot this by typing iterate all, print color. It printed 29 for the 219 atoms it iterated over (at no frame does my simulation box contain 219 atoms; the first 10 frames contain 200, 206, 209, 213, 206, 209, 221, 238, 235, and 253 atoms, and the last 10 all contain more than 253 atoms). Since it doesn't appear to be iterating over all atoms, I suspect this indicates what the problem is, but I can't figure it out. I put frame 20 into its own pdb file and displayed it in pymol, and it displayed all 428 atoms as white. So the problem definitely appears to be coming from the fact that the number of atoms in the box is changing. With simulations in which the number of atoms remains constant, I've never had this problem. This occurs both when I run on Linux (Version 1.7.0.0) or on a Mac (Version 1.7.2.1). Any help would be greatly appreciated. Both pdb files are attached. Efrem Braun -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] when number of atoms changes, colors change in an uncontrolled manner
Hi Efrem, do you still see the same behavior if you disable automatic change of colors when loading your PDBs? The relevant setting would be auto_color set to off. Does not quite answer your question, but could be a work-around. HTH Carsten From: Efrem Braun [mailto:efrem.br...@gmail.com] Sent: Friday, March 27, 2015 3:19 PM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] when number of atoms changes, colors change in an uncontrolled manner Hello, I'm running a Monte Carlo simulations in which the number of atoms in my simulation box changes over the course of the simulation. I print all atoms as Hydrogen, so the colors of them should all be white. When I load the resulting pdb file into PyMOL, the first frame has all atoms colored white, but by frame 3 some of the atoms have turned black, by frame 9 some atoms have turned orange or blue, and by frame 15 lots of purple atoms show up (the purple atoms disappear in frame 16 and reappear in frame 17 along with a whole bunch of other colors). I tried to troubleshoot this by typing iterate all, print color. It printed 29 for the 219 atoms it iterated over (at no frame does my simulation box contain 219 atoms; the first 10 frames contain 200, 206, 209, 213, 206, 209, 221, 238, 235, and 253 atoms, and the last 10 all contain more than 253 atoms). Since it doesn't appear to be iterating over all atoms, I suspect this indicates what the problem is, but I can't figure it out. I put frame 20 into its own pdb file and displayed it in pymol, and it displayed all 428 atoms as white. So the problem definitely appears to be coming from the fact that the number of atoms in the box is changing. With simulations in which the number of atoms remains constant, I've never had this problem. This occurs both when I run on Linux (Version 1.7.0.0) or on a Mac (Version 1.7.2.1). Any help would be greatly appreciated. Both pdb files are attached. Efrem Braun -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] when number of atoms changes, colors change in an uncontrolled manner
Carsten, Yes, the same behavior results. I did: set auto_color, off load test.pdb set auto_color, off And the colors remained. (I set auto_color to off twice just to be sure). Efrem Braun On Mon, Mar 30, 2015 at 11:04 AM, Schubert, Carsten [JRDUS] cschu...@its.jnj.com wrote: Hi Efrem, do you still see the same behavior if you disable automatic change of colors when loading your PDBs? The relevant setting would be auto_color set to off. Does not quite answer your question, but could be a work-around. HTH Carsten *From:* Efrem Braun [mailto:efrem.br...@gmail.com] *Sent:* Friday, March 27, 2015 3:19 PM *To:* pymol-users@lists.sourceforge.net *Subject:* [PyMOL] when number of atoms changes, colors change in an uncontrolled manner Hello, I'm running a Monte Carlo simulations in which the number of atoms in my simulation box changes over the course of the simulation. I print all atoms as Hydrogen, so the colors of them should all be white. When I load the resulting pdb file into PyMOL, the first frame has all atoms colored white, but by frame 3 some of the atoms have turned black, by frame 9 some atoms have turned orange or blue, and by frame 15 lots of purple atoms show up (the purple atoms disappear in frame 16 and reappear in frame 17 along with a whole bunch of other colors). I tried to troubleshoot this by typing iterate all, print color. It printed 29 for the 219 atoms it iterated over (at no frame does my simulation box contain 219 atoms; the first 10 frames contain 200, 206, 209, 213, 206, 209, 221, 238, 235, and 253 atoms, and the last 10 all contain more than 253 atoms). Since it doesn't appear to be iterating over all atoms, I suspect this indicates what the problem is, but I can't figure it out. I put frame 20 into its own pdb file and displayed it in pymol, and it displayed all 428 atoms as white. So the problem definitely appears to be coming from the fact that the number of atoms in the box is changing. With simulations in which the number of atoms remains constant, I've never had this problem. This occurs both when I run on Linux (Version 1.7.0.0) or on a Mac (Version 1.7.2.1). Any help would be greatly appreciated. Both pdb files are attached. Efrem Braun -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net