Skip to content

Instantly share code, notes, and snippets.

@rajarshi
Created February 20, 2017 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajarshi/86389392173191ee15cef7b76d994ae5 to your computer and use it in GitHub Desktop.
Save rajarshi/86389392173191ee15cef7b76d994ae5 to your computer and use it in GitHub Desktop.
public void testSA() throws FileNotFoundException, CDKException {
FileInputStream fis = new FileInputStream("/Users/guhar/tmp/after_alignment.sdf");
MDLV2000Reader reader = new MDLV2000Reader(fis, Mode.STRICT);
IAtomContainer after = reader.read(new AtomContainer());
fis = new FileInputStream("/Users/guhar/tmp/before_alignment.sdf");
reader = new MDLV2000Reader(fis, Mode.STRICT);
IAtomContainer before = reader.read(new AtomContainer());
System.out.println(before.getProperty(CDKConstants.TITLE));
System.out.println(after.getProperty(CDKConstants.TITLE));
NumericalSurface saAfter = new NumericalSurface(after);
saAfter.calculateSurface();
NumericalSurface saBefore = new NumericalSurface(before);
saBefore.calculateSurface();
System.out.println(saBefore.getTotalSurfaceArea()+" <-> "+saAfter.getTotalSurfaceArea());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment