[PyMOL] need more info
Hello, First, thanks a lot for your help. Pymol with cctbx works now for me. I changed the script "pymol" and replaced "/usr/binpython" to "python" and thats it. Few more questions: (i) draw_cell.py uses lavv.pdb as an example. Where can I find this pdb file ? Basically, I am making my own pdb file for a crystal system, the file lavv.pdb can help me figure out how to put crystal information in my own pdb file. (ii) I used "draw_cell_param" command to put crystal information at command prompt. Then I wanted to change radius, etc. How to undo what has already be drawn so that I can re-sketch ? Or killing the pymol, starting it again, and loading everything again is the only option ? Similarly, is there a way to turn off labels ? (iii) For the same reason as stated above, I would like to know how to get the file for 2x19 ? When I issue the command "fetch 2x19" it draws a structure. Where is the pdb file for it and how to get it to my computer ? Please let me know. -- Thank you and Regards, Vivek Ranjan -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ 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] need more info
Hello Vivek, On Tue, 13 Jul 2010 11:21:03 -0400 Vivek Ranjan wrote: > Hello, > > First, thanks a lot for your help. Pymol with cctbx works now for me. > I changed the script "pymol" and replaced "/usr/binpython" to "python" > and thats it. Few more questions: > > (i) draw_cell.py uses lavv.pdb as an example. Where can I find this > pdb file ? Basically, I am making my own pdb file for a crystal > system, the file lavv.pdb can help me figure out how to put crystal > information in my own pdb file. That would be "1avv" not "lavv". All PDB structure codes begin with a number. You could use "fetch 1avv" to get it, but I guess you know that. > (ii) I used "draw_cell_param" command to put crystal information at > command prompt. Then I wanted to change radius, etc. How to undo what > has already be drawn so that I can re-sketch ? Or killing the pymol, > starting it again, and loading everything again is the only option ? > Similarly, is there a way to turn off labels ? The only way to "undo" what you have done is to delete the objects created by draw_cell_param (or similarly with draw_cell) and rerun the draw_cell_param function. You'll find the delete function under the "A" menu next to the object name or simply type "delete cell*" to delete all objects whose name begins with "cell". As far as the labels go, you'll note that two objects are created by the draw_cell function. One object is the cell border and the second is the labels. Simply click on the name of the labels and they will turn off. This is true of any object. > (iii) For the same reason as stated above, I would like to know how to > get the file for 2x19 ? When I issue the command "fetch 2x19" it draws > a structure. Where is the pdb file for it and how to get it to my > computer ? The fetch command should leave the 2x19.pdb file in the directory from which you started PyMOL. Cheers, Rob -- Robert L. Campbell, Ph.D. Senior Research Associate/Adjunct Assistant Professor Botterell Hall Rm 644 Department of Biochemistry, Queen's University, Kingston, ON K7L 3N6 Canada Tel: 613-533-6821Fax: 613-533-2497 http://pldserver1.biochem.queensu.ca/~rlc -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ 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] need more info
Thank you once again. I have been trying to change the color of the cell. cell = [] cell.append(CYLINDER) cell = cell + vert_000 + vert_100 + [radius] + [0,0,0] + [1,0,0] cell.append(CYLINDER) cell = cell + vert_000 + vert_010 + [radius] + [0,0,0] + [0,1,0] cell.append(CYLINDER) if I put cell.append(CYLINDER, [COLOR, 0, 0, 1]), pymol complains "TypeError: append() takes exactly one argument". If I add a line "cell.extend([COLOR, 0.0, 0.0, 1.0])" after the above cell.append(CYLINDER), nothing displays. There is also very little description of cgo on "http://pymol.sourceforge.net/newman/user/S0500cgo.html"; How to change the color of the cell ? What is append(), and extend() ? Is there a document that describes complete functionalities of CGO ? Basically, I would like learn how CGO, python, and openGL are connected within pymol. Please let me know. Thank you again, Vivek Ranjan On Tue, Jul 13, 2010 at 12:13 PM, Robert Campbell wrote: > Hello Vivek, > > On Tue, 13 Jul 2010 11:21:03 -0400 Vivek Ranjan wrote: > >> Hello, >> >> First, thanks a lot for your help. Pymol with cctbx works now for me. >> I changed the script "pymol" and replaced "/usr/binpython" to "python" >> and thats it. Few more questions: >> >> (i) draw_cell.py uses lavv.pdb as an example. Where can I find this >> pdb file ? Basically, I am making my own pdb file for a crystal >> system, the file lavv.pdb can help me figure out how to put crystal >> information in my own pdb file. > > That would be "1avv" not "lavv". All PDB structure codes begin with a number. > You could use "fetch 1avv" to get it, but I guess you know that. > >> (ii) I used "draw_cell_param" command to put crystal information at >> command prompt. Then I wanted to change radius, etc. How to undo what >> has already be drawn so that I can re-sketch ? Or killing the pymol, >> starting it again, and loading everything again is the only option ? >> Similarly, is there a way to turn off labels ? > > The only way to "undo" what you have done is to delete the objects created by > draw_cell_param (or similarly with draw_cell) and rerun the draw_cell_param > function. You'll find the delete function under the "A" menu next to the > object name or simply type "delete cell*" to delete all objects whose name > begins with "cell". > > As far as the labels go, you'll note that two objects are created by the > draw_cell function. One object is the cell border and the second is the > labels. Simply click on the name of the labels and they will turn off. This > is true of any object. > >> (iii) For the same reason as stated above, I would like to know how to >> get the file for 2x19 ? When I issue the command "fetch 2x19" it draws >> a structure. Where is the pdb file for it and how to get it to my >> computer ? > > The fetch command should leave the 2x19.pdb file in the directory from which > you started PyMOL. > > Cheers, > Rob > -- > Robert L. Campbell, Ph.D. > Senior Research Associate/Adjunct Assistant Professor > Botterell Hall Rm 644 > Department of Biochemistry, Queen's University, > Kingston, ON K7L 3N6 Canada > Tel: 613-533-6821 Fax: 613-533-2497 > http://pldserver1.biochem.queensu.ca/~rlc > > -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > ___ > 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 > -- Thank you and Regards, Vivek Ranjan -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ 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] need more info
Vivek, append and extend are Python functions. "cell = []" asks Python to create you a Python list and name it "cell." For more information on list functions see the Python docs (http://docs.python.org/library/stdtypes.html#mutable-sequence-types) about mutable sequence types. Cheers, -- Jason On Tue, Jul 13, 2010 at 1:18 PM, Vivek Ranjan wrote: > Thank you once again. I have been trying to change the color of the cell. > > cell = [] > cell.append(CYLINDER) > cell = cell + vert_000 + vert_100 + [radius] + [0,0,0] + [1,0,0] > cell.append(CYLINDER) > cell = cell + vert_000 + vert_010 + [radius] + [0,0,0] + [0,1,0] > cell.append(CYLINDER) > > if I put cell.append(CYLINDER, [COLOR, 0, 0, 1]), pymol complains > "TypeError: append() takes exactly one argument". If I add a line > "cell.extend([COLOR, 0.0, 0.0, 1.0])" after the above > cell.append(CYLINDER), nothing displays. There is also very little > description of cgo on > "http://pymol.sourceforge.net/newman/user/S0500cgo.html"; > > How to change the color of the cell ? What is append(), and extend() ? > Is there a document that describes complete functionalities of CGO ? > Basically, I would like learn how CGO, python, and openGL are > connected within pymol. > > Please let me know. > > Thank you again, > > Vivek Ranjan > > > > On Tue, Jul 13, 2010 at 12:13 PM, Robert Campbell > wrote: >> Hello Vivek, >> >> On Tue, 13 Jul 2010 11:21:03 -0400 Vivek Ranjan wrote: >> >>> Hello, >>> >>> First, thanks a lot for your help. Pymol with cctbx works now for me. >>> I changed the script "pymol" and replaced "/usr/binpython" to "python" >>> and thats it. Few more questions: >>> >>> (i) draw_cell.py uses lavv.pdb as an example. Where can I find this >>> pdb file ? Basically, I am making my own pdb file for a crystal >>> system, the file lavv.pdb can help me figure out how to put crystal >>> information in my own pdb file. >> >> That would be "1avv" not "lavv". All PDB structure codes begin with a >> number. >> You could use "fetch 1avv" to get it, but I guess you know that. >> >>> (ii) I used "draw_cell_param" command to put crystal information at >>> command prompt. Then I wanted to change radius, etc. How to undo what >>> has already be drawn so that I can re-sketch ? Or killing the pymol, >>> starting it again, and loading everything again is the only option ? >>> Similarly, is there a way to turn off labels ? >> >> The only way to "undo" what you have done is to delete the objects created by >> draw_cell_param (or similarly with draw_cell) and rerun the draw_cell_param >> function. You'll find the delete function under the "A" menu next to the >> object name or simply type "delete cell*" to delete all objects whose name >> begins with "cell". >> >> As far as the labels go, you'll note that two objects are created by the >> draw_cell function. One object is the cell border and the second is the >> labels. Simply click on the name of the labels and they will turn off. This >> is true of any object. >> >>> (iii) For the same reason as stated above, I would like to know how to >>> get the file for 2x19 ? When I issue the command "fetch 2x19" it draws >>> a structure. Where is the pdb file for it and how to get it to my >>> computer ? >> >> The fetch command should leave the 2x19.pdb file in the directory from which >> you started PyMOL. >> >> Cheers, >> Rob >> -- >> Robert L. Campbell, Ph.D. >> Senior Research Associate/Adjunct Assistant Professor >> Botterell Hall Rm 644 >> Department of Biochemistry, Queen's University, >> Kingston, ON K7L 3N6 Canada >> Tel: 613-533-6821 Fax: 613-533-2497 >> http://pldserver1.biochem.queensu.ca/~rlc >> >> -- >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> ___ >> 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 >> > > > > -- > Thank you and Regards, > > Vivek Ranjan > > -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > ___ > 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 > -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) jason.vertr...@schrodinger.com (o) +1 (603) 374-7120 -- This SF.net email is sponsored by Sprint What will
Re: [PyMOL] need more info
Hi Vivek, On Tue, 13 Jul 2010 13:18:07 -0400 Vivek Ranjan wrote: > Thank you once again. I have been trying to change the color of the cell. > > cell = [] > cell.append(CYLINDER) > cell = cell + vert_000 + vert_100 + [radius] + [0,0,0] + [1,0,0] > cell.append(CYLINDER) > cell = cell + vert_000 + vert_010 + [radius] + [0,0,0] + [0,1,0] > cell.append(CYLINDER) > > if I put cell.append(CYLINDER, [COLOR, 0, 0, 1]), pymol complains > "TypeError: append() takes exactly one argument". If I add a line > "cell.extend([COLOR, 0.0, 0.0, 1.0])" after the above > cell.append(CYLINDER), nothing displays. There is also very little > description of cgo on > "http://pymol.sourceforge.net/newman/user/S0500cgo.html"; > > How to change the color of the cell ? What is append(), and extend() ? > Is there a document that describes complete functionalities of CGO ? > Basically, I would like learn how CGO, python, and openGL are > connected within pymol. The reference that you point to above notes that the CYLINDER primitive takes the arguments: CYLINDER, x1, y1, z1, x2, y2, z2, radius, red1, green1, blue1, red2, green2, blue2, If you want to change the color of the cell, then you should change the two triplets of values within the square brackets after the radius. The line in my script cell = cell + vert_000 + vert_100 + [radius] + [0,0,0] + [1,0,0] draws a cylinder coloured from black to red, while cell = cell + vert_001 + vert_011 + [radius] + [0,0,1] + [0,1,1] draws a cylinder coloured from blue to cyan. As Jason answered, .append() and .extend() are python functions that apply to lists. .append adds one element to a list, while .extend adds each of the elements from its argument, which is itself an iterable object. And I can't speak for others here, but since I read the e-mail list, there is no need to CC: any e-mails for the list to my own address. Cheers, Rob -- Robert L. Campbell, Ph.D. Senior Research Associate/Adjunct Assistant Professor Botterell Hall Rm 644 Department of Biochemistry, Queen's University, Kingston, ON K7L 3N6 Canada Tel: 613-533-6821Fax: 613-533-2497 http://pldserver1.biochem.queensu.ca/~rlc -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ 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
[PyMOL] PyMOL Help
Hi PyMOL, This may be a very simple problem to solve. How do I select chain-specific individual residues in the command line? For example: 1PSO.pdb has two chains: E and I. If I enter [select catalytic, resi 2] I get the residue I want selected BUT i also get residue 2 in the I chain selected - which I DON'T want to happen. How can i specifiy a chain when selecting a residue in the command line? Thanks, Matthew Jenner - The Sanger Institue -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ 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] PyMOL Help
Hello Matthew, You write something like and chain A. To select chain A. In your case, doing select catalytic, resi 2 and chain E should do the trick Best! João [...] Rodrigues @ http://doeidoei.wordpress.org On Tue, Jul 13, 2010 at 5:28 AM, Matthew Jenner wrote: > Hi PyMOL, > > This may be a very simple problem to solve. How do I select chain-specific > individual residues in the command line? For example: > > 1PSO.pdb has two chains: E and I. > If I enter [select catalytic, resi 2] I get the residue I want selected BUT > i also get residue 2 in the I chain selected - which I DON'T want to happen. > > > How can i specifiy a chain when selecting a residue in the command line? > > Thanks, > > Matthew Jenner - The Sanger Institue > > > -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > ___ > 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 > -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ 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] PyMOL Help
Hi Matthew, You can specify a chain with "chain X" or the abbreviated "c. X" where X is the chain identifier. In your case, # select residue 2 from chain E select catalytic, resi 2 and chain E # same as above select catalytic, i. 2 and c. E For more help, see the PyMOLWiki (http://www.pymolwiki.org/index.php/Property_Selectors). Cheers, -- Jason On Tue, Jul 13, 2010 at 8:28 AM, Matthew Jenner wrote: > Hi PyMOL, > > This may be a very simple problem to solve. How do I select chain-specific > individual residues in the command line? For example: > > 1PSO.pdb has two chains: E and I. > If I enter [select catalytic, resi 2] I get the residue I want selected BUT > i also get residue 2 in the I chain selected - which I DON'T want to happen. > > How can i specifiy a chain when selecting a residue in the command line? > > Thanks, > > Matthew Jenner - The Sanger Institue > -- > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > ___ > 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 > -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) jason.vertr...@schrodinger.com (o) +1 (603) 374-7120 -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ 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