# This script is applicable to all molecules with a scene specified by # a single Jmol state script. # It is designed to be called by a molecule-specific script # that defines the variables referenced below. # LOAD MOLECULE (restores windowcentered) zap if (_applet) // for web page { loadedfileprev = "" # blank signals state script to load PDB file } else if (PlaygroundProjection) { modelPath = @PlaygroundModelPath + @PDBFileName load @modelPath } else // application development mode, local files { load @PDBFileName } # DISPLAY MOLECULAR SCENE FROM STATE SCRIPT if (_applet) // for web page { script @proteopediaStateScript } else if (PlaygroundProjection) { scriptPath = @PlaygroundScriptPath + @localStateScript # load and initialize commands commented out! script @scriptPath } else // application development mode, local files { script @localStateScript # load and initialize commands commented out! } # NOTE THAT STATE SCRIPT ERASES DEFINED VARIABLES AND SETTINGS, # SO MUST GO BEFORE WHAT IS BELOW. # LOAD SUPPORT FUNCTIONS if (_applet) // for web page { script "/wiki/images/d/de/MPSupportVersion01.spt" } else if (PlaygroundProjection) { scriptPath = @PlaygroundScriptPath + "MPSupportVersion01.spt" # load and initialize commands commented out! script @scriptPath } else // application for development, local files { script MPSupportVersion01.spt } # INITIALIZE initializeBeforeEachCycle("nozap") # USE LIGHT CPK COLORS ON ATOMS AND BONDS # This will need to be modified if some atoms are non-cpk colored! colorAllLightCPK # affects only C, N, O. # BANNER AT TOP (bannerMessage2 is defined in MPSupportVersion01.spt) showBannerAcrossTop(bannerMessage, bannerMessage2) # OPTIONALLY ADD AN ELEMENT COLOR KEY # Generate the color key. elementColorKey(elementList) # ARBITRARY COLOR KEY(S) arbitraryColorKeys() # Spin if spinDefault is true spinOn # ENTRANCE ZOOM if (zoomStart != "") # blank if undefined { entranceZoom(zoomStart, zoomEnd) } delay 20.0 // in order to let the scene spin before the next cycle starts # This is required to signal script completion # to the MP projection system. message "Jmol Script Execution Completed" # END of MPSceneVersion01.spt