Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Angel Herraez
I'd like to keep this discussion going, so here is a little bit more, 
picking up on the possibilities to have Jmol supported in Wikipedia 
and other Wikis:


On 30 Nov 2008 22:53, Nicolas Vervelle wrote:
> 
> On the matter of security issues, there are at least 2 things to do :
> *   Being able to entirely deactivate the possibility to let arbitrary 
> Javascript being called by Jmol. I don't know if there's a way in 
> Jmol to disable this. There's a need to completely disable the 
> 'javascript' command in Jmol scripts. The problem is demonstrated by 
> http://wiki.jmol.org:81/index.php/User:Ilmari_Karonen/JS_injection_dem
> o

Do we still need this? (see below)


> *   Ensuring that the extension doesn't allow for true Javascript 
> injection (whatever text is entered by someone in the tags, 
> this only creates Jmol applet and Jmol scripts, nothing else). I 
> think this means ensuring that in the generated page, the text is 
> always correctly escaped to prevent Javascript injection.

This is implemented in the last update.

> The second problem nees to be treated in the extension. My knowledge 
> on PHP and the security issues is limited (and I don't have much time 
> avaiable), so some help from someone knowing how to deal with the 
> script injection would be very useful.

The way I've implemented it, any script passed to the Extension 
(inside the extension's 

Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Nicolas Vervelle
Hi,


On Tue, Dec 9, 2008 at 1:21 PM, Angel Herraez <[EMAIL PROTECTED]> wrote:

> I'd like to keep this discussion going, so here is a little bit more,
> picking up on the possibilities to have Jmol supported in Wikipedia
> and other Wikis:
>
>
> On 30 Nov 2008 22:53, Nicolas Vervelle wrote:
> >
> > On the matter of security issues, there are at least 2 things to do :
> > *   Being able to entirely deactivate the possibility to let arbitrary
> > Javascript being called by Jmol. I don't know if there's a way in
> > Jmol to disable this. There's a need to completely disable the
> > 'javascript' command in Jmol scripts. The problem is demonstrated by
> >
> http://wiki.jmol.org:81/index.php/User:Ilmari_Karonen/JS_injection_dem
> > o
>
> Do we still need this? (see below)
>
>
> > *   Ensuring that the extension doesn't allow for true Javascript
> > injection (whatever text is entered by someone in the tags,
> > this only creates Jmol applet and Jmol scripts, nothing else). I
> > think this means ensuring that in the generated page, the text is
> > always correctly escaped to prevent Javascript injection.
>
> This is implemented in the last update.
>
> > The second problem nees to be treated in the extension. My knowledge
> > on PHP and the security issues is limited (and I don't have much time
> > avaiable), so some help from someone knowing how to deal with the
> > script injection would be very useful.
>
> The way I've implemented it, any script passed to the Extension
> (inside the extension's 

Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Angel Herraez
El 9 Dec 2008 a las 14:03, Nicolas Vervelle escribió:
> For example, I think you can stillrun Javascriptwithscripts 
> calling other scripts: 
> *   Create a wiki page with contents corresponding to a Jmol script with 
> Javascript in it. 
> *   Add a  tag in a page with a script calling the other script 

Aha, that's the sort of idea I wanted to hear (but had not imagined). 
Then maybe we should block the use of the "script" command too.
After all, we shouldn't need too much Jmol scripting flexibility 
inside a Wiki; just basic display options that can be pasted in the 
page, not in independent files.
I will test it this evening.



--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Rolf Huehne
Angel Herraez wrote:
> El 9 Dec 2008 a las 14:03, Nicolas Vervelle escribió:
>> For example, I think you can stillrun Javascriptwithscripts 
>> calling other scripts: 
>> *   Create a wiki page with contents corresponding to a Jmol script with 
>> Javascript in it. 
>> *   Add a  tag in a page with a script calling the other script 
> 
> Aha, that's the sort of idea I wanted to hear (but had not imagined). 
> Then maybe we should block the use of the "script" command too.
> After all, we shouldn't need too much Jmol scripting flexibility 
> inside a Wiki; just basic display options that can be pasted in the 
> page, not in independent files.
> I will test it this evening.
> 
I think the only way to guarantee that no Javascript can be injected by
Jmol would be to add a non-reversible switch to Jmol itself.

I would expect only this kind of solution might convince the Wikipedia
people that Jmol is save enough.

Regards,
Rolf


--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Making movies (A. Dijkman)

2008-12-09 Thread Jennifer L. Muzyka
I've used Chem3D and Spartan to make movies.  I liked Chem3D better because 
Spartan would sometimes change the xyz coordinates to yzx when I changed from 
one structure to the next.
-Jennifer





--

Message: 1
Date: Mon, 8 Dec 2008 22:39:45 +0100
From: "A. Dijkman" <[EMAIL PROTECTED]>
Subject: Re: [Jmol-users] Making movies
To: 
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

>> I'd rather look for an external way to build the multi-model file.

That's exactly what I'm looking for. I'd found the website of chemtube3d, but 
that's not what I can use in my lessons.

Anyone else with idea's to make movies?

Arjan
  - Original Message -
  From: Angel Herr?ez
  To: A. Dijkman ; jmol-users@lists.sourceforge.net
  Sent: Saturday, December 06, 2008 7:25 PM
  Subject: Re: [Jmol-users] Making movies


  Hello Arjan


  > My question:
  > I'd like to make a movie of an esterification where molecules/atoms of the 
reactants move to
  > form the ester. I've been searching the net now for 2 days, but I cannot 
find any documentation
  > on this. Maybe I'm searching in the wrong place, so I've turned to you. I 
downloaded a xyz-file
  > and included it in this message, to give you an idea of my intentions.


  > Is there a program to make these files or do I have to start understanding 
the script (yes, I know,
  > that's probably a good idea anyway:-])


  Yes, the problem is building the multi-model file for your reaction, similar 
to the one you downloaded. But that's not a Jmol task. Jmol will just 
display-animate the model once you have it built. There is little you can learn 
from scripting, apart from the way to play the animation.
  I do not know of a program that you can use to build the model.




  In fact, the thing MAY be done using Jmol scripting, as it can move atoms 
around, but that's not trivial at all. I'd rather look for an external way to 
build the multi-model file.


  There are a few websites that have animated mechanisms of reaction. Maybe you 
can find yours already built there.


  Please check out sites at
  http://wiki.jmol.org/index.php/Websites_Using_Jmol


  I particularly suggest  ChemTube3D, by Nick Greeves. For example:
  
http://www.chemtube3d.com/Nucleophilic%20substitution%20at%20the%20carbonyl%20group%20-%20Acid-catalysed%20ester%20hydrolysis%20and%20transesterification.html


  Once you've got your model, you may come back to this list if you need help 
with playing the animation. I (we) will be glad to help you.


  Good luck!



--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Making movies

2008-12-09 Thread Patrick J. Carroll
Arjan,
I have used Eric Martz' MORPH2 to calculate intermediate co-ordinates from a
beginning and a final PDB file. MORPH2 is a part of pdbtools, available from:


   http://www.umass.edu/microbio/rasmol/pdbtools.htm#martz

Go all the way to the bootom of the page to download pdbtools.

Pat


-- 
Patrick J. Carroll, Ph.D.
Director, X-ray Facility
Department of Chemistry
University of Pennsylvania

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Something about file loading

2008-12-09 Thread Robert Hanson
Duan Lian,

Your request for a better way to pass an image to an output stream
gave me an idea. I have now checked in two new methods for Jmol that
can be accessed by an embedding application or a browser using the
signed applet:

 Object nullOrBytesOrStringOrErrorMsg =
jmolViewer.getImageAs(type, quality, width, height, fileName,
outputStream);
 String errMsg = jmolViewer.clipImage(textOrNull);

These make it possible for any application -- or for that matter the
signed applet -- to:

   write text directly to the system clipboard,
   write the current image directly to the system clipboard,
   save the image in a file,
   get the image as a set of bytes or a Base64 JPG string, or
   send image bytes to an open OutputStream

The key to success is to use viewer.scriptWait(), not viewer.script(),
prior to calling one of these methods.
Duan Lian, this should be what you need, and the bonus is that anyone
can use it and you are not restricted to the PNG file type.

command examples:

 jmol.viewer.scriptWait("load =1crn;cartoons on;set antialiasdisplay");
 Object nullOrErrorMsg = jmol.viewer.getImageAs("JPG", 75, 300,
300, "t75.jpg", null);
 Object nullOrErrorMsg = jmol.viewer.getImageAs("JPG", 75, 300,
300, null, os);
 Object bytesOrError = jmol.viewer.getImageAs("JPG", 75, 300, 300,
null, null);
 Object stringOrError = jmol.viewer.getImageAs("JPG64", 75, 300,
500, null, null);


version=11.7.18_dev

# new feature: (embedded application method of JmolViewer):
#
# public Object viewer.getImageAs(String type,
# int quality,
# int width,
# int height,
# String filename,
# OutputStream outputStream);
#
#   allows creation of an image of a given type ("JPG", "JPEG",
"JPG64", "PNG", "GIF", "PPM")
#   of a specific quality (-1 indicates default)
# 0 to 100 for JPG (-1 = default of 75)
# 0-9 for PNG (-1 = default of 2)
#   and specific width and height
#   and returned as byte[] (when fileName = null, os = null)
#   or sent to an output stream (os != null)
#   or set to a file (os == null, fileName != null)
#
#   return can be String if there is an error.
#
#   command sequence, for example:
#
# jmol.viewer.scriptWait("load =1crn;cartoons on;set antialiasdisplay");
# Object nullOrErrorMsg = jmol.viewer.getImageAs("JPG", 75, 300,
300, "t75.jpg", null);
# Object nullOrErrorMsg = jmol.viewer.getImageAs("JPG", 75, 300,
300, null, os);
# Object bytesOrError = jmol.viewer.getImageAs("JPG", 75, 300,
300, null, null);
# Object stringOrError = jmol.viewer.getImageAs("JPG64", 75, 300,
300, null, null);
#
#   this method, like WRITE IMAGE uses the antialiasImage settings
#
#   primarily, this is for writing to an OutputStream directly, but
#   the rest seemed simple to implement along with that.
#


# new feature: (embedded application method of JmolViewer):
#
# public String clipImage(String text);
#
#   sends image (null parameter) or text to clipboard
#


# new feature: #exitJmol does that.
# new feature: application -d --debug sets loglevel to 5
# new feature: application -J --jmolscript1 Jmol script BEFORE -s
# new feature: application -j --jmolscript2 Jmol script AFTER -s not
accepting values

#
# -
Bob


src

On Sun, Dec 7, 2008 at 2:47 AM, Duan Lian <[EMAIL PROTECTED]> wrote:
> Robert,
>
> Actually I don't know jmol script can write PNG file directly, but
> it's still not what I want.  What I'm writing is a servlet that takes
> PDB file content as POST param, and return the binary content of PNG
> image as response stream. "write image"  script writes directly into a
> local file. It's possible to use the script to write PNG as a temp
> file on local disk, and then read it into response stream of HTTP
> response. But the script is also executed in a unblocked way, so it's
> still a problem to determine when to read the image file from my local
> disk.
>
> Best Regards,
> Duan Lian
>
>>From: Robert Hanson <[EMAIL PROTECTED]> -  2008-12-06 23:16
>>Duan Lian,
>>
>>Please tell us a bit more about your PDB2PNG renderer. Specifically,
>>why not just use the capability of Jmol to write PNG files?
>>You can even do this in command-line mode without ever calling up a
>>display. Is there something special that you are trying to do, or is
>>t possible that you didn't realize that Jmol does this already.
>>
>>For example:
>>
>>load =1crn
>>cartoons on;color group
>>write image 500 500 PNG "myfile.png"
>
> --
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more an

Re: [Jmol-users] Jmol 11.7.1 - 11.7.3 new features

2008-12-09 Thread Rolf Huehne
[EMAIL PROTECTED] wrote:
> Quoting Robert Hanson <[EMAIL PROTECTED]>:
> 
>> Rolf, will this cause any real problem? You just need to add load
>> \"...\"; at the beginning of your -j script.
>>
>> the command line parser -- presumably standard Java -- does not accept
>> quoted strings as values for -x flags. Quoted strings are left as
>> arguments. Maybe someone can tell me how to do it differently...
>>
> No, it is not a real problem. It is only very unusual for someone who  
> is used to work with command-line programs in a Linux/Unix environment.
> 
> Since Jmol isn't capable of being part of a pipeline (getting its  
> input at standard input from another program and providing its output  
> at standard output) it doesn't really make much of a difference.
> 
But there is a real problem in combination with "-j":

With the "-n" switch Jmol is not exited after the "-j" script like it is
with a "-s" script. This makes it impossible to use it for batch processing.

Regards, Rolf

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Support of 'alchemy' format for rectangular schematic base-pair geometry

