public void Initialise(int id, PrimaryStructure primaryStructure, MoleculeRenderSettings renderSettings) { if (primaryStructure == null) { return; } this.ID = id; this.PrimaryStructure = primaryStructure; this.renderSettings = renderSettings; this.frameNumber = null; try { secondaryStructure = SecondaryStructure.CreateFromPrimaryStructure(primaryStructure, Settings.StrideExecutablePath, Settings.TmpFilePath); } catch (Exception ex) { Debug.Log("Error Parsing Secondary Structure from Structure File: " + ex.Message); buildSecondaryStructureTrajectory = false; } moleculeBox.gameObject.SetActive(renderSettings.ShowSimulationBox); boundingBox = new BoundingBox(primaryStructure, true); moleculeRender.transform.position = new Vector3(-1 * boundingBox.Centre.x, -1 * boundingBox.Centre.y, -1 * boundingBox.Centre.z); this.transform.position = new Vector3(boundingBox.Centre.x, boundingBox.Centre.y, boundingBox.Centre.z); if (renderSettings.ShowSimulationBox) { moleculeBox.Build(boundingBox); } primaryStructureRenderer.Initialise(primaryStructure); secondaryStructureRenderer.Initialise(primaryStructure); moleculeInput.enabled = false; autoRotateEnabled = false; AutoRotateSpeed = 0f; }