72 using System.Collections.Generic;
79 public List<int[]> bondList=
new List<int[]>();
80 public List<int[]> bondEPList=
new List<int[]>();
93 Debug.Log(
"DisplayBonds??bondEPList.Count " + bondEPList.Count);
94 int Number=bondEPList.Count;
96 for(
int i=0;i<Number;i++)
100 CreateCylinderByParticle(i,(i+1));
104 CreateCylinderByParticle(i,bondEPList.Count);
108 GameObject ParticleStickManager=GameObject.Find(
"ParticleStickManager");
113 Debug.Log(
"the length of p ="+p.Length);
124 GameObject ParticleManager=GameObject.Find(
"ParticleStickManager");
127 for(
int i=start;i<end;i++)
130 Vector3[] location =
new Vector3[bondEPList.Count];
131 for(
int j=0; i<(bondEPList.Count); j++)
133 Vector3 v =
new Vector3( (bondEPList[i][0]),
135 (bondEPList[i][2]) );
139 Vector3 atom0position=
new Vector3();
140 Vector3 atom1position=
new Vector3();
141 Vector3 atomtype=
new Vector3();
142 atom0position=location[0];
143 atom1position=location[1];
144 atomtype=location[2];
149 float atomradius0=1f;
150 float atomradius1=1f;
168 switch((
int)atomtype.x)
213 switch((
int)atomtype.y)
259 Quaternion q=Quaternion.identity;
260 Vector3 v3=
new Vector3();
261 v3.x=location[1].x*180f/3.1416f;
262 v3.y=location[1].y*180f/3.1416f;
263 v3.z=location[1].z*180f/3.1416f;
265 p[bondindex+start].position=(atom0position+atom1position)/2;
266 p[bondindex+start].size=(float)(atomradius0+atomradius1)/2;
267 p[bondindex+start].color=Color.yellow;
268 p[bondindex+start].energy=1000;
void CreateCylinderByParticle(int start, int end)
!WiP manage GUI, and provide static strings for the GUI.
static string file_extension
static List< int[]> bondEPList
The bonds between atoms.