private void MoveRoutine() { string destination = Path.Combine(Directory.GetCurrentDirectory(), "out"); string structOutFolder = structList.GetCurrentInfo().Name; Directory.CreateDirectory(Path.Combine(destination, structOutFolder)); string finalDestination = Path.Combine(destination, structOutFolder); }
public bool SaveSettings(int exhaust, int num_modes) { try { if (File.Exists(confPath)) { List <string> contents = new List <string>(); using (StreamReader sr = new StreamReader(confPath)) { string curLine; while ((curLine = sr.ReadLine()) != null) { if (curLine != String.Empty) { contents.Add(curLine); } } for (int i = 0; i < contents.Count; i++) { if (i == 0) { contents[0] = String.Format("receptor = {0}", findProtein()); } if (i == 1) { contents[1] = String.Format("ligand = {0}", structList.GetCurrentInfo().Name); } if (i == 9) { contents[9] = String.Format("exhaustiveness = {0}", exhaust); } if (i == 10) { contents[10] = String.Format("num_modes = {0}", num_modes); } } } using (StreamWriter sw = new StreamWriter(confPath)) { for (int i = 0; i < contents.Count; i++) { sw.WriteLine(contents[i]); } } return(true); } } catch (IOException e) { // Leave blank for now } return(false); }