<!-- debug thru # 1 -->
<html>
<head>
   <title>ConSurf Results Download</title>
</head>

<body bgcolor='white'>

<div align=center>
<b>
<big><big>
Downloading Results of ConSurf Jobs
<br>
for display in <a href="http://firstglance.jmol.org"
target=_blank>FirstGlance in Jmol</a>,
</big>
<br>
and for
<br>
Using and Customizing the Downloaded Files.
<br>
Making Presentations Showing ConSurf Results.
</big>
</b>
</div>

<br><br>

<center><table cellpadding="15"><tr>
<td bgcolor='#c0ffff'><big>
<a name='top'>
Download the PDB File here</a>
<br>
&nbsp; 
for this ConSurf Job:
<br><br>

<script language='javascript'>

	// the only query parameter for downldcs.htm is "?nopdb"
	var qp = document.location.search;
	var isconsurf = false;
	var cspdb = "";

	if (qp.length == 0) // not "?nopdb", so opener exists and knows the PDB ID
	{
		cspdb = opener.pdbToLoad;
		if (cspdb.indexOf("_consurf") != -1 && cspdb.indexOf("_pipe") != -1)
			isconsurf = true;

		// Uploaded ConSurf files don't have _consurf/_pipe in filename.
		if (opener.consurfMode)
			isconsurf = true;
	}
//	alert("downldcs.htm #1: cspdb =\n" + cspdb);

	var uploaded = false;
	var iLIGIM = cspdb.indexOf("/LIGIM/"); // used by Prilusky for uploads
	if (iLIGIM != -1)
		uploaded = true;

//	uploaded = true; // @@ for testing

	if (isconsurf && !uploaded)
	{
		// bundled gallery pdb: "xxxx_consurf0000000000_pipe.pdb"
		// server job: "/results/0000000000/xxxx_consurf0000000000_pipe.pdb"

		var jobno, pdbfile;

		var iResults = cspdb.indexOf("/results/");
		var isBundled = (iResults == -1);

		if (isBundled)
		{
			jobno = cspdb.substring(12, 22); // skip "xxxx_consurf"
			pdbfile = cspdb;
		}
		else // on-line server job
		{
			jobno = cspdb.substring(9, 19); // skip "/results/"
			pdbfile = cspdb.substring(20); // skip "/results/0000000000/"
		}

/*
		var joburl = "<a href='";
		if (isBundled)
			joburl += "http://consurf.tau.ac.il/results/" + jobno + "/";

		joburl += cspdb + "'>" + pdbfile + "</a>";

		document.writeln(joburl);
*/

		document.writeln("<a href='http://consurf.tau.ac.il/results/" + jobno +
			"/" + pdbfile + "'>" + pdbfile + "</a>");
	}

	else if (isconsurf) // uploaded
	{
		document.writeln(
"<font color='#808080'>\
[This ConSurf PDB file was<br>\
uploaded. Therefore you already<br>\
have a downloaded copy of it!]\
</font>");
	}

	else
		document.writeln(
"<font color='#808080'>\
[This page was not opened from<br>\
a <i>FirstGlance</i> session<br>\
displaying a molecule, or the<br>\
current PDB file is not a<br>\
ConSurf result.]</font>");

</script>

<br><br>
<b>Windows:</b>
<br>
&nbsp; 
Right-Click,
<br>
&nbsp; 
Save Target/Link As.

</big><br><br>
Results must be downloaded before
<br>
they are removed from the server.

</td>

<td bgcolor="#c0e0ff"><big>
<center><b>Contents</b></center>
<ul>
<li><a href="#why"><b>Why</b> download results from ConSurf?</a>
<li><a href="#what"><b>What</b> is included in the downloaded PDB file?</a>
<li><a href="#how"><b>How</b> to download this ConSurf result.</a>
<li><a href="#use"><b>Using</b> your downloaded ConSurf results.</a>
<li><a href="#altcolors">Changing the conservation <b>color scheme</b> in your downloaded ConSurf results.</a>
<li><a href="#pipes"><b>Presenting</b> ConSurf-colored molecular views.</a>

</ul>
</big></td></tr></table></center>

