//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// config.js CONTAINS SERVER-SPECIFIC CONFIGURATION SETTINGS.
//
// INSTRUCTIONS:
//
// Change the method-Available variables from false to true for each
// method that is available on your server.
// (Methods #1, #5, #6, #7 are always available. Only #2 or #3 and
// optionally #4 need to be enabled.)
//
// At least one of methods #2 or #3 must be available or else FirstGlance
// has no way to get any PDB code data file.
//
// If method #2 is available (copy of the entire Protein Data Bank is on
// your server), you do not need method #3 (RCSB rewrite rules),
// so leave #3 false.
//
// Do not comment out anything below. This would result in undefined
// variables and javascript errors that prevent the application from
// working.
// 
// For further explanation, see install.htm
//
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// LOCATION OF APPLET

// This path contains the applet .jar files.
// This path is used only when the HTML is on a server.
// When the HTML comes from local files, the path is expected to be ".".

// WARNING: VALUES OTHER THAN "." HAVE NOT BEEN TESTED.
var jmolJarPathOnServer = ".";

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// See datameth.htm for explanations of these methods.
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// PDB File Access Method #1 SIGNED APPLET ONLY
// (FirstGlance knows whether it is using the signed applet.)
// This method can be used for any source of a PDB file.

// This URL tells the signed applet where to get PDB Id codes.

var rcsbURLSignedHead = "http://www.rcsb.org/pdb/cgi/export.cgi/";
var rcsbURLSignedTail = ".pdb.gz";
var rcsbURLSignedTailCIF = ".cif.gz";

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// METHODS #2-#6 ARE FOR THE UNSIGNED APPLET.
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// PDB Access Method #2: Same server provides applet and PDB files.
// PDB codes will be fetched from the applet server using these values.
// Example: "1d66" (N.B. not "1d66.pdb", see below)
// When available, this method will be used in preference to method #3.
// If Method #2 is available, do not enable Method #3, which is unnecessary.

var localPDBCodesAvailable = false; // True if and only if available.

// This path tells the unsigned applet where to get PDB Id codes on
// the applet server. Path must be in the same domain as the applet
// server, else the unsigned applet will fail to get the data file.
// The PDB code is sandwiched between the Head and Tail.

var localPDBCodesPathHead = "http://yourserver/filepath/";
var localPDBCodesPathTail = ".pdb.gz"; // or whatever your files need
var localPDBCodesPathTailCIF = ".cif.gz"; // or whatever your files need

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// PDB Access Method #3: RCSB APACHE REWRITE RULES for PDB ID CODES.
// PDB codes will be fetched from rcsb.edu using these rules.
// Example: "1d66" (N.B. not "1d66.pdb", see below)

var apacheRCSBRewriteRulesAvailable = false; // True if and only if available.

// This path tells the unsigned applet where to get PDB Id codes on
// the local server via the Apache rewrite rules.
// The PDB code is sandwiched between the Head and Tail.

var rcsbPathHead = "http://yourserver/rcsbRulePath/"; // must end in '/'
var rcsbPathTail = ".pdb.gz";
var rcsbPathTailCIF = ".cif.gz";

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// PDB Access Method #4: GENERAL APACHE REWRITE RULES for PDB URL's.
// This method will be used when the PDB source includes an absolute URL.
// Example: "http://www.umass.edu/microbio/chime/atp.pdb"
// Example: "http://pqs.ebi.ac.uk/pqs-doc/macmol/1k28.mmol"

var apacheGeneralRewriteRulesAvailable = false; // True if and only if available.

// This path tells the unsigned applet where to get PDB files
// with absolute URL's (from non RCSB servers).
// The URL is added to the Head. No Tail is needed because
// the complete filepath and filename must be given.

var generalPathHead = "http://yourserver/generalRulePath/"; // must end in '/'

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// PDB Access Method #5: ONLY FOR PDB FILES BUNDLED WITH FIRSTGLANCE.
// Example: "1d66.pdb"

// When filename.pdb is requested, not preceded by a path (no slashes),
// where "filename" may or may not be a valid PDB Id, filename.pdb
// is assumed to exist in localPDBFiles/filename.pdb.

// This method is always assumed to exist.

var localPDBFiles = "localPDBFiles/"; // must end in slash; exists on server.

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// PDB Access Method #6: ONLY FOR TESTING when FirstGlance is NOT on a server.

// When (isServed == false)
//   and applet is unsigned
//     PDB Id 1abc will be assumed to be in localTestPDBFiles + "1abc.pdb".

// The directory specified below should NOT exist on a server.

var localTestPDBFiles = "localTestPDBFiles/"; // not on a server!

//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// PDB Access Method #7: Relative paths. Requires no variables here.
// See explanation in datameth.htm.
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// END OF config.js
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

