From: Chimed J. <chi...@gm...> - 2009-11-28 12:59:21
|
Hello PyMol users, I have a lot of pdb files open and I've superposed them to compare the pockets. Now I would like to see the hydrogen bonds formed by each ligand to the protein its been crystalised with. I would ideally like an object which shows hydrogen bonds between the ligand(s) present (I use organic to identify them since the naming is different in each pdb) and the protein of the enabled object. So far I keep getting an object showing all the hydrogen bonds in all the pdbs at once. Given the number of pdbs I'm comparing creating hydrogen bond objects for each of them would be cumbersome. Thank you, Chimed |
From: Jason V. <jas...@gm...> - 2009-11-29 17:29:19
|
Chimed, You can automate the task. Load your 100 proteins. Use a wildcard from the command line or a script like loadDir (http://pymolwiki.org/index.php/LoadDir). Align them. Then, run: python for n in cmd.get_names("objects"): selName = "s" + n cmd.select(selName, n) cmd.distance("dist"+n, selName, selName + " and (organic and " + n + ")", 3.2, mode=2) python end This will create the hbond objects for all your proteins. If this clutters up the UI too much, check out the group ('help group' in PyMOL, or http://pymolwiki.org/index.php/Group) command and modify the loop accordingly. If you must have all objects in one object, you can create a multi-state object. For that, see the create command ("help create" in PyMOL, or http://pymolwiki.org/index.php/Create). Hope this helps, -- Jason -- Jason Vertrees, PhD PyMOLWiki -- http://www.pymolwiki.org On Sat, Nov 28, 2009 at 5:51 PM, Chimed Jansen <chi...@gm...> wrote: > Hi Jason, > > Thank you, but I have just over 100 pdbs open, so I was hoping to avoid > having to perform steps on each of them. > > I thought there might be a way to create just one conditional object which > shows the hydrogen bonds between the ligand and protein for each pdb as I > view them. > > Thanks, > Chimed > > On Sat, Nov 28, 2009 at 6:22 PM, Jason Vertrees <jas...@gm...> > wrote: >> >> Chimed, >> >> Define a selection between one protein and one ligand. Then using the >> mouse, A->Action->Find->Polar Contacts->Within Selection. >> >> Let's say you load 10 proteins and 7 have ligands. You could simply >> do something like: >> select complex1, pdbName1 >> then using the mouse A->Action->Find->Polar Contacts->Within >> Selection, for that selection. Repeat for proteins 2..10. >> >> If you want to mix the ligands and proteins, say check the bonds >> between protein1 and ligand7 you could do: >> select curComplex, (pdbName1 and polymer) or (pdbName7 and organic) >> and repeat the A->Action->Find->Polar Contacts->Within Selection step >> for the curComplex selection. >> >> -- Jason >> >> -- >> Jason Vertrees, PhD >> >> PyMOLWiki -- http://www.pymolwiki.org >> >> >> >> On Sat, Nov 28, 2009 at 7:59 AM, Chimed Jansen <chi...@gm...> >> wrote: >> > Hello PyMol users, >> > >> > I have a lot of pdb files open and I've superposed them to compare the >> > pockets. Now I would like to see the hydrogen bonds formed by each >> > ligand to >> > the protein its been crystalised with. I would ideally like an object >> > which >> > shows hydrogen bonds between the ligand(s) present (I use organic to >> > identify them since the naming is different in each pdb) and the protein >> > of >> > the enabled object. So far I keep getting an object showing all the >> > hydrogen >> > bonds in all the pdbs at once. Given the number of pdbs I'm comparing >> > creating hydrogen bond objects for each of them would be cumbersome. >> > >> > Thank you, >> > Chimed >> > >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> > 30-Day >> > trial. Simplify your report design, integration and deployment - and >> > focus >> > on >> > what you do best, core application coding. Discover what's new with >> > Crystal Reports now. http://p.sf.net/sfu/bobj-july >> > _______________________________________________ >> > PyMOL-users mailing list (PyM...@li...) >> > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users >> > Archives: http://www.mail-archive.com/pym...@li... >> > > > |
From: Robert C. <rob...@qu...> - 2009-11-30 02:51:57
|
Hi Jason, On Sun, 29 Nov 2009 12:29:08 -0500, Jason Vertrees <jas...@gm...> wrote: > You can automate the task. Load your 100 proteins. Use a wildcard > from the command line or a script like loadDir > (http://pymolwiki.org/index.php/LoadDir). Align them. Then, run: > > python > for n in cmd.get_names("objects"): > selName = "s" + n > cmd.select(selName, n) > cmd.distance("dist"+n, selName, selName + " and (organic and " + n + ")", 3.2, mode=2) > python end I'm just curious, but why do you go to the trouble to create a selection that is just the whole object? Especially if Chimed has 100s of objects, he doesn't need to add a named selection for each. Why not do the following? python for n in cmd.get_names("objects"): cmd.distance("dist"+n,n,n + " and organic",3.2, mode=2) python end The latter worked for me. If you wanted to eliminate waters from the selection for the protein, you could change it to: python for n in cmd.get_names("objects"): cmd.distance("dist"+n,n + " and not solvent",n + " and organic",3.2,mode=2) python end Or to make it more readable: python for n in cmd.get_names("objects"): protein_sele = n + " and not solvent" organic_sele = n + " and organic" cmd.distance("dist"+n, protein_sele, organic_sele, 3.2, mode=2) python end 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 <rob...@qu...> http://pldserver1.biochem.queensu.ca/~rlc |
From: Jason V. <jas...@gm...> - 2009-11-30 03:09:11
|
Robert, Great point! My original script had selections from protein A to a ligand in any other protein B. I just left it in there. I agree that creating a named selection for each object is unnecessary. If he really wanted a clean namespace, he could dump all of those into a group(s) or a multi-state object. Nice attention to detail, -- Jason -- Jason Vertrees, PhD PyMOLWiki -- http://www.pymolwiki.org On Sun, Nov 29, 2009 at 9:50 PM, Robert Campbell <rob...@qu...> wrote: > Hi Jason, > > On Sun, 29 Nov 2009 12:29:08 -0500, Jason Vertrees <jas...@gm...> > wrote: > >> You can automate the task. Load your 100 proteins. Use a wildcard >> from the command line or a script like loadDir >> (http://pymolwiki.org/index.php/LoadDir). Align them. Then, run: >> >> python >> for n in cmd.get_names("objects"): >> selName = "s" + n >> cmd.select(selName, n) >> cmd.distance("dist"+n, selName, selName + " and (organic and " + n + ")", 3.2, mode=2) >> python end > > I'm just curious, but why do you go to the trouble to create a selection that > is just the whole object? Especially if Chimed has 100s of objects, he > doesn't need to add a named selection for each. Why not do the following? > > python > for n in cmd.get_names("objects"): > cmd.distance("dist"+n,n,n + " and organic",3.2, mode=2) > python end > > The latter worked for me. If you wanted to eliminate waters from > the selection for the protein, you could change it to: > > python > for n in cmd.get_names("objects"): > cmd.distance("dist"+n,n + " and not solvent",n + " and organic",3.2,mode=2) > python end > > Or to make it more readable: > > python > for n in cmd.get_names("objects"): > protein_sele = n + " and not solvent" > organic_sele = n + " and organic" > cmd.distance("dist"+n, protein_sele, organic_sele, 3.2, mode=2) > python end > > 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 > <rob...@qu...> http://pldserver1.biochem.queensu.ca/~rlc > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > |