void Update() { //Populate/Display tooltip if (activeAtoms == null) { return; } if (activeAtoms.selection.Count == 3) { if (bendBoxContainer.activeSelf == false) { bendBoxContainer.SetActive(true); } a0 = activeAtoms.selection[0]; a1 = activeAtoms.selection[1]; a2 = activeAtoms.selection[2]; angleConnection = activeAtoms.graph.GetAngleConnection(a0, a1, a2); if (angleConnection == null) { return; } atom0 = angleConnection.atom0; atom1 = angleConnection.atom1; atom2 = angleConnection.atom2; bend = activeAtoms.graph.GetBendParameter(angleConnection); Mathematics.VectorFromVector3(atom0.p, p0); Mathematics.VectorFromVector3(atom1.p, p1); Mathematics.VectorFromVector3(atom2.p, p2); if (Mathematics.IsEqual(p0, p0Old) && Mathematics.IsEqual(p1, p1Old) && Mathematics.IsEqual(p2, p2Old)) { return; } Mathematics.GetBendForce(p0, p1, p2, energies, force0, force1, force2, Mathf.Deg2Rad * bend.req, bend.keq); atom0Text.text = string.Format("{0}{1} ({2})", atom0.element, atom0.index, atom0.amberName); atom1Text.text = string.Format("{0}{1} ({2})", atom1.element, atom1.index, atom1.amberName); atom2Text.text = string.Format("{0}{1} ({2})", atom2.element, atom2.index, atom2.amberName); angleText.text = string.Format("{0}", angleConnection.angle); energyText.text = string.Format("{0}", energies[0]); gradientText.text = string.Format("{0}", energies[1]); forceConstantText.text = string.Format("{0}", energies[2]); Mathematics.Copy(p0, p0Old); Mathematics.Copy(p1, p1Old); Mathematics.Copy(p2, p2Old); } else { bendBoxContainer.SetActive(false); } }