Class OpsinResult


  • public class OpsinResult
    extends java.lang.Object
    Holds the structure OPSIN has generated from a name Additionally holds a status code for whether name interpretation was successful
    Author:
    dl387
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Returns a message explaining why generation of a molecule from the name failed This string will be blank when no problems were encountered
        Returns:
        String explaining problems encountered
      • getChemicalName

        public java.lang.String getChemicalName()
        Returns the chemical name that this OpsinResult was generated from
        Returns:
        String containing the original chemical name
      • getCml

        public java.lang.String getCml()
        Generates the CML corresponding to the molecule described by the name If name generation failed i.e. the OPSIN_RESULT_STATUS is FAILURE then null is returned
        Returns:
        Chemical Markup Language as a String
      • getPrettyPrintedCml

        public java.lang.String getPrettyPrintedCml()
        Generates the CML corresponding to the molecule described by the name If name generation failed i.e. the OPSIN_RESULT_STATUS is FAILURE then null is returned The CML is indented
        Returns:
        Idented Chemical Markup Language as a String
      • getSmiles

        public java.lang.String getSmiles()
        Generates the SMILES corresponding to the molecule described by the name If name generation failed i.e. the OPSIN_RESULT_STATUS is FAILURE then null is returned
        Returns:
        SMILES as a String
      • getExtendedSmiles

        public java.lang.String getExtendedSmiles()
        Experimental function that generates the extended SMILES corresponding to the molecule described by the name If name generation failed i.e. the OPSIN_RESULT_STATUS is FAILURE then null is returned If the molecule doesn't utilise any features made possible by extended SMILES this is equivalent to getSmiles()
        Returns:
        Extended SMILES as a String
      • nameAppearsToBeAmbiguous

        public boolean nameAppearsToBeAmbiguous()
        Convenience method to check if one of the associated OPSIN warnings was OpsinWarning.OpsinWarningType.APPEARS_AMBIGUOUS
        Returns:
        true if name appears to be ambiguous