Class SmilesMatcher

java.lang.Object
org.jmol.smiles.SmilesMatcher
All Implemented Interfaces:
SmilesMatcherInterface

public class SmilesMatcher extends Object implements SmilesMatcherInterface
Originating author: Nicholas Vervelle A class to handle a variety of SMILES/SMARTS-related functions, including: -- determining if two SMILES strings are equivalent -- determining the molecular formula of a SMILES or SMARTS string -- searching for specific runs of atoms in a 3D model -- searching for specific runs of atoms in a SMILES description -- generating valid (though not canonical) SMILES and bioSMILES strings -- getting atom-atom correlation maps to be used with biomolecular alignment methods

The original SMILES description can been found at the SMILES Home Page. Specification for this implementation can be found in package.html.

 
 public methods:
 
 int areEqual  -- checks a SMILES string against a reference (-1 for error; 0 for no finds; >0 for number of finds)
 
 BitSet[] find  -- finds one or more occurances of a SMILES or SMARTS string within a SMILES string
 
 int[][] getCorrelationMaps  -- returns correlated arrays of atoms
 
 String getLastError  -- returns any error that was last encountered.
 
 String getMolecularFormula   -- returns the MF of a SMILES or SMARTS string
 
 String getRelationship -- returns isomeric relationship
 
 String getSmiles  -- returns a standard SMILES string or a
                  Jmol BIOSMILES string with comment header.
 
 BitSet getSubstructureSet  -- returns a single BitSet with all found atoms included
   
   
   in Jmol script:
   
   string2.find("SMILES", string1)
   string2.find("SMARTS", string1)
   
   e.g.
   
     print "CCCC".find("SMILES", "C[C]")
 
   select search("smartsString")
   
   All bioSMARTS strings begin with ~ (tilde).
   
 
 
Author:
Bob Hanson
  • Field Details

  • Constructor Details

    • SmilesMatcher

      public SmilesMatcher()
  • Method Details