Difference between revisions of "Jmol Applet"

From Jmol
Jump to navigation Jump to search
m
(Forcing the JSmol object to open in a certain language)
 
(57 intermediate revisions by 11 users not shown)
Line 1: Line 1:
[http://www.partnerwithsap.com/de/images/banners/rmdtqp.html sex cams] [http://c21redwood.com/images/properties/thumbs/bkcvfo.html college free sex] [http://www.bassboatmagazine.com/linkmachine/templates/lm_images/thumb/qbsima.html milf amateurs] [http://www.hardenassociates.com/shands-santa/albums/image/apchar.html omega watch] [http://c21redwood.com/images/properties/thumbs/gedtaw.html smoking sex] [http://aoreport.com/mag/images/stories/News05-06/5-22-06/image/eqgasb.html baby crib bedding set] [http://www.bassboatmagazine.com/linkmachine/templates/lm_images/thumb/rxkbke.html alesse] [http://wirelessilliana.com/sullivanpack341/gallery341/g2data/image/nthcgx.html niagrafalls] [http://maslov.com/new_releases/cache/gihwdh.html luis miguel concert ticket] [http://meretusa.com/links/cache/jdgwqe.html homecoming dress] [http://adrianwindridge.co.uk/propertyimages/thumbs/gif/avplln.html remax realty] [http://maslov.com/new_releases/cache/abnovb.html seymore butts] [http://deadmansjacket.co.uk/gallery_images/thumbs/sttgox.html large size womens dress shoes] [http://meretusa.com/links/cache/curhfb.html mini skirt] [http://reverejournal.com/wp-content/uploads/2007/05/images/evkiwe.html pornosex] [http://wirelessilliana.com/sullivanpack341/gallery341/g2data/image/vxbemg.html lavasoft adaware] [http://wirelessilliana.com/sullivanpack341/gallery341/g2data/image/qmwtou.html mortal kombat] [http://marylandcomputerguy.net/nails/image/bklxob.html demetrios wedding dress] [http://npgsupport.com/chat/chat/localization/icelandic/cache/dmkfmb.html adderall abuse] [http://michaelboyle.biz/joomla/templates/limbocms/limbocms/images/pics/npihpm.html oral pathology] [http://interserverhost.com/gallery/albums/userpics/avatars/rcjeqp.html sexfilm] [http://jaxrotaract.org/galainfo/images/avatars/pics/ooqvsm.html temperature] [http://www.jericogt.com/design/schema/images/news/thumb/1/ourmem.html single woman] [http://interserverhost.com/gallery/albums/userpics/avatars/xetbdn.html gucci outlet] [http://aoreport.com/mag/images/stories/News05-06/5-22-06/image/wtusgt.html mature sex video] [http://deadmansjacket.co.uk/gallery_images/thumbs/snwawm.html nuns] [http://npgsupport.com/chat/chat/localization/icelandic/cache/snjmhs.html horse bed spread] [http://www.bassboatmagazine.com/linkmachine/templates/lm_images/thumb/eqfhax.html foreclosure houses in fl] [http://meretusa.com/links/cache/ttuegh.html gingerbread houses] [http://marylandcomputerguy.net/nails/image/pfaglp.html home mortgage] [http://maslov.com/new_releases/cache/nffqsg.html cruises] [http://aoreport.com/mag/images/stories/News05-06/5-22-06/image/wdnlud.html football betting] [http://deadmansjacket.co.uk/gallery_images/thumbs/ognrrk.html work at home] [http://c21redwood.com/images/properties/thumbs/ohtvno.html papasan ottoman] [http://borrington.org/videos/move/qxdlwm.html bdsm free] [http://adrianwindridge.co.uk/propertyimages/thumbs/gif/pqcuxm.html hawaii job bank] [http://bostoncentury.com/old/coppermine/albums/userpics/10001/thumb/tnafbm.html plastic bags] [http://interserverhost.com/gallery/albums/userpics/avatars/weaubr.html download morpheus for free] [http://reverejournal.com/wp-content/uploads/2007/05/images/aetwva.html northern tools and equipment] [http://michaelboyle.biz/joomla/templates/limbocms/limbocms/images/pics/bxehdw.html mp3 to ringtone converter] [http://michaelboyle.biz/joomla/templates/limbocms/limbocms/images/pics/bowppu.html kenny rogers ticket] [http://www.hardenassociates.com/shands-santa/albums/image/ncuucr.html groomsmen gifts] [http://reportchildporn.com/rcp/themes/phpkaox/cache/prufnp.html kawasaki parts online] [http://npgsupport.com/chat/chat/localization/icelandic/cache/dgktqo.html portable generators] [http://www.athomewithmark.com/images/properties/thumb/cvckbq.html suvs] [http://reportchildporn.com/rcp/themes/phpkaox/cache/riihah.html alltel ringtone] [http://wirelessilliana.com/sullivanpack341/gallery341/g2data/image/jdrpar.html tweety background] [http://borrington.org/videos/move/cjnnnd.html pepto bismol] [http://aoreport.com/mag/images/stories/News05-06/5-22-06/image/kswxvh.html popular dance music] [http://marylandcomputerguy.net/nails/image/krhord.html mature porn woman] [http://www.bassboatmagazine.com/linkmachine/templates/lm_images/thumb/ahaudm.html codes xbox] [http://www.bassboatmagazine.com/linkmachine/templates/lm_images/thumb/ujvvio.html carbidopa] [http://reportchildporn.com/rcp/themes/phpkaox/cache/juqxdq.html gardening] [http://c21redwood.com/images/properties/thumbs/gosnpd.html cheap flat london] [http://staticchain.com/banner/123x110/kehird.html free monthly planners] [http://adrianwindridge.co.uk/propertyimages/thumbs/gif/rtfawe.html disney music] [http://www.partnerwithsap.com/de/images/banners/ltaphq.html georgia car auction] [http://jaxrotaract.org/galainfo/images/avatars/pics/bhebxn.html excessive sweating] [http://adrianwindridge.co.uk/propertyimages/thumbs/gif/bsronu.html ford bronco] [http://marylandcomputerguy.net/nails/image/uxhdbk.html homeclips password] [http://reportchildporn.com/rcp/themes/phpkaox/cache/qpqdxo.html bizzare] [http://www.bidondates.com/pics/albums/102806/CIMG1414/dbmhud.html government of canada] [http://shopwhat.com/photo/image/bpuagh.html anatomy of knee] [http://www.swiic.com/swi/images/banners/128x250/thvkcu.html burners] [http://www.athomewithmark.com/images/properties/thumb/kfxehb.html east indian woman] [http://npgsupport.com/chat/chat/localization/icelandic/cache/jjxptd.html free anal porn] [http://c21redwood.com/images/properties/thumbs/cbauaf.html franck muller watch] [http://bostoncentury.com/old/coppermine/albums/userpics/10001/thumb/ttmbpi.html sexy woman] [http://marylandcomputerguy.net/nails/image/oogkhl.html didrex cod] [http://staticchain.com/banner/123x110/kdgbnd.html free asians] [http://sbcoachescollege.com/bulletin/images/avatars/new/duecgv.html shower curtain] [http://www.swiic.com/swi/images/banners/128x250/bjuuko.html karaoke] [http://meretusa.com/links/cache/wjwbrv.html iran photo sex] [http://shopwhat.com/photo/image/csihvh.html movies sample sex clips] [http://www.bidondates.com/pics/albums/102806/CIMG1414/xlqxwq.html guitar lessons] [http://npgsupport.com/chat/chat/localization/icelandic/cache/dajvem.html hard boiled egg peeler] [http://michaelboyle.biz/joomla/templates/limbocms/limbocms/images/pics/mjroel.html disney channel] [http://c21redwood.com/images/properties/thumbs/drqfjr.html aol phone number] [http://wirelessilliana.com/sullivanpack341/gallery341/g2data/image/roaixj.html tag heuer watch] [http://www.athomewithmark.com/images/properties/thumb/inpojn.html hidden camera sex] [http://adrianwindridge.co.uk/propertyimages/thumbs/gif/uwdcvg.html legal steroids] [http://shopwhat.com/photo/image/ioevkv.html sex movies for free] [http://www.boatnbabes.com/babes/modules/xcgal/albums/userpics/10001/thumbs/gxpefr.html motorhome bluebook] [http://www.swiic.com/swi/images/banners/128x250/hfkadk.html dmx mp3] [http://c21redwood.com/images/properties/thumbs/pfdjnd.html driver detective torrent] [http://sbcoachescollege.com/bulletin/images/avatars/new/ehknll.html ps2 game cheat codes] [http://www.bassboatmagazine.com/linkmachine/templates/lm_images/thumb/fqdtit.html claddagh rings] [http://shopwhat.com/photo/image/vqwugr.html games downlod] [http://www.usedboatdealer.com/boats/images/banners/gif/atnvbc.html pthc forum] [http://www.partnerwithsap.com/de/images/banners/xwplov.html necklace] [http://adrianwindridge.co.uk/propertyimages/thumbs/gif/bnpwew.html cheap] [http://www.swiic.com/swi/images/banners/128x250/ubxgxd.html log cabins] [http://www.bassboatmagazine.com/linkmachine/templates/lm_images/thumb/tfrall.html jewelry making kits] [http://aoreport.com/mag/images/stories/News05-06/5-22-06/image/fniwhd.html stair railings] [http://www.jericogt.com/design/schema/images/news/thumb/1/tllvoe.html hawaii rentals] [http://shopwhat.com/photo/image/fvcgwc.html best western hotels] [http://www.swiic.com/swi/images/banners/128x250/aimmva.html addicting game] [http://jaxrotaract.org/galainfo/images/avatars/pics/gxqxph.html runescape money] [http://borrington.org/videos/move/dacrna.html vacations hawaii] [http://marylandcomputerguy.net/nails/image/hlcqnm.html delco electronics] [http://diaper.servemp3.com/what-is-a-pin-hole.htm what is a pin hole camera] [http://perfum.servemp3.com/view/the-cure-end.html the cure end of the world] [http://mortar.servemp3.com/content/micheal-w-smith.html micheal w smith biography] [http://perfum.servemp3.com/view/fire-fighters.html fire fighters] [http://marked.servemp3.com/web/where-to-sell-comic.html where to sell comic books] [http://chopt.servemp3.com/lake-las-vegas.htm lake las vegas vent cleaning] [http://toledo.servemp3.com/articles/battlefield-2.html battlefield 2] [http://whiff.servemp3.com/library/hillary-swank.html hillary swank nude] [http://amamon.servemp3.com/articles/custom-suv-wheels.html custom suv wheels] [http://toledo.servemp3.com/articles/broadway-plays.html broadway plays] [http://safely.servemp3.com/articles/nurse-fuck.html nurse fuck] [http://whiff.servemp3.com/library/electric-generators.html electric generators] [http://expuls.servemp3.com/web/buy-avodart.html buy avodart] [http://perfum.servemp3.com/view/american-express.html american express] [http://mortar.servemp3.com/content/filipina-actress.html filipina actress nude] [http://mortar.servemp3.com/content/trimspa-x32.html trimspa x32] [http://mortar.servemp3.com/content/ronnie.html ronnie] [http://toledo.servemp3.com/articles/kitchen-pictures.html kitchen pictures] [http://seeds.servemp3.com/web/business-process.html business process outsourcing] [http://mortar.servemp3.com/content/getto-booty.html getto booty] [http://marked.servemp3.com/web/incontinence-products.html incontinence products] [http://expuls.servemp3.com/web/real-estate.html real estate franchises] [http://chopt.servemp3.com/trademark-registration.htm trademark registration] [http://safely.servemp3.com/articles/amazon-woman.html amazon woman] [http://perfum.servemp3.com/view/appliance-stores.html appliance stores new york] [http://chopt.servemp3.com/female-impersonators.htm female impersonators] [http://whiff.servemp3.com/library/mpeg-squirt.html mpeg squirt] [http://safely.servemp3.com/articles/porker.html porker] [http://perfum.servemp3.com/view/cum-covered-bodies.html cum covered bodies] [http://whiff.servemp3.com/library/georgia-carpet-outlet.html georgia carpet outlet] [http://toledo.servemp3.com/articles/gerard-way.html gerard way] [http://whiff.servemp3.com/library/girls-in-bras.html girls in bras] [http://toledo.servemp3.com/articles/malay.html malay] [http://chopt.servemp3.com/ford-f150.htm ford f150] [http://amamon.servemp3.com/articles/hawaiian-recipes.html hawaiian recipes] [http://toledo.servemp3.com/articles/stick-games.html stick games] [http://mortar.servemp3.com/content/award-emmy-winner.html award emmy winner] [http://chopt.servemp3.com/sonic-the-hedgehog.htm sonic the hedgehog download for pc] [http://seeds.servemp3.com/web/granny-older.html granny older] [http://seeds.servemp3.com/web/sorority-girls.html sorority girls] [http://marked.servemp3.com/web/silver-prices.html silver prices] [http://seeds.servemp3.com/web/reed-dance.html reed dance] [http://prozak.servemp3.com/text/incubus-stellar.htm incubus stellar] [http://marked.servemp3.com/web/bouncing-boobies.html bouncing boobies] [http://toledo.servemp3.com/articles/ministerio-proteccion.html ministerio proteccion social colombia] [http://diaper.servemp3.com/cute-young-teens.htm cute young teens] [http://amamon.servemp3.com/articles/networking-dictionary.html networking dictionary online] [http://prozak.servemp3.com/text/mg-midget.htm mg midget] [http://perfum.servemp3.com/view/la-fitness.html la fitness] [http://chopt.servemp3.com/white-house-country.htm white house country manor] [http://amamon.servemp3.com/articles/latina-anal.html latina anal] [http://perfum.servemp3.com/view/hot-anime-girls.html hot anime girls] [http://safely.servemp3.com/articles/animal-porno.html animal porno] [http://expuls.servemp3.com/web/texas-bar-associations.html texas bar associations] [http://chopt.servemp3.com/allman-brothers.htm allman brothers tickets] [http://toledo.servemp3.com/articles/anesthesia-medical.html anesthesia medical group san diego] [http://whiff.servemp3.com/library/ivermectin.html ivermectin] [http://expuls.servemp3.com/web/paris-sex.html paris sex] [http://perfum.servemp3.com/view/buffy-tyler-video.html buffy tyler video] [http://prozak.servemp3.com/text/wrinkles.htm wrinkles] [http://expuls.servemp3.com/web/cum-kissing-snowballing.html cum kissing snowballing] [http://expuls.servemp3.com/web/sbc-ameritech.html sbc ameritech] [http://prozak.servemp3.com/text/disney-cruise.htm disney cruise] [http://safely.servemp3.com/articles/xnxx-galleries.html xnxx galleries] [http://safely.servemp3.com/articles/ama-motocross.html ama motocross] [http://safely.servemp3.com/articles/free-porno-movie.html free porno movie] [http://marked.servemp3.com/web/laurel-and-hardy.html laurel and hardy] [http://perfum.servemp3.com/view/backseat-bangers.html backseat bangers sex] [http://prozak.servemp3.com/text/arizona-tourism.htm arizona tourism] [http://perfum.servemp3.com/view/left-side-pain.html left side pain] [http://perfum.servemp3.com/view/shoal.html shoal] [http://amamon.servemp3.com/articles/daddy-yankee-mp3.html daddy yankee mp3] [http://seeds.servemp3.com/web/zip-free-program.html zip free program] [http://perfum.servemp3.com/view/whats-my-age-again.html whats my age again] [http://toledo.servemp3.com/articles/lady-sonia-uk.html lady sonia uk] [http://mortar.servemp3.com/content/glands.html glands] [http://mortar.servemp3.com/content/sailor-moon.html sailor moon doujinshi] [http://seeds.servemp3.com/web/going-braless-wife.html going braless wife] [http://prozak.servemp3.com/text/wet-bitches.htm wet bitches] [http://perfum.servemp3.com/view/physical-therapist.html physical therapist search] [http://toledo.servemp3.com/articles/jazz-dance.html jazz dance] [http://mortar.servemp3.com/content/dried-cherries.html dried cherries] [http://marked.servemp3.com/web/las-vegas-review.html las vegas review journal] [http://chopt.servemp3.com/girl-sucking-cock.htm girl sucking cock] [http://expuls.servemp3.com/web/james-bond-girls.html james bond girls images] [http://mortar.servemp3.com/content/free-midget.html free midget sex midget sex] [http://whiff.servemp3.com/library/thong-shots.html thong shots] [http://amamon.servemp3.com/articles/robert-browning.html robert browning poems] [http://mortar.servemp3.com/content/the-home-depot.html the home depot] [http://mortar.servemp3.com/content/teaching-bible-facts.html teaching bible facts publications] [http://whiff.servemp3.com/library/out-of-print-books.html out of print books] [http://seeds.servemp3.com/web/anna-nicole-smith.html anna nicole smith exposed] [http://diaper.servemp3.com/michelle-thorne.htm michelle thorne] [http://mortar.servemp3.com/content/outdoor-mat.html outdoor mat] [http://marked.servemp3.com/web/small-boys-dicks.html small boys dicks] [http://toledo.servemp3.com/articles/antec.html antec] [http://chopt.servemp3.com/nude-kirsten.htm nude kirsten dunst] [http://seeds.servemp3.com/web/grief.html grief] [http://amamon.servemp3.com/articles/musket.html musket] [http://perfum.servemp3.com/view/scrambled-eggs.html scrambled eggs testicle kick] {{Running_Jmol_Sections}}
+
''Note: although the title of this page remains the same, there is no longer any implication of Java applets involved in running Jmol''
== Jmol Applet ==
 
  
[[wikipedia:Java_applet|Java applet]] version of Jmol which allows Jmol to be embedded in web pages (given that viewers have a Java plugin installed). Like with the application, [[Scripting]] is available. For some demonstration pages see http://www.jmol.org/demo/. To see the HTML source use your web browser {{MenuItem|View}}
+
{{Lang:Jmol Applet}}
 +
 
 +
{{Running_Jmol_Sections}}
 +
 
 +
== Jmol HTML5 Object (JSmol) ==
 +
 
 +
This allows Jmol to be embedded in web pages. Like with the application, commands can be applied to the model using the [[Scripting]] language. For some demonstration pages see {{Website}}demo/. To see the HTML source use your web browser {{MenuItem|View}} → {{MenuItem|Page Source}}.
 +
Starting with version 13.1, Jmol may also be inserted into web pages using the non-Java alternative, called JSmol. This allows to use an HTML5 object that only requires JavaScript and has the same set of features as Jmol applet. See [[Jmol JavaScript Object]] for more details.
 +
 
 +
== Installing Jmol objects ==
 +
{{Installing_Jmol_Sections}}
 +
If you only wish to create a web page(s) containing molecular scenes in Jmol, there are easier ways than starting from scratch: see [[#Tools for Authoring Jmol Web Pages]]. If you wish to learn how to create web pages containing Jmol from scratch, read on.
 +
 
 +
Download the Jmol package (either <code>.zip</code> or <code>tar.gz</code> format) and extract/uncompress '''only the necessary files''' to the folder of your choice.
 +
 
 +
Which are those necessary files? Read subsections below.
 +
 
 +
To use the Jmol object within local web pages, e.g. on the hard disk or on CD, see [[Jmol Applet Deployment Local]] for some precautions needed.
 +
 
 +
For some specific needs, you must use other files; read the sections below about the signed applet.
 +
 
 +
If you distribute your web page files, you should also include the copyright, license and information files: {{File|COPYRIGHT.txt}}, {{File|LICENSE.txt}} and {{File|README.txt}}
 +
 
 +
=== Inserting Jmol objects into web pages ===
 +
Inclusion of Jmol objects and interaction with them are managed easily using a JavaScript-based solution:
 +
 
 +
==== Jmol JavaScript Object (Jmol-JSO) ====
 +
'''Jmol-JSO''' (new in Jmol v.13) provides a clean, efficient way to interact with the Jmol applet from JavaScript and, in addition, allows extension to Java- and applet-challenged platforms such as the iPad, the iPhone, and Android mobile devices, and adds easy access to public databases such as [http://rcsb.org the RCSB PDB database], [http://cactus.nci.nih.gov/ the National Cancer Institute CACTVS server], and [http://pubchem.ncbi.nlm.nih.gov/ PubChem], even when the Jmol Java applet is not available because of a user's platform. Basic high-level scripting for these non-Java alternatives is included. In addition, '''Jmol-JSO''' adds synchronization with the [http://jspecview.sourceforge.net JSpecView applet] and 2D-to-3D model building and interconversion using the [https://peter-ertl.com/jsme/ JSME Molecule Editor]. See more details on [[Jmol JavaScript Object]].
 +
 
 +
====  Forcing the JSmol object to open in a certain language ====
 +
The JSmol object includes [[Internationalisation/Current_Status|several languages]] (technically called localizations) for the user interface (pop-up menu). JSmol will open by default with the interface using the language of your operating system
 +
([http://java.sun.com/j2se/corejava/intl/reference/faqs/index.html#set-default-locale ref.]). However, if you need to change this:
 +
 
 +
# The language in JSmol can be switched anytime, from the pop-up  menu, "Language" item near the bottom.
 +
# Or, using the scripting language: <code> language = "de" </code> (you must use the keyword "language" and the two-letter language code: ca, cs, de, en, es, et, fr, nl, pt, tr, etc.). In a few cases, the language code has 2+2 letters: en_GB, en_US, pt_BR, zh_CN, zh_TW
 +
# To set the language just when the JSmol object is created as the web page loads, use the [[Jmol_JavaScript_Object/Info#Customization_or_extras|language]] parameter of the <code>Info</code> variable.
 +
 
 +
=== Testing different JSmol versions ===
 +
''(This is an advanced feature)''
 +
 
 +
You can force the use of a certain version of JSmol object in any web page (even if that page is not yours), as long as the page was written using the standard, recommended code for inserting JSmol objects. The way to do so is:
 +
 
 +
On the URL line of the browser, add the following:
 +
 
 +
''(Pending -- this needs verification)''
 +
<!-- need to check if this works
 +
<code>?_USE=HTML5&J2S=</code> followed by the url of the {{folder|j2s}} folder your intend to use.
 +
 
 +
If there is already a <code>?</code> in the URL, then use <code>&</code> for your addition, to preserve the logic of a url.
 +
-->
 +
 
 +
== Jmol in Wikis ==
 +
 
 +
The applet can be embedded in [[wikipedia:HTML|HTML]] (or XHTML) pages (examples are listed on [[Websites Using Jmol]]), but also, with some extra technologies, in Wiki pages (see [[Jmol Processor]]).
 +
 
 +
== Tools for Authoring Jmol Web Pages ==
 +
===Jmol.php: easy Jmol insertion into a web page===
 +
You can insert a Jmol object into a web page with nothing more than a simple <code><script></code> or <code><a></code> tag.
 +
You don't have to install any Jmol files in your computer or web server.
 +
You don't even need a file with the 3D model; it will be automatically obtained from an appropriate web server.
 +
 
 +
Note that this way of using Jmol is easily compatible with any environment where you do not control the full source code, like forums, blogs, wikis, content management systems, e-learning environments...
 +
In fact, you can email the address and the recipient will see the Jmol object by clicking on the received link.
 +
 
 +
See [[Jmol_PHP]] for details.
 +
 
 +
===Proteopedia's Scene Authoring Tools===
 +
The easiest way to create, and share, a web page containing customized molecular scenes in Jmol, is to build the page in [http://proteopedia.org Proteopedia.Org]. Proteopedia's ''Molecular Scene-Authoring Tools'' free you from learning any Jmol commands, HTML, or javascript. You will only need to learn a tiny bit of wikitext markup, for which convenience buttons and help are provided. On the other hand, if you already know some Jmol commands, you may use them in creating your scene (via the Jmol console). Regardless of how your scene is created, it will be saved as a Jmol state script. You may upload atomic coordinate files, or use published PDB files. Proteopedia automatically saves a frozen copy of each PDB file that you use, to protect your scripts from breaking e.g. after remediation of files by the Protein Data Bank. You may created pages that are protected from editing by others.
 +
 
 +
===Jmol's ''Export to Web''===
 +
If you are not comfortable writing html/xhtml and javascript code, or would just like to quickly put together some simple pages, then look at the '''export to web function of Jmol'''.  This allows you to export all the necessary files to make simple pages that have a number of live Jmol displays or a single Jmol display that can be changed by clicking buttons.  You select the views you want the user to see by setting them up in Jmol.  You then add any desired text or comments to the .html file created by the export function in your favorite web editor (Some open source suggestions: [http://www.seamonkey-project.org/ SeaMonkey] is simple and works very well, [http://www.kompozer.net/ Kompozer] is more sophisticated and works pretty well, [http://www.w3.org/Amaya/ Amaya] is the most sophisticated but is harder to use). Instructions for using the export function are accessible in the export to web dialog within the Jmol application.  A more detailed tutorial and some older packages are available at [http://www.uwosh.edu/faculty_staff/gutow/Jmol_Web_Page_Maker/Jmol_Web_Page_Maker.shtml Jmol Web Page Maker].
 +
<!--[[User:Gutow|Gutow]] 21:48, 25 July 2008 (CEST)-->
 +
 
 +
== Saving Files from the Jmol Object ==
 +
Although this isn't obvious, the molecule that is being shown in JSmol can be saved to local disk unless the model was loaded inline, in which case this technique fails. To do so:
 +
# Open the applet's menu (right-click, Ctrl+click, or click on bottom-right "Jmol" logo).
 +
# Click on the last entry (<code>About...</code>).
 +
# On the submenu that appears, the first entry is the name of the first model loaded. If it says "string" then the model was loaded inline and continuing will result in a "404" resource not found error. If the entry is a file name, then you can continue.  If more than one file has been loaded, there will be a line for each on this submenu. Click on the one that you want to open or save.  This will bring up another layer of menu options
 +
# Click on the last entry (<code>View</code> + name of file)
 +
# Depending on your browser's configuration, the file will be opened in the associated program ("helper application") or you will get an "Open or Save" dialog; choose Save and location in your disk.
 +
 
 +
:''Warning'': At least in Windows, modern browsers may detect this action as opening a pop-up window, so it's likely that the pop-up blocker will prevent you from seeing the "Open or Save" dialog. Pay attention to messages and options in your browser to allow pop-ups for the current page. (Such messages often appear as yellow bars at the top of the page, warnings in a toolbar, or hints in the status line at the bottom of the browser window.)
 +
 
 +
In addition to saving the full model, a '''part of the molecule''' can be extracted and saved into MOL format. This is not so straightforward as the former, and is described in the "interactive scripting documentation" (see [{{Website}} Jmol home page]).
 +
 
 +
It is also possible to save the '''state of the molecule''' (rendering style, coloring, visibility, orientation, etc.). See [http://www.stolaf.edu/academics/chemapps/jmol/docs/?ver=11.0#save <code>save state</code>] and [http://www.stolaf.edu/academics/chemapps/jmol/docs/?ver=11.0#write <code>write state</code>] in the Jmol scripting documentation.

Latest revision as of 10:29, 14 August 2021

Note: although the title of this page remains the same, there is no longer any implication of Java applets involved in running Jmol


Geographylogo.png

Reference: English – Other: 日本語 ·


Running Jmol / JSmol

Jmol HTML5 Object (JSmol)

This allows Jmol to be embedded in web pages. Like with the application, commands can be applied to the model using the Scripting language. For some demonstration pages see http://jmol.sourceforge.net/demo/. To see the HTML source use your web browser ViewPage Source. Starting with version 13.1, Jmol may also be inserted into web pages using the non-Java alternative, called JSmol. This allows to use an HTML5 object that only requires JavaScript and has the same set of features as Jmol applet. See Jmol JavaScript Object for more details.

Installing Jmol objects

Installing Jmol / JSmol

If you only wish to create a web page(s) containing molecular scenes in Jmol, there are easier ways than starting from scratch: see #Tools for Authoring Jmol Web Pages. If you wish to learn how to create web pages containing Jmol from scratch, read on.

Download the Jmol package (either .zip or tar.gz format) and extract/uncompress only the necessary files to the folder of your choice.

Which are those necessary files? Read subsections below.

To use the Jmol object within local web pages, e.g. on the hard disk or on CD, see Jmol Applet Deployment Local for some precautions needed.

For some specific needs, you must use other files; read the sections below about the signed applet.

If you distribute your web page files, you should also include the copyright, license and information files: File icon.gifCOPYRIGHT.txt, File icon.gifLICENSE.txt and File icon.gifREADME.txt

Inserting Jmol objects into web pages

Inclusion of Jmol objects and interaction with them are managed easily using a JavaScript-based solution:

Jmol JavaScript Object (Jmol-JSO)

Jmol-JSO (new in Jmol v.13) provides a clean, efficient way to interact with the Jmol applet from JavaScript and, in addition, allows extension to Java- and applet-challenged platforms such as the iPad, the iPhone, and Android mobile devices, and adds easy access to public databases such as the RCSB PDB database, the National Cancer Institute CACTVS server, and PubChem, even when the Jmol Java applet is not available because of a user's platform. Basic high-level scripting for these non-Java alternatives is included. In addition, Jmol-JSO adds synchronization with the JSpecView applet and 2D-to-3D model building and interconversion using the JSME Molecule Editor. See more details on Jmol JavaScript Object.

Forcing the JSmol object to open in a certain language

The JSmol object includes several languages (technically called localizations) for the user interface (pop-up menu). JSmol will open by default with the interface using the language of your operating system (ref.). However, if you need to change this:

  1. The language in JSmol can be switched anytime, from the pop-up menu, "Language" item near the bottom.
  2. Or, using the scripting language: language = "de" (you must use the keyword "language" and the two-letter language code: ca, cs, de, en, es, et, fr, nl, pt, tr, etc.). In a few cases, the language code has 2+2 letters: en_GB, en_US, pt_BR, zh_CN, zh_TW
  3. To set the language just when the JSmol object is created as the web page loads, use the language parameter of the Info variable.

Testing different JSmol versions

(This is an advanced feature)

You can force the use of a certain version of JSmol object in any web page (even if that page is not yours), as long as the page was written using the standard, recommended code for inserting JSmol objects. The way to do so is:

On the URL line of the browser, add the following:

(Pending -- this needs verification)

Jmol in Wikis

The applet can be embedded in HTML (or XHTML) pages (examples are listed on Websites Using Jmol), but also, with some extra technologies, in Wiki pages (see Jmol Processor).

Tools for Authoring Jmol Web Pages

Jmol.php: easy Jmol insertion into a web page

You can insert a Jmol object into a web page with nothing more than a simple <script> or <a> tag. You don't have to install any Jmol files in your computer or web server. You don't even need a file with the 3D model; it will be automatically obtained from an appropriate web server.

Note that this way of using Jmol is easily compatible with any environment where you do not control the full source code, like forums, blogs, wikis, content management systems, e-learning environments... In fact, you can email the address and the recipient will see the Jmol object by clicking on the received link.

See Jmol_PHP for details.

Proteopedia's Scene Authoring Tools

The easiest way to create, and share, a web page containing customized molecular scenes in Jmol, is to build the page in Proteopedia.Org. Proteopedia's Molecular Scene-Authoring Tools free you from learning any Jmol commands, HTML, or javascript. You will only need to learn a tiny bit of wikitext markup, for which convenience buttons and help are provided. On the other hand, if you already know some Jmol commands, you may use them in creating your scene (via the Jmol console). Regardless of how your scene is created, it will be saved as a Jmol state script. You may upload atomic coordinate files, or use published PDB files. Proteopedia automatically saves a frozen copy of each PDB file that you use, to protect your scripts from breaking e.g. after remediation of files by the Protein Data Bank. You may created pages that are protected from editing by others.

Jmol's Export to Web

If you are not comfortable writing html/xhtml and javascript code, or would just like to quickly put together some simple pages, then look at the export to web function of Jmol. This allows you to export all the necessary files to make simple pages that have a number of live Jmol displays or a single Jmol display that can be changed by clicking buttons. You select the views you want the user to see by setting them up in Jmol. You then add any desired text or comments to the .html file created by the export function in your favorite web editor (Some open source suggestions: SeaMonkey is simple and works very well, Kompozer is more sophisticated and works pretty well, Amaya is the most sophisticated but is harder to use). Instructions for using the export function are accessible in the export to web dialog within the Jmol application. A more detailed tutorial and some older packages are available at Jmol Web Page Maker.

Saving Files from the Jmol Object

Although this isn't obvious, the molecule that is being shown in JSmol can be saved to local disk unless the model was loaded inline, in which case this technique fails. To do so:

  1. Open the applet's menu (right-click, Ctrl+click, or click on bottom-right "Jmol" logo).
  2. Click on the last entry (About...).
  3. On the submenu that appears, the first entry is the name of the first model loaded. If it says "string" then the model was loaded inline and continuing will result in a "404" resource not found error. If the entry is a file name, then you can continue. If more than one file has been loaded, there will be a line for each on this submenu. Click on the one that you want to open or save. This will bring up another layer of menu options
  4. Click on the last entry (View + name of file)
  5. Depending on your browser's configuration, the file will be opened in the associated program ("helper application") or you will get an "Open or Save" dialog; choose Save and location in your disk.
Warning: At least in Windows, modern browsers may detect this action as opening a pop-up window, so it's likely that the pop-up blocker will prevent you from seeing the "Open or Save" dialog. Pay attention to messages and options in your browser to allow pop-ups for the current page. (Such messages often appear as yellow bars at the top of the page, warnings in a toolbar, or hints in the status line at the bottom of the browser window.)

In addition to saving the full model, a part of the molecule can be extracted and saved into MOL format. This is not so straightforward as the former, and is described in the "interactive scripting documentation" (see Jmol home page).

It is also possible to save the state of the molecule (rendering style, coloring, visibility, orientation, etc.). See save state and write state in the Jmol scripting documentation.