From: <272...@qq...> - 2020-08-30 21:58:41
|
I load a protein.pdb file into Pymol. This file has multiple frames (or states), and with different b-factor values at different frames at the PDB file b-factor columns. After running the "spectrum b" command, the colouring is only based on the last state of the object. So can I colour the frames differently using their corresponding b-factor values? In that case, I can see the colour changing throughout the frame playing. |
From: Mooers, B. H.M. (HSC) <Bla...@ou...> - 2020-08-31 10:14:04
|
Hi ZHANG Cheng, Did you try? set all_states, on;spectrum b Another approach would to split the states into separate objects and then apply the spectrum command to each object. split_states protein.pdb; prefix=test;spectrum b,,test* Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 ________________________________________ From: ZHANG Cheng [272...@qq...] Sent: Sunday, August 30, 2020 4:40 PM To: pymol-users Subject: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? I load a protein.pdb file into Pymol. This file has multiple frames (or states), and with different b-factor values at different frames at the PDB file b-factor columns. After running the "spectrum b" command, the colouring is only based on the last state of the object. So can I colour the frames differently using their corresponding b-factor values? In that case, I can see the colour changing throughout the frame playing. |
From: <272...@qq...> - 2020-08-31 10:56:53
|
Hi Blaine, Thank you for your suggestion. "set all_states, on" could not work. For splitting the object, it is an alternatve. But I have 1000 frames in the object, and I want to show a movie by playing the frames. Best Cheng ------------------ Original ------------------ From: "Mooers, Blaine H.M. (HSC)" <Bla...@ou...>; Date: Mon, Aug 31, 2020 06:13 PM To: "ZHANG Cheng"<272...@qq...>;"pymol-users"<pym...@li...>; Subject: RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Hi ZHANG Cheng, Did you try? set all_states, on;spectrum b Another approach would to split the states into separate objects and then apply the spectrum command to each object. split_states protein.pdb; prefix=test;spectrum b,,test* Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 ________________________________________ From: ZHANG Cheng [272...@qq...] Sent: Sunday, August 30, 2020 4:40 PM To: pymol-users Subject: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? I load a protein.pdb file into Pymol. This file has multiple frames (or states), and with different b-factor values at different frames at the PDB file b-factor columns. After running the "spectrum b" command, the colouring is only based on the last state of the object. So can I colour the frames differently using their corresponding b-factor values? In that case, I can see the colour changing throughout the frame playing. |
From: Mooers, B. H.M. (HSC) <Bla...@ou...> - 2020-08-31 13:05:30
|
Dear Cheng, Please note that the original split_states code that I posted has a typo (the dangers of posting a reply before dawn!) The semicolon after pdb should be a comma. split_states protein, prefix=test; Thank you Tamas for the pseudo code for iterating the application of spectrum!!! After applying the spectrum with Tamas's code, you will want to combine the 1000 objects into one file. join_states multitest, (test*) And then you will want to save the multistate object multisave multitest.pdb,multitest,0 Best regards, Blaine Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 ________________________________________ From: ZHANG Cheng [272...@qq...] Sent: Monday, August 31, 2020 5:56 AM To: Mooers, Blaine H.M. (HSC); pymol-users Subject: Re:RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Hi Blaine, Thank you for your suggestion. "set all_states, on" could not work. For splitting the object, it is an alternatve. But I have 1000 frames in the object, and I want to show a movie by playing the frames. Best Cheng ------------------ Original ------------------ From: "Mooers, Blaine H.M. (HSC)" <Bla...@ou...>; Date: Mon, Aug 31, 2020 06:13 PM To: "ZHANG Cheng"<272...@qq...>;"pymol-users"<pym...@li...>; Subject: RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Hi ZHANG Cheng, Did you try? set all_states, on;spectrum b Another approach would to split the states into separate objects and then apply the spectrum command to each object. split_states protein.pdb; prefix=test;spectrum b,,test* Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 ________________________________________ From: ZHANG Cheng [272...@qq...] Sent: Sunday, August 30, 2020 4:40 PM To: pymol-users Subject: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? I load a protein.pdb file into Pymol. This file has multiple frames (or states), and with different b-factor values at different frames at the PDB file b-factor columns. After running the "spectrum b" command, the colouring is only based on the last state of the object. So can I colour the frames differently using their corresponding b-factor values? In that case, I can see the colour changing throughout the frame playing. |
From: Tamas H. <bio...@gm...> - 2020-08-31 11:55:11
|
You may write and use a script after splitting the object. a pseudo code: for i in range(1, 1001): spectrum b, rainbow, frame_i enable frame_i sleep sometime disable frame_i On 8/31/20 12:56 PM, ZHANG Cheng wrote: > Hi Blaine, > > Thank you for your suggestion. "set all_states, on" could not work. > > For splitting the object, it is an alternatve. But I have 1000 frames > in the object, and I want to show a movie by playing the frames. > > Best > Cheng > > > ------------------ Original ------------------ > *From:* "Mooers, Blaine H.M. (HSC)" <Bla...@ou...>; > *Date:* Mon, Aug 31, 2020 06:13 PM > *To:* "ZHANG > Cheng"<272...@qq...>;"pymol-users"<pym...@li...>; > *Subject:* RE: [EXTERNAL] [PyMOL] How to color based on b-factor for > all the frames in one object in Pymol? > > Hi ZHANG Cheng, > > Did you try? > > set all_states, on;spectrum b > > Another approach would to split the states into separate objects and > then apply the > spectrum command to each object. > > split_states protein.pdb; prefix=test;spectrum b,,test* > > Best regards, > > Blaine > > Blaine Mooers, Ph.D. > Associate Professor > Department of Biochemistry and Molecular Biology > College of Medicine > University of Oklahoma Health Sciences Center > S.L. Young Biomedical Research Center (BRC) Rm. 466 > 975 NE 10th Street, BRC 466 > Oklahoma City, OK 73104-5419 > > ________________________________________ > From: ZHANG Cheng [272...@qq...] > Sent: Sunday, August 30, 2020 4:40 PM > To: pymol-users > Subject: [EXTERNAL] [PyMOL] How to color based on b-factor for all the > frames in one object in Pymol? > > I load a protein.pdb file into Pymol. This file has multiple frames > (or states), and with different b-factor values at different frames at > the PDB file b-factor columns. > > After running the "spectrum b" command, the colouring is only based on > the last state of the object. > > So can I colour the frames differently using their corresponding > b-factor values? In that case, I can see the colour changing > throughout the frame playing. > > > > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe |
From: Tamas H. <bio...@gm...> - 2020-08-31 12:22:41
|
you can also try not to split and set/activate the given frame in the for loop it could happen that spectrum works on the active frame (which was the last one in your case) https://pymolwiki.org/index.php/Frame On 8/31/20 2:16 PM, ZHANG Cheng wrote: > Thank you, this could be a solution. I would still like not splitting > the object if possible. > On 8/31/20 1:54 PM, Tamas Hegedus wrote: > You may write and use a script after splitting the object. > > a pseudo code: > > for i in range(1, 1001): > spectrum b, rainbow, frame_i > enable frame_i > sleep sometime > disable frame_i > > On 8/31/20 12:56 PM, ZHANG Cheng wrote: >> Hi Blaine, >> >> Thank you for your suggestion. "set all_states, on" could not work. >> >> For splitting the object, it is an alternatve. But I have 1000 frames >> in the object, and I want to show a movie by playing the frames. >> >> Best >> Cheng >> >> >> ------------------ Original ------------------ >> *From:* "Mooers, Blaine H.M. (HSC)" <Bla...@ou...>; >> *Date:* Mon, Aug 31, 2020 06:13 PM >> *To:* "ZHANG >> Cheng"<272...@qq...>;"pymol-users"<pym...@li...>; >> *Subject:* RE: [EXTERNAL] [PyMOL] How to color based on b-factor for >> all the frames in one object in Pymol? >> >> Hi ZHANG Cheng, >> >> Did you try? >> >> set all_states, on;spectrum b >> >> Another approach would to split the states into separate objects and >> then apply the >> spectrum command to each object. >> >> split_states protein.pdb; prefix=test;spectrum b,,test* >> >> Best regards, >> >> Blaine >> >> Blaine Mooers, Ph.D. >> Associate Professor >> Department of Biochemistry and Molecular Biology >> College of Medicine >> University of Oklahoma Health Sciences Center >> S.L. Young Biomedical Research Center (BRC) Rm. 466 >> 975 NE 10th Street, BRC 466 >> Oklahoma City, OK 73104-5419 >> >> ________________________________________ >> From: ZHANG Cheng [272...@qq...] >> Sent: Sunday, August 30, 2020 4:40 PM >> To: pymol-users >> Subject: [EXTERNAL] [PyMOL] How to color based on b-factor for all >> the frames in one object in Pymol? >> >> I load a protein.pdb file into Pymol. This file has multiple frames >> (or states), and with different b-factor values at different frames >> at the PDB file b-factor columns. >> >> After running the "spectrum b" command, the colouring is only based >> on the last state of the object. >> >> So can I colour the frames differently using their corresponding >> b-factor values? In that case, I can see the colour changing >> throughout the frame playing. >> >> >> >> _______________________________________________ >> PyMOL-users mailing list >> Archives:http://www.mail-archive.com/pym...@li... >> Unsubscribe:https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe > |
From: <272...@qq...> - 2020-08-31 12:58:44
|
Dear Blaine, I tried "split_states protein, prefix=test", it can output multiple objects, with each object having 1 frame. However, when each object (test0001, test0002, ...) is saved as PDB, I found that the b-factor values are all the same as the last frame of the protein.pdb. Best Cheng ------------------ Original ------------------ From: "Mooers, Blaine H.M. (HSC)" <Bla...@ou...>; Date: Mon, Aug 31, 2020 08:29 PM To: "ZHANG Cheng"<272...@qq...>;"pymol-users"<pym...@li...>; Subject: RE: Re:RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Dear Cheng, Please note that the original split_states code that I posted has a typo (the dangers of posting a reply before dawn!) The semicolon after pdb should be a comma. split_states protein, prefix=test; Thank you Tamas for the pseudo code for iterating the application of spectrum!!! After applying the spectrum with Tamas's code, you will want to combine the 1000 objects into one file. join_states multitest, (test*) And then you will want to save the multistate object multisave multitest.pdb,multitest,0 Best regards, Blaine Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 ________________________________________ From: ZHANG Cheng [272...@qq...] Sent: Monday, August 31, 2020 5:56 AM To: Mooers, Blaine H.M. (HSC); pymol-users Subject: Re:RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Hi Blaine, Thank you for your suggestion. "set all_states, on" could not work. For splitting the object, it is an alternatve. But I have 1000 frames in the object, and I want to show a movie by playing the frames. Best Cheng ------------------ Original ------------------ From: "Mooers, Blaine H.M. (HSC)" <Bla...@ou...>; Date: Mon, Aug 31, 2020 06:13 PM To: "ZHANG Cheng"<272...@qq...>;"pymol-users"<pym...@li...>; Subject: RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Hi ZHANG Cheng, Did you try? set all_states, on;spectrum b Another approach would to split the states into separate objects and then apply the spectrum command to each object. split_states protein.pdb; prefix=test;spectrum b,,test* Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 ________________________________________ From: ZHANG Cheng [272...@qq...] Sent: Sunday, August 30, 2020 4:40 PM To: pymol-users Subject: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? I load a protein.pdb file into Pymol. This file has multiple frames (or states), and with different b-factor values at different frames at the PDB file b-factor columns. After running the "spectrum b" command, the colouring is only based on the last state of the object. So can I colour the frames differently using their corresponding b-factor values? In that case, I can see the colour changing throughout the frame playing. |
From: <272...@qq...> - 2020-08-31 13:35:48
|
Also, "join_states multitest, (test*)" could not achieve the purpose. The multiple objects can be combined into one object, but the b-factor in this object is all the same as the last frame. ------------------ Original ------------------ From: "ZHANG Cheng" <272...@qq...>; Date: Mon, Aug 31, 2020 08:58 PM To: "Mooers, Blaine H.M. (HSC)"<Bla...@ou...>;"pymol-users"<pym...@li...>; Subject: Re:RE: Re:RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Dear Blaine, I tried "split_states protein, prefix=test", it can output multiple objects, with each object having 1 frame. However, when each object (test0001, test0002, ...) is saved as PDB, I found that the b-factor values are all the same as the last frame of the protein.pdb. Best Cheng ------------------ Original ------------------ From: "Mooers, Blaine H.M. (HSC)" <Bla...@ou...>; Date: Mon, Aug 31, 2020 08:29 PM To: "ZHANG Cheng"<272...@qq...>;"pymol-users"<pym...@li...>; Subject: RE: Re:RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Dear Cheng, Please note that the original split_states code that I posted has a typo (the dangers of posting a reply before dawn!) The semicolon after pdb should be a comma. split_states protein, prefix=test; Thank you Tamas for the pseudo code for iterating the application of spectrum!!! After applying the spectrum with Tamas's code, you will want to combine the 1000 objects into one file. join_states multitest, (test*) And then you will want to save the multistate object multisave multitest.pdb,multitest,0 Best regards, Blaine Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 ________________________________________ From: ZHANG Cheng [272...@qq...] Sent: Monday, August 31, 2020 5:56 AM To: Mooers, Blaine H.M. (HSC); pymol-users Subject: Re:RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Hi Blaine, Thank you for your suggestion. "set all_states, on" could not work. For splitting the object, it is an alternatve. But I have 1000 frames in the object, and I want to show a movie by playing the frames. Best Cheng ------------------ Original ------------------ From: "Mooers, Blaine H.M. (HSC)" <Bla...@ou...>; Date: Mon, Aug 31, 2020 06:13 PM To: "ZHANG Cheng"<272...@qq...>;"pymol-users"<pym...@li...>; Subject: RE: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? Hi ZHANG Cheng, Did you try? set all_states, on;spectrum b Another approach would to split the states into separate objects and then apply the spectrum command to each object. split_states protein.pdb; prefix=test;spectrum b,,test* Best regards, Blaine Blaine Mooers, Ph.D. Associate Professor Department of Biochemistry and Molecular Biology College of Medicine University of Oklahoma Health Sciences Center S.L. Young Biomedical Research Center (BRC) Rm. 466 975 NE 10th Street, BRC 466 Oklahoma City, OK 73104-5419 ________________________________________ From: ZHANG Cheng [272...@qq...] Sent: Sunday, August 30, 2020 4:40 PM To: pymol-users Subject: [EXTERNAL] [PyMOL] How to color based on b-factor for all the frames in one object in Pymol? I load a protein.pdb file into Pymol. This file has multiple frames (or states), and with different b-factor values at different frames at the PDB file b-factor columns. After running the "spectrum b" command, the colouring is only based on the last state of the object. So can I colour the frames differently using their corresponding b-factor values? In that case, I can see the colour changing throughout the frame playing. |