<ul>
<br>
<a name="why"><big><b>Why download results from ConSurf?</b></big></a>
<br><br>
<li>Downloaded ConSurf results
(<a href="http://proteinexplorer.org/igloss.htm#pdb"
target="igwin"><font color="#00b000"><b>PDB files</b></font></a>)
can be uploaded to
<a href="http://firstglance.jmol.org" target=_blank>FirstGlance in Jmol</a>
(version <b>0.995</b> or higher, see <a href="#use">below</a>),
which will display them exactly as they appeared after the job was completed
on the
<a href="http://consurf.tau.ac.il" target=_blank>ConSurf Server</a>.
This requires an Internet connection.
<ul>

<li>ConSurf results <b>downloaded before <i>FirstGlance
in Jmol</i></b> was installed at the ConSurf server can also be displayed
by uploading them to 
<i>FirstGlance in Jmol</i>, because
no change in the results file contents was needed for
<i>FirstGlance in Jmol</i>.

<li>Downloaded ConSurf results can
also be displayed <b>off-line</b>, but this requires a downloaded installation of
<a href="http://proteinexplorer.org" target=_blank>Protein Explorer</a> and a
<a href="http://proteinexplorer.org/needbrow.htm?nosorry" target=_blank>PE-compatible
browser</a>. (<i>FirstGlance in Jmol</i> is not configured for downloading
and use off line.)

</ul>

<br><li>Saving your results will keep them available after they have been
removed from the server.
You can re-run the job, of course, but saving the results avoids the
time required to set-up and re-run the job.
This may be especially desirable when
you wish to show the results to an audience in
a <b>presentation</b>.

<br><br><li>It is relatively easy to 
<a href="#altcolors">
change the conservation color scheme</a> in a downloaded ConSurf PDB file.

<br><br>
<a name="what"><big><b>What is included in the downloaded PDB file?</b></big></a>
<br><br>
<li>The above download link enables you to save the customized
<a href="http://proteinexplorer.org/igloss.htm#pdb"
target="igwin"><font color="#00b000"><b>PDB file</b></font></a>
created in each ConSurf job.

<br><br><li>This single saved PDB file
<b>includes</b> the original PDB file, plus
the ConSurf job parameters and command scripts for
coloring the molecule.
The latter are inserted near the top of the PDB file, into its "header",
in a format understood by <i>FirstGlance in Jmol</i> or <i>Protein Explorer</i>.
The job parameters can be displayed from the link <i>ConSurf Job Information</i>
available when the file is displayed in either
<i>FirstGlance in Jmol</i> or <i>Protein Explorer</i>.
(The format of the ConSurf results, inserted into the PDB file header,
was developed for
<a href="http://proteinexplorer.org/pipedoc/index.htm"
target=_blank><i>Presentations in Protein Explorer (PiPEs)</i></a>.)


<br><br><li>The saved PDB file <b>does not include</b> ConSurf job
results offered as separate files, such as
&quot;Amino Acid Conservation Scores&quot;,
&quot;Multiple Sequence Alignment&quot;,
&quot;Phylogenetic Tree&quot;, etc.
which can be saved separately if you wish (using your browser's
File, Save (Page) As).

<a href="http://proteinexplorer.org/consurf/downmore.htm"
target=_blank>More..</a>

</ul>

<ol>

<a name="how"><b><big>How to download this ConSurf result:</big></b></a>

<br><br><li> Decide where, on your computer, you want to put your downloaded
ConSurf results, and create a folder (directory) for them. We recommend
that this folder be named <b>consurf/pdb_only</b>.
If you use a different folder name,
substitute that name wherever consurf/pdb_only is mentioned below.

<br><br><li>Download from one of these two places:

<ol type="i">
<li>

Follow the instructions at the
<a href="#top">
<b>top left</b></a> of this page, where you will find a link for downloading.

<li>The <i>ConSurf Job Status & Results</i> page has a link (near the bottom) for downloading the
<u>The PDB file with ConSurf results in its Header, for FirstGlance in Jmol or Protein Explorer</u>.
In MS Windows,
<font color='red'><b>right click</b></font>
on this link, and select Save Target/Link As.

