Class Sdf
- java.lang.Object
-
- com.actelion.research.chem.forcefield.mmff.Sdf
-
public class Sdf extends java.lang.Object
The Sdf class provides helper functions for dealing with the SDF file format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Sdf.OnMolecule
-
Constructor Summary
Constructors Constructor Description Sdf()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Vector3[]
getPositions(java.lang.String sdfpath)
Parses a SDF file to extract the positions of each atom.static void
testFolder(java.lang.String sdfbase, java.lang.String refbase, java.lang.String ext, Sdf.OnMolecule cb)
Tests an entire pair of folders, one containing SDF files and the other containing reference files.
-
-
-
Method Detail
-
testFolder
public static void testFolder(java.lang.String sdfbase, java.lang.String refbase, java.lang.String ext, Sdf.OnMolecule cb)
Tests an entire pair of folders, one containing SDF files and the other containing reference files. Each folder should contain either all SDF files or all reference files. There should be a corresponding reference file for each SDF file, and they should have the same name (excluding extension).- Parameters:
sdfbase
- The base folder which contains all of the SDF files.refbase
- The base folder which contains all of the reference files.
-
getPositions
public static Vector3[] getPositions(java.lang.String sdfpath)
Parses a SDF file to extract the positions of each atom. Positions are extracted as an (X, Y, Z) Vector3 object.- Parameters:
sdfpath
- The string path to the SDF file to be loaded.- Returns:
- Returns an array of Vector3's which contain the X, Y, Z coordinates of each atom.
-
-