From: James <ja...@ry...> - 2013-06-29 01:44:56
|
Hi, I know you can get the angstrom coordinates of an atom from atomInfo.[x|y|z], but is it possible to get the XY screen (pixel) coordinates? If the answer is "not just by querying a variable," is this possible to compute accurately? I can see how you would start this, by taking the angstrom coordinates, adjusting them by the orientation to get what amounts to the angstrom coordinates of the current view, by I don't see how you would then convert angstroms to pixels (if "zoom 0" worked precisely, I could perhaps see how, but it doesn't work precisely for me so I'm not sure how one relates the boundbox size to _height and _width). Sincerely, James |
From: James <ja...@ry...> - 2013-06-29 03:33:44
|
As I was trying to figure this out, I noted that the value for labelOffset must be <= 127 (in pixels). Is there a reason for this limitation? That's not much of the available height/width for most screens. What I'm trying to do is be able to place labels at the edges of the screen so that they do not occlude the model like they tend to do by default. Some other alignment/justification options for labels (and echo) would be pretty useful, such as WindowLeft, WindowRight, WindowTop, WindowBottom (although use of say WindowLeft+WindowTop with more than one label, unless there was a concept of labels taking up space and so not overlapping, would cause the labels to be on top of each other). But, I think this is possible without new alignment options, if labelOffset could assume a wider range of values (<=4095 in preparation for 4K screens?). Thanks, James On Fri, Jun 28, 2013 at 9:44 PM, James <ja...@ry...> wrote: > Hi, > > I know you can get the angstrom coordinates of an atom from > atomInfo.[x|y|z], but is it possible to get the XY screen > (pixel) coordinates? > > If the answer is "not just by querying a variable," is this possible to > compute accurately? I can see how you would start this, by taking the > angstrom coordinates, adjusting them by the orientation to get what amounts > to the angstrom coordinates of the current view, by I don't see how you > would then convert angstroms to pixels (if "zoom 0" worked precisely, I > could perhaps see how, but it doesn't work precisely for me so I'm not sure > how one relates the boundbox size to _height and _width). > Sincerely, > James > |
From: Angel H. <ang...@ua...> - 2013-06-29 11:19:52
|
Hello, James By definition, labels are attached to atoms. That is why the distance cannot be long. >From your description, I don't think that labels are what you need. You have "echo" for positioning text either in 2D screen space or in 3D molecular coordinates, at arbitrary positions and with chosen alignment, even multi-line. e.g. set echo myEcho1 0 50%; echo Hello; // windowLeft+windowMiddle, left flushed set echo myEcho2 0 100%; echo Good Bye; // windowLeft+windowTop, left flushed set echo myEcho3 15% 85%; set echo center; echo Another; // close to windowLeft+windowTop, center-justified // note that text will never go out of screen, it will flush to the edge if needed set echo myEcho4 0 100%; echo First Line; set echo myEcho5 0 100%; echo "|Second Line"; //no overlap due to the initial newline (|) |
From: James <ja...@ry...> - 2013-06-29 12:51:05
|
Thanks Angel. I see that echo has almost everything. But, the reason I was trying to use labels is because they can have a line to an atom. After reviewing "draw ARROW" in the hopes that it could substitute for that line, I don't see that it is possible to draw from a 2D point (e.g., top left) to a 3D point (an atom). I tried assigning echo an ID and drawing from that to an atom, but (as I suspected - just hoping I could trick it) since echo isn't a draw object it doesn't work. I can't find a way to bridge that 2D/3D coordinate issue, which label does automatically. Thanks, James On Saturday, June 29, 2013, Angel Herráez wrote: > Hello, James > > By definition, labels are attached to atoms. That is why the distance > cannot > be long. > >From your description, I don't think that labels are what you need. You > have > "echo" for positioning text either in 2D screen space or in 3D molecular > coordinates, at arbitrary positions and with chosen alignment, even > multi-line. > > e.g. > > set echo myEcho1 0 50%; echo Hello; > // windowLeft+windowMiddle, left flushed > set echo myEcho2 0 100%; echo Good Bye; > // windowLeft+windowTop, left flushed > set echo myEcho3 15% 85%; set echo center; echo Another; > // close to windowLeft+windowTop, center-justified > // note that text will never go out of screen, it will flush to the edge > if needed > > set echo myEcho4 0 100%; echo First Line; > set echo myEcho5 0 100%; echo "|Second Line"; //no overlap due to the > initial newline (|) > > > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Jmol-users mailing list > Jmo...@li... <javascript:;> > https://lists.sourceforge.net/lists/listinfo/jmol-users > -- Sincerely, James Ryley, PhD, Patent Agent SumoBrain: Intellectual Property Solutions & Data AcclaimIP <https://www.acclaimip.com/> | FreePatentsOnline.com<http://www.freepatentsonline.com/>| SumoBrain.com <http://www.sumobrain.com/> | BioMedSearch.com<http://www.biomedsearch.com/> This communication is confidential and may be subject to legal privilege. Nothing contained herein should be construed as legal or patenting advice. |
From: Robert H. <ha...@st...> - 2013-06-29 20:29:14
|
That's right. There isn't a way to draw from a fixed point on the screen to an atom. You might try a recent addition in relation to PyMOL. This is a much more general offset method that is used in PyMOL and I needed to implement in Jmol, so we have it as well now. Do give this a try and let me know if it solves your problem: new feature: PyMOL-like label offset options: set labelOffset [sx, sy, sz] set labelOffset [mode, sx, sy, sz, ax, ay, az] where sx,sy,sz are screen coord offsets -- in Angstroms -- applied after view rotation -- sy > 0 LOWERS label ax,ay,az are xyz position (in Angstroms; applied before view rotation) mode == 1 indicates xyz position is an offset to the atom position mode != 1 indicates xyz position is absolute defaults: mode == 1; ax = ay = az = 0 Note that those sx sy sz are not in pixels, they are in angstroms. Also, I note that there is a bug that disallows label pointers with this sort of offset. Hmm.... On Sat, Jun 29, 2013 at 1:50 PM, James <ja...@ry...> wrote: > Thanks Angel. I see that echo has almost everything. But, the reason I was > trying to use labels is because they can have a line to an atom. After > reviewing "draw ARROW" in the hopes that it could substitute for that line, > I don't see that it is possible to draw from a 2D point (e.g., top left) to > a 3D point (an atom). I tried assigning echo an ID and drawing from that to > an atom, but (as I suspected - just hoping I could trick it) since echo > isn't a draw object it doesn't work. I can't find a way to bridge that > 2D/3D coordinate issue, which label does automatically. > > Thanks, > James > > > On Saturday, June 29, 2013, Angel Herráez wrote: > >> Hello, James >> >> By definition, labels are attached to atoms. That is why the distance >> cannot >> be long. >> >From your description, I don't think that labels are what you need. You >> have >> "echo" for positioning text either in 2D screen space or in 3D molecular >> coordinates, at arbitrary positions and with chosen alignment, even >> multi-line. >> >> e.g. >> >> set echo myEcho1 0 50%; echo Hello; >> // windowLeft+windowMiddle, left flushed >> set echo myEcho2 0 100%; echo Good Bye; >> // windowLeft+windowTop, left flushed >> set echo myEcho3 15% 85%; set echo center; echo Another; >> // close to windowLeft+windowTop, center-justified >> // note that text will never go out of screen, it will flush to the edge >> if needed >> >> set echo myEcho4 0 100%; echo First Line; >> set echo myEcho5 0 100%; echo "|Second Line"; //no overlap due to the >> initial newline (|) >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Windows: >> >> Build for Windows Store. >> >> http://p.sf.net/sfu/windows-dev2dev >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> > > > -- > Sincerely, > James Ryley, PhD, Patent Agent > SumoBrain: Intellectual Property Solutions & Data > AcclaimIP <https://www.acclaimip.com/> | FreePatentsOnline.com<http://www.freepatentsonline.com/>| > SumoBrain.com <http://www.sumobrain.com/> | BioMedSearch.com<http://www.biomedsearch.com/> > > This communication is confidential and may be subject to legal privilege. > Nothing contained herein should be construed as legal or patenting advice. > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Larson-Anderson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr 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 |
From: James <ja...@ry...> - 2013-06-29 20:44:59
|
How is that different than what exists? Perhaps in that it is applied post-rotation? That would make it a bit simpler, assuming the offset can be large enough to place the label anywhere. I think I could, with a little ugliness, make the current labels work if the offset could be > 127. Or, I could use absolute scaling, try to figure out where the screen boundary approximately is in angstroms, and use that to draw an arrow from an echo to an atom. Anything that would reduce the ugliness would be good lol. Thanks, James On Saturday, June 29, 2013, Robert Hanson wrote: > That's right. There isn't a way to draw from a fixed point on the screen > to an atom. You might try a recent addition in relation to PyMOL. This is a > much more general offset method that is used in PyMOL and I needed to > implement in Jmol, so we have it as well now. > > Do give this a try and let me know if it solves your problem: > > new feature: PyMOL-like label offset options: > > set labelOffset [sx, sy, sz] > set labelOffset [mode, sx, sy, sz, ax, ay, az] > > where > > sx,sy,sz are screen coord offsets > -- in Angstroms > -- applied after view rotation > -- sy > 0 LOWERS label > ax,ay,az are xyz position (in Angstroms; applied before view rotation) > mode == 1 indicates xyz position is an offset to the atom position > mode != 1 indicates xyz position is absolute > defaults: mode == 1; ax = ay = az = 0 > > Note that those sx sy sz are not in pixels, they are in angstroms. Also, I > note that there is a bug that disallows label pointers with this sort of > offset. Hmm.... > > > > > > On Sat, Jun 29, 2013 at 1:50 PM, James <ja...@ry...<javascript:_e({}, 'cvml', 'ja...@ry...');> > > wrote: > >> Thanks Angel. I see that echo has almost everything. But, the reason I >> was trying to use labels is because they can have a line to an atom. After >> reviewing "draw ARROW" in the hopes that it could substitute for that line, >> I don't see that it is possible to draw from a 2D point (e.g., top left) to >> a 3D point (an atom). I tried assigning echo an ID and drawing from that to >> an atom, but (as I suspected - just hoping I could trick it) since echo >> isn't a draw object it doesn't work. I can't find a way to bridge that >> 2D/3D coordinate issue, which label does automatically. >> >> Thanks, >> James >> >> >> On Saturday, June 29, 2013, Angel Herráez wrote: >> >>> Hello, James >>> >>> By definition, labels are attached to atoms. That is why the distance >>> cannot >>> be long. >>> >From your description, I don't think that labels are what you need. You >>> have >>> "echo" for positioning text either in 2D screen space or in 3D molecular >>> coordinates, at arbitrary positions and with chosen alignment, even >>> multi-line. >>> >>> e.g. >>> >>> set echo myEcho1 0 50%; echo Hello; >>> // windowLeft+windowMiddle, left flushed >>> set echo myEcho2 0 100%; echo Good Bye; >>> // windowLeft+windowTop, left flushed >>> set echo myEcho3 15% 85%; set echo center; echo Another; >>> // close to windowLeft+windowTop, center-justified >>> // note that text will never go out of screen, it will flush to the edge >>> if needed >>> >>> set echo myEcho4 0 100%; echo First Line; >>> set echo myEcho5 0 100%; echo "|Second Line"; //no overlap due to the >>> initial newline (|) >>> >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by Windows: >>> >>> Build for Windows Store. >>> >>> http://p.sf.net/sfu/windows-dev2dev >>> _______________________________________________ >>> Jmol-users mailing list >>> Jmo...@li... >>> https://lists.sourceforge.net/lists/listinfo/jmol-users >>> >> >> >> -- >> Sincerely, >> James Ryley, PhD, Patent Agent >> SumoBrain: Intellectual Property Solutions & Data >> AcclaimIP <https://www.acclaimip.com/> | FreePatentsOnline.com<http://www.freepatentsonline.com/>| >> SumoBrain.com <http://www.sumobrain.com/> | BioMedSearch.com<http://www.biomedsearch.com/> >> >> This communication is confidential and may be subject to legal privilege. >> Nothing contained herein should be construed as legal or patenting >> advice. >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Windows: >> >> Build for Windows Store. >> >> http://p.sf.net/sfu/windows-dev2dev >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... <javascript:_e({}, 'cvml', >> 'Jmo...@li...');> >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> >> > > > -- > Robert M. Hanson > Larson-Anderson Professor of Chemistry > St. Olaf College > Northfield, MN > http://www.stolaf.edu/people/hansonr > > > 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 > > |
From: Robert H. <ha...@st...> - 2013-06-29 21:40:42
|
It's much different from what existed in 13.0. In that version all you can do is move a label a small distance in pixels. 1) you can put any offset of any size in for a label. 2) you can offset in molecular coordinates (ax, ay, az) or in "screen" (sx, sy, sz) coordinates. I think the only thing it doesn't do is let you make labels, like echos, adjust for window boundaries. On Sat, Jun 29, 2013 at 9:44 PM, James <ja...@ry...> wrote: > How is that different than what exists? Perhaps in that it is applied > post-rotation? That would make it a bit simpler, assuming the offset can be > large enough to place the label anywhere. > > I think I could, with a little ugliness, make the current labels work if > the offset could be > 127. Or, I could use absolute scaling, try to > figure out where the screen boundary approximately is in angstroms, and use > that to draw an arrow from an echo to an atom. Anything that would reduce > the ugliness would be good lol. > > Thanks, > James > > > On Saturday, June 29, 2013, Robert Hanson wrote: > >> That's right. There isn't a way to draw from a fixed point on the screen >> to an atom. You might try a recent addition in relation to PyMOL. This is a >> much more general offset method that is used in PyMOL and I needed to >> implement in Jmol, so we have it as well now. >> >> Do give this a try and let me know if it solves your problem: >> >> new feature: PyMOL-like label offset options: >> >> set labelOffset [sx, sy, sz] >> set labelOffset [mode, sx, sy, sz, ax, ay, az] >> >> where >> >> sx,sy,sz are screen coord offsets >> -- in Angstroms >> -- applied after view rotation >> -- sy > 0 LOWERS label >> ax,ay,az are xyz position (in Angstroms; applied before view rotation) >> mode == 1 indicates xyz position is an offset to the atom position >> mode != 1 indicates xyz position is absolute >> defaults: mode == 1; ax = ay = az = 0 >> >> Note that those sx sy sz are not in pixels, they are in angstroms. Also, >> I note that there is a bug that disallows label pointers with this sort of >> offset. Hmm.... >> >> >> >> >> >> On Sat, Jun 29, 2013 at 1:50 PM, James <ja...@ry...> wrote: >> >>> Thanks Angel. I see that echo has almost everything. But, the reason I >>> was trying to use labels is because they can have a line to an atom. After >>> reviewing "draw ARROW" in the hopes that it could substitute for that line, >>> I don't see that it is possible to draw from a 2D point (e.g., top left) to >>> a 3D point (an atom). I tried assigning echo an ID and drawing from that to >>> an atom, but (as I suspected - just hoping I could trick it) since echo >>> isn't a draw object it doesn't work. I can't find a way to bridge that >>> 2D/3D coordinate issue, which label does automatically. >>> >>> Thanks, >>> James >>> >>> >>> On Saturday, June 29, 2013, Angel Herráez wrote: >>> >>>> Hello, James >>>> >>>> By definition, labels are attached to atoms. That is why the distance >>>> cannot >>>> be long. >>>> >From your description, I don't think that labels are what you need. >>>> You have >>>> "echo" for positioning text either in 2D screen space or in 3D molecular >>>> coordinates, at arbitrary positions and with chosen alignment, even >>>> multi-line. >>>> >>>> e.g. >>>> >>>> set echo myEcho1 0 50%; echo Hello; >>>> // windowLeft+windowMiddle, left flushed >>>> set echo myEcho2 0 100%; echo Good Bye; >>>> // windowLeft+windowTop, left flushed >>>> set echo myEcho3 15% 85%; set echo center; echo Another; >>>> // close to windowLeft+windowTop, center-justified >>>> // note that text will never go out of screen, it will flush to the >>>> edge if needed >>>> >>>> set echo myEcho4 0 100%; echo First Line; >>>> set echo myEcho5 0 100%; echo "|Second Line"; //no overlap due to the >>>> initial newline (|) >>>> >>>> >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> This SF.net email is sponsored by Windows: >>>> >>>> Build for Windows Store. >>>> >>>> http://p.sf.net/sfu/windows-dev2dev >>>> _______________________________________________ >>>> Jmol-users mailing list >>>> Jmo...@li... >>>> https://lists.sourceforge.net/lists/listinfo/jmol-users >>>> >>> >>> >>> -- >>> Sincerely, >>> James Ryley, PhD, Patent Agent >>> SumoBrain: Intellectual Property Solutions & Data >>> AcclaimIP <https://www.acclaimip.com/> | FreePatentsOnline.com<http://www.freepatentsonline.com/>| >>> SumoBrain.com <http://www.sumobrain.com/> | BioMedSearch.com<http://www.biomedsearch.com/> >>> >>> This communication is confidential and may be subject to legal privilege. >>> Nothing contained herein should be construed as legal or patenting >>> advice. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> This SF.net email is sponsored by Windows: >>> >>> Build for Windows Store. >>> >>> http://p.sf.net/sfu/windows-dev2dev >>> _______________________________________________ >>> Jmol-users mailing list >>> Jmo...@li... >>> https://lists.sourceforge.net/lists/listinfo/jmol-users >>> >>> >> >> >> -- >> Robert M. Hanson >> Larson-Anderson Professor of Chemistry >> St. Olaf College >> Northfield, MN >> http://www.stolaf.edu/people/hansonr >> >> >> 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 >> >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Larson-Anderson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr 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 |
From: Robert H. <ha...@st...> - 2013-06-29 21:41:34
|
Would you prefer having a 2D echo that is tied to an atom by a pointer? On Sat, Jun 29, 2013 at 10:40 PM, Robert Hanson <ha...@st...> wrote: > It's much different from what existed in 13.0. In that version all you can > do is move a label a small distance in pixels. > > 1) you can put any offset of any size in for a label. > 2) you can offset in molecular coordinates (ax, ay, az) or in "screen" > (sx, sy, sz) coordinates. > > I think the only thing it doesn't do is let you make labels, like echos, > adjust for window boundaries. > > > > > On Sat, Jun 29, 2013 at 9:44 PM, James <ja...@ry...> wrote: > >> How is that different than what exists? Perhaps in that it is applied >> post-rotation? That would make it a bit simpler, assuming the offset can be >> large enough to place the label anywhere. >> >> I think I could, with a little ugliness, make the current labels work if >> the offset could be > 127. Or, I could use absolute scaling, try to >> figure out where the screen boundary approximately is in angstroms, and use >> that to draw an arrow from an echo to an atom. Anything that would reduce >> the ugliness would be good lol. >> >> Thanks, >> James >> >> >> On Saturday, June 29, 2013, Robert Hanson wrote: >> >>> That's right. There isn't a way to draw from a fixed point on the >>> screen to an atom. You might try a recent addition in relation to PyMOL. >>> This is a much more general offset method that is used in PyMOL and I >>> needed to implement in Jmol, so we have it as well now. >>> >>> Do give this a try and let me know if it solves your problem: >>> >>> new feature: PyMOL-like label offset options: >>> >>> set labelOffset [sx, sy, sz] >>> set labelOffset [mode, sx, sy, sz, ax, ay, az] >>> >>> where >>> >>> sx,sy,sz are screen coord offsets >>> -- in Angstroms >>> -- applied after view rotation >>> -- sy > 0 LOWERS label >>> ax,ay,az are xyz position (in Angstroms; applied before view rotation) >>> mode == 1 indicates xyz position is an offset to the atom position >>> mode != 1 indicates xyz position is absolute >>> defaults: mode == 1; ax = ay = az = 0 >>> >>> Note that those sx sy sz are not in pixels, they are in angstroms. Also, >>> I note that there is a bug that disallows label pointers with this sort of >>> offset. Hmm.... >>> >>> >>> >>> >>> >>> On Sat, Jun 29, 2013 at 1:50 PM, James <ja...@ry...> wrote: >>> >>>> Thanks Angel. I see that echo has almost everything. But, the reason I >>>> was trying to use labels is because they can have a line to an atom. After >>>> reviewing "draw ARROW" in the hopes that it could substitute for that line, >>>> I don't see that it is possible to draw from a 2D point (e.g., top left) to >>>> a 3D point (an atom). I tried assigning echo an ID and drawing from that to >>>> an atom, but (as I suspected - just hoping I could trick it) since echo >>>> isn't a draw object it doesn't work. I can't find a way to bridge that >>>> 2D/3D coordinate issue, which label does automatically. >>>> >>>> Thanks, >>>> James >>>> >>>> >>>> On Saturday, June 29, 2013, Angel Herráez wrote: >>>> >>>>> Hello, James >>>>> >>>>> By definition, labels are attached to atoms. That is why the distance >>>>> cannot >>>>> be long. >>>>> >From your description, I don't think that labels are what you need. >>>>> You have >>>>> "echo" for positioning text either in 2D screen space or in 3D >>>>> molecular >>>>> coordinates, at arbitrary positions and with chosen alignment, even >>>>> multi-line. >>>>> >>>>> e.g. >>>>> >>>>> set echo myEcho1 0 50%; echo Hello; >>>>> // windowLeft+windowMiddle, left flushed >>>>> set echo myEcho2 0 100%; echo Good Bye; >>>>> // windowLeft+windowTop, left flushed >>>>> set echo myEcho3 15% 85%; set echo center; echo Another; >>>>> // close to windowLeft+windowTop, center-justified >>>>> // note that text will never go out of screen, it will flush to the >>>>> edge if needed >>>>> >>>>> set echo myEcho4 0 100%; echo First Line; >>>>> set echo myEcho5 0 100%; echo "|Second Line"; //no overlap due to the >>>>> initial newline (|) >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> This SF.net email is sponsored by Windows: >>>>> >>>>> Build for Windows Store. >>>>> >>>>> http://p.sf.net/sfu/windows-dev2dev >>>>> _______________________________________________ >>>>> Jmol-users mailing list >>>>> Jmo...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/jmol-users >>>>> >>>> >>>> >>>> -- >>>> Sincerely, >>>> James Ryley, PhD, Patent Agent >>>> SumoBrain: Intellectual Property Solutions & Data >>>> AcclaimIP <https://www.acclaimip.com/> | FreePatentsOnline.com<http://www.freepatentsonline.com/>| >>>> SumoBrain.com <http://www.sumobrain.com/> | BioMedSearch.com<http://www.biomedsearch.com/> >>>> >>>> This communication is confidential and may be subject to legal >>>> privilege. >>>> Nothing contained herein should be construed as legal or patenting >>>> advice. >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> This SF.net email is sponsored by Windows: >>>> >>>> Build for Windows Store. >>>> >>>> http://p.sf.net/sfu/windows-dev2dev >>>> _______________________________________________ >>>> Jmol-users mailing list >>>> Jmo...@li... >>>> https://lists.sourceforge.net/lists/listinfo/jmol-users >>>> >>>> >>> >>> >>> -- >>> Robert M. Hanson >>> Larson-Anderson Professor of Chemistry >>> St. Olaf College >>> Northfield, MN >>> http://www.stolaf.edu/people/hansonr >>> >>> >>> 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 >>> >>> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Windows: >> >> Build for Windows Store. >> >> http://p.sf.net/sfu/windows-dev2dev >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> >> > > > -- > Robert M. Hanson > Larson-Anderson Professor of Chemistry > St. Olaf College > Northfield, MN > http://www.stolaf.edu/people/hansonr > > > 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 > > -- Robert M. Hanson Larson-Anderson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr 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 |
From: James <ja...@ry...> - 2013-06-29 21:43:36
|
For my purposes that would be by far the simplest I think. Sincerely, James On Saturday, June 29, 2013, Robert Hanson wrote: > Would you prefer having a 2D echo that is tied to an atom by a pointer? > > > On Sat, Jun 29, 2013 at 10:40 PM, Robert Hanson <ha...@st...>wrote: > > It's much different from what existed in 13.0. In that version all you can > do is move a label a small distance in pixels. > > 1) you can put any offset of any size in for a label. > 2) you can offset in molecular coordinates (ax, ay, az) or in "screen" > (sx, sy, sz) coordinates. > > I think the only thing it doesn't do is let you make labels, like echos, > adjust for window boundaries. > > > > > On Sat, Jun 29, 2013 at 9:44 PM, James <ja...@ry...> wrote: > > How is that different than what exists? Perhaps in that it is applied > post-rotation? That would make it a bit simpler, assuming the offset can be > large enough to place the label anywhere. > > I think I could, with a little ugliness, make the current labels work if > the offset could be > 127. Or, I could use absolute scaling, try to > figure out where the screen boundary approximately is in angstroms, and use > that to draw an arrow from an echo to an atom. Anything that would reduce > the ugliness would be good lol. > > Thanks, > James > > > On Saturday, June 29, 2013, Robert Hanson wrote: > > That's right. There isn't a way to draw from a fixed point on the screen > to an atom. You might try a recent addition in relation to PyMOL. This is a > much more general offset method that is used in PyMOL and I needed to > implement in Jmol, so we have it as well now. > > Do give this a try and let me know if it solves your problem: > > new feature: PyMOL-like label offset options: > > set labelOffset [sx, sy, sz] > set labelOffset [mode, sx, sy, sz, ax, ay, az] > > where > > sx,sy,sz are screen coord offsets > -- in Angstroms > -- applied after view rotation > -- sy > 0 LOWERS label > ax,ay,az are xyz position (in Angstroms; applied before view rotation) > mode == 1 indicates xyz position is an offset to the atom position > mode != 1 indicates xyz position is absolute > defaults: mode == 1; ax = ay = az = 0 > > Note that those sx sy sz are not in pixels, they are in angstroms. Also, I > note that there is a bug that disallows label pointers with this sort of > offset. Hmm.... > > > > > > On Sat, Jun 29, 2013 at 1:50 PM, James <ja...@ry...> wrote: > > Thanks Angel. I see that echo has almost everything. But, the reason I was > trying to use labels is because they can have a line to an atom. After > reviewing "draw ARROW" in the hopes that it could substitute for that line, > I don't see that it is possible to draw from a 2D point (e.g., top left) to > a 3D point (an atom). I tried assigning echo an ID and drawing from that to > an atom, but (as I suspected - just hoping I could trick it) since echo > isn't a draw object it doesn't work. I can't find a way to bridge that > 2D/3D coordinate issue, which label does automatically. > > Thanks, > James > > > On Saturday, June 29, 2013, Angel Herráez wrote: > > Hello, James > > By definition, labels are attached to atoms. That is why the distance > cannot > be long. > >From your description, I don't think that labels are what you need. You > have > "echo" for positioning text either in 2D screen space or in 3D molecular > coordinates, at arbitrary positions and with chosen alignment, even > multi-line. > > e.g. > > set echo myEcho1 0 50%; echo Hello; > // windowLeft+windowMiddle, left flushed > set echo myEcho2 0 100%; echo Good Bye; > // windowLeft+windowTop, left flushed > set echo myEcho3 15% 85%; set echo center; echo Another; > // close to windowLeft+windowTop, center-justified > // note that text will never go out of screen, it will flush to the edge > if needed > > set e > > |
From: Robert H. <ha...@st...> - 2013-06-29 23:38:01
|
OK, that's in now: http://chemapps.stolaf.edu/jmol/Jmol-13.zip ___JmolVersion="13.1.19_dev_2013.06.29" new feature: SET ECHO POINT {atom or point} -- allows 2D and 3D echos to have a pointer to an atom or a specified position such as {0 2.0 3.0} -- needs a bit of adjustment, as it only works when x is not within range of echo itself (same with labels) On Sat, Jun 29, 2013 at 10:43 PM, James <ja...@ry...> wrote: > For my purposes that would be by far the simplest I think. > > Sincerely, > James > > On Saturday, June 29, 2013, Robert Hanson wrote: > >> Would you prefer having a 2D echo that is tied to an atom by a pointer? >> >> >> On Sat, Jun 29, 2013 at 10:40 PM, Robert Hanson <ha...@st...>wrote: >> >> It's much different from what existed in 13.0. In that version all you >> can do is move a label a small distance in pixels. >> >> 1) you can put any offset of any size in for a label. >> 2) you can offset in molecular coordinates (ax, ay, az) or in "screen" >> (sx, sy, sz) coordinates. >> >> I think the only thing it doesn't do is let you make labels, like echos, >> adjust for window boundaries. >> >> >> >> >> On Sat, Jun 29, 2013 at 9:44 PM, James <ja...@ry...> wrote: >> >> How is that different than what exists? Perhaps in that it is applied >> post-rotation? That would make it a bit simpler, assuming the offset can be >> large enough to place the label anywhere. >> >> I think I could, with a little ugliness, make the current labels work if >> the offset could be > 127. Or, I could use absolute scaling, try to >> figure out where the screen boundary approximately is in angstroms, and use >> that to draw an arrow from an echo to an atom. Anything that would reduce >> the ugliness would be good lol. >> >> Thanks, >> James >> >> >> On Saturday, June 29, 2013, Robert Hanson wrote: >> >> That's right. There isn't a way to draw from a fixed point on the >> screen to an atom. You might try a recent addition in relation to PyMOL. >> This is a much more general offset method that is used in PyMOL and I >> needed to implement in Jmol, so we have it as well now. >> >> Do give this a try and let me know if it solves your problem: >> >> new feature: PyMOL-like label offset options: >> >> set labelOffset [sx, sy, sz] >> set labelOffset [mode, sx, sy, sz, ax, ay, az] >> >> where >> >> sx,sy,sz are screen coord offsets >> -- in Angstroms >> -- applied after view rotation >> -- sy > 0 LOWERS label >> ax,ay,az are xyz position (in Angstroms; applied before view rotation) >> mode == 1 indicates xyz position is an offset to the atom position >> mode != 1 indicates xyz position is absolute >> defaults: mode == 1; ax = ay = az = 0 >> >> Note that those sx sy sz are not in pixels, they are in angstroms. Also, >> I note that there is a bug that disallows label pointers with this sort of >> offset. Hmm.... >> >> >> >> >> >> On Sat, Jun 29, 2013 at 1:50 PM, James <ja...@ry...> wrote: >> >> Thanks Angel. I see that echo has almost everything. But, the reason I >> was trying to use labels is because they can have a line to an atom. After >> reviewing "draw ARROW" in the hopes that it could substitute for that line, >> I don't see that it is possible to draw from a 2D point (e.g., top left) to >> a 3D point (an atom). I tried assigning echo an ID and drawing from that to >> an atom, but (as I suspected - just hoping I could trick it) since echo >> isn't a draw object it doesn't work. I can't find a way to bridge that >> 2D/3D coordinate issue, which label does automatically. >> >> Thanks, >> James >> >> >> On Saturday, June 29, 2013, Angel Herráez wrote: >> >> Hello, James >> >> By definition, labels are attached to atoms. That is why the distance >> cannot >> be long. >> >From your description, I don't think that labels are what you need. You >> have >> "echo" for positioning text either in 2D screen space or in 3D molecular >> coordinates, at arbitrary positions and with chosen alignment, even >> multi-line. >> >> e.g. >> >> set echo myEcho1 0 50%; echo Hello; >> // windowLeft+windowMiddle, left flushed >> set echo myEcho2 0 100%; echo Good Bye; >> // windowLeft+windowTop, left flushed >> set echo myEcho3 15% 85%; set echo center; echo Another; >> // close to windowLeft+windowTop, center-justified >> // note that text will never go out of screen, it will flush to the edge >> if needed >> >> set e >> >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Larson-Anderson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr 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 |
From: James <ja...@ry...> - 2013-06-30 00:45:47
|
Works great, even with the X issue (easy to avoid). Thanks! I've got code now that will auto-label a PDB file with anything in the REMARK 800 lines. I'm going to update it to allow a choice of echoes or labels. I'll probably review the pdb spec again and see what the best way to save new labels/echoes is so they won't get overwritten in other programs (there is no problem if you don't need more than one REMARK on an atom, I'm just wondering what the best way to handle more than 1 is). Once I've satisfied myself that the generated files round-trip cleanly (or before, if you want awful code!), I'll post it in case it's useful for anyone. Sincerely, James On Sat, Jun 29, 2013 at 7:37 PM, Robert Hanson <ha...@st...> wrote: > OK, that's in now: > > http://chemapps.stolaf.edu/jmol/Jmol-13.zip > > > ___JmolVersion="13.1.19_dev_2013.06.29" > > new feature: SET ECHO POINT {atom or point} > -- allows 2D and 3D echos to have a pointer to an atom or a specified > position such as {0 2.0 3.0} > -- needs a bit of adjustment, as it only works when x is not within > range of echo itself (same with labels) > > > > > On Sat, Jun 29, 2013 at 10:43 PM, James <ja...@ry...> wrote: > >> For my purposes that would be by far the simplest I think. >> >> Sincerely, >> James >> >> On Saturday, June 29, 2013, Robert Hanson wrote: >> >>> Would you prefer having a 2D echo that is tied to an atom by a pointer? >>> >>> >>> On Sat, Jun 29, 2013 at 10:40 PM, Robert Hanson <ha...@st...>wrote: >>> >>> It's much different from what existed in 13.0. In that version all you >>> can do is move a label a small distance in pixels. >>> >>> 1) you can put any offset of any size in for a label. >>> 2) you can offset in molecular coordinates (ax, ay, az) or in "screen" >>> (sx, sy, sz) coordinates. >>> >>> I think the only thing it doesn't do is let you make labels, like echos, >>> adjust for window boundaries. >>> >>> >>> >>> >>> On Sat, Jun 29, 2013 at 9:44 PM, James <ja...@ry...> wrote: >>> >>> How is that different than what exists? Perhaps in that it is applied >>> post-rotation? That would make it a bit simpler, assuming the offset can be >>> large enough to place the label anywhere. >>> >>> I think I could, with a little ugliness, make the current labels work if >>> the offset could be > 127. Or, I could use absolute scaling, try to >>> figure out where the screen boundary approximately is in angstroms, and use >>> that to draw an arrow from an echo to an atom. Anything that would reduce >>> the ugliness would be good lol. >>> >>> Thanks, >>> James >>> >>> >>> On Saturday, June 29, 2013, Robert Hanson wrote: >>> >>> That's right. There isn't a way to draw from a fixed point on the >>> screen to an atom. You might try a recent addition in relation to PyMOL. >>> This is a much more general offset method that is used in PyMOL and I >>> needed to implement in Jmol, so we have it as well now. >>> >>> Do give this a try and let me know if it solves your problem: >>> >>> new feature: PyMOL-like label offset options: >>> >>> set labelOffset [sx, sy, sz] >>> set labelOffset [mode, sx, sy, sz, ax, ay, az] >>> >>> where >>> >>> sx,sy,sz are screen coord offsets >>> -- in Angstroms >>> -- applied after view rotation >>> -- sy > 0 LOWERS label >>> ax,ay,az are xyz position (in Angstroms; applied before view rotation) >>> mode == 1 indicates xyz position is an offset to the atom position >>> mode != 1 indicates xyz position is absolute >>> defaults: mode == 1; ax = ay = az = 0 >>> >>> Note that those sx sy sz are not in pixels, they are in angstroms. Also, >>> I note that there is a bug that disallows label pointers with this sort of >>> offset. Hmm.... >>> >>> >>> >>> >>> >>> On Sat, Jun 29, 2013 at 1:50 PM, James <ja...@ry...> wrote: >>> >>> Thanks Angel. I see that echo has almost everything. But, the reason I >>> was trying to use labels is because they can have a line to an atom. After >>> reviewing "draw ARROW" in the hopes that it could substitute for that line, >>> I don't see that it is possible to draw from a 2D point (e.g., top left) to >>> a 3D point (an atom). I tried assigning echo an ID and drawing from that to >>> an atom, but (as I suspected - just hoping I could trick it) since echo >>> isn't a draw object it doesn't work. I can't find a way to bridge that >>> 2D/3D coordinate issue, which label does automatically. >>> >>> Thanks, >>> James >>> >>> >>> On Saturday, June 29, 2013, Angel Herráez wrote: >>> >>> Hello, James >>> >>> By definition, labels are attached to atoms. That is why the distance >>> cannot >>> be long. >>> >From your description, I don't think that labels are what you need. You >>> have >>> "echo" for positioning text either in 2D screen space or in 3D molecular >>> coordinates, at arbitrary positions and with chosen alignment, even >>> multi-line. >>> >>> e.g. >>> >>> set echo myEcho1 0 50%; echo Hello; >>> // windowLeft+windowMiddle, left flushed >>> set echo myEcho2 0 100%; echo Good Bye; >>> // windowLeft+windowTop, left flushed >>> set echo myEcho3 15% 85%; set echo center; echo Another; >>> // close to windowLeft+windowTop, center-justified >>> // note that text will never go out of screen, it will flush to the edge >>> if needed >>> >>> set e >>> >>> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Windows: >> >> Build for Windows Store. >> >> http://p.sf.net/sfu/windows-dev2dev >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> >> > > > -- > Robert M. Hanson > Larson-Anderson Professor of Chemistry > St. Olaf College > Northfield, MN > http://www.stolaf.edu/people/hansonr > > > 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 > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > |