UnityMol  0.9.6-875
UnityMol viewer / In developement
MoleculeModel.cs
Go to the documentation of this file.
1 
66 namespace Molecule.Model {
67  using UnityEngine;
68  using System.Collections;
69  using System.Collections.Generic;
70 
71  public class MoleculeModel : MonoBehaviour {
72  public static string sequence = "";
73 
74  //AurĂ©lien : changed the summary to acknowledge the changes I made in RequestPDB.cs
75 
79  public static List<float[]> atomsLocationlist = new List<float[]>();
80 
84  public static List<Vector3> atomsIMDSimulationLocationlist;
85 
89  public static List<float[]> CatomsLocationlist = new List<float[]>();
90 
94  public static List<float[]> backupCatomsLocationlist = new List<float[]>();
95 
99  public static List<float[]> CaSplineList = new List<float[]>();
100 
104  public static List<AtomModel> atomsTypelist = new List<AtomModel>();
105 
109  public static List<string> atomsNamelist = new List<string>();
110 
111 
115  public static List<int> atomsNumberList = new List<int>();
116 
117  public static List<string> atomsSugarNamelist = new List<string>();
118  public static List<string> atomsSugarResnamelist = new List<string>();
119  public static List<string> sugarResname = new List<string> {"ABE","ACE","ALT","API","ARA","DHA","FRU","FUC","GAL",
120  "GLC","GUL","IDO","DKN","KDO","MAN","NEG","RHA","RIB","SIA","TAG","TAL","XYL",
121  "GLA","FUL","GLB","NAG","NDG","BMA","MMA","A2G","AAL","BGC"};
122  public static List<float[]> atomsSugarLocationlist = new List<float[]>();
123  public static List<string> resSugarChainList = new List<string>();
124  public static List<int[]> bondEPSugarList = new List<int[]>(); // Not sure of what EP means btw
125  public static List<AtomModel> atomsSugarTypelist = new List<AtomModel>();
126  // public static List<int> sortedResIndexByListSugar = new List<int>();
127 
128  public static List<int[]> BondListFromPDB = new List<int[]>();
129 
130  public static List<string> atomHetTypeList = new List<string>();
131 
132 
136  public static List<string> existingName = new List<string>();
137 
141  public static List<string> atomsResnamelist = new List<string>();
142 
146  public static List<string> existingRes = new List<string>();
147 
151  public static List<int> residueIds = new List<int>();
152 
156  public static Dictionary<int, ArrayList> residues = new Dictionary<int, ArrayList>();
157 
161  public static List<string> atomsChainList = new List<string>();
162 
166  public static List<string> resChainList = new List<string>();
167 
171  public static List<string> resChainList2 = new List<string>();
172 
176  public static int firstresnb = new int();
177 
181  public static List<string> existingChain = new List<string>();
182 
186  public static List<Color> atomsColorList = new List<Color>();
187 
188  public static List<float> atomsLocalScaleList = new List<float>();
189 
193  public static List<int> splits = new List<int>();
194 
201  public static List<int[]> bondList = new List<int[]>();
202 
208  public static List<int[]> bondEPList = new List<int[]>(); // Not sure of what EP means btw
209 
213  public static Dictionary<int, List<int>> bondEPDict= new Dictionary<int, List<int>>();
214 
215  public static List<int[]> CSidList = new List<int[]>(); // List of IDs for networks, or something like that.
216  public static List<string[]> CSSGDList = new List<string[]>(); // Dunno
217  public static List<float[]> CSRadiusList = new List<float[]>(); // Mystery too.
218  public static List<string[]> CSColorList = new List<string[]>(); // List of colors, I guess. Probably for networks.
219  public static List<string[]> CSLabelList = new List<string[]>(); // And of labels.
220 
221  public static List<List<Vector3>> FieldLineList= null;
222  //public static ArrayList FieldLineDist= null;// Field lines distance arrays // Apparently not used anywhere
223 
224  //public static ArrayList CaSplineList=new ArrayList();
225 
231  public static List<int[]> bondCAList=new List<int[]>();
232 
236  public static List<AtomModel> CaSplineTypeList = new List<AtomModel>();
237 
241  public static List<string> CaSplineChainList = new List<string>();
242 
247  // public static List<int> sortedResIndexByList = new List<int>();
248  //not used!
249 
254  public static List<string> backupCaSplineChainList = new List<string>();
255 
259  public static List<float> BFactorList = new List<float>();
260 
266  public static Dictionary<int, int[]> atomsForEllipsoidsPerResidue = new Dictionary<int, int[]>();
267 
268  public static Dictionary<int, int> atomsForEllipsoidsOrientationPerResidue = new Dictionary<int, int>();
269 
273  public static List<int> baseIdx = new List<int>();
274 
278  public static List<float> scale_RNA = new List<float>();
279 
283  public static List<GameObject> ellipsoids = new List<GameObject>();
284 
288  public static Dictionary<int, GameObject> ellipsoidsPerResidue = new Dictionary<int, GameObject>();
289 
290  public static List<GameObject> bondsForReplacedAtoms = new List<GameObject>();
291 
292  public static List<Dictionary<string, Vector3>> residueDictionaries;
293  public static List<Dictionary<string, Vector3>> residueDictionariesSugar;
294 
302  public static List<float[]> ssHelixList = new List<float[]> ();
303 
309  public static List<float[]> ssStrandList = new List<float[]> ();
310 
314  public static List<string> helixChainList = new List<string>() ;
315 
319  public static List<string> strandChainList = new List<string> ();
320 
321  public static Vector3 target=new Vector3(0f,0f,0f);//
322  public static Vector3 cameraLocation=new Vector3(10f,10f,10f);//
323 
328  public static Vector3 Offset=new Vector3(0f,0f,0f);
329 
333  public static Vector3 Center=new Vector3(0f,0f,0f);
334 
338  public static Vector3 MinValue= new Vector3(0f,0f,0f);
339 
343  public static Vector3 MaxValue= new Vector3(0f,0f,0f);
344 
345  // NEW PASTEL COLOR THEME
346  public static ColorObject oxygenColor = new ColorObject(new Color(0.827f,0.294f,0.333f,1f));
347  public static ColorObject carbonColor = new ColorObject(new Color(0.282f,0.6f,0.498f,1f));
348  public static ColorObject nitrogenColor = new ColorObject(new Color(0.443f,0.662f,0.882f,1f));
349  public static ColorObject hydrogenColor = new ColorObject(Color.white);
350  public static ColorObject sulphurColor = new ColorObject(new Color(1f,0.839f,0.325f,1f));
351  public static ColorObject phosphorusColor = new ColorObject(new Color(0.960f,0.521f,0.313f,1f));
352  public static ColorObject unknownColor = new ColorObject(new Color(1f,0.4f,1f,1f));
353 // public static ColorObject selectionColor = new ColorObject(Color.red);
354 // public static ColorObject residueColor = new ColorObject(Color.white);
355 
356  public static Color GetAtomColor(string atomType) {
357  switch(atomType) {
358  case "O": return oxygenColor.color;
359  case "C": return carbonColor.color;
360  case "N": return nitrogenColor.color;
361  case "H": return hydrogenColor.color;
362  case "S": return sulphurColor.color;
363  case "P": return phosphorusColor.color;
364  default: return unknownColor.color;
365  }
366  }
367 
368  public static string oxygenNumber="0";
369  public static string carbonNumber="0";
370  public static string nitrogenNumber="0";
371  public static string hydrogenNumber="0";
372  public static string sulphurNumber="0";
373  //public static string lodineNumber="0";
374  //public static string chlorineNumber="0";
375  public static string phosphorusNumber="0";
376  public static string unknownNumber="0";
377 
378  // public static GameObject [] boxes;
379 /*
380  public static GameObject[] Oes;
381  public static GameObject[] Ces;
382  public static GameObject[] Nes;
383  public static GameObject[] Hes;
384  public static GameObject[] Ses;
385  //public static GameObject[] Les;
386  //public static GameObject[] Cles;
387  public static GameObject[] Pes;
388  public static GameObject[] NOes;
389 */
390 
391  public static Dictionary<string, GameObject[]> atomsByChar = new Dictionary<string, GameObject[]>();
392  public static ArrayList atoms = new ArrayList();
393 
394  public static GameObject[] clubs;
395 
396  //public static float []atomsScaleList={1.72f,1.6f,1.32f,2.08f,2.6f,1f};//c\n\o\s\p\n
397 
398  public static Vector3 vo=new Vector3(0.66f,0.66f,0.66f);
399  public static Vector3 vc=new Vector3(0.86f,0.86f,0.86f);
400  public static Vector3 vn=new Vector3(0.80f,0.80f,0.80f);
401  public static Vector3 vh=new Vector3(0.78f,0.78f,0.78f);
402  public static Vector3 vs=new Vector3(1.04f,1.04f,1.04f);
403  //public static Vector3 vl=new Vector3(1.95f,1.95f,1.95f);
404  //public static Vector3 vcl=new Vector3(0.91f,0.91f,0.91f);
405  public static Vector3 vp=new Vector3(1.30f,1.30f,1.30f);
406  public static Vector3 vno=new Vector3(1f,1f,1f);
407 
408  public static float oxygenScale=100f;
409  public static float carbonScale=100f;
410  public static float nitrogenScale=100f;
411  public static float hydrogenScale=100f;
412  public static float sulphurScale=100f;
413  //public static string lodineScale="100";
414  //public static string chlorineScale="100";
415  public static float phosphorusScale=100f;
416  public static float unknownScale=100f;
417 
418  public static long atomsnumber=0;
419  public static long bondsnumber=0;
420 
421  public static string FPS="";
422 
423  public static Particle[] p;
424 
425  public static Particle[] fieldlinep;
426 
427  public static string newtooltip;
428 
429  public static bool fieldLineFileExists=false;
430 
431  public static bool dxFileExists = false ; // true if a DX file was found
432 
433  public static bool surfaceFileExists=false;
434 
435 
436  public static bool networkLoaded = false; // set to true when a network is present
437 
438  public static Vector3[] vertices;
439 
440 
441  public MoleculeModel() {}
442 
443  }
444 }
static List< Dictionary< string, Vector3 > > residueDictionaries
static Particle[] fieldlinep
static List< Vector3 > atomsIMDSimulationLocationlist
The coordinates of each atom, simulated through an IMD simulation.
Color color
Definition: ColorObject.cs:72
static Color GetAtomColor(string atomType)
static List< Dictionary< string, Vector3 > > residueDictionariesSugar
static GameObject[] clubs