Hi Esben,

I just pushed a change to the open-source SVN repo which makes loading maps 
with a script a little easier. If you have your map in a numpy array, you can 
do:

yourdata = ... # array with shape (a,b,c)
yourgridspacing = (0.2, 0.2, 0.2) # grid spacing

from chempy.brick import Brick
b = Brick.from_numpy(yourdata, yourgridspacing)
cmd.load_brick(b, 'yourmap')

Hope that helps.

Cheers,
  Thomas

On 30 Jan 2014, at 16:24, Jason Vertrees <jason.vertr...@schrodinger.com> wrote:

> Hi Esben,
> 
> I have a list of coordinates on a regular grid with associated floating point 
> values from a calculation that I want to visualise in PyMOL. Is it nescessary 
> to write this to an Xplor/CNS/CCP4 file format and subsequently load it, or 
> can it be loaded directly into a map object via some fancy python code?
> 
> It depends on how you want to visualize the data. If dots/points or other 
> discrete representations are okay then you can use a XYZ or a modified 
> structure file. If you want the benefit of a field (volume, gradient, 
> isosurface) then I suggest the map.
> 
> If you already have the data in a well-formatted brick, check out the asCCP4 
> function in http://www.pymolwiki.org/index.php/Tiff2ccp4. That writes the 
> CCP4 header and data (of a TIFF file, but you can modify that for your 
> needs). 
> 
> If you want, send me a copy of your data. Or, I also have a very poorly 
> written script that will convert raw volumes of data to CCP4 maps, similar to 
> the aforementioned script. Email me personally and I can send you a copy if 
> you prefer (but it's really ugly code).
> 
> Cheers,
> 
> -- Jason
> 
> 
> On Wed, Jan 29, 2014 at 8:02 AM, Esben Jannik Bjerrum 
> <esbenjan...@rocketmail.com> wrote:
> >
> > Hi All-knowing Pymol'ers.
> >
> > I wonder if anyone had a couple of tips/ pointers / script snippets.
> >
> > I have a list of coordinates on a regular grid with associated floating 
> > point values from a calculation that I want to visualise in PyMOL. Is it 
> > nescessary to write this to an Xplor/CNS/CCP4 file format and subsequently 
> > load it, or can it be loaded directly into a map object via some fancy 
> > python code?
> >
> > Best Regards
> > Esben Jannik Bjerrum


-- 
Thomas Holder
PyMOL Developer
Schrödinger, Inc.


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
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

Reply via email to