[Jmol-developers] [ jmol-Feature Requests-1878094 ] Spartan spinput format

2008-02-05 Thread SourceForge.net
Feature Requests item #1878094, was opened at 2008-01-23 07:19
Message generated for change (Comment added) made by hansonr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379136&aid=1878094&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: New IO Format
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Rene Kanters (rkanters)
Assigned to: Bob Hanson (hansonr)
Summary: Spartan spinput format

Initial Comment:
Hi,

I was wondering whether it is possible to start supporting the Spartan spinput 
format (which can be created in the windows version of Spartan).

It seems very similar to the Odyssey format and in my cases where I have 
molecules that have a positive charge and S = 1, I have the line 1  2 in the 
file. If I change this to a 0 1, which is what triggers the resolver to 
conclude that it is an Odyssey file, the file is read properly.

I noticed the email this morning to force load to interpret a file as a cif 
(where the resolved tripped up), and was wondering whether it maybe possible to 
resolve this problem/feature request in a similar way too?

Thanks,
René

Just in case somebody is wondering I'll include a spinput file with this request

--

>Comment By: Bob Hanson (hansonr)
Date: 2008-02-05 07:52

Message:
Logged In: YES 
user_id=1082841
Originator: NO

OK, that's checked in for 11.5.4 now. 
a) ignore comment lines starting with "C "
b) check to see that next line starts with " "
c) skip one line; check next line for exactly two integers -- charge and
spin
d) check next line for exactly four numbers

Please test using negatively charged species.

--

Comment By: Rene Kanters (rkanters)
Date: 2008-02-03 14:49

Message:
Logged In: YES 
user_id=905185
Originator: YES

The line is basically contains the charge and spin multiplicity (in that
order), so the checked in modification of determining whether there are two
tokens both of which evaluate to a value larger or equal to 0 would only
work for neutral or positive charged ions (not negative ones).
I didn't dare to mess with the logic of determining the file format
because I wasn't sure what unanticipated consequences my modifications may
have on recognizing other file formats, but if it is OK to just verify that
the first value is integer and the second larger or equal to 0 the
recognition should work.

Thanks,
René



--

Comment By: Bob Hanson (hansonr)
Date: 2008-02-01 22:57

Message:
Logged In: YES 
user_id=1082841
Originator: NO

What are the options for that line? Anything else besides 0 1 and 1 2 ?

This is fixed now for 11.5.4 for those two options, which will be released
soon. If other options are possible, then you will have to force the
Odyssey reader using:

load odyssey::filename.spinput

Otherwise Jmol will think this is a MOL file.


Bob Hanson


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379136&aid=1878094&group_id=23629

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


[Jmol-developers] [ jmol-Feature Requests-1878094 ] Spartan spinput format

2008-02-05 Thread SourceForge.net
Feature Requests item #1878094, was opened at 2008-01-23 08:19
Message generated for change (Comment added) made by rkanters
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379136&aid=1878094&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: New IO Format
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Rene Kanters (rkanters)
Assigned to: Bob Hanson (hansonr)
Summary: Spartan spinput format

Initial Comment:
Hi,

I was wondering whether it is possible to start supporting the Spartan spinput 
format (which can be created in the windows version of Spartan).

It seems very similar to the Odyssey format and in my cases where I have 
molecules that have a positive charge and S = 1, I have the line 1  2 in the 
file. If I change this to a 0 1, which is what triggers the resolver to 
conclude that it is an Odyssey file, the file is read properly.

I noticed the email this morning to force load to interpret a file as a cif 
(where the resolved tripped up), and was wondering whether it maybe possible to 
resolve this problem/feature request in a similar way too?

Thanks,
René

Just in case somebody is wondering I'll include a spinput file with this request

--

>Comment By: Rene Kanters (rkanters)
Date: 2008-02-05 11:54

Message:
Logged In: YES 
user_id=905185
Originator: YES