2008-12-09 Thread Xiang-Jun Lu
> OpenBabel reads the Alchemy format
>
> http://openbabel.org/wiki/Alchemy
>
> which makes me wonder if Jmol could use the versatility of Open Babel and
> avoid writing new code.
>
> Xavier
>

I have been using 'openbabel' for a long while, and know that it supports
alchemy format. However, it can't read my schematic base-pair geometry. I
know my alchemy file does not have 'proper' chemistry. The chemistry-related
tools are too intelligent to handle such a simple case.

Date: Mon, 08 Dec 2008 23:52:21 +0100
> From: " Angel Herr?ez " <[EMAIL PROTECTED]>
> Subject: Re: [Jmol-users] Support of 'alchemy' format for rectangular
>schematic base-pair geometry
> To: jmol-users@lists.sourceforge.net
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=US-ASCII
>
> Xiang, I would suggest that whatever software you use to produce the ALC
> files is changed
> so that it produces MOL files. These have a well documented format
> specification and will
> be read by Jmol as well as RasMol.
> It seems that Alchemy format is rather old (there isn't even a mention of
> the program at the
> Tripos website) and there is no documentation about the format details, so
> it is difficult and
> unlikely that Jmol will read it.


MDL MOL format specifies atoms and bonds as well, and you can easily
> instruct Jmol to
> render those bonds only. I guess you could even use plain text files making
> use of the
> DATA command in Jmol to draw the boxes you need.
>
> > *   As I mentioned in my previous message, I am "playing tricks" with the
> alchemy format
>
> Yes, that was clear. But the brief answer is: Jmol does not understand the
> alc format.
>
>
> > In relation to Jmol, I am hoping Jmol could render such
> "non-chemistry-based" alchemy file
> > properly. In essence, the render just needs to respect the node and
> linkage information explicitly
> > defined in the file: it does not try to be "clever" to deduce some
> chemistry from it.
>
> Yes, that is perfectly possible. But you need a file format that Jmol
> understands.
>
> Maybe you can use some utility like OpenBabel to convert ALC to MDL files?
> or http://www.webqc.org/molecularformatsconverter.php
>
>
>
I know alchemy is not as well-supported/documented as the one your
mentioned. I picked alchemy up instead of other options for some random
reason I can't recall. I initially figured out the alchemy format by going
through RasMol code and played with some examples that RasMol writes out. It
is a simple format, and I am using it in the simplest possible way. RasMol
likes it, and I have been using RasMol for interactive visualization purpose
only, without any problem.

As far as Jmol's support for alchemy is concerned, I converted a sample PDB
file to alchemy using 'openbabel' and Jmol can read it without a problem.
That's why I thought Jmol does support "standard" alchemy in my initial
post, and qualified my subject line with "'alchemy' format  for rectangular
schematic base-pair geometry".

Thanks so much to all of you for for your feedbacks. I still hope Jmol could
support this un-chemical alchemy format. It could be taken as an extreme
case to validate an alchemy reader.

Xiang-Jun

-- 
Xiang-Jun Lu (Ph. D.)
Creator & Maintainer of 3DNA
Email: [EMAIL PROTECTED]
http://3dna.rutgers.edu:8080/forum
--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Something about file loading

2008-12-09 Thread Duan Lian
Dear Prof. Robert,

Thank you very much for that.

I have something maybe interesting for you. I read from Rich's
blog(http://depth-first.com/articles/2008/07/15/javascript-for-cheminformatics)
that you're interested in AJAX technology used in chemistry.
So I'm thinking, if molecule editor is able
to be written in javascript, no plugin will be required at client
side. We have PubChem server side editor already, but most of the work
is done at server side, client side javascript is just handling simple
tasks such as image downloading and mouse point capturing. If JChemPaint was
ported into javascript, more interactive function such as toggling the
visibility of H atoms can be implemented, rather than displaying a
static image file only. More internet users can enjoy the magic of
chemoinformatics easily, and more websites are willing to add safe
javascript future rather the "thought to be dangerous" Applet.

If your last exposure to JavaScript was in the 1990s, a lot has
changed for the better. Although we can never expect a performance
like Java, it has improved a lot. Large JavaScript applications such
as Gmail and Google Map work very smooth even on five-year-old
computers. With the help of canvas technology, 2D drawing for
JavaScript is also available now. (A demo here
http://ponderer.org/download/canvas_demo/)

I think there's no technical obstacles there, but CDK behinds
JChemPaint is a large
library. Can we make the porting process less painful? GWT in Action,
the book I translated this year seems to be an answer. GWT(Google Web
Toolkit) is a revolutionary toolkit for AJAX development. It allows
source code to be written in Java language but executed as javascript
in a web browser with no plugin needed. A special compiler can compile
Java source code into JavaScript rather than JVM byte code. And JSNI,
an JNI liked native interface, can also fill the gap between GWT Java
code and hand written JavaScript.

Well, if it's just as simple as what I said, there's no need to write
this mail to you, or I should attach "JChemPaint in JavaScript" in this mail.
But the problem is, GWT compiler is not a standard Java compiler. As
JavaScript is set to be the target language, GWT Java code can do
nothing beyond JavaScript's ability, such as local file reading. As
Java code rather than JVM byte code is the source language, no byte
code JAR is allowed in compiler input. A lot of tasks need to be done.

How do you think about it?

Best Regards,

Duan Lian

On Tue, Dec 9, 2008 at 11:50 PM, Robert Hanson <[EMAIL PROTECTED]> wrote:
> Duan Lian,
>
> Your request for a better way to pass an image to an output stream
> gave me an idea. I have now checked in two new methods for Jmol that
> can be accessed by an embedding application or a browser using the
> signed applet:
>
> Object nullOrBytesOrStringOrErrorMsg =
> jmolViewer.getImageAs(type, quality, width, height, fileName,
> outputStream);
> String errMsg = jmolViewer.clipImage(textOrNull);
>
> These make it possible for any application -- or for that matter the
> signed applet -- to:
>
>   write text directly to the system clipboard,
>   write the current image directly to the system clipboard,
>   save the image in a file,
>   get the image as a set of bytes or a Base64 JPG string, or
>   send image bytes to an open OutputStream
>
> The key to success is to use viewer.scriptWait(), not viewer.script(),
> prior to calling one of these methods.
> Duan Lian, this should be what you need, and the bonus is that anyone
> can use it and you are not restricted to the PNG file type.
>
> command examples:
>
> jmol.viewer.scriptWait("load =1crn;cartoons on;set antialiasdisplay");
> Object nullOrErrorMsg = jmol.viewer.getImageAs("JPG", 75, 300,
> 300, "t75.jpg", null);
> Object nullOrErrorMsg = jmol.viewer.getImageAs("JPG", 75, 300,
> 300, null, os);
> Object bytesOrError = jmol.viewer.getImageAs("JPG", 75, 300, 300,
> null, null);
> Object stringOrError = jmol.viewer.getImageAs("JPG64", 75, 300,
> 500, null, null);
>
>
> version=11.7.18_dev
>
> # new feature: (embedded application method of JmolViewer):
> #
> # public Object viewer.getImageAs(String type,
> # int quality,
> # int width,
> # int height,
> # String filename,
> # OutputStream outputStream);
> #
> #   allows creation of an image of a given type ("JPG", "JPEG",
> "JPG64", "PNG", "GIF", "PPM")
> #   of a specific quality (-1 indicates default)
> # 0 to 100 for JPG (-1 = default of 75)
> # 0-9 for PNG (-1 = default of 2)
> #   and specific width and height
> #   and returned as byte[] (when fileName = null, os = null)
> #   or sent to an output stream (os != null)
> #   or set to a file (os == null, fileName != null)
> #
> #   return can be String if there is an er

Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Nicolas Vervelle
On Tue, Dec 9, 2008 at 2:41 PM, Angel Herraez <[EMAIL PROTECTED]> wrote:

> El 9 Dec 2008 a las 14:03, Nicolas Vervelle escribió:
> > For example, I think you can stillrun Javascriptwithscripts
> > calling other scripts:
> > *   Create a wiki page with contents corresponding to a Jmol script with
> > Javascript in it.
> > *   Add a  tag in a page with a script calling the other script
>
> Aha, that's the sort of idea I wanted to hear (but had not imagined).
> Then maybe we should block the use of the "script" command too.
> After all, we shouldn't need too much Jmol scripting flexibility
> inside a Wiki; just basic display options that can be pasted in the
> page, not in independent files.
> I will test it this evening.
>

I am rather thinking as Rolf does, that to convince Wikipedia people it
would be better to really deactivate Javascript in Jmol itself (would it be
possible to pass an option to Jmol applet when starting it ?), rather than
trying to block several things.

I don't know if scripts would be used much, but using independent files can
help apply similar display options to a lot of a pages.
I haven't tested if inserting templates inside  tags works : that
could be an other way of running the same script on a lot of pages.

Nico
--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol 11.7.1 - 11.7.3 new features

2008-12-09 Thread Robert Hanson
I think this is all fixed now. The sequence of execution is:

file load
-J (Jmol script as argument)
-s (script file name as argument)
-j (Jmol script as argument)
-x (exit)

The -n switch (no display) adds an implicit -x, and it is executed
only after the final script is run. Basically what the -x switch does
is add ";exitJmol" to any second script present.

So, for example, the following worked for me:

  jmol -ion -J "myparam = 3" -s "t.spt" -j "set echo top left;echo
@myparam;cartoons on;write image 400 400 JPG \"t.jpg\";"  "1crn.pdb"


Bob


> --
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
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

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] designate temperature for a few atoms?

