コード例 #1
0
ファイル: PDBMeshGenerator.cs プロジェクト: ming81/SciSim
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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();
        }
コード例 #4
0
ファイル: PDBAsset.cs プロジェクト: ming81/SciSim
 public bool EqualsAtom(PDBAtom other)
 {
     return(chainID == other.chainID && residueNumber == other.residueNumber && residueType == other.residueType &&
            atomNumber == other.atomNumber && elementType == other.elementType && localPosition == other.localPosition);
 }