Class NameToInchi


  • public class NameToInchi
    extends java.lang.Object
    Allows the conversion of OPSIN's output into (Std)InChIs or StdInChIKeys Also can be used, as a convenience method, to directly convert chemical names to (Std)InChIs or StdInChIKeys
    Author:
    dl387
    • Constructor Summary

      Constructors 
      Constructor Description
      NameToInchi()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String convertResultToInChI​(OpsinResult result)
      Converts an OPSIN result to InChI.
      static java.lang.String convertResultToStdInChI​(OpsinResult result)
      Converts an OPSIN result to StdInChI.
      static java.lang.String convertResultToStdInChIKey​(OpsinResult result)
      Converts an OPSIN result to a StdInChIKey.
      java.lang.String parseToInchi​(java.lang.String name)
      Parses a chemical name, returning an InChI representation of the molecule.
      java.lang.String parseToStdInchi​(java.lang.String name)
      Parses a chemical name, returning a StdInChI representation of the molecule.
      java.lang.String parseToStdInchiKey​(java.lang.String name)
      Parses a chemical name, returning a StdInChIKey for the molecule.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NameToInchi

        public NameToInchi()
    • Method Detail

      • parseToInchi

        public java.lang.String parseToInchi​(java.lang.String name)
        Parses a chemical name, returning an InChI representation of the molecule.
        Parameters:
        name - The chemical name to parse.
        Returns:
        An InChI string, containing the parsed molecule, or null if the molecule would not parse.
      • parseToStdInchi

        public java.lang.String parseToStdInchi​(java.lang.String name)
        Parses a chemical name, returning a StdInChI representation of the molecule. Note that chemical names typically specify an exact tautomer which is not representable in StdInChI Use parseToInchi(String) if you want to represent the exact tautomer using a fixed hydrogen layer
        Parameters:
        name - The chemical name to parse.
        Returns:
        A StdInChI string, containing the parsed molecule, or null if the molecule would not parse.
      • parseToStdInchiKey

        public java.lang.String parseToStdInchiKey​(java.lang.String name)
        Parses a chemical name, returning a StdInChIKey for the molecule. Like StdInChI, StdInChIKeys aim to not be tautomer specific
        Parameters:
        name - The chemical name to parse.
        Returns:
        A StdInChIKey string or null if the molecule would not parse.
      • convertResultToInChI

        public static java.lang.String convertResultToInChI​(OpsinResult result)
        Converts an OPSIN result to InChI. Null is returned if this conversion fails
        Parameters:
        result -
        Returns:
        String InChI
      • convertResultToStdInChI

        public static java.lang.String convertResultToStdInChI​(OpsinResult result)
        Converts an OPSIN result to StdInChI. Null is returned if this conversion fails Note that chemical names typically specify an exact tautomer which is not representable in StdInChI Use convertResultToInChI(OpsinResult) if you want to represent the exact tautomer using a fixed hydrogen layer
        Parameters:
        result -
        Returns:
        String InChI
      • convertResultToStdInChIKey

        public static java.lang.String convertResultToStdInChIKey​(OpsinResult result)
        Converts an OPSIN result to a StdInChIKey. Null is returned if this conversion fails Like StdInChI, StdInChIKeys aim to not be tautomer specific
        Parameters:
        result -
        Returns:
        String InChIKey