} // The spheres /// <summary> /// Create a new molecule representation using the contents of a .pdb file. /// </summary> /// <param name="file"> /// The .pdb file, that the molecule is parsed from. /// </param> public static CMoleculeRepresentation ParseFromFile(string file) { var name = Path.GetFileNameWithoutExtension(file); var atoms = ( from line in File.ReadLines(file) where line.StartsWith("ATOM") select CAtom.ParseFromString(line) ).ToArray(); return(new CMoleculeRepresentation(new CMolecula(atoms, name))); }
public CAtomRepresentation(CAtom atom) { Atom = atom; Sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere); }