Hi,

I just did an update in Eclipse to get the latest modifications, but when
I run Jmol I now get the following message:
ffa185198:~/Projects/Eclipse/Jmol-datafiles/spinput rkanters$ jmol
splash_image=jar:file:/Users/rkanters/Projects/Eclipse/Jmol/build/Jmol.jar!/org/openscience/jmol/images/Jmol_splash.jpg
history file is /Users/rkanters/.jmol/history
using Smarter Model Adapter
(C) 2007 Jmol Development
Jmol Version 11.5.4  2007-12-20 00:37
java.vendor:Apple Computer, Inc.
java.version:1.5.0_13
os.name:Mac OS X
memory:4.3/6.0
appletId:
uncaught exception: java.lang.NoSuchMethodError:
org.jmol.g3d.Graphics3D.getFont3D(I)Lorg/jmol/g3d/Font3D;
java.lang.NoSuchMethodError:
org.jmol.g3d.Graphics3D.getFont3D(I)Lorg/jmol/g3d/Font3D;
at org.jmol.shape.Measures.initShape(Unknown Source)
at org.jmol.shape.Shape.initializeShape(Unknown Source)
at org.jmol.modelset.ModelSet.allocateShape(Unknown Source)
at org.jmol.modelset.ModelSet.loadShape(Unknown Source)
at org.jmol.modelset.ModelLoader.finalizeShapes(Unknown Source)
at org.jmol.modelset.ModelLoader.initializeModelSet(Unknown
Source)
at org.jmol.modelset.ModelLoader.(Unknown Source)
at org.jmol.viewer.ModelManager.zap(Unknown Source)
at org.jmol.viewer.Viewer.zap(Unknown Source)
at org.jmol.viewer.Viewer.setAppletContext(Unknown Source)
at org.openscience.jmol.app.Jmol.(Unknown Source)
at org.openscience.jmol.app.Jmol.(Unknown Source)
at org.openscience.jmol.app.Jmol.getJmol(Unknown Source)
at org.openscience.jmol.app.Jmol.main(Unknown Source)
Exception in thread "main" java.lang.NullPointerException
at org.openscience.jmol.app.Jmol.main(Unknown Source)

so something got broken.

--

Comment By: Bob Hanson (hansonr)
Date: 2008-02-05 08:52

Message:
Logged In: YES 
user_id=1082841
Originator: NO

OK, that's checked in for 11.5.4 now. 
a) ignore comment lines starting with "C "
b) check to see that next line starts with " "
c) skip one line; check next line for exactly two integers -- charge and
spin
d) check next line for exactly four numbers

Please test using negatively charged species.

--

Comment By: Rene Kanters (rkanters)
Date: 2008-02-03 15:49

Message:
Logged In: YES 
user_id=905185
Originator: YES

The line is basically contains the charge and spin multiplicity (in that
order), so the checked in modification of determining whether there are two
tokens both of which evaluate to a value larger or equal to 0 would only
work for neutral or positive charged ions (not negative ones).
I didn't dare to mess with the logic of determining the file format
because I wasn't sure what unanticipated consequences my modifications may
have on recognizing other file formats, but if it is OK to just verify that
the first value is integer and the second larger or equal to 0 the
recognition should work.

Thanks,
René



--

Comment By: Bob Hanson (hansonr)
Date: 2008-02-01 23:57

Message:
Logged In: YES 
user_id=1082841
Originator: NO

What are the options for that line? Anything else besides 0 1 and 1 2 ?

This is fixed now for 11.5.4 for those two options, which will be released
soon. If other options are possible, then you will have to fo

[Jmol-developers] testing please -- set fontScaling TRUE/FALSE

2008-02-05 Thread Bob Hanson
Jmol Developers -- I need testers. I have uploaded 11.5.4 code that

(1) allows for the fonts in labels and 3D echos to scale with zoom and 
window resizing, and
(2) generates proper-sized fonts when an image is created at a different 
size than the current window.

