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

Quick Search    Search Deep

org.xmlcml.noncml
Class SMILESAtom  view SMILESAtom download SMILESAtom.java

java.lang.Object
  extended byorg.xmlcml.noncml.SMILESAtom

public class SMILESAtom
extends java.lang.Object

parse a SMILES atom [....]. Interprets leading characters of a String as a SMILES atom (used for parsing SMILES. Typical usage:

s = "[13C@H3-2]NOS"
SMILESAtom sa = new SMILESAtom(s);
String rest = s.substring(sa.getLength());
int isotope = sa.getIsotope();
String element = sa.getElementType();
String chiral = sa.getChiral();
int hCount = sa.getHydrogenCount();
int ch = sa.getFormalCharge()
At present SMARTS is not supported


Field Summary
protected  boolean aromatic
           
protected  java.lang.String chiral
           
protected  java.lang.String elementType
           
protected  int formalCharge
           
protected  int hydrogenCount
           
protected  int isotope
           
protected  int len
           
static java.lang.String UNKNOWN_ELEMENT
           
static java.lang.String UNMATCHED_BRACKET
           
static java.lang.String UNPARSABLE_ATOM
           
 
Constructor Summary
SMILESAtom(java.lang.String s)
           
 
Method Summary
 boolean getAromatic()
           
 java.lang.String getChiral()
           
 java.lang.String getElementType()
           
 int getFormalCharge()
           
 int getHydrogenCount()
           
 int getIsotope()
           
 int getLength()
           
static void main(java.lang.String[] args)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNMATCHED_BRACKET

public static final java.lang.String UNMATCHED_BRACKET
See Also:
Constant Field Values

UNKNOWN_ELEMENT

public static final java.lang.String UNKNOWN_ELEMENT
See Also:
Constant Field Values

UNPARSABLE_ATOM

public static final java.lang.String UNPARSABLE_ATOM
See Also:
Constant Field Values

aromatic

protected boolean aromatic

len

protected int len

elementType

protected java.lang.String elementType

isotope

protected int isotope

chiral

protected java.lang.String chiral

hydrogenCount

protected int hydrogenCount

formalCharge

protected int formalCharge
Constructor Detail

SMILESAtom

public SMILESAtom(java.lang.String s)
           throws org.xmlcml.cml.CMLException
Method Detail

getLength

public int getLength()

getElementType

public java.lang.String getElementType()

getIsotope

public int getIsotope()

getChiral

public java.lang.String getChiral()

getHydrogenCount

public int getHydrogenCount()

getFormalCharge

public int getFormalCharge()

getAromatic

public boolean getAromatic()

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception