java.lang.Object
org.openscience.compchem.ChemFileUtils
- public class ChemFileUtils
- extends java.lang.Object
A collection of static methods to return an array of Nodes from
various commonly used file formats, so far only MDL Mol files and
SMILES strings
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChemFileUtils
public ChemFileUtils()
readMDLMolFile
public static Node[] readMDLMolFile(java.lang.String args)
- This needs to be fixed according to JICS (1992) 32/3,
244-255 I have written this by trial and error. Parses an
MDL Mol file and returns an array of nodes. So far, the
coordinates are ignored because I only use the method to
extract the connectivity info from the file, but the code to
read the coordinates into the x and y coordinates of the
Node class is easily added
readMDLMolFile
public static Node[] readMDLMolFile(java.io.File args)
writeMDLMolFile
public static void writeMDLMolFile(java.lang.String fQFilename,
java.lang.String name,
Node[] setOfNodes)
writeMDLMolFile
public static void writeMDLMolFile(java.io.File file,
java.lang.String name,
Node[] setOfNodes)
parseSmiles
public static Node[] parseSmiles(java.lang.String args)
- Parses a SMILES string and returns an array of nodes. So far only the
SSMILES subset and the '%' tag for more than 10 rings at a time are
supported, but this should be sufficient for most organic molecules.
getElementSymbol
private static java.lang.String getElementSymbol(java.lang.String s,
int pos)
getRingNumber
private static java.lang.String getRingNumber(java.lang.String s,
int pos)
formatMDLInt
private static java.lang.String formatMDLInt(int i,
int l)
formatMDLFloat
private static java.lang.String formatMDLFloat(float fl)
formatMDLString
private static java.lang.String formatMDLString(java.lang.String s,
int le)
readLUCYStructure
public static Node[] readLUCYStructure(java.lang.String args)