This was rather tricky to implement, and I'm not convinced it is 
correct. But here is the basic idea:

1) Use

 set fontScaling TRUE

to initiate font scaling for labels and 3D echo text. This does not 
affect any labels or echo text already in place, and it does not affect 
2D echo text at all.

Now zoom to some desired level and create a label or 3D echo:

 select atomno=1;label
 set echo myecho {1 1 1};echo "testing"

Now zoom some more. You should see the fonts scaling properly.

Resize the window. The fonts should scale.

Use

  write image 1000 1000 t.jpg

to create an image. Check it -- the fonts should be scaled properly. 
Items to check include axes, unitcells, MO titles, quaternion frame 
titles -- anything with text.

Note that because the fonts have to appear the way they always would 
before, we have to use the same notation as before for indicating fonts. 
(I've expanded that to fractional points, though.) And because fonts 
have to scale, there is a "reference" scale for them. This reference is 
based on the scale of the display, in Angstroms per pixel. This allows 
fonts rendered in one window size to appear scaled properly when the 
window size is scaled. The value of this reference is calculated 
automatically when you introduce a label or 3D echo, and it is saved in 
the state. You can see it by using

  show state

In which case you will see something like this:

  select ({0});
  label "%e%i";
  font label 20.0 Serif Plain;
  set labelScaleReference 0.02;

and

  set echo myecho2 {2.0 2.0 2.0}; echo "XX";
  font echo 12.0 Serif Bold 0.01;

The number 0.02 indicated as a labelScaleReference and the number 0.01 
at the end of the font command are the scale references, in Angstroms 
per pixel. The larger this number, the larger the font. You can change 
this number on the fly to set the font scaling to anything you want. 
Roughly, the letter "X" of a font of scale 10.0 with a scale reference 
of 0.1 will by about 1 Angstrom tall at all zoom levels.

The tricky part of all this was that I had to completely rewrite how 
antialiasing of display and images affected font size. So that needs 
thorough testing. You will notice some slight changes when you resize a 
window. This is because the fonts are scaled in 0.1-point increments.

Also tricky was getting the background boxes and offsets correct. Please 
test these, and if you see anything odd, let me know.

I'm also concerned about memory with all these extra fonts. So be on the 
alert for slower processing or large memory usage.

Navigation mode is a bit odd -- the way that works is that the screen 
scale is fixed, and the model passes through it. So there if navigation 
mode is set, then fonts do not scale. It probably suggests I need an 
additional scaling based on distance from the plane of the observer in 
that case, but I'm not there yet, and I really don't know how to do that 
yet.

Bob



-- 
Robert M. Hanson
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


[Jmol-developers] [ jmol-Feature Requests-1878094 ] Spartan spinput format

2008-02-05 Thread SourceForge.net
Feature Requests item #1878094, was opened at 2008-01-23 07:19
Message generated for change (Comment added) made by hansonr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379136&aid=1878094&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: New IO Format
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Rene Kanters (rkanters)
Assigned to: Bob Hanson (hansonr)
Summary: Spartan spinput format

Initial Comment:
Hi,

I was wondering whether it is possible to start supporting the Spartan spinput 
format (which can be created in the windows version of Spartan).

It seems very similar to the Odyssey format and in my cases where I have 
molecules that have a positive charge and S = 1, I have the line 1  2 in the 
file. If I change this to a 0 1, which is what triggers the resolver to 
conclude that it is an Odyssey file, the file is read properly.

I noticed the email this morning to force load to interpret a file as a cif 
(where the resolved tripped up), and was wondering whether it maybe possible to 
resolve this problem/feature request in a similar way too?

Thanks,
René

Just in case somebody is wondering I'll include a spinput file with this request

--

>Comment By: Bob Hanson (hansonr)
Date: 2008-02-05 11:10

Message:
Logged In: YES 
user_id=1082841
Originator: NO

try updating again, and do a clean build.

--

Comment By: Rene Kanters (rkanters)
Date: 2008-02-05 10:54

Message:
Logged In: YES 
user_id=905185
Originator: YES

Hi,

I just did an update in Eclipse to get the latest modifications, but when
I run Jmol I now get the following message:
ffa185198:~/Projects/Eclipse/Jmol-datafiles/spinput rkanters$ jmol
splash_image=jar:file:/Users/rkanters/Projects/Eclipse/Jmol/build/Jmol.jar!/org/openscience/jmol/images/Jmol_splash.jpg
history file is /Users/rkanters/.jmol/history
using Smarter Model Adapter
(C) 2007 Jmol Development
Jmol Version 11.5.4  2007-12-20 00:37
java.vendor:Apple Computer, Inc.
java.version:1.5.0_13
os.name:Mac OS X
memory:4.3/6.0
appletId:
uncaught exception: java.lang.NoSuchMethodError:
org.jmol.g3d.Graphics3D.getFont3D(I)Lorg/jmol/g3d/Font3D;
java.lang.NoSuchMethodError:
org.jmol.g3d.Graphics3D.getFont3D(I)Lorg/jmol/g3d/Font3D;
at org.jmol.shape.Measures.initShape(Unknown Source)
at org.jmol.shape.Shape.initializeShape(Unknown Source)
at org.jmol.modelset.ModelSet.allocateShape(Unknown Source)
at org.jmol.modelset.ModelSet.loadShape(Unknown Source)
at org.jmol.modelset.ModelLoader.finalizeShapes(Unknown Source)
at org.jmol.modelset.ModelLoader.initializeModelSet(Unknown
Source)
at org.jmol.modelset.ModelLoader.(Unknown Source)
at org.jmol.viewer.ModelManager.zap(Unknown Source)
at org.jmol.viewer.Viewer.zap(Unknown Source)
at org.jmol.viewer.Viewer.setAppletContext(Unknown Source)
at org.openscience.jmol.app.Jmol.(Unknown Source)
at org.openscience.jmol.app.Jmol.(Unknown Source)
at org.openscience.jmol.app.Jmol.getJmol(Unknown Source)
at org.openscience.jmol.app.Jmol.main(Unknown Source)
Exception in thread "main" java.lang.NullPointerException
at org.openscience.jmol.app.Jmol.main(Unknown Source)

so something got broken.

--

Comment By: Bob Hanson (hansonr)
Date: 2008-02-05 07:52

Message:
Logged In: YES 
user_id=1082841
Originator: NO

OK, that's checked in for 11.5.4 now. 
a) ignore comment lines starting with "C "
b) check to see that next line starts with " "
c) skip one line; check next line for exactly two integers -- charge and
spin
d) check next line for exactly four numbers

