JMOL Author Instructions. This document is intended to highlight the

advertisement
JMOL Author Instructions.
This document is intended to highlight the process used to host molecules for societies / websites
for use with Wiley Interscience (WIS) content.
To host the molecule authors will be required to upload files through a content management
application and create the “main body” of the HTML page through a wysiwyg editor In the CMA.
The following pages will explain this process in more detail.
Terms used in this document:
1. Page Template: The surrounding HTML within which author supplied content appears. This is a
fixed template for each website.
2. Main Content Area: The “main body” of the html page in which the jmol applet and any controls
are rendered. This contains “Author supplied source code”.
3. Molecular Data: molecular data can refer to either molecular data files such as .pdb files or to
script files (.spt) files. These files must be made available over the internet for the applet and
jmol javascripts to function correctly.
Jmol Application Output.
The web application at http://jmol.wiley.com is responsible for outputting supplied markup in the
page template that has been created for the particular society or website. In each molecule page the
author has control of the main body of the content but does not have to worry about or include
markup for the surrounding template (see figure 1 below).
Page Template. This is the surrounding template for each molecule
page. This should contain branding for a particular society or website.
This is defined once for each society and website and automatically
forms the base HTML for each molecule page.
Figure 1 - Example Jmol page layout
Author supplied source. The main
body of the page is supplied through
the Jmol CMA application by authors
of the Jmol applet pages.
The JMOL CMA.
The process that we will discuss below will involve the author using a CMA to supply molecular data
and HTML to the http://jmol.wiley.com website.
The JMOL CMA is available
http://springboard.wiley.com
at
the
url:
With a suitable username and password a user of
the CMA can log in and add or edit an individual
molecule’s HTML and upload or re-upload
molecular data.
Figure 2 - CMA login page
The main components of the JMOL CMA are as
follows:
1
3
4
2
5
4.
5.
6.
7.
8.
The content menu.
Content list.
Search box.
Status setting tool.
Open as new button.
Figure 3 - CMA Listing page
The Content Menu.
This defines the following options that are available to authors:
9. Add Jmol: This option is used to create a new record in which the author can supply their
“Author supplied source” which will constitute the “main body” of a new jmol page.
10. Browse Jmols: This option allows authors to filter the main list of content so that only “Author
supplied source” code records are viewed
11. Add Molecule Data: This option allows authors to upload a new molecule data file.
12. Browse Molecule Data: This option allows authors to filter the main list of content so that only
molecule data files are listed
Content list.
The content list by default lists the most recently updated content records within the Jmol CMA. This
is the default view you can see when you log in to the CMA. In addition to filtering the list by content
“type” as specified in the content menu section above, the listing can be filtered using the search
functionality.
Search Box.
The search box can be used to search for text that appears within the Author supplied source. Html
mark up is stripped and only textual content from the supplied information is indexed. We can
configure the application to index the contents of molecular data files ( pdb or similar and .spt files
alike) if the authors would find this functionality useful.
Details on the types of searching that are supported
http://lucene.apache.org/java/2_3_2/queryparsersyntax.html
can
be
found
here:
Status Setting Tool.
From a listing page, multiple pieces of content can be seleted using the checkboxes that accompany
each content record and a change of status can be applied to them. This is extremely useful when
deleting content. (please note.. deleted content is only removed from the system if it remains
unaltered for 30 days.)
Open As New Button.
The open as new button can be used to clone existing content, creating a new Copy of the selected
content. To use this first select the record required for copying and press the open as new button. In
the JMOL CMA this is intended for use with the author supplied source.
Adding and editing JMOL content in the CMA
To create a new JMOL page you must create a new author supplied source record by selecting the
“add Jmol” option from the CMA menu. To Edit an existing author supplied HTML record you must
click on the link corresponding to the record in the listing view.
Adding Author Supplied HTML.
Editing a record required
information to be added:
1
the
following
1. Title: Used for identifying the content in the
CMA, this also provides the human-readable
element of the URL for this molecule.
2
2. Author supplied content: This is the
WYSIWGY editing field into which the
author’s HTML source can be pasted into in
“source” view
Figure 4 – Editing Author Supplied Html Content
2
3
Figure 4a – Lower part of Edit Form
3. Website instance this content belongs: This
is used by the http://jmol.wiley.com website
to associate the correct surrounding
template
Adding Molecular Data.
The files that are referenced from the author supplied HTML must also be uploaded to the CMA. To
achieve this the author must use the “Edit File” form:
1. File: Use the file upload dialogue to select
the file you wish to upload to JMOL website
application. Files uploaded by this method
are virus scanned.
Figure 5 – Editing File content
Viewing saved molecular data.
The http://jmol.wiley.com website lists JMOL
molecules created via the CMA (the most
recently created molecules feature first).
Clicking on one of the links will display the
associated JMOL molecule page.
Figure 6 - The JMOL molecules listing
Generating http://jmol.wiley.com molecule pages – Workflow
Pre-requisites for this process:

An Internet connection

A local working example of a JMOL molecule ( HTML source code )
The process:
1. Log into the JMOL CMA.
2. Upload any molecule data files (.pdb files or similar)
3. Note down the ID of the newly created molecule data file.
4. Upload any spt files that do not reference any other .spt files or molecule data files.
5. Note down the ID of the newly created .spt file.
6. If any of your local .spt files reference molecule data files or .spt files then the references
must be changed to reference the corresponding uploaded file:
a. Replace the path/filename to your local molecule data file with the following path:
/details/<id_of_uploaded_file>/ (please note the trailing ‘/’ character is important)
b. Save the file locally.
7. Upload any .spt files that have been updated.
8. Note down the ID of the uploaded .spt files.
9. Modify the HTML source so that references to .spt files or molecule data files reference the
corresponding uploaded file:
a. Replace the path/filename to your local molecule data file with the following path:
/details/<id_of_uploaded_file>/ (please note the trailing ‘/’ character is important)
10. Use the “add Jmol” menu option to create a new Jmol record.
11. Add a title for this molecule (this forms the human readable part of the URL)
12. Click the “source” button of the wyswyg editor.
13. Paste in your modified html
14. Click the “OK” button at the bottom of the source view popup.
15. Select the appropriate website from the list of application instances at the bottom of the
form.
16. Press the “save” button at the top of the form.
17. Go to the http://jmol.wiley.com website and click the link for the molecule you have just
created to verify the page is working as expected.
Download