Re: [PyMOL] Display technical info about objects

2012-01-18 Thread Martin Hediger
Most helpful, thats exactly the solution I was looking for.
Thanks a lot
Martin






On 17.01.12 16:01, Jason Vertrees wrote:
 Hi Martin,

 PyMOL does not keep track of which files the objects were loaded from.
 If you wanted, you could wrap the load command in with your own load
 command that keeps track of such information, for example in a
 dictionary. That could look something like this:

 def load_with_props(fileName, objName):

# store whatever info you want, like the filename

obj_info[objName] = fileName

# ... do more recording of properties you choose

# ask PyMOL to now load the file

cmd.load(fileName,objName)

 Then you could just query obj_info based on object name:

 for obj in cmd.get_names():
print obj_info[obj]

 Cheers,

 -- Jason



 On Tue, Jan 17, 2012 at 3:44 AM, Martin Hedigerma@bluewin.ch  wrote:
 Dear List
 I'm frequently loading a number of objects into PyMOL which formally
 have the same name, but are different in structure. Sometimes it can
 become a bit difficult to keep track of which object is what.
 Is there a way to display technical information about a loaded object?
 Say, the file path to the loaded PDB file? That would be great.

 Thanks for hints.
 Martin

 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 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



--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
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


[PyMOL] Display technical info about objects

2012-01-17 Thread Martin Hediger
Dear List
I'm frequently loading a number of objects into PyMOL which formally 
have the same name, but are different in structure. Sometimes it can 
become a bit difficult to keep track of which object is what.
Is there a way to display technical information about a loaded object? 
Say, the file path to the loaded PDB file? That would be great.

Thanks for hints.
Martin

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
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


Re: [PyMOL] Display technical info about objects

2012-01-17 Thread Jason Vertrees
Hi Martin,

PyMOL does not keep track of which files the objects were loaded from.
If you wanted, you could wrap the load command in with your own load
command that keeps track of such information, for example in a
dictionary. That could look something like this:

def load_with_props(fileName, objName):

  # store whatever info you want, like the filename

  obj_info[objName] = fileName

  # ... do more recording of properties you choose

  # ask PyMOL to now load the file

  cmd.load(fileName,objName)

Then you could just query obj_info based on object name:

for obj in cmd.get_names():
  print obj_info[obj]

Cheers,

-- Jason



On Tue, Jan 17, 2012 at 3:44 AM, Martin Hediger ma@bluewin.ch wrote:
 Dear List
 I'm frequently loading a number of objects into PyMOL which formally
 have the same name, but are different in structure. Sometimes it can
 become a bit difficult to keep track of which object is what.
 Is there a way to display technical information about a loaded object?
 Say, the file path to the loaded PDB file? That would be great.

 Thanks for hints.
 Martin

 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 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



-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC

(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
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