Please test using negatively charged species.

--

Comment By: Rene Kanters (rkanters)
Date: 2008-02-03 14:49

Message:
Logged In: YES 
user_id=905185
Originator: YES

The line is basically contains the charge and spin multiplicity (in that
order), so the checked in modification of determining whether there are two
tokens both of which evaluate to a value larger or equal to 0 would only
work for neutral or positive charged ions (not negative ones).
I didn't dare to mess with the logic of determining the file format
because I wasn't sure what unanticipated consequences my modifications may
have on recognizing other file formats, but if it is OK to just verify that
the first value is integer and the second larger or equal to 0 the
recognition should work.

Thanks,
René



--

Comment By: Bob Hanson (hansonr)
Date: 2008-02-01 22:57

Message:
Logged In: YES 
user_id=10828

[Jmol-developers] [ jmol-Feature Requests-1878094 ] Spartan spinput format

2008-02-05 Thread SourceForge.net
Feature Requests item #1878094, was opened at 2008-01-23 05:19
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379136&aid=1878094&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: New IO Format
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Rene Kanters (rkanters)
Assigned to: Bob Hanson (hansonr)
Summary: Spartan spinput format

Initial Comment:
Hi,

I was wondering whether it is possible to start supporting the Spartan spinput 
format (which can be created in the windows version of Spartan).

