[r12013]: cdk-qa / trunk / projects / 080813-00001 / diff.bsh Maximize Restore History

Download this file

diff.bsh    23 lines (20 with data), 718 Bytes

#!/usr/bin/bsh

import java.io.File;
import java.io.FileReader;
import java.io.BufferedReader;

File cdkFile = new File("mol2.cdk.txt");
BufferedReader cdkReader = new BufferedReader(new FileReader(cdkFile));
File obFile = new File("mol2.zinc.txt");
BufferedReader obReader = new BufferedReader(new FileReader(obFile));

String cdkLine = cdkReader.readLine();
String obLine = obReader.readLine();
while (cdkLine != null && obLine != null) {
  // the molecule titles should always be the same, so don't worry about this.
  String cdkAT = cdkLine.trim();
  String obAT = obLine.trim();
  if (!cdkAT.equals(obAT)) {
    print(obAT + " -> " + cdkAT);
  }
  cdkLine = cdkReader.readLine();
  obLine = obReader.readLine();
}