14 using System.Collections.Generic;
23 public static void LoadSymmetry(
float Xorigin,
float Yorigin,
float Zorigin,
float Xdirection,
float Ydirection,
float Zdirection)
26 Debug.Log(
"REORIENTATION");
28 Vector3 direction =
new Vector3 (Xdirection, Ydirection, Zdirection);
29 direction.Normalize ();
35 float angle = Vector3.Angle(direction, -Vector3.up);
36 Vector3 rot_axis = Vector3.Cross (direction, -Vector3.up);
37 Debug.Log (
"Axis: "+rot_axis);
38 Debug.Log (
"Angle: "+angle);
39 Quaternion rotate = Quaternion.AngleAxis (angle, rot_axis);
45 Vector3 vec_pos =
new Vector3(position[0], position[1], position[2]);
46 Vector3 new_vec = rotate * vec_pos;
47 position[0] = new_vec.x;
48 position[1] = new_vec.y;
49 position[2] = new_vec.z;
88 float[] target =
new float[3];
89 target[0] = x_tot/count;
90 target[1] = y_tot/count;
91 target[2] = z_tot/count;
93 Debug.Log (
"Target coordinates: "+x_tot/count+
" "+y_tot/count+
" "+z_tot/count);
99 List<float[]> calist =
new List<float[]>();
103 float[] vect =
new float[3];
116 List<Dictionary<string, Vector3>> residueDictList =
new List<Dictionary<string, Vector3>>();
117 Dictionary<string, Vector3> residueDict =
new Dictionary<string, Vector3>();
119 Vector3 testVector = Vector3.zero;
121 int currResId =
int.MinValue+1;
122 int prevResId =
int.MinValue+1;
126 currResId = residueIds[i];
129 if(currResId != prevResId) {
130 if(residueDict != null && residueDict.Count > 0){
131 residueDictList.Add(residueDict);
133 residueDict =
new Dictionary<string, Vector3>();
135 prevResId = currResId;
static List< Dictionary< string, Vector3 > > residueDictionaries
static GuidedNavigationManager getGuidedNavigationManager()
void CreateAxeAndOrigin()
Instantiate the origin and symmetry axis game objects.
static List< string > atomsNamelist
The name of each atom.
static List< string > atomsChainList
The chain of each atom.
static List< AtomModel > atomsTypelist
The type of each atom.
static List< int > residueIds
The residue identifiers.
static List< float[]> CatomsLocationlist
The coordinates of each Carbon alpha.
!WiP Includes FLAGS of GUI.
static void ChangeRepresentation(UIData.AtomType newAtomType, UIData.BondType newBondType=UIData.BondType.nobond)
static List< float[]> backupCatomsLocationlist
Backup of the coordinates of each Carbon alpha.
static Vector3 MinValue
The "smallest" corner of the bounding box that encloses the molecule.
static List< string > atomsResnamelist
The name of the residue to which each atom belongs.
static void BuildMoleculeComponents()
Builds the molecule's components.
static void LoadSymmetry(float Xorigin, float Yorigin, float Zorigin, float Xdirection, float Ydirection, float Zdirection)
static List< float[]> atomsLocationlist
The coordinates of each atom.