These variables are set in top.js in getMolToLoad() If there is no "mol=" in the query string, fatal error. pdbToLoad is everything between mol= and &, unescaped. Can be full url, code only, code.pdb. processHeaderBeforeMolView (boolean) true if pdbToLoad contains e.g. "consurf". pdbFilename is the PDB code or a filename at the end of a URL (with everything up to the last slash removed). pdbId is UPPER CASE filename with ".pdb" trimmed off, if present. usePDBId is true if pdbId is a valid PDB code. validPDBId // Contains a valid PDB Id if pdbToLoad was a valid PDB Id, // or if the first four characters of pdbId are a valid PDB Id. Else blank. // CONSURF upload: pdbId is "DATA". PDB ID is not in URL. pdbURL; // URL Jmol uses to fetch the molecule. ------------------------------ UPLOADED PDB files end up as DATA.pdb. When ConSurf, the PDB ID is in FGij javascript consurf_pdb_id (not conveyed to FG). However we want a more general solution using HEADER. consurf/msgcall.js: At the end of the header -> processPDBHeader() which splits into pipeBlock and pdbHeader new in FG 3.8 function getPDBIdFromHeader() extracts the PDB ID from the HEADER line if it has not already in validPDBId.