Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

## Re: [PyMOL] simple cgo question

 Re: [PyMOL] simple cgo question From: Richard Gillilan - 2007-02-19 16:48:22 ```Thanks Rob, that worked! > > Load it into PyMOL with: > PyMOL> run arrows.py > ```

 [PyMOL] Visualizing Molecular Orbitals in PyMol From: BuzB - 2007-02-15 17:26:06 ```Hi All, I'm trying to develop a way to display quantum mechanical molecular orbitals in PyMol. I can compute the probability amplitude at all points in space around a molecule; at the moment I'm using an extended h=FCckel program to do this. I would like to be able to draw a mesh or a surface, that represents a surface of constant probability amplitude, and color the mesh or surface depending on the sign of the probability amplitude. For instance, the contour would still be displayed if the probability amplitude at a particular surface was 0.1 or -0.1, but would be colored blue for positive, and red for negative. I think a way to do this would be to generate a map, like an electron density map, and then generate a mesh from this, contoured at a given value. To do this I would like some help; 1. Given that I know the probability amplitude at all points in a given volume of space, how do I generate a map? Will having sign information complicate matters? 2. Given a map object, how do I color the mesh depending on the sign of the values in the map? Thank you very much! and all the best, --BuzB ```
 [PyMOL] Visualizing Molecular Orbitals in PyMol From: BuzB - 2007-02-19 23:10:34 ```Hi All, Thanks to everyone and for the responses to and encouragement about my query on visualizing molecular orbitals in pymol. I'm using PyMol 0.99rc6. I feel like I'm quite close to a solution. I've developed a routine to compute a 3 dimensional matrix containing the probability amplitudes of the orbitals, which I can load into a PyMol brick object. Then, things start to go wrong.... When I use the load_brick function in the cmd module; cmd.load_brick(brik, "Brick") or alternatively, cmd.load_object(loadable.brick, brik, "Brik") PyMol returns the message; ObjectMap: Map Read. Range = 0.000 to 0.000 but it does display the object "Brick" in the objects menu. I can then create an isomesh or surface with the command; cmd.isosurface("BrikSurf", "Brick", 0.1) But no surface is displayed on screen. The example file brick01.py that is included in examples/devel does something almost identical to what I'm trying to do, it displays an exponentially decaying density, but also with no success in PyMol 0.99rc6. Is there a bug somewhere in the load_brick function that I'm running into? Thanks a lot! bmb197 ```
 Re: [PyMOL] Visualizing Molecular Orbitals in PyMol From: Michael Lerner - 2007-02-20 01:50:58 ```Hi, I don't remember the details, but I do remember that I had some troubles using bricks when I was writing the APBS plugin. The DX file format is really simple, though, especially for this sort of thing. http://apbs.sourceforge.net/doc/user-guide/index.html#opendx-format If I recall correctly, my problems with bricks were mostly that I wasn't using them correctly, but I didn't figure out how to use them correctly until after I'd already converted everything to DX. -Michael Lerner On 2/19/07, BuzB wrote: > Hi All, > > Thanks to everyone and for the responses to and encouragement about my > query on visualizing molecular orbitals in pymol. > > I'm using PyMol 0.99rc6. > > I feel like I'm quite close to a solution. I've developed a routine to > compute a 3 dimensional matrix containing the probability amplitudes > of the orbitals, which I can load into a PyMol brick object. > > Then, things start to go wrong.... > > When I use the load_brick function in the cmd module; > > cmd.load_brick(brik, "Brick") > > or alternatively, > > cmd.load_object(loadable.brick, brik, "Brik") > > PyMol returns the message; > > ObjectMap: Map Read. Range = 0.000 to 0.000 > > but it does display the object "Brick" in the objects menu. I can then > create an isomesh or surface with the command; > > cmd.isosurface("BrikSurf", "Brick", 0.1) > > But no surface is displayed on screen. > > The example file brick01.py that is included in examples/devel does > something almost identical to what I'm trying to do, it displays an > exponentially decaying density, but also with no success in PyMol > 0.99rc6. Is there a bug somewhere in the load_brick function that I'm > running into? > > Thanks a lot! > > bmb197 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > PyMOL-users mailing list > PyMOL-users@... > https://lists.sourceforge.net/lists/listinfo/pymol-users > -- Biophysics Graduate Student Carlson Lab, University of Michigan http://www.umich.edu/~mlerner http://lernerclan.net ```
 Re: [PyMOL] Visualizing Molecular Orbitals in PyMol From: Martin - 2007-02-17 10:39:17 ```Am Donnerstag, 15. Februar 2007 schrieb BuzB: > I think a way to do this would be to generate a map, like an electron > density map, and then generate a mesh from this, contoured at a given > value. A good point to start is maybe to look at Learner's APBS plugin. Also there should be some documentation about the ?OpenDX? format apbs is using for potential maps. It has also isosurface display controls implemented. > To do this I would like some help; > > 1. Given that I know the probability amplitude at all points in a > given volume of space, how do I generate a map? Will having sign > information complicate matters? Sign information? If you're talking about a simple scalar potential, i see no problems arise. The probability amplitude should be always positive or what do you mean? > 2. Given a map object, how do I color the mesh depending on the sign > of the values in the map? There are 2 things you can do IMHO. Either creating isosurfaces with fixed color or color sth else e.g. the sas surface of a protein with the potential values. Cheers Martin -- "The price of freedom is eternal vigilance.", Thomas Jefferson ```
 [PyMOL] simple cgo question From: Richard Gillilan - 2007-02-19 15:24:07 ```I'm probably making a simpler mistake here, or perhaps there is something wrong with my installation or paths. I'm trying to load and display the simple cgo example in the manual. I created a file named "arrows" containing this definition: from pymol.cgo import * # get constants from pymol import cmd obj = [ BEGIN, LINES, COLOR, 1.0, 1.0, 1.0, VERTEX, 0.0, 0.0, 0.0, VERTEX, 1.0, 0.0, 0.0, VERTEX, 0.0, 0.0, 0.0, VERTEX, 0.0, 2.0, 0.0, VERTEX, 0.0, 0.0, 0.0, VERTEX, 00, 0.0, 3.0, END ] From the Pymol prompt I then attempt to load it: PyMOL> cmd.load_cgo(obj,'/Volumes/transport/AFABP_structs/Linoleic4/ rf10_TLS/arrows'); I get the following error: Traceback (most recent call last): File "/Users/delwarl/MacPyMOL060228/build/Deployment/MacPyMOL.app/ pymol/modules/pymol/parser.py", line 370, in parse File "", line 1, in ? NameError: name 'obj' is not defined Anyone recognize what I am doing wrong here? Richard ```
 Re: [PyMOL] simple cgo question From: Robert Campbell - 2007-02-19 16:25:35 ```Hi Richard, * Richard Gillilan [2007-02-19 10:22] wrote: > > I'm probably making a simpler mistake here, or perhaps there is > something wrong with my installation or paths. > I'm trying to load and display the simple cgo example in the manual. > I created a file named "arrows" containing this definition: > > from pymol.cgo import * # get constants > from pymol import cmd > > obj = [ > BEGIN, LINES, > COLOR, 1.0, 1.0, 1.0, > > VERTEX, 0.0, 0.0, 0.0, > VERTEX, 1.0, 0.0, 0.0, > > VERTEX, 0.0, 0.0, 0.0, > VERTEX, 0.0, 2.0, 0.0, > > VERTEX, 0.0, 0.0, 0.0, > VERTEX, 00, 0.0, 3.0, > > END > ] > > From the Pymol prompt I then attempt to load it: > > PyMOL> cmd.load_cgo(obj,'/Volumes/transport/AFABP_structs/Linoleic4/ > rf10_TLS/arrows'); > > I get the following error: > > Traceback (most recent call last): > File "/Users/delwarl/MacPyMOL060228/build/Deployment/MacPyMOL.app/ > pymol/modules/pymol/parser.py", line 370, in parse > File "", line 1, in ? > NameError: name 'obj' is not defined > > Anyone recognize what I am doing wrong here? The cmd.load_cgo command wants the object and object name as parameters, so you want to put the load_cgo command within your file and use the run command to load it (it is a python file): # --------- arrows.py --------------------------- from pymol.cgo import * # get constants from pymol import cmd obj = [ BEGIN, LINES, COLOR, 1.0, 1.0, 1.0, VERTEX, 0.0, 0.0, 0.0, VERTEX, 1.0, 0.0, 0.0, VERTEX, 0.0, 0.0, 0.0, VERTEX, 0.0, 2.0, 0.0, VERTEX, 0.0, 0.0, 0.0, VERTEX, 00, 0.0, 3.0, END ] cmd.load_cgo(obj,'arrows') Load it into PyMOL with: PyMOL> run arrows.py 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://adelie.biochem.queensu.ca/~rlc ```
 Re: [PyMOL] simple cgo question From: Richard Gillilan - 2007-02-19 16:48:22 ```Thanks Rob, that worked! > > Load it into PyMOL with: > PyMOL> run arrows.py > ```