It seems very similar to the Odyssey format and in my cases where I have 
molecules that have a positive charge and S = 1, I have the line 1  2 in the 
file. If I change this to a 0 1, which is what triggers the resolver to 
conclude that it is an Odyssey file, the file is read properly.

I noticed the email this morning to force load to interpret a file as a cif 
(where the resolved tripped up), and was wondering whether it maybe possible to 
resolve this problem/feature request in a similar way too?

Thanks,
René

Just in case somebody is wondering I'll include a spinput file with this request

--

Comment By: Nobody/Anonymous (nobody)
Date: 2008-02-05 10:26

Message:
Logged In: NO 

I checked and it works for neutral, cation and anion structures.

When I get around to it, I will upload the test spinput files to the
Jmol-datafiles and check to see how to adjust the junit test for the
filereaders too. (I have to run to teach a lab right now).

Thanks.


--

Comment By: Bob Hanson (hansonr)
Date: 2008-02-05 09:10

Message:
Logged In: YES 
user_id=1082841
Originator: NO

try updating again, and do a clean build.

--

Comment By: Rene Kanters (rkanters)
Date: 2008-02-05 08:54

Message:
Logged In: YES 
user_id=905185
Originator: YES

Hi,

I just did an update in Eclipse to get the latest modifications, but when
I run Jmol I now get the following message:
ffa185198:~/Projects/Eclipse/Jmol-datafiles/spinput rkanters$ jmol
splash_image=jar:file:/Users/rkanters/Projects/Eclipse/Jmol/build/Jmol.jar!/org/openscience/jmol/images/Jmol_splash.jpg
history file is /Users/rkanters/.jmol/history
using Smarter Model Adapter
(C) 2007 Jmol Development
Jmol Version 11.5.4  2007-12-20 00:37
java.vendor:Apple Computer, Inc.
java.version:1.5.0_13
os.name:Mac OS X
memory:4.3/6.0
appletId:
uncaught exception: java.lang.NoSuchMethodError:
org.jmol.g3d.Graphics3D.getFont3D(I)Lorg/jmol/g3d/Font3D;
java.lang.NoSuchMethodError:
org.jmol.g3d.Graphics3D.getFont3D(I)Lorg/jmol/g3d/Font3D;
at org.jmol.shape.Measures.initShape(Unknown Source)
at org.jmol.shape.Shape.initializeShape(Unknown Source)
at org.jmol.modelset.ModelSet.allocateShape(Unknown Source)
at org.jmol.modelset.ModelSet.loadShape(Unknown Source)
at org.jmol.modelset.ModelLoader.finalizeShapes(Unknown Source)
at org.jmol.modelset.ModelLoader.initializeModelSet(Unknown
Source)
at org.jmol.modelset.ModelLoader.(Unknown Source)
at org.jmol.viewer.ModelManager.zap(Unknown Source)
at org.jmol.viewer.Viewer.zap(Unknown Source)
at org.jmol.viewer.Viewer.setAppletContext(Unknown Source)
at org.openscience.jmol.app.Jmol.(Unknown Source)
at org.openscience.jmol.app.Jmol.(Unknown Source)
at org.openscience.jmol.app.Jmol.getJmol(Unknown Source)
at org.openscience.jmol.app.Jmol.main(Unknown Source)
Exception in thread "main" java.lang.NullPointerException
at org.openscience.jmol.app.Jmol.main(Unknown Source)

so something got broken.

--

Comment By: Bob Hanson (hansonr)
Date: 2008-02-05 05:52

Message:
Logged In: YES 
user_id=1082841
Originator: NO

