Class MolfileUtil

java.lang.Object
chemaxon.marvin.io.formats.mdl.MolfileUtil

@PublicApi public class MolfileUtil extends Object
MDL molfile related utility methods.
Since:
Marvin 5.1.6, 03/10/2009
  • Field Details

    • SGROUP_TYPENAMES

      public static final String[] SGROUP_TYPENAMES
      Array of S-group type names.
  • Constructor Details

    • MolfileUtil

      public MolfileUtil()
  • Method Details

    • getSgroupType

      public static Integer getSgroupType(String name)
      Gets the S-group type.
      Parameters:
      name - the S-group type name
      Returns:
      the type or null for invalid type name
    • isSpecBeilsteinGeneric

      public static boolean isSpecBeilsteinGeneric(String s)
      Tests whether the specified symbol is a Beilstein Generic except A, Q and X.
      Parameters:
      s - the S-group type name
      Returns:
      the type or null for invalid type name
    • decodeHIsotopeMass

      public static int decodeHIsotopeMass(int code)
      Extract H isotope information from the given Chemaxon compressed mol format code of the atom.
      Parameters:
      code - given code
      Returns:
      the mass number stored in the code
    • codeHIsotopeMass

      public static int codeHIsotopeMass(int originalCode, int massNo)
      Add mass number information to the given code. Utility for compressed mol format coding of H isotopes.
      Parameters:
      originalCode - the code to which mass number is added
      massNo - the mass number
      Returns:
      the modified code
    • MDLCT2MDL

      public static byte[] MDLCT2MDL(byte[] data) throws IOException
      Converts an MDLCT data to MDL. MDLCT format: sequence of records where each record is a C like String. Each record stores a line of the molfile (without EOL character). The first byte describes how many bytes are allocated for the string. The MDLCT stream starts with a zero byte since Mol file starts with an empty line.
      Parameters:
      data - the clipboard transferable MDL bytes
      Returns:
      an MDL file as a byte array
      Throws:
      IOException