Re: [PyMOL] Cartoon visualization of per-residue txt data
Hi James, ss is a reserved keyword of the selection language, so you should not use it as the name of an object or selection. Cheers, Thomas On 12 Apr 2015, at 09:24, James Starlight jmsstarli...@gmail.com wrote: and also a question- how it would be possible to do something with the selection based on the b-factors e.g PyMOLselect ss, b -0.2 Selector: selection ss defined with 119 atoms. than I've tried to make visualization of the residues within the ss to display residues names from the label context menu, which resulted in the Selector-Error: Misplaced ). Selector-Error: Malformed selection. ( ss )-- Selector-Error: Misplaced ). Selector-Error: Malformed selection. also I've tried just to copy 'ss' to new object: ( ( name CA+C1*+C1' and ( byres ( ss )-- Selector-Error: Misplaced ). Selector-Error: Malformed selection. ( ss )-- James -- 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] Cartoon visualization of per-residue txt data
Hi Tsjerk, the interesting option for coloring which I found to set sensitivity of the visualization in my case: spectrum b, red_orange_white, minimum=-1, maximum=0.1 are there any same commands to set transparency level according to the B-factor value? Here the issue is with the proper selection E.g PyMOLselect not-relevent, b 0 results only in small atoms selected and PyMOLselect ss, b = 0 Selector-Error: Invalid selection. b-- Regards, James 2015-04-10 21:12 GMT+02:00 Tsjerk Wassenaar tsje...@gmail.com: Hi James, The selection keyword 'b' exists for just that purpose: to make selections based on the b-factor value. color red, b 0 Cheers, Tsjerk On Fri, Apr 10, 2015 at 5:19 PM, James Starlight jmsstarli...@gmail.com wrote: some specification regarding B-factors visualization for my task: is it possible within the open pymol session 1) to select only residues with non-zero B-factors as specified selection (here I would like to present it as the stics and display it names as the label) 2) to define residues with zero B-factors as another specified selection (for those one I'd like to apply specified color filter for instance and transparency as for not relevant in my case) Thanks! J 2015-04-10 15:27 GMT+02:00 James Starlight jmsstarli...@gmail.com: Hi Osvaldo and thank you very much- it works perfect! The only question which I have- is it possible to modify existing color-pattern of the B-factor colouring (from the spectrum visualization)? for instance I need to colour by white all residues with 0.0 B-factors and as the rainbow from cold to hot gradient residues with non-zero B-factors: where residues with most negative values should correspond to the hot colours, and with positive - to cold (because here this valus in fact correspond to the binding free energy so more negative- better contribution to dG). Thanks again, James 2015-04-10 14:44 GMT+02:00 Osvaldo Martin aloctavo...@gmail.com: Hi James, cmd.alter() is not working because you forget the to add the . You can use PyMol as a regular Python library, write an script and then run it, from the command line, as: python my_script.py Your script should looks like the following: import __main__ __main__.pymol_argv = ['pymol','-qc'] # Pymol: quiet and no GUI import pymol from pymol import cmd, stored pymol.finish_launching() import other_useful_library cmd.load(OR5P3_androstenone.pdb) # open the file of new values (just 1 column of numbers, one for each alpha carbon) inFile = open(OR5P3_androstenone.dat, 'r') # create the global, stored array newB = [] # read the new B factors from file for line in inFile.readlines(): newB.append( float(line) ) # close the input file inFile.close() # clear out the old B Factors cmd.alter(OR5P3_androstenone, b=0.0) # update the B Factors with new properties cmd.alter(OR5P3_androstenone and n. CA, b=newB.pop(0)) # color the protein based on the new B Factors of the alpha carbons cmd.spectrum(b, OR5P3_androstenone and n. CA) # save new pdb cmd.save(OR5P3_androstenone_newBFactors.pdb, OR5P3_androstenone) Cheers, Osvaldo. On Fri, Apr 10, 2015 at 9:03 AM, James Starlight jmsstarli...@gmail.com wrote: so to be more precise the issue is how to adapt the following script (which used python interpetator directly from pymol to change B-factors within loaded pdb) to use it as the external script loaded from command line e.g pymol -r script.py # here the code what should I to adapt: cmd.load(OR5P3_androstenone.pdb) # open the file of new values (just 1 column of numbers, one for each alpha carbon) inFile = open(OR5P3_androstenone.dat, 'r') # create the global, stored array newB = [] # read the new B factors from file for line in inFile.readlines(): newB.append( float(line) ) # close the input file inFile.close() # clear out the old B Factors cmd.alter(OR5P3_androstenone, b=0.0) # update the B Factors with new properties cmd.alter(OR5P3_androstenone and n. CA, b=newB.pop(0)) # color the protein based on the new B Factors of the alpha carbons cmd.spectrum(b, OR5P3_androstenone and n. CA) # save new pdb cmd.save(OR5P3_androstenone_newBFactors.pdb, OR5P3_androstenone) # so as you can see here I tried to move some pynol command like alter to the cmd.alter with its options but the script didn't worked. J. 2015-04-09 16:52 GMT+02:00 James Starlight jmsstarli...@gmail.com: also to specify: I've already done this for one pdb and one dat file using just sequence command from the pymol with loaded protA.pdb inFile = open(./test.dat, 'r') # create the global, stored array stored.newB = [] # read the new B factors from file for line in inFile.readlines(): stored.newB.append( float(line) ) # close the input file inFile.close() #
Re: [PyMOL] Pymol molecular visualisation
Thanks ! still have not found solution for grid-mode display: 1- I need to show names of each opened object near its cartoon 2- I need to increase spacing of grid border (m.b like just empty space)- to better discriminate between opened objects in case of its high zooming J 2015-04-11 14:51 GMT+02:00 João M. Damas jmda...@itqb.unl.pt: 1- See http://www.pymolwiki.org/index.php/Ray_Trace_Gain. However, from my experience, I don't think the setting works too well, so what I usually do is to increase the resolution of the raytrace, which makes the black outline thinner. On Fri, Apr 10, 2015 at 4:48 PM, James Starlight jmsstarli...@gmail.com wrote: Dear Pymol users! Here I will ask some question regarding visualization issues in pymol. 1- Using ray_trace_mode, 1 I need to decrease at least twisty width of black countour line (especially in the loop segments). 2- Being in the split mode (visualization of the several objects on one screen) I need to show title of each of the objects somewhere near of its cartoon area (e,g in right upper corner)- just to know on the produced picture names of the corresponded cartoon. 3- Also please have a look on my another topic regarding visualization of B-factor gradients: actually I need to revert its existing color pattern and select residues according to it's actual B-factor values (E.g with B-factor=0, with negative and/or positive) for its subsequent selective visualization. Thanks a lot for the advises! -- 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 -- João M. Damas PhD Student Protein Modelling Group ITQB-UNL, Oeiras, Portugal Tel:+351-214469613 -- 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] Cartoon visualization of per-residue txt data
and also a question- how it would be possible to do something with the selection based on the b-factors e.g PyMOLselect ss, b -0.2 Selector: selection ss defined with 119 atoms. than I've tried to make visualization of the residues within the ss to display residues names from the label context menu, which resulted in the Selector-Error: Misplaced ). Selector-Error: Malformed selection. ( ss )-- Selector-Error: Misplaced ). Selector-Error: Malformed selection. also I've tried just to copy 'ss' to new object: ( ( name CA+C1*+C1' and ( byres ( ss )-- Selector-Error: Misplaced ). Selector-Error: Malformed selection. ( ss )-- James 2015-04-12 15:12 GMT+02:00 James Starlight jmsstarli...@gmail.com: Hi Tsjerk, the interesting option for coloring which I found to set sensitivity of the visualization in my case: spectrum b, red_orange_white, minimum=-1, maximum=0.1 are there any same commands to set transparency level according to the B-factor value? Here the issue is with the proper selection E.g PyMOLselect not-relevent, b 0 results only in small atoms selected and PyMOLselect ss, b = 0 Selector-Error: Invalid selection. b-- Regards, James 2015-04-10 21:12 GMT+02:00 Tsjerk Wassenaar tsje...@gmail.com: Hi James, The selection keyword 'b' exists for just that purpose: to make selections based on the b-factor value. color red, b 0 Cheers, Tsjerk On Fri, Apr 10, 2015 at 5:19 PM, James Starlight jmsstarli...@gmail.com wrote: some specification regarding B-factors visualization for my task: is it possible within the open pymol session 1) to select only residues with non-zero B-factors as specified selection (here I would like to present it as the stics and display it names as the label) 2) to define residues with zero B-factors as another specified selection (for those one I'd like to apply specified color filter for instance and transparency as for not relevant in my case) Thanks! J 2015-04-10 15:27 GMT+02:00 James Starlight jmsstarli...@gmail.com: Hi Osvaldo and thank you very much- it works perfect! The only question which I have- is it possible to modify existing color-pattern of the B-factor colouring (from the spectrum visualization)? for instance I need to colour by white all residues with 0.0 B-factors and as the rainbow from cold to hot gradient residues with non-zero B-factors: where residues with most negative values should correspond to the hot colours, and with positive - to cold (because here this valus in fact correspond to the binding free energy so more negative- better contribution to dG). Thanks again, James 2015-04-10 14:44 GMT+02:00 Osvaldo Martin aloctavo...@gmail.com: Hi James, cmd.alter() is not working because you forget the to add the . You can use PyMol as a regular Python library, write an script and then run it, from the command line, as: python my_script.py Your script should looks like the following: import __main__ __main__.pymol_argv = ['pymol','-qc'] # Pymol: quiet and no GUI import pymol from pymol import cmd, stored pymol.finish_launching() import other_useful_library cmd.load(OR5P3_androstenone.pdb) # open the file of new values (just 1 column of numbers, one for each alpha carbon) inFile = open(OR5P3_androstenone.dat, 'r') # create the global, stored array newB = [] # read the new B factors from file for line in inFile.readlines(): newB.append( float(line) ) # close the input file inFile.close() # clear out the old B Factors cmd.alter(OR5P3_androstenone, b=0.0) # update the B Factors with new properties cmd.alter(OR5P3_androstenone and n. CA, b=newB.pop(0)) # color the protein based on the new B Factors of the alpha carbons cmd.spectrum(b, OR5P3_androstenone and n. CA) # save new pdb cmd.save(OR5P3_androstenone_newBFactors.pdb, OR5P3_androstenone) Cheers, Osvaldo. On Fri, Apr 10, 2015 at 9:03 AM, James Starlight jmsstarli...@gmail.com wrote: so to be more precise the issue is how to adapt the following script (which used python interpetator directly from pymol to change B-factors within loaded pdb) to use it as the external script loaded from command line e.g pymol -r script.py # here the code what should I to adapt: cmd.load(OR5P3_androstenone.pdb) # open the file of new values (just 1 column of numbers, one for each alpha carbon) inFile = open(OR5P3_androstenone.dat, 'r') # create the global, stored array newB = [] # read the new B factors from file for line in inFile.readlines(): newB.append( float(line) ) # close the input file inFile.close() # clear out the old B Factors cmd.alter(OR5P3_androstenone, b=0.0) # update the B Factors with new properties cmd.alter(OR5P3_androstenone and n. CA, b=newB.pop(0)) # color the protein based on the new B Factors of the alpha carbons cmd.spectrum(b, OR5P3_androstenone