207 if (mds && mds.enabled) {
234 LocCamera.GetComponent<
ClickAtom>().ClearSelection();
257 System.Threading.Thread.CurrentThread.CurrentCulture =
new System.Globalization.CultureInfo(
"en-US");
259 LocCamera=Camera.main.gameObject;
261 camera = LocCamera.GetComponent<Camera>();
263 default_fov_angle = camera.fieldOfView;
264 default_near_clip_plane = camera.nearClipPlane;
266 default_fov_angle_rad = default_fov_angle * Mathf.Deg2Rad;
267 default_near_plane_length = default_near_clip_plane * Mathf.Tan(default_fov_angle_rad / 2f);
271 requestPDB = gameObject.AddComponent<
RequestPDB>();
273 GameObject hbmeshManagerObj = GameObject.FindGameObjectWithTag(
"HBallMeshManager");
275 GameObject hStickMeshManagerObj = GameObject.FindGameObjectWithTag(
"HStickMeshManager");
278 LocCamera=Camera.main.gameObject;
280 camSky = LocCamera.GetComponent<Skybox>();
282 toggleNewUI = GameObject.Find(
"New UI Toggle Canvas");
284 scenecontroller = GameObject.Find(
"LoadBox");
301 if(!fontInitialized) {
303 fontInitialized =
true;
309 if (gUIDisplay == null)
404 if(GUI.tooltip !=
"")GUI.Box (
new Rect(180,Screen.height-55,450,25), GUI.tooltip);
468 SendMessage(
"Display",SendMessageOptions.DontRequireReceiver);
493 Debug.Log(
"T.T ==> END OF LOADING");
517 GameObject.Find(
"ParticleManager").SendMessage(
"killCurrentEffects",SendMessageOptions.DontRequireReceiver);
526 (
MoleculeModel.
atoms[i] as GameObject).transform.position =
new Vector3((xyz[j] as
float[])[0], (xyz[j] as
float[])[1], (xyz[j] as
float[])[2]);
533 (
MoleculeModel.
atoms[i] as GameObject).transform.position =
new Vector3((xyz[j] as
float[])[0], (xyz[j] as
float[])[1], (xyz[j] as
float[])[2]);
540 GameObject lineManagerObj = GameObject.FindGameObjectWithTag(
"LineManager");
544 GameObject cubeBondManagerObj = GameObject.FindGameObjectWithTag(
"CubeBondManager");
548 GameObject hStickManagerObj = GameObject.FindGameObjectWithTag(
"HStickManager");
552 GameObject hStickMeshManagerObj = GameObject.FindGameObjectWithTag(
"HStickMeshManager");
572 GameObject.Find(
"ParticleManager").SendMessage(
"killCurrentEffects",SendMessageOptions.DontRequireReceiver);
581 (
MoleculeModel.
atoms[i] as GameObject).transform.position =
new Vector3((xyz[j] as
float[])[0], (xyz[j] as
float[])[1], (xyz[j] as
float[])[2]);
588 (
MoleculeModel.
atoms[i] as GameObject).transform.position =
new Vector3((xyz[j] as
float[])[0], (xyz[j] as
float[])[1], (xyz[j] as
float[])[2]);
681 if(val <= newVal && deltaVal < 0.0f)
return newVal;
682 if(val >= newVal && deltaVal > 0.0f)
return newVal;
683 return val + deltaVal;
690 if(Input.GetKeyDown(KeyCode.Delete)) {
700 camera.fieldOfView = angle;
703 angle_rad = angle * Mathf.Deg2Rad / 2f;
705 float new_near_plane = default_near_plane_length / Mathf.Tan(angle_rad);
708 camera.ResetProjectionMatrix();
711 camera.transform.localPosition =
new Vector3(0f, 0f, -(new_near_plane - default_near_clip_plane) * 800f);
719 if(Input.GetButtonDown(
"Hide GUI")) {
722 toggleNewUI.SetActive(
false);
723 Debug.Log(
"Hide all the UI.");
743 toggleNewUI.SetActive(
true);
745 Debug.Log(
"Show all the UI and Camera.");
757 if(Input.GetKeyUp(KeyCode.D))
761 if(Input.GetKeyUp(KeyCode.W))
765 if(Input.GetKeyUp(KeyCode.S))
769 if(Input.GetKeyUp(KeyCode.A))
773 if(Input.GetButtonUp(
"Zoom In"))
777 if(Input.GetButtonUp(
"Zoom Out"))
781 if(Input.GetButtonUp(
"Rotate X Right"))
785 if(Input.GetButtonUp(
"Rotate X Left"))
789 if(Input.GetButtonUp(
"Render Cubes")) {
794 if(Input.GetButtonUp(
"Render Spheres")) {
799 if(Input.GetButtonUp(
"Render Hyperballs")) {
804 if(Input.GetButtonUp(
"Render Optimized Hyperballs")) {
809 if(Input.GetButtonDown(
"Hide Molecule")) {
815 if(Input.GetButtonDown(
"Take Screenshot")) {
820 Vector3 vv=
new Vector3();
821 vv=LocCamera.transform.localPosition;
824 vv.z+=Input.GetAxis(
"Mouse ScrollWheel")*5;
826 LocCamera.transform.localPosition=vv;
853 Vector3 v=
new Vector3();
854 if (LocCamera == null)
855 LocCamera = Camera.main.gameObject;
856 v=LocCamera.transform.localPosition;
862 if (Input.GetMouseButton(0)) {
866 print(
"Mouse X"+Input.GetAxis(
"Mouse X"));
867 print(
"Mouse Y"+Input.GetAxis(
"Mouse Y"));
868 print(
"rotationXX"+rotationXX);
869 print(
"rotationYY"+rotationYY);
871 Quaternion xQuaternion = Quaternion.AngleAxis (rotationXX, Vector3.up);
872 Quaternion yQuaternion = Quaternion.AngleAxis (rotationYY, Vector3.left);
873 transform.localRotation = xQuaternion * yQuaternion;
878 if(Input.GetMouseButtonUp(1))
881 v.z+=Input.GetAxis(
"Mouse ScrollWheel")*5;
882 LocCamera.transform.localPosition=v;
883 Debug.Log (
"get mouse: " +v.z);
894 GameObject CamTarget = GameObject.Find(
"Cam Target");
899 if(scenecontroller.GetComponent<
maxCamera>().enabled) {
904 GameObject hbManagerObj = GameObject.FindGameObjectWithTag(
"HBallManager");
908 }
else if (mode ==1) {
910 CamTarget.transform.rotation = transform.rotation;
static bool toggle_NA_HIDE
UIData.BondType previous_BondType
void ToNotParticle()
Switch the protein representation to Hyperball.
override void ResetPositions()
Resets the positions of all balls.
float default_near_plane_length
static string init_molecule
static bool networkLoaded
void Display()
Display a GUI pannel for selecting a PDB on a server or on a local file.
UIData.BondType PreviousBondType
static float radiusFactor
static string proxyServer
override void ResetPositions()
Resets the positions of all balls.
void LoadAnimCrd(string resource_name)
static GuidedNavigationManager getGuidedNavigationManager()
static bool toggle_TWISTER
static int ColorationModeBond
static bool secondarystruct
Switch between all atoms and C-alpha trace or BFactor secondary structure representation.
static List< string > existingName
List of the names existing in the molecule.
UIData.AtomType previous_AtomType
static ImprovedFileBrowser m_fileBrowser
static bool showHyperballsMenu
static bool toggle_OXYGEN
float transition(float val, float newVal, float deltaVal)
Make the transition between metaphors.
static float newGlobalRadius
static void SetAtomsExtended()
static string file_base_name
static VRPN.VRPNManager getVRPNManager()
void ToParticle()
Switch the protein representation to Particle.
static bool transMETAPHOR
static void ClearMemory()
void RecenterSurfaces(Vector3 pos)
static Color EnergyGrayColor
static bool isMoleculeDisplayed
static void DeletePhysics()
float default_near_clip_plane
static void InitCutParameters()
static bool showAtomsExtendedMenu
static bool changeStructure
static List< int > residueIds
The residue identifiers.
override void ResetPositions()
Resets the bond vectors, which is necessary when the balls move.
static List< string > existingRes
List of the residues existing in the molecule.
static GameObject LocCamera
ArrayList clubLocationalist
static bool toggle_RING_BLENDING
static void UpdateBondsFromGameObject(ArrayList atoms)
static bool resetInteractive
static void setCurrentAtomManager(GenericManager manager)
static bool toggle_HIDE_HYDROGEN
static bool toggle_NA_MAXCAM
void MouseOperate()
Sets the center of the scene on : The original center ('R' key) The targeted atom ('T' key) ...
void LoadPDBReaction(string resource_name)
static ElectrostaticManager getElectrostaticManager()
static bool toggle_NA_MEASURE
void KeyOperate()
For keyboard control.
void LoadXGMML(string file_name)
static void setCurrentBondManager(GenericManager manager)
!WiP Includes FLAGS of GUI.
static void CreateResidues()
static bool isParticlesInitialized
static void ChangeRepresentation(UIData.AtomType newAtomType, UIData.BondType newBondType=UIData.BondType.nobond)
static bool showPanelsMenu
override void ResetPositions()
!WiP manage GUI, and provide static strings for the GUI.
ImprovedFileBrowser m_fileBrowser
static float radiusFactor
static string file_extension
static Dictionary< int, ArrayList > residues
The residues.
static void SetResidues()
static ArtemisManager getArtemisManager()
static bool FileBrowser_show
static List< string > existingChain
List of the chains existing in the molecule.
void HiddenOperate()
Hides the GUI and enables a sort of "full-screen" mode, as in GUI-less, not as opposed to windowed...
static void InitAtomic()
Inits the atomic and chains scales.
static List< GenericManager > GetManagers()
Gets the list of active managers based on the atom type provided and based on the bond type in UIData...
void LoadAnimTop(string resource_name)
static bool toggle_NA_INTERACTIVE
void OpenMenuOperate()
Switch back to the particle mode.
static SurfaceManager getSurfaceManager()
static float globalRadius
static bool hasMoleculeDisplay
static bool toggle_HB_TRANS
static bool hiddenUIbutFPS
static void clearScene()
Clears the scene.
static void BuildMoleculeComponents()
Builds the molecule's components.
static bool showChainsMenu
override void ResetPositions()
static bool surfaceFileExists
static bool isSphereLoaded
static bool isHBallLoaded
static int ColorationModeRing
GameObject scenecontroller
static ColorObject EnergyGrayColor
UIData.AtomType PreviousAtomType
void SetCenter(int mode)
Sets the center of the scene on the original center or on an atom.
static void BuildHireRnaHydrogenBondsStructures()
float default_fov_angle_rad
static List< float > atomsLocalScaleList
static bool showResiduesMenu
static void SetFontSize()
Sets the size of the font.