org.jmol.smiles
Class SmilesParser

java.lang.Object
  extended by org.jmol.smiles.SmilesParser

public class SmilesParser
extends java.lang.Object

Parses a SMILES String to create a SmilesMolecule. The SMILES specification has been found at http://www.daylight.com/smiles/. Currently this parser supports only parts of the SMILES specification. An example on how to use it:

 try {
   SmilesParser sp = new SmilesParser();
   SmilesMolecule sm = sp.parseSmiles("CC(C)C(=O)O");
   // Use the resulting molecule 
 } catch (InvalidSmilesException e) {
   // Exception management
 }
 

See Also:
SMILES Home Page

Constructor Summary
SmilesParser()
          SmilesParser constructor
 
Method Summary
 SmilesMolecule parseSmiles(java.lang.String smiles)
          Parse a SMILES String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmilesParser

public SmilesParser()
SmilesParser constructor

Method Detail

parseSmiles

public SmilesMolecule parseSmiles(java.lang.String smiles)
                           throws InvalidSmilesException
Parse a SMILES String

Parameters:
smiles - SMILES String
Returns:
Molecule corresponding to smiles
Throws:
InvalidSmilesException