void AddAtom(PDBAtom atomData) { GameObject atom = new GameObject(atomData.elementType.ToString() + atomData.atomNumber, typeof(MetaballNode)); atom.transform.SetParent(root); atom.transform.localPosition = pointCloudScale * atomData.localPosition; atom.GetComponent <MetaballNode>().baseRadius = blobSize * MoleculeUtility.SizeForElement(atomData.elementType); }
void EmitAtom(PDBAtom atomData) { ParticleSystem.EmitParams particle = new ParticleSystem.EmitParams(); particle.position = scale * atomData.localPosition; particle.velocity = Vector3.zero; particle.startLifetime = Mathf.Infinity; particle.startColor = palette.ColorForElement(atomData.elementType); particle.startSize = scale * atomSize * MoleculeUtility.SizeForElement(atomData.elementType); particle.randomSeed = (uint)atomData.index; emitter.Emit(particle, 1); }
void ParseData() { int i = 0; residueSequence = new List <Residue>(); lines = molecule.rawData.Split('\n'); molecule.pdbID = lines[0].Substring(62, 4); foreach (string line in lines) { PDBAtom newAtom = ParseLine(i, line); if (newAtom != null) { molecule.atoms.Add(newAtom); i++; } } // PrintResidueSequence(); }
public bool EqualsAtom(PDBAtom other) { return(chainID == other.chainID && residueNumber == other.residueNumber && residueType == other.residueType && atomNumber == other.atomNumber && elementType == other.elementType && localPosition == other.localPosition); }