Package moss

Class SMILES

All Implemented Interfaces:
Serializable

public class SMILES extends MoleculeNtn implements Serializable
Class for the Simplified Molecular Input Line Entry System (SMILES, Daylight, Inc.).
Since:
2006.08.12
See Also:
  • Constructor Details

    • SMILES

      public SMILES()
      Create a SMILES notation object.
      Since:
      2006.08.12 (Christian Borgelt)
  • Method Details

    • isLine

      public boolean isLine()
      Whether this is a line notation (single line description).
      Specified by:
      isLine in class Notation
      Returns:
      true, because SMILES is a line notation
      Since:
      2007.03.04 (Christian Borgelt)
    • parse

      public Graph parse(Reader reader) throws IOException
      Parse the description of a molecule.
      Specified by:
      parse in class Notation
      Parameters:
      reader - the reader to read from
      Returns:
      the parsed molecule
      Throws:
      IOException - if a parse error or an i/o error occurs
      Since:
      2006.08.12 (Christian Borgelt)
    • describe

      public String describe(Graph mol)
      Create a string description of a molecule.
      Specified by:
      describe in class Notation
      Parameters:
      mol - the molecule to describe
      Returns:
      the created string description
      Since:
      2006.08.12 (Christian Borgelt)
    • main

      public static void main(String[] args)
      Main function for testing basic functionality.

      It is tried to parse the first argument as a SMILES description of a molecule. If this is successful, the parsed molecule is printed using the function describe().

      Parameters:
      args - the command line arguments
      Since:
      2006.08.12 (Christian Borgelt)