OK, that's checked in for 11.5.4 now. 
a) ignore comment lines starting with "C "
b) check to see that next line starts with " "
c) skip one line; check next line for exactly two integers -- charge and
spin
d) check next line for exactly four numbers

Please test using negatively charged species.

--

Comment By: Rene Kanters (rkanters)
Date: 2008-02-03 12:49

Message:
Logged In: YES 
user_id=905185
Originator: YES

The line is basically contains the charge and spin multiplicity (in that
order), so the checked in modification of determining whether there are two
tokens both of which evaluate to a value larger or equal to 0 would only
work for neutral or positive charged ions (not negative ones).
I didn't dare to mess with the logic of determining the file for

Re: [Jmol-developers] testing please -- set fontScaling TRUE/FALSE

2008-02-05 Thread Rolf Huehne
Hi Bob,

I did a few tests on revision 8957 from SVN.
The font scaling with zoom and window resize seems to work very well and
really is a big improvement!

Two points I noticed:

1) The axes labels did not scale.

2) The initial font size was not identical for all labels. Although I
didn't change the default font size and all labels were attached to
alpha carbon atoms some of them had only about half the size than
others. While scaling this difference was preserved.
The label section of the state and 2 example labels looked like this:

# label defaults;
  select none;
  color label none;
  background label none;
  set labelOffset 4 4;
  set labelAlignment left;
  set labelPointer off;
  font label 13.0 SansSerif Plain;

...
  select ({3952});
  label " TOPOISOMERASE_I_EUK :%c";
  select ({1593});
  label " Exon 1.13 :%c";
...

The "TOPOISOMERASE_I_EUK" label was about twice as big as the "Exon
1.13" label.

Regards,
Rolf


Bob Hanson wrote:
> Jmol Developers -- I need testers. I have uploaded 11.5.4 code that
> 
> (1) allows for the fonts in labels and 3D echos to scale with zoom and 
> window resizing, and
> (2) generates proper-sized fonts when an image is created at a different 
> size than the current window.
> 
> This was rather tricky to implement, and I'm not convinced it is 
> correct. But here is the basic idea:
> 
> 1) Use
> 
>  set fontScaling TRUE
> 
> to initiate font scaling for labels and 3D echo text. This does not 
> affect any labels or echo text already in place, and it does not affect 
> 2D echo text at all.
> 
> Now zoom to some desired level and create a label or 3D echo:
> 
>  select atomno=1;label
>  set echo myecho {1 1 1};echo "testing"
> 
> Now zoom some more. You should see the fonts scaling properly.
> 
> Resize the window. The fonts should scale.
> 
> Use
> 
>   write image 1000 1000 t.jpg
> 
> to create an image. Check it -- the fonts should be scaled properly. 
> Items to check include axes, unitcells, MO titles, quaternion frame 
> titles -- anything with text.
> 
> Note that because the fonts have to appear the way they always would 
> before, we have to use the same notation as before for indicating fonts. 
> (I've expanded that to fractional points, though.) And because fonts 
> have to scale, there is a "reference" scale for them. This reference is 
> based on the scale of the display, in Angstroms per pixel. This allows 
> fonts rendered in one window size to appear scaled properly when the 
> window size is scaled. The value of this reference is calculated 
> automatically when you introduce a label or 3D echo, and it is saved in 
> the state. You can see it by using
> 
>   show state
> 
> In which case you will see something like this:
> 
>   select ({0});
>   label "%e%i";
>   font label 20.0 Serif Plain;
>   set labelScaleReference 0.02;
> 
> and
> 
>   set echo myecho2 {2.0 2.0 2.0}; echo "XX";
>   font echo 12.0 Serif Bold 0.01;
> 
> The number 0.02 indicated as a labelScaleReference and the number 0.01 
> at the end of the font command are the scale references, in Angstroms 
> per pixel. The larger this number, the larger the font. You can change 
> this number on the fly to set the font scaling to anything you want. 
> Roughly, the letter "X" of a font of scale 10.0 with a scale reference 
> of 0.1 will by about 1 Angstrom tall at all zoom levels.
> 
> The tricky part of all this was that I had to completely rewrite how 
> antialiasing of display and images affected font size. So that needs 
> thorough testing. You will notice some slight changes when you resize a 
> window. This is because the fonts are scaled in 0.1-point increments.
> 
> Also tricky was getting the background boxes and offsets correct. Please 
> test these, and if you see anything odd, let me know.
> 
> I'm also concerned about memory with all these extra fonts. So be on the 
> alert for slower processing or large memory usage.
> 
> Navigation mode is a bit odd -- the way that works is that the screen 
> scale is fixed, and the model passes through it. So there if navigation 
> mode is set, then fonts do not scale. It probably suggests I need an 
> additional scaling based on distance from the plane of the observer in 
> that case, but I'm not there yet, and I really don't know how to do that 
> yet.
> 
> Bob
> 
> 
> 


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] testing please -- set fontScaling TRUE/FALSE

