Package moss

Class Ctab

All Implemented Interfaces:
Serializable

public class Ctab extends MoleculeNtn
Class for the connection table notation (Ctab, Elsevier MDL).
Since:
2007.02.21
See Also:
  • Constructor Details

    • Ctab

      public Ctab()
      Create a connection table notation.
      Since:
      2007.02.21 (Christian Borgelt)
  • Method Details

    • isLine

      public boolean isLine()
      Whether this is a line notation (single line description).
      Specified by:
      isLine in class Notation
      Returns:
      false, since Ctab is a multi-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:
      2007.02.21 (Christian Borgelt)
    • describe

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

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

      It is tried to parse the contents of the file given by the first argument as a connection table (Ctab) description of a molecule. If this is successful, the parsed molecule is printed using the function describe().

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