UnityMol  0.9.6-875
UnityMol viewer / In developement
RequestPDB.cs
Go to the documentation of this file.
1 
66 
67 namespace ParseData.ParsePDB
68 {
69  using UnityEngine;
70  using System.Collections;
71  using System.Collections.Generic;
72  using System.IO;
73  using System.Net;
74  using System.Linq;
75  using System;
76  using Molecule.Model;
77  using Molecule.Control;
78  using System.Xml;
79  using System.Text;
80  using System.Text.RegularExpressions;
81  using UI;
82 
83  public class RequestPDB : MonoBehaviour{
84 // private string url="http://www.pdb.org/pdb/downLoad/downLoadFile.do?fileFormat=pdb&compression=NO&structureId=3KX3";
85 // private string data="";
86 
93  public float progress=0.0f;
94  public static bool isDone=false;
95  public bool Loading = true;
96  //public GUISkin mySkin;
97 
98  // choice open file
99 // bool wantpdb=true;
100 // bool wantxgmml=false;
101  bool wantobj=false;
102  bool wantdx=false;
103  bool wantjson =false;
104 
105  void Start() {
106  //mySkin?Resources.Load("MyGUISkin") as GUISkin;
107  }
108 
109  public RequestPDB() {}
110 
111 
112 
113  void Update() {
114  Loading = !isDone;
115  }
116 
117  //Move this method to the related class
124  public IEnumerator LoadJsonWWW(string file_name, Vector3 Offset) {
125  WWW www = new WWW(file_name);
126 
127  progress = 0;
128  isDone = false;
129  while(!www.isDone) {
130 // Debug.Log("*** PDB: "+www.progress);
131  progress = www.progress;
132  yield return new WaitForEndOfFrame();
133  }
134 
135  ReadJson readjson=new ReadJson();
136  MoleculeModel.FieldLineList = readjson.ReadFile(www.text,Offset);
137  isDone = true;
138  }
139 
140 
141 
142 
143 
144  //TODO put molecule offset here
145  public IEnumerator LoadOBJWWW(string file_name) {
146  WWW www = new WWW(file_name);
147 
148  progress = 0;
149  isDone = false;
150  while(!www.isDone) {
151 // Debug.Log("*** PDB: "+www.progress);
152  progress = www.progress;
153  yield return new WaitForEndOfFrame();
154  }
155 
156  OBJ obj = new OBJ(new StringReader(www.text));
157  obj.Load();
158  isDone = true;
159  }
160 
161 
162  public void LoadXMLRequest(string file_name) {
163  XmlReader reader=new XmlTextReader(file_name);
164 
165 // int i=0;
166  while(reader.Read()) {
167  if(reader.ReadToFollowing("PDBx:atom_site")) {
168  Vector3 v=new Vector3();
169 
170  reader.ReadToDescendant("PDBx:Cartn_x");
171  v.x=reader.ReadElementContentAsFloat();
172  reader.ReadToFollowing("PDBx:Cartn_y");
173  v.y=reader.ReadElementContentAsFloat();
174  reader.ReadToFollowing("PDBx:Cartn_z");
175  v.z=reader.ReadElementContentAsFloat();
176 
177  // print(i%150);
178  // print(i/150);
179  // location1[i%150,i/150]=v;
180  // i++;
181  }
182  }
183  }
184 
185 
186  //Aurélien : initiates the reading of the reaction file
187  public void LoadPDBReaction(string resource_name)
188  {
189  StreamReader sr ;
190 
191  sr=new StreamReader(resource_name+".txt");
192 
193  ReadPDBReaction(sr, resource_name);
194  }
195 
196  //Aurélien : initiates the reading of the top animation file
197  public void LoadAnimTop(string resource_name)
198  {
199  StreamReader sr ;
200 
201  sr=new StreamReader(resource_name+".top");
202 
203  ReadAnimTop(sr, resource_name);
204  }
205 
206  //Aurélien : initiates the reading of the top animation file
207  public void LoadAnimCrd(string resource_name)
208  {
209  StreamReader sr ;
210 
211  sr=new StreamReader(resource_name+".mdcrd");
212 
213  ReadAnimCrd(sr, resource_name);
214  }
215 
216 
217 
218 
219  public static List<int> sortResIndex(List<string> resChainList){
220  // Debug.Log ("sortResIndex :: entering");
221  List<String> nbChainStr = new List<string> ();
222  List<int> resInOrderByChain = new List<int>();
223  Dictionary<string, int> IDofString = new Dictionary<string, int> ();
224  //We count the number of different chain
225  int stringID = 0;
226 
227  for (int i=0; i<resChainList.Count; i++) {
228  if (!nbChainStr.Contains (resChainList [i])) {
229  nbChainStr.Add(resChainList[i]);
230  IDofString.Add (resChainList[i], stringID);
231  stringID++;
232  }
233  }
234 
235  int nbChain = nbChainStr.Count ();
236 
237  List<int>[] preSortedList = new List<int>[nbChain];
238  //We initialize the preSortedList
239  for (int i=0; i<preSortedList.Length; i++) {
240  preSortedList[i] = new List<int>();
241  }
242 
243  //We put the resID in the good chainID
244 
245  for (int i=0; i<resChainList.Count; i++){
246  preSortedList[IDofString[resChainList[i]]].Add (i);
247  }
248 
249  //We finaly put all res in order (chain order)
250  for (int i=0 ; i<preSortedList.Length; i++){
251  resInOrderByChain.AddRange(preSortedList[i]);
252  }
253 
254  return resInOrderByChain;
255 
256  }//End of sortResIndex
257 
258 
259  //Aurélien : reads a reaction text file
260  private void ReadPDBReaction(TextReader sr, string resource_name)
261  {
262  ArrayList tmp;
263  String s;
264 // ControlMolecule.CreateMolecule(sr);//reads the PDB part of the reaction text file
265  //sr is closed by ReadPDB, a new StreamReader is required
266  StreamReader srdr ;
267  srdr = new StreamReader(resource_name+".txt");
268  while((s=srdr.ReadLine()).StartsWith("[GEOMETRIES]")==false){}//Skipping the PDB part
269  s = srdr.ReadLine();
270  while((s = srdr.ReadLine())!=null){
271  if(s.StartsWith("END")){//Every reaction step has been treated at this point
272  break;
273  }
274  s = srdr.ReadLine();
275  tmp = new ArrayList();
276 
277  while(s!=null){
278  if(s.StartsWith("Coords")){//Every coordinates for the current reaction step has been read at this point
279  break;
280  }
281  float[] xyz = new float[3];
282  xyz[0] = -float.Parse(s.Substring(7,9));
283  xyz[1] = float.Parse(s.Substring(20,9));
284  xyz[2] = float.Parse(s.Substring(32,9));
285  tmp.Add(xyz);
286  s = srdr.ReadLine();
287  }
288  Reaction.coord.Add(tmp);
289  }
290  srdr.Close();
291  Reaction.isReaction = true;
292  Reaction.current = 0;
293  Reaction.affichage = false;
294  Reaction.forward = true;
295  Reaction.count = Reaction.coord.Count;
296  Reaction.acount = ((Reaction.coord)[0] as ArrayList).Count;
297  //Applying the Offset defined when the PDB was read to all coordinates
298  for(int i=0;i<Reaction.count;i++){
299  for(int j=0;j<Reaction.acount;j++){
300  (((Reaction.coord)[i] as ArrayList)[j] as float[])[0] += MoleculeModel.Offset.x;
301  (((Reaction.coord)[i] as ArrayList)[j] as float[])[1] += MoleculeModel.Offset.y;
302  (((Reaction.coord)[i] as ArrayList)[j] as float[])[2] += MoleculeModel.Offset.z;
303  }
304  }
305  }
306 
307  //Aurélien : reads a top animation text file
308  private void ReadAnimTop(TextReader sr, string resource_name)
309  {
310 
311 
312  List<float> BFactorList = new List<float>();
313  List<int> calist = new List<int>();
314  List<string> resnamelist = new List<string>();
315  List<string> atomsNameList = new List<string>();
316  List<string> caChainlist = new List<string>();
317  List<Color> colorList = new List<Color> ();
318 
319  List<AtomModel> typelist = new List<AtomModel>();
320  string[] dnaBackboneAtoms = new string[] {"C5'"};
321 
322  string s;
323  s = sr.ReadLine ();
324  while(!s.StartsWith("%FORMAT(10I8)"))
325  {
326  s = sr.ReadLine();
327  }
328  s = sr.ReadLine();
329  string count = string.Empty;
330  int c = 0;
331  while(!char.IsDigit(s[c]))
332  {
333  c++;
334  }
335  while(char.IsDigit(s[c])){
336  count+=s[c];
337  c++;
338  }
339  Reaction.acount = int.Parse(count);
340 
341  while(!s.StartsWith("%FLAG AMBER_ATOM_TYPE "))
342  {
343  s = sr.ReadLine();
344  }
345  s = sr.ReadLine();
346  s = sr.ReadLine();
347  while(!s.StartsWith("%"))
348  {
349  char[] sep = {' '};
350  String[] sa = s.Split(sep, 20, StringSplitOptions.RemoveEmptyEntries);
351  for(int i = 0; i < sa.Count() ; i++)
352  {
353  string typestring = sa[i];
354  atomsNameList.Add(typestring);
355  int bout;
356  bool b = int.TryParse(typestring[0].ToString(), out bout);
357  string type;
358  if(b)
359  {
360  type=typestring[1].ToString();
361  }
362  else
363  {
364  type=typestring[0].ToString();
365 
366  }
367  string resname = "MOL";
368 
369 
370  if(typestring[0].ToString()=="C" && typestring.Length>1)
371  {
372  if(typestring[1].ToString()=="A")
373  {
374  string chaintype = "chain" + "A";
375  calist.Add(i);
376  caChainlist.Add(chaintype);
377  }
378  }
379  if(dnaBackboneAtoms.Contains(typestring))
380  {
381  string chaintype = "chain" + "A";
382  calist.Add(i);
383  caChainlist.Add(chaintype);
384  }
385  float bfactor = 10.00f;
386  BFactorList.Add(bfactor);
387  AtomModel aModel = AtomModel.GetModel(type);
388  if(aModel == null) aModel = AtomModel.GetModel("X");
389  typelist.Add(aModel);
390 
391  if (UIData.ffType == UIData.FFType.atomic)
392  {
393  colorList.Add(MoleculeModel.GetAtomColor(type));
394  }
395  else
396  {
397  colorList.Add(aModel.baseColor);
398  }
399 
400  resnamelist.Add(resname);
401  }
402  s = sr.ReadLine();
403  }
404  sr.Close();
405  MoleculeModel.CaSplineChainList = caChainlist;
406  MoleculeModel.atomsTypelist = typelist;
407  MoleculeModel.atomsNamelist = atomsNameList;
408  MoleculeModel.atomsColorList = colorList;
409 
410  Reaction.CatomsIndList = new int[calist.Count];
411  for(int i=0;i<calist.Count;i++)
412  {
413  Reaction.CatomsIndList[i] = calist[i];
414  }
415  Reaction.Catomscount = calist.Count;
416  MoleculeModel.BFactorList = BFactorList;
417  MoleculeModel.atomsResnamelist = resnamelist;
418  Reaction.top = true;
419 
420  }
421 
422  //Aurelien : reads a crd animation file
423  private void ReadAnimCrd(TextReader sr, string resource_name)
424  {
425  int[] caindlist = new int[Reaction.Catomscount];
426  for(int i = 0; i < Reaction.Catomscount; i++)
427  {
428  caindlist[i] = (int)Reaction.CatomsIndList[i];
429  }
430  Reaction.CatomsIndList = null;
431  List<float[]> alist = new List<float[]>();
432  List<float[]> calist = new List<float[]>();
433  int currentcoord = 0;
434  int currentatome = 0;
435  string s;
436  s = sr.ReadLine();
437  s = sr.ReadLine();
438  string[] tmp;
439  char[] sep = {' '};
440  float[] xyz = new float[3];
441  ArrayList step = new ArrayList();
442  while(s != null)
443  {
444  tmp = s.Split(sep, 10, StringSplitOptions.RemoveEmptyEntries);
445  if(tmp.Count () == 0)
446  {
447  break;
448  }
449  for(int i = 0 ; i < tmp.Count() ; i++)
450  {
451  xyz[currentcoord] = float.Parse(tmp[i]);
452  currentcoord++;
453  if(currentcoord == 3)
454  {
455  xyz[0] *= -1;
456  step.Add(xyz);
457  xyz = new float[3];
458  currentcoord = 0;
459  currentatome++;
460  if(currentatome == Reaction.acount)
461  {
462  Reaction.coord.Add(step);
463  currentatome = 0;
464  step = new ArrayList();
465  }
466  }
467  }
468  s = sr.ReadLine();
469  }
470  sr.Close();
471  float[] xyzi = new float[4];
472  for(int i=0;i<Reaction.acount;i++)
473  {
474  xyzi[0] = ((Reaction.coord[0] as ArrayList)[i] as float[])[0];
475  xyzi[1] = ((Reaction.coord[0] as ArrayList)[i] as float[])[1];
476  xyzi[2] = ((Reaction.coord[0] as ArrayList)[i] as float[])[2];
477  xyzi[3] = i;
478  alist.Add(xyzi);
479  xyzi = new float[4];
480  }
482 
483  for (int i =0;i<Reaction.Catomscount;i++)
484  {
485  calist.Add ((Reaction.coord[0] as ArrayList)[i] as float[]);
486  }
487  Reaction.Catomscount = 0;
489 
492 
493  UIData.isParticlesInitialized = false ; // new file, new particle system needed
494  MoleculeModel.networkLoaded = false ; // protein loaded, network removed if present
495 
496  Reaction.affichage = false;
497  Reaction.animation = true;
498  Reaction.isReady = false;
499  Reaction.forward = true;
500  Reaction.top = false;
501  Reaction.count = Reaction.coord.Count;
502  Reaction.current = 0;
503  Reaction.isReaction = true;
504 
505  //Applying the Offset
506  for(int i=0;i<Reaction.count;i++){
507  for(int j=0;j<Reaction.acount;j++){
508  (((Reaction.coord)[i] as ArrayList)[j] as float[])[0] += MoleculeModel.Offset.x;
509  (((Reaction.coord)[i] as ArrayList)[j] as float[])[1] += MoleculeModel.Offset.y;
510  (((Reaction.coord)[i] as ArrayList)[j] as float[])[2] += MoleculeModel.Offset.z;
511  }
512  }
513  }
514 
515 
516  public void LoadXGMML(string file_name)
517  {
518  WWW www = new WWW(file_name);
519 
520  progress = 0;
521  isDone = false;
522  while(!www.isDone){
523  progress = www.progress;
524  }
525  // {
526  // progress = www.progress;
527  // yield return new WaitForEndOfFrame();
528  // }
529  // Debug.Log("read");
530  ReadXGMML(www.text);
531  isDone = true;
532  }
533 
534  //TODO: avoid reading the file 3 times
535  public void ReadXGMML(String xml_content)
536  {
537  List<float[]> alist = new List<float[]>();
538  List<float[]> CSRadiusList = new List<float[]>();
539 
540  List<AtomModel> typelist = new List<AtomModel>();
541 // List<string> chainlist = new List<string>();
542  List<int[]> edgelist = new List<int[]>();
543  List<string> resnamelist = new List<string>();
544  List<string[]> CSSGDList = new List<string[]>();
545  List<string[]> CSColorList=new List<string[]>();
546  List<string[]> CSLabelList=new List<string[]>();
547 
548  List<int[]> CSidList = new List<int[]>();
549 
550 
551  XmlReader reader=new XmlTextReader(new StringReader(xml_content));
552  while(reader.Read())
553  {
554  if(reader.ReadToFollowing("node"))
555  {
556  float[] vect=new float[3];
557 // Vector3 v=new Vector3();
558  float [] intarrayw= new float[1];
559  while (reader.MoveToNextAttribute()) // Read the attributes.
560  {
561  if(reader.Name=="label")
562  {
563  string [] intarray= new string[1];
564  intarray[0]=reader.Value;
565  CSLabelList.Add(intarray);
566 
567  }
568  else if(reader.Name=="id")
569  {
570  int [] intarray= new int[1];
571  intarray[0]=int.Parse(reader.Value);
572  CSidList.Add(intarray);
573  }
574  // Debug.Log(" " + reader.Name + "='" + reader.Value + "'");
575  }
576  // if(reader.NodeType==XmlNodeType.Element)
577  // {
578  // Debug.Log(" " + reader.Name + "='" + reader.Value + "'");
579  // string [] intarray= new string[1];
580  // intarray[0]=reader.Value;
581  // if(reader.LocalName=="SGD symbol")CSSGDList.Add(intarray);
582  //
583  // }
584  reader.ReadToFollowing("graphics");
585  while (reader.MoveToNextAttribute()) // Read the attributes.
586  {
587  if(reader.Name=="type")
588  {
589 
590  }
591  else if(reader.Name=="h")
592  {
593 
594  }
595  else if(reader.Name=="w")
596  {
597  // Debug.Log(" " + reader.Name + "='" + reader.Value + "'");
598  intarrayw[0]=float.Parse(reader.Value)/60;
599 
600  CSRadiusList.Add(intarrayw);
601  }
602  else if(reader.Name=="x")
603  {
604  // Debug.Log(" " + reader.Name + "='" + reader.Value + "'");
605  //Take the opposite of y beceause Unity is left-handed
606  vect[0]=float.Parse(reader.Value)/60;
607 
608  }
609  else if(reader.Name=="y")
610  {
611  // Debug.Log(" " + reader.Name + "='" + reader.Value + "'");
612  //Take the opposite of y beceause screen is directed in -y
613  vect[1]=-float.Parse(reader.Value)/60;
614  }
615  else if(reader.Name=="fill")
616  {
617  string [] intarray= new string[1];
618  intarray[0]=reader.Value;
619  CSColorList.Add(intarray);
620 
621 
622  }
623  else if(reader.Name=="width")
624  {
625 
626  }
627  else if(reader.Name=="outline")
628  {
629 
630  }
631  // Debug.Log(" " + reader.Name + "='" + reader.Value + "'");
632 
633  }
634  //Take the opposite for z to make the node pop out toward the user
635  vect[2]=-GUIMoleculeController.depthfactor*intarrayw[0];
636  alist.Add(vect);
637  typelist.Add(AtomModel.GetModel("S"));
638  // modellist.Add(model);
639  }
640 
641 
642  }
643  reader.Close();
644  XmlReader reader2=new XmlTextReader(new StringReader(xml_content));
645  while(reader2.Read())
646  {
647  if(reader2.ReadToFollowing("edge"))
648  {
649  int[] vectint=new int[2];
650  while (reader2.MoveToNextAttribute()) // Read the attributes.
651  {
652  if(reader2.Name=="label")
653  {
654 
655  }
656  else if(reader2.Name=="source")
657  {
658  // Debug.Log(" " + reader2.Name + "='" + reader2.Value + "'");
659  vectint[0]=int.Parse(reader2.Value);
660  }
661  else if(reader2.Name=="target")
662  {
663  // Debug.Log(" " + reader2.Name + "='" + reader2.Value + "'");
664  vectint[1]=int.Parse(reader2.Value);
665  }
666  // Debug.Log(" " + reader.Name + "='" + reader.Value + "'");
667  }
668  // Debug.Log(" vectint[0]:" + vectint[0]+", vectint[1]:" + vectint[1]);
669  edgelist.Add(vectint);
670 
671  }
672 
673  }
674  reader2.Close();
675 
676  XmlReader reader3=new XmlTextReader(new StringReader(xml_content));
677  while(reader3.Read())
678  {
679  if(reader3.NodeType==XmlNodeType.Element)
680  {
681  while (reader3.MoveToNextAttribute()) // Read the attributes.
682  {
683  if(reader3.Name=="name"&& reader3.Value=="SGD symbol")
684  {
685  if(reader3.MoveToNextAttribute())
686  {
687  // Debug.Log(" " + reader3.Name + "=" + reader3.Value + " ");
688  string [] intarray= new string[1];
689  intarray[0]=reader3.Value;
690  CSSGDList.Add(intarray);
691  // Debug.Log(" " + reader3.Name + "='" + reader3.Value + "'");
692  }
693 
694 
695  }
696  }
697  }
698 
699  }
700  reader3.Close();
701 
703  MoleculeModel.atomsTypelist=typelist;
704  MoleculeModel.atomsResnamelist=resnamelist;
705  MoleculeModel.CSidList=CSidList;
706 
707  MoleculeModel.CSLabelList=CSLabelList;
708  MoleculeModel.CSRadiusList=CSRadiusList;
709  MoleculeModel.CSColorList=CSColorList;
710  MoleculeModel.CSSGDList=CSSGDList;
711  //float [] a0=alist[0] as float[];
712 
713  Vector3 minPoint= new Vector3(float.MaxValue,float.MaxValue,float.MaxValue);
714  Vector3 maxPoint= new Vector3(float.MinValue,float.MinValue,float.MinValue);
715 
716  for(int i=0; i<alist.Count; i++)
717  {
718  float[] position= alist[i] as float[];
719 // Debug.Log(position[0]+","+position[1]+","+position[2]);
720  minPoint = Vector3.Min(minPoint, new Vector3(position[0],position[1],position[2]));
721  maxPoint = Vector3.Max(maxPoint, new Vector3(position[0],position[1],position[2]));
722  }
723  Vector3 centerPoint = minPoint + ((maxPoint - minPoint) / 2);
724  //MoleculeModel.target = centerPoint;
725 
726  Camera.main.transform.position=new Vector3(0,0,0);
727 
728  MoleculeModel.Offset = -centerPoint;
729  MoleculeModel.MinValue = minPoint;
730  MoleculeModel.MaxValue = maxPoint;
731  // Debug.Log("centerPoint="+centerPoint );
732 
733 
734 
735  for(int i=0; i<alist.Count; i++)
736  {
737  float[] position= alist[i] as float[];
738  float[] vectarray=new float[3];
739  vectarray[0]=position[0]+MoleculeModel.Offset.x;
740  vectarray[1]=position[1]+MoleculeModel.Offset.y;
741  vectarray[2]=position[2]+MoleculeModel.Offset.z;
742 
743  alist[i]=vectarray;
744  }
745 
746 
747 // Debug.Log("MoleculeModel.target "+MoleculeModel.target);
750 // MoleculeModel.cameraLocation.z=MoleculeModel.target.z-((maxPoint - minPoint) ).z;
752 // MoleculeModel.cameraLocation.z=MoleculeModel.target.z;
753 
754 
755 // MoleculeModel.bondList=ControlMolecule.CreateBondsList(alist,typelist);
756 // MoleculeModel.bondEPList=ControlMolecule.CreateBondsEPList(alist,typelist);
758  MoleculeModel.atomsnumber = alist.Count;
760 
761  MoleculeModel.networkLoaded = true ; // there should be a network loaded, if all went well
762 // return alist;
763  }
764 
767  private void LoadChoice(int a)
768  {
769  FileInfo fieldlinefile=new FileInfo(UI.GUIDisplay.file_base_name+".json");
770  if(fieldlinefile.Exists)
771  wantjson = GUILayout.Toggle (wantjson, new GUIContent ( "JSON" , "Open the Json file"));
772 
773  FileInfo Surfacefile=new FileInfo(UI.GUIDisplay.file_base_name+".obj");
774  FileInfo Surfacefile0=new FileInfo(UI.GUIDisplay.file_base_name+"0.obj");
775 
776  if(Surfacefile.Exists || Surfacefile0.Exists)
777  wantobj = GUILayout.Toggle (wantobj, new GUIContent ( "OBJ" , "Open the Obj file"));
778 
779  FileInfo dxfile=new FileInfo(UI.GUIDisplay.file_base_name+".dx");
780  if(dxfile.Exists)
781  wantdx = GUILayout.Toggle (wantdx, new GUIContent ( "DX" , "Open the Dx file"));
782  if (GUILayout.Button("Confirm")){
783 // wantpdb=false;
784  }
785 
786  }
787 
788  }
789 
790 }
static List< string[]> CSColorList
List< List< Vector3 > > ReadFile(string fieldlines_file_content, Vector3 Offset)
Definition: ReadJson.cs:84
static List< int[]> CreateBondsCSList(List< int[]> atomsLocationlist)
void ReadXGMML(String xml_content)
Definition: RequestPDB.cs:535
void LoadAnimCrd(string resource_name)
Definition: RequestPDB.cs:207
IEnumerator LoadJsonWWW(string file_name, Vector3 Offset)
Loads the json WW.
Definition: RequestPDB.cs:124
static bool isReaction
Definition: Reaction.cs:11
static AtomModel GetModel(string type)
Definition: AtomModel.cs:257
static int Catomscount
Definition: Reaction.cs:10
static Vector3 Offset
The offset for the molecule.
static string file_base_name
Definition: GUIDisplay.cs:120
static bool animation
Definition: Reaction.cs:19
static FFType ffType
Definition: UIData.cs:241
static int[] CatomsIndList
Definition: Reaction.cs:9
static List< string > atomsNamelist
The name of each atom.
static bool affichage
Definition: Reaction.cs:16
static List< AtomModel > atomsTypelist
The type of each atom.
static List< float[]> CatomsLocationlist
The coordinates of each Carbon alpha.
static List< float[]> CSRadiusList
static List< float > BFactorList
Bfactor of each atom.
void ReadAnimTop(TextReader sr, string resource_name)
Definition: RequestPDB.cs:308
void ReadPDBReaction(TextReader sr, string resource_name)
Definition: RequestPDB.cs:260
static Color GetAtomColor(string atomType)
static List< int[]> CSidList
static int current
Definition: Reaction.cs:14
void Load()
Definition: OBJ.cs:149
void LoadPDBReaction(string resource_name)
Definition: RequestPDB.cs:187
static bool isReady
Definition: Reaction.cs:15
static bool forward
Definition: Reaction.cs:17
void LoadXGMML(string file_name)
Definition: RequestPDB.cs:516
!WiP Includes FLAGS of GUI.
Definition: UIData.cs:78
static bool isParticlesInitialized
Definition: UIData.cs:101
static Vector3 MaxValue
The "biggest" corner of the bounding box that encloses the molecule.
static List< string > CaSplineChainList
The chain of each carbon alpha in the CA-Spline.
!WiP manage GUI, and provide static strings for the GUI.
Definition: GUIDisplay.cs:94
static List< Color > atomsColorList
The color of each atom.
static void CreateSplines()
Creates the carbon alpha splines.
Definition: OBJ.cs:84
static List< int[]> bondEPList
The bonds between atoms.
static List< List< Vector3 > > FieldLineList
void ReadAnimCrd(TextReader sr, string resource_name)
Definition: RequestPDB.cs:423
void LoadXMLRequest(string file_name)
Definition: RequestPDB.cs:162
static Vector3 MinValue
The "smallest" corner of the bounding box that encloses the molecule.
void LoadAnimTop(string resource_name)
Definition: RequestPDB.cs:197
IEnumerator LoadOBJWWW(string file_name)
Definition: RequestPDB.cs:145
static List< string > atomsResnamelist
The name of the residue to which each atom belongs.
static void BuildMoleculeComponents()
Builds the molecule&#39;s components.
static ArrayList coord
Definition: Reaction.cs:8
static List< string[]> CSLabelList
static List< string[]> CSSGDList
static List< int > sortResIndex(List< string > resChainList)
Definition: RequestPDB.cs:219
Definition: GUIDisplay.cs:66
static List< float[]> atomsLocationlist
The coordinates of each atom.