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 <hansonr@stolaf.edu> 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 <james@ryley.com> 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 <hansonr@stolaf.edu> 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 <james@ryley.com> 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 <james@ryley.com> 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
Jmol-users@lists.sourceforge.net
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
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users