2008-12-09 Thread Robert Hanson
I think you just say

{within(3.0, [lig])}.temperature= 3.0

or

{within(3.0, [lig])}.partialCharge = 0.3



On Mon, Dec 8, 2008 at 7:45 PM, Frieda Reichsman <[EMAIL PROTECTED]> wrote:
> Hi Bob,
>
> Is there a script command I can use to add values for the temperature
> property of the selected atoms in a protein? For example, I would like
> to select atoms at a certain distance from a ligand using 'select
> within...', and then give those atoms a value for temperature, then
> convert that to partial charge.
>
> Thanks,
> Frieda
>
> ///
>
> Frieda Reichsman
> Molecules in Motion
> Interactive Molecular Structures
> http://www.moleculesinmotion.com
>
> ///
>
>
>
>
>
> --
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
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

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Support of Alchemy format

2008-12-09 Thread Robert Hanson
On Mon, Dec 8, 2008 at 3:33 PM, Xavier Prat-Resina <[EMAIL PROTECTED]> wrote:
> OpenBabel reads the Alchemy format
>
> http://openbabel.org/wiki/Alchemy
>
> which makes me wonder if Jmol could use the versatility of Open Babel and
> avoid writing new code.

It's very easy to write a file reader -- I realize there might seem to
be an advantage to using other libraries, but the sorts of things we
do with symmetry and embedded scripts and such have convinced me that
taking the time to make a new reader is still the best way.

I'm happy to make an alchemy reader, especially if it's just that
simple format -- I just want to know what it is before I write it and
then discover some odd sort of nuance I missed -- like the atom name
CAR is really one of a select set of possible names, not just
someone's ad hoc designation for "aromatic carbon"

Bob


>
> Xavier
>
> On Mon, Dec 8, 2008 at 3:36 PM, Angel Herráez <[EMAIL PROTECTED]> wrote:
>>
>> Philip Bays wrote:
>>
>> > As I recall, Alchemy was a program for the Mac back in the early 90's
>> > that Tripos sold.  I thought it had gone out of existence.  Is it
>> > still available, or has it been reborn?
>>
>> Oh, that may be why I can't find hardly any info on this format.
>>
>> A user posted in this list a question about Jmol reading this file format
>> incorrectly. He is using some old *.alc file for a dummy molecule.
>>
>> Apparently RasMol supports the format.
>>
>> Let's wait for more user feedback.
>> Thanks, Phil.
>>
>>
>>
>>
>> --
>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
>> Nevada.
>> The future of the web can't happen without you.  Join us at MIX09 to help
>> pave the way to the Next Web now. Learn more and register at
>>
>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>> ___
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>
>
>
> --
> Xavier Prat-Resina
> Research Associate
> Journal of Chemical Education and University of Wisconsin
> 209 N. Brooks St. Madison, WI  53715-1116
>
> Tel: 608 8901702 // Fax: 608 2627145
> e-mail: xavier ( ) chem.wisc.edu ; skype: xavierprat
> http://x.prat.resina.googlepages.com
>
> --
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>



-- 
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

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Angel Herráez
On 9 Dec 2008 at 17:14, Nicolas Vervelle wrote:

> I am rather thinking as Rolf does, that to convince Wikipedia people it would 
> be better to really 
> deactivate Javascript in Jmol itself (would it be possible to pass an option 
> to Jmol applet 
> whenstarting it ?), rather than trying to block several things. 

As usual, Bob had the rabbit ready in his hat. There is an option to avoid 
evaluation of 
javascript from inside Jmol.
This prevents javascript injection in the wiki both from 

