From: Tamas H. <bio...@gm...> - 2020-04-29 16:51:52
|
Hi, I do not provide a full solution... I suggest * try every particular step in pymol, in the command window * if one step is successful, then put it (finally everything) into a file * use python commands (not pymol; e.g. cmd.color("blue", "lig_01")) * run the file either using "run python.file.py" in pymol; in this case you can set "argumuments" as regular python variables before running "run ..." * run the file from the shell "pymol -c python.file.py -- arg1 arg_i view1.pkl * if you have several poses in the vina output, I suggest to split them (vina_split) convert to pdb (e.g. openbabel) and then load them individually into pymol in a for cycle * before saving png, try/test "ray x, y"; later this can be set in the "png" command * READ the documentation * use GOOGLE; e.g. "pymol find polar contacts" You can save your view: pickle.dump(cmd.get_view(), open(fname, 'wb')) Load it back: cmd.set_view(pickle.load(open(fname, 'rb'))) On 4/29/20 6:29 PM, lei...@sb... wrote: > > I have two receptors and their active sites for which I need to draw > about 70 separate ligand-active site images (.png). Both active sites > are saved in session files (.pse) based on 3D coordinates from pdbqt > files after prepping for Vina docking. The ligand 3D coordinates are > based on *_out.pdbqt files from docking with Vina. > > After opening a .pse file to show the surface of the active site, the > following automated steps are needed: > > 1. Open a ligand docking output file, ligandname_out.pdbqt, and > automatically orient the active site (the site coordinates jump a > little as soon as each ligand docking output file is opened). So > the same active site orientation is needed so images are consistent. > 2. Adjust the brightness level (mouse thumbwheel) so that each saved > image has a consistent look. > 3. On the ligand, removes valence. > 4. Change the color of the ligand using ColoràElementsàGreen (carbon) > 5. On the ligand, FindàPolar contactsàTo any atom (is there away to > get counts of H-bonds) > 6. Save PNG using ligand name. > > (need to also programmatically hit Return after code is pasted into > command line) > > Once I get something that works after pasting the code for the above 6 > steps into the command line, and discover that the image is saved, I > can then write my own code to clone the commands, and substitute all > the ligand file names. > > Certainly, someone has already written code to autodraw a docked > ligand (from Vina) sitting in an active site? > > > > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe |