Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.openscience.compchem
Class ChemFileUtils  view ChemFileUtils download ChemFileUtils.java

java.lang.Object
  extended byorg.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


Constructor Summary
ChemFileUtils()
           
 
Method Summary
private static java.lang.String formatMDLFloat(float fl)
           
private static java.lang.String formatMDLInt(int i, int l)
           
private static java.lang.String formatMDLString(java.lang.String s, int le)
           
private static java.lang.String getElementSymbol(java.lang.String s, int pos)
           
private static java.lang.String getRingNumber(java.lang.String s, int pos)
           
static Node[] parseSmiles(java.lang.String args)
          Parses a SMILES string and returns an array of nodes.
static Node[] readLUCYStructure(java.lang.String args)
           
static Node[] readMDLMolFile(java.io.File args)
           
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.
static void writeMDLMolFile(java.io.File file, java.lang.String name, Node[] setOfNodes)
           
static void writeMDLMolFile(java.lang.String fQFilename, java.lang.String name, Node[] setOfNodes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChemFileUtils

public ChemFileUtils()
Method Detail

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)