Re: [Jmol-users] Support of 'alchemy' format for rectangular schematic base-pair geometry

2008-12-09 Thread Robert Hanson
Before I write this reader, can I ask if it's possible you could use
another format?

Do you have all these files already made, so you are eager to use them
exactly, or do you have a program that produces them?

Because if it's a program that produces them, I suggest doing a little
modification to that program to produce Jmol scripts instead. That
would be far more efficient, and it should be pretty easy to make them
- probably just one small subroutine. Then you could do all sorts of
interesting things in relation to dynamically changing them,
displaying them, measuring them, etc., within Jmol. For example, that
one you show as a demo could be something like this:

pt1={-2.2500   5.   0.2500}
pt2={-2.2500  -5.   0.2500}
pt3={-2.2500  -5.  -0.2500}
pt4={-2.2500   5.  -0.2500}
pt5={2.2500   5.   0.2500}
pt6={2.2500  -5.   0.2500}
pt7={2.2500  -5.  -0.2500}
pt8={2.2500   5.  -0.2500}
draw box line @pt1 @pt2 @pt3 @pt4 @pt1 @pt5 @pt6 @pt7 @pt8 @pt5
draw side1 plane @pt1 @pt2 @pt3 @pt4

(not complete, but you get the idea)

But even better, you could define a Jmol function that draws the boxes
for you give the eight points:

function drawbox(name, pt1, pt2, pt3, pt4, pt5, pt6, pt7, pt8)
  draw ID @{name + "_box"} line @pt1 @pt2 @pt3 @pt4 @pt1 @pt5 @pt6
@pt7 @pt8 @pt5
  draw ID @{name + "_side1"} plane @pt1 @pt2 @pt3 @pt4
  etc.

end function

then just

drawbox({-2.2500   5.   0.2500},{-2.2500  -5.   0.2500}
,{-2.2500  -5.  -0.2500} ,\
  {-2.2500   5.  -0.2500},{2.2500   5.   0.2500},{2.2500
-5.   0.2500},\
  {2.2500  -5.  -0.2500},{2.2500   5.  -0.2500})

for each box. It seems to me, for that matter, you only need three
points to define the box. So that would be even easier.

Now, if you are really fancy, what you do is embed those commands in
the pdb files themselves, so when the pdb file is loaded, the boxes
are all drawn automatically. Rolf can show you how he does that at
Jena.

And, better, if you are doing this based on some simple criterion in
PDB files, then you should be able to define a function that allows
drawing of such boxes for the entire model all within Jmol. That would
be REALLY COOL, because then anyone could do it with any PDB file. I
have such a function (somewhere), for example, for drawing all the
peptide planes.

Bob