2008-02-05 Thread Bob Hanson
Rolf Huehne wrote:

>Hi Bob,
>
>I did a few tests on revision 8957 from SVN.
>The font scaling with zoom and window resize seems to work very well and
>really is a big improvement!
>
>Two points I noticed:
>
>1) The axes labels did not scale.
>
>  
>
On zooming, right? Correct. This is open for discussion, but axes 
labels, unit cell information, frame titles -- all these are considered 
nonscaling. You should see them scale if you create a JPG of a new size, 
though.

>2) The initial font size was not identical for all labels. Although I
>didn't change the default font size and all labels were attached to
>alpha carbon atoms some of them had only about half the size than
>others. While scaling this difference was preserved.
>  
>
You definitely created them at the same zoom level? The state 
information below suggests that they were created with set fontScaling 
false. Better try that again and send both the history and the state 
scripts to me.

Bob



>The label section of the state and 2 example labels looked like this:
>
># label defaults;
>  select none;
>  color label none;
>  background label none;
>  set labelOffset 4 4;
>  set labelAlignment left;
>  set labelPointer off;
>  font label 13.0 SansSerif Plain;
>
>...
>  select ({3952});
>  label " TOPOISOMERASE_I_EUK :%c";
>  select ({1593});
>  label " Exon 1.13 :%c";
>...
>
>The "TOPOISOMERASE_I_EUK" label was about twice as big as the "Exon
>1.13" label.
>
>Regards,
>Rolf
>
>
>Bob Hanson wrote:
>  
>
>>Jmol Developers -- I need testers. I have uploaded 11.5.4 code that
>>
>>(1) allows for the fonts in labels and 3D echos to scale with zoom and 
>>window resizing, and
>>(2) generates proper-sized fonts when an image is created at a different 
>>size than the current window.
>>
>>This was rather tricky to implement, and I'm not convinced it is 
>>correct. But here is the basic idea:
>>
>>1) Use
>>
>> set fontScaling TRUE
>>
>>to initiate font scaling for labels and 3D echo text. This does not 
>>affect any labels or echo text already in place, and it does not affect 
>>2D echo text at all.
>>
>>Now zoom to some desired level and create a label or 3D echo:
>>
>> select atomno=1;label
>> set echo myecho {1 1 1};echo "testing"
>>
>>Now zoom some more. You should see the fonts scaling properly.
>>
>>Resize the window. The fonts should scale.
>>
>>Use
>>
>>  write image 1000 1000 t.jpg
>>
>>to create an image. Check it -- the fonts should be scaled properly. 
>>Items to check include axes, unitcells, MO titles, quaternion frame 
>>titles -- anything with text.
>>
>>Note that because the fonts have to appear the way they always would 
>>before, we have to use the same notation as before for indicating fonts. 
>>(I've expanded that to fractional points, though.) And because fonts 
>>have to scale, there is a "reference" scale for them. This reference is 
>>based on the scale of the display, in Angstroms per pixel. This allows 
>>fonts rendered in one window size to appear scaled properly when the 
>>window size is scaled. The value of this reference is calculated 
>>automatically when you introduce a label or 3D echo, and it is saved in 
>>the state. You can see it by using
>>
>>  show state
>>
>>In which case you will see something like this:
>>
>>  select ({0});
>>  label "%e%i";
>>  font label 20.0 Serif Plain;
>>  set labelScaleReference 0.02;
>>
>>and
>>
>>  set echo myecho2 {2.0 2.0 2.0}; echo "XX";
>>  font echo 12.0 Serif Bold 0.01;
>>
>>The number 0.02 indicated as a labelScaleReference and the number 0.01 
>>at the end of the font command are the scale references, in Angstroms 
>>per pixel. The larger this number, the larger the font. You can change 
>>this number on the fly to set the font scaling to anything you want. 
>>Roughly, the letter "X" of a font of scale 10.0 with a scale reference 
>>of 0.1 will by about 1 Angstrom tall at all zoom levels.
>>
>>The tricky part of all this was that I had to completely rewrite how 
>>antialiasing of display and images affected font size. So that needs 
>>thorough testing. You will notice some slight changes when you resize a 
>>window. This is because the fonts are scaled in 0.1-point increments.
>>
>>Also tricky was getting the background boxes and offsets correct. Please 
>>test these, and if you see anything odd, let me know.
>>
>>I'm also concerned about memory with all these extra fonts. So be on the 
>>alert for slower processing or large memory usage.
>>
>>Navigation mode is a bit odd -- the way that works is that the screen 
>>scale is fixed, and the model passes through it. So there if navigation 
>>mode is set, then fonts do not scale. It probably suggests I need an 
>>additional scaling based on distance from the plane of the observer in 
>>that case, but I'm not there yet, and I really don't know how to do that 
>>yet.
>>
>>Bob
>>
>>
>>
>>
>>
>
>
>-
>This SF.net email is sponsored by: Microsoft
>Defy all challenges.

Re: [Jmol-developers] testing please -- set fontScaling TRUE/FALSE

2008-02-05 Thread Angel Herráez
11.5.4
Just a quick test, but I find that the font family and style on labels are 
ignored, both before 
and after "set fontScaling true"

That is, "serif", "monospaced", "italic", "bold" all have no effect; all I can 
get is sansSerif 
plain. The size can be set OK..

The scaling on zooming works, and it's a nice improvement. Good work!


This is a minor glitch, but if I select an atom, apply a label, then activate 
font scaling, the 
label does not scale (as described). However, even after deleting the label 
(label off) that 
precise atom cannot ever get a scaling label. Is there a way, or one has to 
resort to reload 
the model?




-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] testing please -- set fontScaling TRUE/FALSE

2008-02-05 Thread Bob Hanson
Angel Herráez wrote:

>11.5.4
>Just a quick test, but I find that the font family and style on labels are 
>ignored, both before 
>and after "set fontScaling true"
>
>That is, "serif", "monospaced", "italic", "bold" all have no effect; all I can 
>get is sansSerif 
>plain. The size can be set OK..
>
>  
>
Hmm. This all worked fine for me:

select atomno=1
label "TESTING"
font label 30
font label 30 serif
font label 30 serif bold

>The scaling on zooming works, and it's a nice improvement. Good work!
>
>
>This is a minor glitch, but if I select an atom, apply a label, then activate 
>font scaling, the 
>label does not scale (as described). However, even after deleting the label 
>(label off) that 
>precise atom cannot ever get a scaling label. Is there a way, or one has to 
>resort to reload 
>the model?
>  
>

should be a way. For now you can


set labelScaleReference

yourself to re-activate scaling.

>
>
>
>-
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
>___
>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
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers