void OnGUI()
    {
        GUI.skin = mySkin;

        if (!fontInitialized)
        {
            Rectangles.SetFontSize();
            fontInitialized = true;
        }

        if (GUIMoleculeController.m_fileBrowser != null)
        {
            GUIMoleculeController.m_fileBrowser.OnGUI();
        }



        if (gUIDisplay.m_fileBrowser != null)
        {
            GUIMoleculeController.FileBrowser_show = true;
            gUIDisplay.m_fileBrowser.OnGUI();
        }
        else
        {
            GUIMoleculeController.FileBrowser_show = false;
        }

        UIData.EnableUpdate = false;
        if ((!UIData.hiddenUI) && (!UIData.hiddenUIbutFPS))
        {
            gUIDisplay.Display();
        }

        if ((!UIData.hiddenUI) && (UIData.hiddenUIbutFPS))
        {
            GUIMoleculeController.toggle_INFOS = true;
        }

        if (!UIData.hiddenUI)
        {
            if (GUIMoleculeController.showPanelsMenu)
            {
                GUIMoleculeController.SetPanels();
            }
        }

        if (!UIData.hiddenUI)
        {
            if (GUIMoleculeController.showResiduesMenu)
            {
                GUIMoleculeController.SetResidues();
            }
        }

        if (!UIData.hiddenUI)
        {
            if (GUIMoleculeController.showAtomsExtendedMenu)
            {
                GUIMoleculeController.SetAtomsExtended();
            }
        }

        if (!UIData.hiddenUI)
        {
            if (GUIMoleculeController.showChainsMenu)
            {
                GUIMoleculeController.SetChains();
            }
        }

        if (UIData.changeStructure)
        {
            DisplayMolecule.ResetDisplay();
            UIData.changeStructure        = false;
            UIData.isParticlesInitialized = false;
        }

        if (UIData.isclear)
        {
            DisplayMolecule.DestroyFieldLine();
            DisplayMolecule.DestroyObject();
            DisplayMolecule.DestroyRingBlending();
            DisplayMolecule.DestroySugarRibbons();
            DisplayMolecule.DestroyOxySpheres();
            DisplayMolecule.DestroyBondObject();
            DisplayMolecule.DestroySurfaces();
            DisplayMolecule.DestroyElectIso();
            DisplayMolecule.ClearMemory();

            // ----- Clearing all variables -----
            UIData.isCubeLoaded                = false;
            UIData.isSphereLoaded              = false;
            UIData.isHBallLoaded               = false;
            LoadTypeGUI.buildSurfaceDone       = false;
            LoadTypeGUI.surfaceTextureDone     = false;
            LoadTypeGUI.toggle_RING_BLENDING   = false;
            LoadTypeGUI.toggle_NA_HIDE         = false;
            LoadTypeGUI.toggle_TWISTER         = false;
            LoadTypeGUI.toggle_HIDE_HYDROGEN   = false;
            LoadTypeGUI.toggle_OXYGEN          = false;
            LoadTypeGUI.ColorationModeBond     = 0;
            LoadTypeGUI.ColorationModeRing     = 0;
            UIData.isParticlesInitialized      = false;
            GUIMoleculeController.globalRadius = 1.0f;
            UIData.secondarystruct             = false;
            UIData.atomtype = UIData.AtomType.noatom;
            UIData.bondtype = UIData.BondType.nobond;
            MoleculeModel.existingName.Clear();
            MoleculeModel.existingRes.Clear();
            MoleculeModel.existingChain.Clear();
//			id="";
            //T.T test debug
            Molecule.Model.MoleculeModel.atomsLocalScaleList.Clear();
            RequestPDB.isDone = false;

            UIData.isclear = false;
            Debug.Log("UIData.isclear");
        }

        if (UIData.resetDisplay && UIData.isCubeToSphere)
        {
            DisplayMolecule.CubeToSphere();
            Debug.Log("UIData :: resetDisplay && iscubetoSphere");
        }

        if (UIData.resetDisplay && UIData.isSphereToCube)
        {
            DisplayMolecule.SphereToCube();
            Debug.Log("UIData :: reset display && is spheretocube");
        }

        if (UIData.resetBondDisplay)
        {
            DisplayMolecule.ResetBondDisplay();
            Debug.Log("UIData :: reset bonddisplay ");
        }

        if (UIData.isOpenFile)
        {
            StartCoroutine(loadLoadFile());
        }

        if (UIData.backGroundIs)
        {
            LocCamera.GetComponent <Skybox>().enabled = true;
        }
        else
        {
            LocCamera.GetComponent <Skybox>().enabled = false;
        }

        UIData.EnableUpdate = true;

        if (UIData.interactive && UIData.resetInteractive)
        {
            DisplayMolecule.AddAllPhysics();
            UIData.resetInteractive = false;
        }
        else if (!UIData.interactive && UIData.resetInteractive)
        {
            DisplayMolecule.DeleteAllPhysics();
            UIData.resetInteractive = false;
        }

        if (UIData.meshcombine)
        {
            DisplayMolecule.AddCombineMesh();
            UIData.resetMeshcombine = false;
        }
        else if (!UIData.meshcombine)
        {
            DisplayMolecule.DeleteCombineMesh();
            UIData.resetMeshcombine = false;
        }

        /*if (requestPDB.Loading) {
         * GUI.Label(new Rect(100, 15, 200, 30), "", "bj");
         * GUI.Label(new Rect(100,15, requestPDB.progress * 200, 30), "", "qj");
         * }*/

//		if(GUI.tooltip != "")GUI.Label ( new Rect(180,Screen.height-35,Screen.width-360,20), GUI.tooltip);
//		if(MoleculeModel.newtooltip != "")GUI.Label ( new Rect(180,Screen.height-35,Screen.width-360,20), MoleculeModel.newtooltip);
        if (GUI.tooltip != "")
        {
            GUI.Box(new Rect(180, Screen.height - 55, 450, 25), GUI.tooltip);
        }
        if (MoleculeModel.newtooltip != "")
        {
            GUI.Box(new Rect(180, Screen.height - 55, 450, 25), MoleculeModel.newtooltip);
        }
    }