[Jmol-developers] question about viewer.getProperty(..) call...
I think this is for Bob. Inorder to create a ghost isosurface (or any other shape), I need to duplicate the shape and change some of the rendering parameters. The cleanest way seems to be to make a copy of the command that created the surface and change just the name and relevant rendering parameters. This way the new surface is added to the Jmol state in the normal way. So, I was investigating what I can get back using the viewer.getProperty() call. I used a call like: Object shapeInfo = viewer.getProperty(Object, ShapeInfo, null); I gather this is just a little more general than using calls to viewer.getShapeProperty. Anyway, my question is this. The returned object is missing the Jmol State version of the isosurface recreation command, is there another way using some version of these getProperty calls to access this? The title appears to have the basic (user entered) command, but I would prefer to work with the Jmol State version, because they are more complete and I believe will reduce the chances of having to update my code if defaults or parameters change. Thanks, Jonathan Dr. Jonathan H. Gutow Chemistry Departmentgu...@uwosh.edu UW-Oshkosh Office: 920-424-1326 800 Algoma BoulevardFAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers
Re: [Jmol-developers] question about viewer.getProperty(..) call...
I just thought of something that might help...Is there a way to ask for just the state of an object? Ideally for me what would be very clean would be to be able to call for a list of all shapes in the Jmol State and then iterate through that list asking for the Jmol State command(s) that create each shape. Jonathan On Jul 14, 2011, at 9:34 AM, Jonathan Gutow wrote: I think this is for Bob. Inorder to create a ghost isosurface (or any other shape), I need to duplicate the shape and change some of the rendering parameters. The cleanest way seems to be to make a copy of the command that created the surface and change just the name and relevant rendering parameters. This way the new surface is added to the Jmol state in the normal way. So, I was investigating what I can get back using the viewer.getProperty() call. I used a call like: Object shapeInfo = viewer.getProperty(Object, ShapeInfo, null); I gather this is just a little more general than using calls to viewer.getShapeProperty. Anyway, my question is this. The returned object is missing the Jmol State version of the isosurface recreation command, is there another way using some version of these getProperty calls to access this? The title appears to have the basic (user entered) command, but I would prefer to work with the Jmol State version, because they are more complete and I believe will reduce the chances of having to update my code if defaults or parameters change. Thanks, Jonathan Dr. Jonathan H. Gutow Chemistry Departmentgu...@uwosh.edu UW-Oshkosh Office: 920-424-1326 800 Algoma BoulevardFAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers Dr. Jonathan H. Gutow Chemistry Departmentgu...@uwosh.edu UW-Oshkosh Office: 920-424-1326 800 Algoma BoulevardFAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers
Re: [Jmol-developers] question about viewer.getProperty(..) call...
Jonathan, have you tested the output of show isosurface or list isosurface? Probbaly too basic for your need, but maybe... -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers
[Jmol-developers] Another option for getting the data I need...
Based on what I can find in the code here are my options: 1) Modify getShapeProperty to include a getStateCmd option. Sounds simple, but I find this access method strange as it duplicates methodologies built into the programming language. Isn't it easier to define public getter functions within objects or make objects publicly readable? This has the additional advantage that if getters have javadoc attached to them it is much easier to figure out what the things you are looking for are called. 2) My present preference (lacking public getter functions) is to use the viewer.getShapeManager() function to grab the list of shapes and pick the data I want out of the data structure. Of course, when the data structure is changed my functions will break. 3) Add public getter functions to ShapeManager. It looks like it might have to be abstract for both of the things I am most interested in (stateCmd and boundBoxCorners), because different shapes have different info. A prime example is drawn polygons for which I will need to check all the vertices to define the boundbox as that does not appear in the data structure. I think options 2 3 are something Bob is trying to avoid. Bob, can you explain why? Any thoughts? Jonathan Dr. Jonathan H. Gutow Chemistry Departmentgu...@uwosh.edu UW-Oshkosh Office: 920-424-1326 800 Algoma BoulevardFAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers
Re: [Jmol-developers] Another option for getting the data I need...
Jonathan, On Thu, Jul 14, 2011 at 3:32 PM, Jonathan Gutow gu...@uwosh.edu wrote: Based on what I can find in the code here are my options: 1) Modify getShapeProperty to include a getStateCmd option. Sounds simple, but I find this access method strange as it duplicates methodologies built into the programming language. Isn't it easier to define public getter functions within objects or make objects publicly readable? This has the additional advantage that if getters have javadoc attached to them it is much easier to figure out what the things you are looking for are called. You can't access any shape that is not in org.jmol.shape directly. That would break the modular loading of Jmol. You would have to put a default method definition in org.jmol.Shape even if it is for something very specialized like this. So the design efficiency is to put any such specialized call into getShapeProperty. It's very efficient. 2) My present preference (lacking public getter functions) is to use the viewer.getShapeManager() function to grab the list of shapes and pick the data I want out of the data structure. Of course, when the data structure is changed my functions will break. I thought you were just interested in isosurfaces, so there's no problem there using getShapeProperty. 3) Add public getter functions to ShapeManager. It looks like it might have to be abstract for both of the things I am most interested in (stateCmd and boundBoxCorners), because different shapes have different info. A prime example is drawn polygons for which I will need to check all the vertices to define the boundbox as that does not appear in the data structure. I think you are talking about way more than I am. Drawn polygons and what else? Are you thinking this would be applicable to all shapes? I'd like to see a clear description, then, of exactly what you are talking about before you go too far on this. We need to work out all the details then BEFORE we get going on the methods. Let's see what you have in mind... Bob I think options 2 3 are something Bob is trying to avoid. Bob, can you explain why? Any thoughts? Jonathan Dr. Jonathan H. Gutow Chemistry Departmentgu...@uwosh.edu UW-Oshkosh Office: 920-424-1326 800 Algoma BoulevardFAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev___ Jmol-developers mailing list Jmol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-developers