Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Diagnostics;
- using System.IO;
- namespace Creadth.OhWhatever
- {
- class Program
- {
- static void Main(string[] args)
- {
- var watcher = new Stopwatch();
- watcher.Start();
- var molId = 0;
- using (var inFile = new StreamReader("E:/out"))
- using (var outFile = new StreamWriter("E:/in"))
- {
- outFile.WriteLine("MolID;Target;Ligand;Run;Pose;Rank;dG;VS;Atom;X;Y;Z");
- while (!inFile.EndOfStream)
- {
- var cnt = int.Parse(inFile.ReadLine());
- var comment = inFile.ReadLine();
- var isp = comment.Split(",");
- var fst = isp[0].Split("-");
- var l = $"{molId};{fst[0]};{fst[1]};{fst[4]};{fst[6]};{isp[1]};{isp[2]};{isp[3]};";
- for (int i = 0; i < cnt; i++)
- {
- outFile.WriteLine(l+inFile.ReadLine().Replace(" ", ";"));
- }
- molId++;
- }
- }
- watcher.Stop();
- Console.WriteLine("Elapsed: " + watcher.Elapsed);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement