Class MDWriter

java.lang.Object
chemaxon.descriptors.MDWriter
Direct Known Subclasses:
MDDBWriter, MDFileWriter

@PublicAPI public abstract class MDWriter extends Object
Base class definitions for MDSet output streams. All kinds of descriptors (like fingerprints, pharmacophore fingerprints) are handled in the same, transparent manner. Derived classes may differ in the type of output to be written, for instance database, readable text file, binary file etc.
Since:
JChem 2.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String[]
    The name of the Molecular Descriptors
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Deafult constructor.
    protected
    MDWriter(int descriptorCount)
    Creates and initializes an MDWriter object which handles the given number of MolecularDescriptors.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Closes down the descriptor output stream.
    abstract MDParameters
    Gets the actual parameter settings of the specified component.
    abstract void
    put(Molecule mol, int id)
    Generates the MDSet for the given Molecule and writes the descriptors into the output with the given identifier.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • mdNames

      protected String[] mdNames
      The name of the Molecular Descriptors
  • Constructor Details

    • MDWriter

      protected MDWriter()
      Deafult constructor.
    • MDWriter

      protected MDWriter(int descriptorCount)
      Creates and initializes an MDWriter object which handles the given number of MolecularDescriptors.
      Parameters:
      descriptorCount - number of components of the MDSet written
  • Method Details

    • getMDParameters

      public abstract MDParameters getMDParameters(int id)
      Gets the actual parameter settings of the specified component.
      Parameters:
      id - component index
      Returns:
      parameter settings
      Since:
      JChem 2.1
    • put

      public abstract void put(Molecule mol, int id) throws MDWriterException
      Generates the MDSet for the given Molecule and writes the descriptors into the output with the given identifier. Note, that the mol parameter is not final, because descriptors generated are stored in this object (as properties).
      Parameters:
      mol - the Molecule object to be written
      id - unique identifier of the molecule
      Throws:
      MDWriterException - all exceptions (mainly io) are reinterpreted
    • close

      public abstract void close() throws MDWriterException
      Closes down the descriptor output stream. After this, no more operation is permitted on the stream. Calling close() guarantees that all data put previously are permanently saved in the stream.
      Throws:
      MDWriterException - all exceptions (mainly io) are reinterpreted