RE: [PyMOL] Trying to plug APBS into PyMOL for electrostatics (almost working)

2003-12-17 Thread Michael George Lerner
Hi again,

I've gotten the code much closer to working.  Also, I think it's factored
well enough that most of it should be non-GPL-contaminated.  After I
actually get it working completely, I'll email the APBS folks to see if
they care about licensing issues.

Right now, I can generate isomeshes and isosurfaces for methanol that look
reasonable (yay!).  But I can't get the surface coloring to work.  If I do
this:

load methanol.pdb
show surface, methanol
run cleanerDxMap.py # loads up my APBS-generated map
ramp_new e_lvl, map, [-10,0.00,10]
set surface_color, e_lvl, methanol
isosurf surfneg, map, -0.1
isomesh meshpos, map, 0.1
color red, surfneg
color blue, meshpos

I get a good looking mesh, a good looking isosurface, and a completely
white surface around methanol.  dragging the limits on the map around to
really small things or really large things doesn't seem to help either.
Any quick guesses?

In case you have a little bit of spare time, I have two dumb sounding
questions:

1) What exactly is supposed to go into ObjectMapState-Dim?

At first, I thought it was just a list of three integers giving the map
dimensions (in grid points), but that doesn't seem to be the answer.  When
I take a map that PyMOL generates for me (e.g. with
cmd.map_new(map,gaussian,0.1,methanol)) and print it out as a
Python list (using ObjectMapAsPyList, etc.), I get different results each
time the program is run.

2) What exactly is supposed to go into ObjectMapState-Field-Points?

I think it's just the x,y,z coordinates of the points starting at
minCorner and working up through maxCorner by incrementing z then y then x
([x1,y1,z1,x1,y1,z2,...].  But, when I first tried to set points myself, I
got a few things wrong .. it looks like n_dim is supposed to be 4.  I had
guessed 3.  It also looks like Dim should be four ints, the grid
dimensions followed by the number 3.  Finally, it looks like stride should
be the normal stride followed by the base_size.  What am I missing here?
Why is points a four-dimensional thing while data is a three-dimensional
thing?

thanks,

-michael


--
This isn't a democracy;|_  |Michael Lerner
 it's a cheer-ocracy.  | ASCII ribbon campaign ( ) |   Michigan
-Torrence,  Bring It On|  - against HTML email  X  |  Biophysics
   |   / \ | mler...@umich

On Thu, 11 Dec 2003, Warren L. DeLano wrote:

 Michael,

   Impressive!  I think you're one of the few people to delve into
 PyMOL's source like this.

   Obviously I'd be the best person to look at your code, but I'm
 crunched right now getting ready for this upcoming trip.  Also, if the
 code is GPL-contaminated, then it can't be useful in the main version,
 but perhaps we can rewrite this cleanly later on.  I can probably help
 you in January.  What you've written sounds right...

   One thing I'd suggest for debugging in the meantime is that you
 use the isomesh or isosurface routines to explore what data is ending up
 in the Map, before trying to use the color ramps.  There may also be
 some code in the chempy brick stuff which could serve as an example for
 populating the list.

 Cheers,
 Warren

 --
 mailto:war...@delanoscientific.com
 Warren L. DeLano, Ph.D.
 Principal Scientist
 DeLano Scientific LLC
 Voice (650)-346-1154
 Fax   (650)-593-4020






Re: [PyMOL] Trying to plug APBS into PyMOL for electrostatics (almost working)

2003-12-17 Thread Michael Banck
On Wed, Dec 17, 2003 at 06:00:44PM -0500, Michael George Lerner wrote:
 I've gotten the code much closer to working.  Also, I think it's factored
 well enough that most of it should be non-GPL-contaminated.  After I
 actually get it working completely, I'll email the APBS folks to see if
 they care about licensing issues.

What's the problem? Both PyMOL and APBS are licensed under the GPL so I
see no problems there. 

Do you imply that you want to license your own code under a
non-GPL-compatible license? Why?


Michael



Re: [PyMOL] Trying to plug APBS into PyMOL for electrostatics (almost working)

2003-12-17 Thread Michael Banck
On Thu, Dec 18, 2003 at 12:26:48AM +0100, Michael Banck wrote:
 On Wed, Dec 17, 2003 at 06:00:44PM -0500, Michael George Lerner wrote:
  I've gotten the code much closer to working.  Also, I think it's factored
  well enough that most of it should be non-GPL-contaminated.  After I
  actually get it working completely, I'll email the APBS folks to see if
  they care about licensing issues.
 
 What's the problem? Both PyMOL and APBS are licensed under the GPL so I
 see no problems there. 

Well, pymol isn't obviously. Note to self: Don't post about licensing
stuff after an evening of mulled wine.

Still, as long as the pymol license is GPL-compatible (which I believe
it is, but I'm no lawyer), and the additional code is licensed under the
same license, it should be alright, as I understand it.


sorry,

Michael



Re: [PyMOL] Trying to plug APBS into PyMOL for electrostatics (almost working)

2003-12-17 Thread Michael George Lerner
  What's the problem? Both PyMOL and APBS are licensed under the GPL so I
  see no problems there.

 Well, pymol isn't obviously. Note to self: Don't post about licensing
 stuff after an evening of mulled wine.

I've had an evening of nice port .. we'll see how a port-influenced
evening compares to a mulled-wine-influenced evening :).

 Still, as long as the pymol license is GPL-compatible (which I believe
 it is, but I'm no lawyer), and the additional code is licensed under the
 same license, it should be alright, as I understand it.

The potential problem is this:  once I get this working, I want to give it
to PyMOL.  That way, I don't have to care about maintainance :).  If I'm
going to give it to PyMOL, I think it needs to use the PyMOL license, not
the GPL.  The license thing is probably not a big deal anyway.  On the one
hand, I'm not sure that anything I've done is actually forced to be GPL'd.
On the other hand, it would probably take Warren all of an hour to
re-create everything I've done.  It took me a while because in addition to
writing something that parses DX files, I had to figure out some of the
PyMOL internals.  And I'm slow :).  Playing around with PyMOL is
definately fun, though.

-michael