On Sun, Dec 7, 2008 at 5:24 PM, Xiang-Jun Lu <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Over the years, I have been using RasMol 2.6.4 (from Roger Sayle) for
> interactive rendering of a 3DNA-specific rectangular schematic
> representation of base and base-pair geometry. As an example image, please
> see:
> http://rutchem.rutgers.edu/~xiangjun/3DNA/jmol/3dna_bp-rasmol2-6-4.png
>
> Recently, I am considering to use Jmol as well, given the great support of
> the Jmol community (as is evident from this list). While Jmol recognizes a
> regular alchemy format file without a problem, it does not render my
> schematic alchemy file as expected (e.g.,
> http://rutchem.rutgers.edu/~xiangjun/3DNA/jmol/3dna_bp.alc): a sample image
> is shown at: http://rutchem.rutgers.edu/~xiangjun/3DNA/jmol/3dna_bp-jmol.png
>
> Essentially, I am playing tricks with the alchemy format purely as a
> rendering tool by specifying explicitly each node and linkage, no chemistry
> at all. Hopefully, Jmol would be able to render it as well, just as RasMol
> does.
>
> Thanks,
>
> Xiang-Jun
>
> --
> Xiang-Jun Lu (Ph. D.)
> Creator & Maintainer of 3DNA
> Email: [EMAIL PROTECTED]
> http://3dna.rutgers.edu:8080/forum
>
> --
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>



-- 
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

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Support of 'alchemy' format for rectangular schematic base-pair geometry

2008-12-09 Thread Robert Hanson
make that

then just

> drawbox("box1", {-2.2500   5.   0.2500},{-2.2500  -5.   0.2500}
> ,{-2.2500  -5.  -0.2500} ,\
>  {-2.2500   5.  -0.2500},{2.2500   5.   0.2500},{2.2500
> -5.   0.2500},\
>  {2.2500  -5.  -0.2500},{2.2500   5.  -0.2500})
>
> for each box. It seems to me, for that matter, you only need three
> points to define the box. So that would be even easier.
>

oh -- I meant to add that I think these boxes are extremely cool. If
they are at all simple to calculate, why don't we build them into
Jmol?


-- 
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

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Support of 'alchemy' format for rectangular schematic base-pair geometry

2008-12-09 Thread Robert Hanson
On Tue, Dec 9, 2008 at 10:02 AM, Xiang-Jun Lu <[EMAIL PROTECTED]> wrote:
>
> As far as Jmol's support for alchemy is concerned, I converted a sample PDB
> file to alchemy using 'openbabel' and Jmol can read it without a problem.

Can you send me that converted file? I'd like to see what Jmol is doing with it.


-- 
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

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Brian Salter-Duke
On Tue, Dec 09, 2008 at 01:21:01PM +0100, Angel Herraez wrote:
> I'd like to keep this discussion going, so here is a little bit more, 
> picking up on the possibilities to have Jmol supported in Wikipedia 
> and other Wikis:

[Nico's message snipped]
 
> And on 1 Dec 2008 9:49, Brian Salter-Duke wrote:
> > I am just thinking aloud here. I think there could be a solution to add
> > a chaneg to medciawiki itself to have some specific Jmol tags, something
> > like:
> > 
> >  ... 
> 
> We already have the  tag added by the extension. Is there any 
> difference intended?
> 
> > avoiding all calls to Jmol itself. 
> 
> I don't quite understand. There is no call to Jmol until the 
> extension inserts the Jmol code. And by using 
> or   one avoids Jmol to be loaded until the visitor 
> requests it.

This is an example of an image inserted on wikipedia:-

[[Image:Meissner effect zoom.jpg|thumb|200px|right|A [[magnet]]
levitating above a [[high-temperature superconductor]] demonstrates the
[[Meissner effect]].]]

Everything is together. I presume the bits are handled by mediawiki.

In contrast, a simple Jmol call is full of html/javascript like stuff.

set spin X 10; spin on
ethane_s1palegreen250
ethane_s.pdb

spin onethane_s1Start
spinning
spin offethane_s1Stop
spinning


What if it was like this:-

[[Jmolimage:ethane_s.pdb|color=palegreen|script=spin X 10|script=spin
on|size=250|button=(spin on,Start spinning)|button=(spin off,Stop
spining)]]

Jmolimage:ethane_s.pdb starts it all off and includes:-
ethane_s.pdb

color=palegreen includes palegreen

size=250 includes palegreen

script=spin X 10| script=spin on would generate:-
set spin X 10; spin on

button=(spin on,Start spinning) is interpreted as:-
spin onethane_s1Start
spinning

button=(spin off,Stop spining) is interpreted as:-
spin offethane_s1Stop
spinning

I suspect this would be easier for users and could likely be made more
secure. However, I have no idea how this would be implemented. The
mediawiki language seems to aim to remove as much direct html use as
possible.
 
> > The parameters for jmolimage would
> > give everything that was needed, method, file names, etc. Mediawiki
> > itself would then be doing any chaecks that were needed. It would also
> > be easier for wikipedia editors and I suspect the wikipedia techs would
> > prefer this solution. Is this worth following up? I do nopt>set spin
> > X 10; spin ont know
> > mediawiki and could be just talking nonsense.
> 
> I think it is the JmolMediaWiki Extension that must do all this 
> anyway, not the generic MediaWiki software. And it is doing so 
> already, by using the different sub-tags of the  tag. Do you 
> envisage any differences, Brian? Please ellaborate on that.
> 
> The configuration in the server (LocalSettings.php) may block the use 
> of external URLs for models, or of uploaded files,  may block or 
> impose the use of signed applet. The rest of the task in inside the 
> Extension.
> 
> 
> > Another advantage of this approach is that wikipedia could limit the
> > mehtods available and perhaps limit them to file upload only. 
> 
> Already possible (see above).

I understand this. When the extension was first written, it was
understandable that a number of different approaches were tried. Maybe
it is time to limit these choices and make it simpler. Particularly on
wikipedia, which has a large number of editors who are likely to be less
familiar with Jmol than users on say the Jmol wiki, I think we have to
decide. The choice is I think really between an uploaded file (on either
wikipedia or Commons) and inline data. The latter will be seen as
clumsy, but it makes it all self contained and does not mean that the
whole upload business has to be altered - see below. The former would be
better, but changes would be needed. 

> > The
> > mediawiki code would need changing anyway to allow use of Jmol files on
> > Commons as well as wikipedia. 
> 
> This needs further work, but is related to the above config. 
> settings.

Whether Commons or the home wiki (say wikipedia or wikiversity) many
changes would be needed. First, upload is restricted to files with
certain extensions. We would have to decide which file types we wanted
and allow those extensions to the upload. Second, we need to think about
copyright issues on uploaded files and how these are going to be added.
If you click on an image, it brings up the image page that displays both
the image and all the upload, copyright, etc. details. How would this
work for say a pdb file. So, third, we have a different image page.
Adding an new prefix "Jmolimage" may facilitate this. Finally, we have
to disguise the "Look on Commons first for the Jmol file; then look on
the local wiki; then fail".

I'm still thinking aloud here and the above is a bit different to what
Angel is responding to.

Brian.

-- 
A child of five could understand this!  Fetch me a child of five. 
   -- Marx (guess which one)
Brian Salt

Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Brian Salter-Duke
On Tue, Dec 09, 2008 at 02:03:17PM +0100, Nicolas Vervelle wrote:
> Hi,
> 
> 
> On Tue, Dec 9, 2008 at 1:21 PM, Angel Herraez <[EMAIL PROTECTED]> wrote:
> 
> > I'd like to keep this discussion going, so here is a little bit more,
> > picking up on the possibilities to have Jmol supported in Wikipedia
> > and other Wikis:
> >
> >
> > On 30 Nov 2008 22:53, Nicolas Vervelle wrote:
> > >
> > > On the matter of security issues, there are at least 2 things to do :
> > > *   Being able to entirely deactivate the possibility to let arbitrary
> > > Javascript being called by Jmol. I don't know if there's a way in
> > > Jmol to disable this. There's a need to completely disable the
> > > 'javascript' command in Jmol scripts. The problem is demonstrated by
> > >
> > http://wiki.jmol.org:81/index.php/User:Ilmari_Karonen/JS_injection_dem
> > > o
> >
> > Do we still need this? (see below)
> >
> >
> > > *   Ensuring that the extension doesn't allow for true Javascript
> > > injection (whatever text is entered by someone in the tags,
> > > this only creates Jmol applet and Jmol scripts, nothing else). I
> > > think this means ensuring that in the generated page, the text is
> > > always correctly escaped to prevent Javascript injection.
> >
> > This is implemented in the last update.
> >
> > > The second problem nees to be treated in the extension. My knowledge
> > > on PHP and the security issues is limited (and I don't have much time
> > > avaiable), so some help from someone knowing how to deal with the
> > > script injection would be very useful.
> >
> > The way I've implemented it, any script passed to the Extension
> > (inside the extension's 

Re: [Jmol-users] Support of 'alchemy' format for rectangular schematic base-pair geometry

2008-12-09 Thread Xiang-Jun Lu
Dear Bob,

Thank you so much for your detailed explanations.

Date: Tue, 9 Dec 2008 18:19:09 -0600
> From: "Robert Hanson" <[EMAIL PROTECTED]>
> Subject: Re: [Jmol-users] Support of 'alchemy' format for rectangular
>schematic base-pair geometry
> To: jmol-users@lists.sourceforge.net
> Message-ID:
><[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Before I write this reader, can I ask if it's possible you could use
> another format?


I could, but I really do not have a solid reason to (see below).

Do you have all these files already made, so you are eager to use them
> exactly, or do you have a program that produces them?
>

Yes, I have several (utility) programs within 3DNA that produce and read
such alchemy files for various (internal) purposes. It is nice that RasMol
can render them properly, but essentially, 3DNA is a suite of command-line
driven programs which do not rely on RasMol for using the alchemy files.


> Because if it's a program that produces them, I suggest doing a little
> modification to that program to produce Jmol scripts instead. That
> would be far more efficient, and it should be pretty easy to make them
> - probably just one small subroutine. Then you could do all sorts of
> interesting things in relation to dynamically changing them,
> displaying them, measuring them, etc., within Jmol. For example, that
> one you show as a demo could be something like this:
>
> pt1={-2.2500   5.   0.2500}
> pt2={-2.2500  -5.   0.2500}
> pt3={-2.2500  -5.  -0.2500}
> pt4={-2.2500   5.  -0.2500}
> pt5={2.2500   5.   0.2500}
> pt6={2.2500  -5.   0.2500}
> pt7={2.2500  -5.  -0.2500}
> pt8={2.2500   5.  -0.2500}
> draw box line @pt1 @pt2 @pt3 @pt4 @pt1 @pt5 @pt6 @pt7 @pt8 @pt5
> draw side1 plane @pt1 @pt2 @pt3 @pt4
>
> (not complete, but you get the idea)
>
> But even better, you could define a Jmol function that draws the boxes
> for you give the eight points:
>
> function drawbox(name, pt1, pt2, pt3, pt4, pt5, pt6, pt7, pt8)
>  draw ID @{name + "_box"} line @pt1 @pt2 @pt3 @pt4 @pt1 @pt5 @pt6
> @pt7 @pt8 @pt5
>  draw ID @{name + "_side1"} plane @pt1 @pt2 @pt3 @pt4
>  etc.
>
> end function
>
> then just
>
> drawbox({-2.2500   5.   0.2500},{-2.2500  -5.   0.2500}
> ,{-2.2500  -5.  -0.2500} ,\
>  {-2.2500   5.  -0.2500},{2.2500   5.   0.2500},{2.2500
> -5.   0.2500},\
>  {2.2500  -5.  -0.2500},{2.2500   5.  -0.2500})
>
> for each box. It seems to me, for that matter, you only need three
> points to define the box. So that would be even easier.
>
> Now, if you are really fancy, what you do is embed those commands in
> the pdb files themselves, so when the pdb file is loaded, the boxes
> are all drawn automatically. Rolf can show you how he does that at
> Jena.
>
> And, better, if you are doing this based on some simple criterion in
> PDB files, then you should be able to define a function that allows
> drawing of such boxes for the entire model all within Jmol. That would
> be REALLY COOL, because then anyone could do it with any PDB file. I
> have such a function (somewhere), for example, for drawing all the
> peptide planes.
>
> Bob
>

Given the amazing support of Jmol from you and others, I have been
considering to use Jmol (and eventually switch to it), and then came cross
the alchemy format issue. All the cool stuffs you mentioned are very
impressive, and I will surely dig more deeply into Jmol in the future.
However, I still think a simple render of the alchemy format in Jmol would
be ideal. Then people like me could simply load the alchemy file into Jmol
to visualize it without writing any Jmol-specific scripts.

I have checked RasMol v2.6.4 source code, and found the alchemy reader is
via function LoadAlchemyMolecule() in infile.c, and it is pretty short. The
data directory even has an example file 'asprin.alc'.

Since there is no official alchemy document, and given the problem that
'openbabel' has with my non-chemistry oriented alchemy file (see my previous
post), maybe one could forget the complexity of atom/bond types, just take
them as nodes and linkages, and Jmol would render the file at face value.

Thanks,

Xiang-Jun

-- 
Xiang-Jun Lu (Ph. D.)
Creator & Maintainer of 3DNA
Email: [EMAIL PROTECTED]
http://3dna.rutgers.edu:8080/forum
--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Paul Pillot
You can also embed these javascript calls into the pdb file itself,  
if it has an embedded Jmol script into it.
Paul

Le 9 déc. 08 à 14:41, Angel Herraez a écrit :

> El 9 Dec 2008 a las 14:03, Nicolas Vervelle escribió:
>> For example, I think you can stillrun Javascriptwithscripts
>> calling other scripts:
>> *   Create a wiki page with contents corresponding to a Jmol  
>> script with
>> Javascript in it.
>> *   Add a  tag in a page with a script calling the other script
>
> Aha, that's the sort of idea I wanted to hear (but had not imagined).
> Then maybe we should block the use of the "script" command too.
> After all, we shouldn't need too much Jmol scripting flexibility
> inside a Wiki; just basic display options that can be pasted in the
> page, not in independent files.
> I will test it this evening.

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Support of 'alchemy' format for rectangular schematic base-pair geometry

2008-12-09 Thread Bob Hanson

I'll set it up tonight



On Dec 9, 2008, at 7:21 PM, "Xiang-Jun Lu" <[EMAIL PROTECTED]> wrote:


Dear Bob,

Thank you so much for your detailed explanations.

Date: Tue, 9 Dec 2008 18:19:09 -0600
From: "Robert Hanson" <[EMAIL PROTECTED]>
Subject: Re: [Jmol-users] Support of 'alchemy' format for rectangular
   schematic base-pair geometry
To: jmol-users@lists.sourceforge.net
Message-ID:
   <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1

Before I write this reader, can I ask if it's possible you could use
another format?

I could, but I really do not have a solid reason to (see below).

Do you have all these files already made, so you are eager to use them
exactly, or do you have a program that produces them?

Yes, I have several (utility) programs within 3DNA that produce and  
read such alchemy files for various (internal) purposes. It is nice  
that RasMol can render them properly, but essentially, 3DNA is a  
suite of command-line driven programs which do not rely on RasMol  
for using the alchemy files.



Because if it's a program that produces them, I suggest doing a little
modification to that program to produce Jmol scripts instead. That
would be far more efficient, and it should be pretty easy to make them
- probably just one small subroutine. Then you could do all sorts of
interesting things in relation to dynamically changing them,
displaying them, measuring them, etc., within Jmol. For example, that
one you show as a demo could be something like this:

pt1={-2.2500   5.   0.2500}
pt2={-2.2500  -5.   0.2500}
pt3={-2.2500  -5.  -0.2500}
pt4={-2.2500   5.  -0.2500}
pt5={2.2500   5.   0.2500}
pt6={2.2500  -5.   0.2500}
pt7={2.2500  -5.  -0.2500}
pt8={2.2500   5.  -0.2500}
draw box line @pt1 @pt2 @pt3 @pt4 @pt1 @pt5 @pt6 @pt7 @pt8 @pt5
draw side1 plane @pt1 @pt2 @pt3 @pt4

(not complete, but you get the idea)

But even better, you could define a Jmol function that draws the boxes
for you give the eight points:

function drawbox(name, pt1, pt2, pt3, pt4, pt5, pt6, pt7, pt8)
 draw ID @{name + "_box"} line @pt1 @pt2 @pt3 @pt4 @pt1 @pt5 @pt6
@pt7 @pt8 @pt5
 draw ID @{name + "_side1"} plane @pt1 @pt2 @pt3 @pt4
 etc.

end function

then just

drawbox({-2.2500   5.   0.2500},{-2.2500  -5.   0.2500}
,{-2.2500  -5.  -0.2500} ,\
 {-2.2500   5.  -0.2500},{2.2500   5.   0.2500},{2.2500
-5.   0.2500},\
 {2.2500  -5.  -0.2500},{2.2500   5.  -0.2500})

for each box. It seems to me, for that matter, you only need three
points to define the box. So that would be even easier.

Now, if you are really fancy, what you do is embed those commands in
the pdb files themselves, so when the pdb file is loaded, the boxes
are all drawn automatically. Rolf can show you how he does that at
Jena.

And, better, if you are doing this based on some simple criterion in
PDB files, then you should be able to define a function that allows
drawing of such boxes for the entire model all within Jmol. That would
be REALLY COOL, because then anyone could do it with any PDB file. I
have such a function (somewhere), for example, for drawing all the
peptide planes.

Bob

Given the amazing support of Jmol from you and others, I have been  
considering to use Jmol (and eventually switch to it), and then came  
cross the alchemy format issue. All the cool stuffs you mentioned  
are very impressive, and I will surely dig more deeply into Jmol in  
the future. However, I still think a simple render of the alchemy  
format in Jmol would be ideal. Then people like me could simply load  
the alchemy file into Jmol to visualize it without writing any Jmol- 
specific scripts.


I have checked RasMol v2.6.4 source code, and found the alchemy  
reader is via function LoadAlchemyMolecule() in infile.c, and it is  
pretty short. The data directory even has an example file  
'asprin.alc'.


Since there is no official alchemy document, and given the problem  
that 'openbabel' has with my non-chemistry oriented alchemy file  
(see my previous post), maybe one could forget the complexity of  
atom/bond types, just take them as nodes and linkages, and Jmol  
would render the file at face value.


Thanks,

Xiang-Jun

--
Xiang-Jun Lu (Ph. D.)
Creator & Maintainer of 3DNA
Email: [EMAIL PROTECTED]
http://3dna.rutgers.edu:8080/forum
--- 
--- 
--- 
-
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,  
Nevada.
The future of the web can't happen without you.  Join us at MIX09 to  
help

pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users
--
SF.Net email is Sponsored by MIX09, March

Re: [Jmol-users] Support of 'alchemy' format for rectangular schematic base-pair geometry

2008-12-09 Thread Xiang-Jun Lu
Dear Bob,

Date: Tue, 9 Dec 2008 18:20:58 -0600
> From: "Robert Hanson" <[EMAIL PROTECTED]>
> Subject: Re: [Jmol-users] Support of 'alchemy' format for rectangular
>schematic base-pair geometry
> To: jmol-users@lists.sourceforge.net
> Message-ID:
><[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> make that
>
> then just
>
> > drawbox("box1", {-2.2500   5.   0.2500},{-2.2500  -5.   0.2500}
> > ,{-2.2500  -5.  -0.2500} ,\
> >  {-2.2500   5.  -0.2500},{2.2500   5.   0.2500},{2.2500
> > -5.   0.2500},\
> >  {2.2500  -5.  -0.2500},{2.2500   5.  -0.2500})
> >
> > for each box. It seems to me, for that matter, you only need three
> > points to define the box. So that would be even easier.
> >
>
> oh -- I meant to add that I think these boxes are extremely cool. If
> they are at all simple to calculate, why don't we build them into
> Jmol?
>

Indeed they are very cool. The rectangular block representation was
initiated by Calladine-Drew in their classic DNA structure work (see:
Understanding DNA: the Molecule and How It Works). I implemented it firstly
in SCHNAaP/SCHNArP, and later in the 3DNA software package for schematic
visualization of nucleic acid structures, and I call them Calladine-Drew
style representations.

In addition to links mentioned in my previous post, please have a look at
(random pick):
http://ndbserver.rutgers.edu/atlas/xray/indexes/xray.dna.quad-1.html. They
are generated automatically by the 'blocview' script from 3DNA. I can help
more if you decide to add Jmol support for it.

Date: Tue, 9 Dec 2008 18:23:29 -0600
> From: "Robert Hanson" <[EMAIL PROTECTED]>
> Subject: Re: [Jmol-users] Support of 'alchemy' format for rectangular
>schematic base-pair geometry
> To: jmol-users@lists.sourceforge.net
> Message-ID:
><[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Tue, Dec 9, 2008 at 10:02 AM, Xiang-Jun Lu <[EMAIL PROTECTED]> wrote:
> >
> > As far as Jmol's support for alchemy is concerned, I converted a sample
> PDB
> > file to alchemy using 'openbabel' and Jmol can read it without a problem.
>
> Can you send me that converted file? I'd like to see what Jmol is doing
> with it.
>

As an example, adenine in original PDB format:
http://rutchem.rutgers.edu/~xiangjun/3DNA/jmol/adenine.pdb

I used 'babel adenine.pdb adenine.alc' to get file adenine.alc:
http://rutchem.rutgers.edu/~xiangjun/3DNA/jmol/adenine.alc

The version of babel is: 'Open Babel 2.1.1 -- Mar  7 2008 -- 14:06:20'

The I rendered 'adenine.alc' in Jmol, as shown here:
http://rutchem.rutgers.edu/~xiangjun/3DNA/jmol/adenine_jmol_alc.png

Hope this classifies the issues.

Xiang-Jun

-- 
Xiang-Jun Lu (Ph. D.)
Creator & Maintainer of 3DNA
Email: [EMAIL PROTECTED]
http://3dna.rutgers.edu:8080/forum
--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Support of 'alchemy' format for rectangular schematic base-pair geometry

2008-12-09 Thread Robert Hanson
A simple Alchemy reader is now part of Jmol.

See http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm and
http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11.jar



-- 
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

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Jmol mediawiki extension

2008-12-09 Thread Rzepa, Henry
>>
>
> I suspect this would be easier for users and could likely be made more
> secure. However, I have no idea how this would be implemented. The
> mediawiki language seems to aim to remove as much direct html use as
> possible.
>>>

Our students use Jmol Mediawiki extensively. We have come up against  
the lack of a proper XML validator in mediawiki, which means that the  
more "XML" one asks the students to insert, the greater the chance of   
XML errors.  I am increasingly having to cope with  the student's work  
disappearing,  to be replaced by a bald  XMR error message instead.   
Gaining access to the history file to revert is also not entirely  
trivial. One can imagine what would happen if Wikipedia pages started  
to vanish in a similar manner (and of course, it could be done  
maliciously as well as accidentally).  Does Wikipedia have a bot that  
can automatically undo these sorts of errors (the XML corruption is  
often such that repair is out of the question)?

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users