<br><br><ul>
We strongly recommend that you keep the original filename, of the form
<b>1xxx_consurf0000000000_pipe.pdb</b>, where "1xxx" is the PDB identification
code, "0000000000" is the ConSurf job number, and the ending "_pipe.pdb"
is required by Protein Explorer. These names alphabetize by PDB code,
and within jobs for the same PDB code, by job number.

<br><br>Using either link listed above to save the PDB file
ensures that the filename will be correct.

(If you save the file directly from Jmol's menu,
the filename may
<font color="red"><b>not be correct</b></font>.)
</ul>

</ol>

<br><li>The previous step saves only the visualization result and
job parameters, but not
the ConSurf Job Status Page nor the several text files linked to it, 
including "Amino Acid Conservation Scores", "PSI-BLAST Output",
"The Homologues found by PSI-BLAST (in FASTA format)",
"Multiple Sequence Alignment (in Clustal format)",
and "Phylogenetic Tree".

These pages can be saved separately if you wish (using your browser's
File, Save (Page) As).

<a href="http://proteinexplorer.org/consurf/downmore.htm"
target=_blank>More..</a>


<a name="use"><br><br><b><big>Using your downloaded ConSurf results.</big></b></a>

<br><br><li>Simply go to <a href="http://firstglance.jmol.org"
target=_blank><b>firstglance.jmol.org</b></a>,
and click on <b>Upload your own PDB file</b>.
Use the Browse button to find your saved ConSurf PDB file, and then
click <b>View in FirstGlance</b>.

<ul>
Displaying ConSurf results requires
FirstGlance in Jmol version <b>0.995</b> or higher.
The version number is at the lower right, just below Jmol (the
molecule). It is also shown near the bottom of the main page, in the
link <i>All About Firstglance in Jmol version X.XX</i>.

</ul>

<br><li>Optionally, you can <b>make an HTML ("web browser") page</b>
with links to your saved ConSurf results. This enables you to add some
description to each result, and to order the results as you wish.

Examples of such links are in the
Gallery and Technical Gallery, available at
FirstGlance's <a href="../index.htm" target=_blank>main page</a>.

This requires that you have an account on an HTTP server, and that
you know how to use an HTML editor to make hyperlinks
in an HTML document.
FirstGlance includes
<a href="http://firstglance.jmol.org/links.htm"
target=_blank>instructions</a>
on how to format these links to specify your saved PDB files.
The saved PDB files must be on an HTTP server along with your
HTML page containing the links, in order to work with FirstGlance.


<br><br><a name="altcolors">
<b><big>Changing the conservation color scheme in your downloaded ConSurf results</big></b></a>
<br><br>

<table align="right" border="0"><tr><td>
<center>ConSurf's Color Scheme</center>
	<img src="colorkey.gif"> <img src="isd.gif">
</td></tr><tr><td>
	<img src="altkey.gif"> <img src="altisd.gif">
<br>
<center>Color Scheme Inspired by MSA3D</center>
</td></tr></table>

<li>ConSurf uses a series of nine colors from turquoise
through white through burgandy to represent conservation grades from
variable through conserved, respectively.
Changing this color scheme in your downloaded PDB file
is relatively simple. At right is shown
an alternative color scheme inspired by
<a href="http://proteinexplorer.org/pv_msa3d.htm"
target=_blank>PE's MSA3D</a>
(in which grades 4, 5, and 6 use the same color).


Please see
<a href="http://proteinexplorer.org/consurf/downmore.htm"
target=_blank>Changing the conservation color scheme</a>.

</ol>

<ul>
<a name="pipes"><br>
<br><b><big>Presenting ConSurf-colored molecular views.</big></b></a>

<br><br>
<li>The easiest way to present a ConSurf result is to bookmark the job
result page. However, your job will remain on the ConSurf server for
a limited time. 
At the <a href="#top">
top of this document</a> is explained how to save the ConSurf
results on your computer.

<br><br><big>

<li>You can also 
<a href="../slides.htm" target=_blank>
incorporate ConSurf-colored molecular views
into presentations</a>.

</big>

</ul>

<br>
<hr>

Feedback to <a href="mailto:emartz@microbio.umass.edu?subject=ConSurf FGiJ Downloads">Eric Martz</a>.

<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>

</body>
</html>
