Class SMILES

java.lang.Object
org.helm.notation2.tools.SMILES

public final class SMILES
extends Object
SMILES class to generate SMILES
Author:
hecht
  • Constructor Details

  • Method Details

    • getSMILESForAll

      public static String getSMILESForAll​(org.helm.notation2.parser.notation.HELM2Notation helm2notation) throws BuilderMoleculeException, org.helm.chemtoolkit.CTKException, ChemistryException
      method to generate smiles for the whole HELMNotation
      Parameters:
      helm2notation - input HELMNotation
      Returns:
      smiles for the whole HELMNotation
      Throws:
      BuilderMoleculeException - if the molecule can't be built
      org.helm.chemtoolkit.CTKException - general ChemToolKit exception passed to HELMToolKit
      ChemistryException - if the Chemistry Engine can not be initialized
    • getCanonicalSMILESForAll

      public static String getCanonicalSMILESForAll​(org.helm.notation2.parser.notation.HELM2Notation helm2notation) throws BuilderMoleculeException, org.helm.chemtoolkit.CTKSmilesException, org.helm.chemtoolkit.CTKException, NotationException, ChemistryException
      method to generate canonical smiles for the whole HELMNotation
      Parameters:
      helm2notation - input HELMNotation
      Returns:
      canonical smiles for the whole HELMNotation
      Throws:
      BuilderMoleculeException - if the molecule can't be built
      org.helm.chemtoolkit.CTKSmilesException - if it contains an invalid smiles
      org.helm.chemtoolkit.CTKException - general ChemToolKit exception passed to HELMToolKit
      NotationException - if notation is not valid
      ChemistryException - if the Chemistry Engine can not be initialized
    • containsGenericStructurePolymer

      public static boolean containsGenericStructurePolymer​(List<org.helm.notation2.parser.notation.polymer.PolymerNotation> polymers) throws HELM2HandledException, ChemistryException, IOException, org.helm.chemtoolkit.CTKException
      method if the any of the given PolymerNotation contains generic structures
      Parameters:
      polymers - list of polymernotations
      Returns:
      true, if it contains generic structure, false otherwise
      Throws:
      HELM2HandledException - if it contains HELM2 specific features, so that it can not be casted to HELM1 Format
      ChemistryException - if chemistry engine can not be initialized
      IOException - if monomer can not be read by chemistry
      org.helm.chemtoolkit.CTKException - general ChemToolKit exception passed to HELMToolKit
    • getUniqueExtendedSMILES

      public static String getUniqueExtendedSMILES​(String smiles)
      Parameters:
      smiles - given smiles
      Returns:
      unique extended smiles
    • getCanonicalSMILESForPolymer

      public static String getCanonicalSMILESForPolymer​(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws BuilderMoleculeException, HELM2HandledException, org.helm.chemtoolkit.CTKSmilesException, org.helm.chemtoolkit.CTKException, NotationException, ChemistryException
      method to generate canonical smiles for one single PolymerNotation
      Parameters:
      polymer - PolymerNotation
      Returns:
      smiles for the sinlge given PolymerNotation
      Throws:
      BuilderMoleculeException - if the molecule can't be built
      HELM2HandledException - if it contains HELM2 specific features, so that it can not be casted to HELM1 Format
      org.helm.chemtoolkit.CTKSmilesException - if it contains an invalid smiles
      org.helm.chemtoolkit.CTKException - general ChemToolKit exception passed to HELMToolKit
      NotationException - if notation is not valid
      ChemistryException - if the Chemistry Engine can not be initialized
    • getSMILESforPolymer

      public static String getSMILESforPolymer​(org.helm.notation2.parser.notation.polymer.PolymerNotation polymer) throws BuilderMoleculeException, HELM2HandledException, org.helm.chemtoolkit.CTKSmilesException, org.helm.chemtoolkit.CTKException, NotationException, ChemistryException
      method to generate smiles for one single PolymerNotation
      Parameters:
      polymer - PolymerNotation
      Returns:
      smiles for the sinlge given PolymerNotation
      Throws:
      BuilderMoleculeException - if the molecule can't be built
      HELM2HandledException - if it contains HELM2 specific features, so that it can not be casted to HELM1 Format
      org.helm.chemtoolkit.CTKSmilesException - if it contains an invalid smiles
      org.helm.chemtoolkit.CTKException - general ChemToolKit exception passed to HELMToolKit
      NotationException - if notation is not valid
      ChemistryException - if the Chemistry Engine can not be initialized
    • convertMolToSMILESWithAtomMapping

      public static String convertMolToSMILESWithAtomMapping​(String molfile, List<Attachment> attachments) throws org.helm.chemtoolkit.CTKException, ChemistryException
      Converts molfile with the given attachments in smiles with atom mapping
      Parameters:
      molfile - given molfile
      attachments - given attachments of the molfile
      Returns:
      smiles with atom mapping
      Throws:
      org.helm.chemtoolkit.CTKException - if the molfile can not be converted to smiles
      ChemistryException - if the Chemistry Engine can not be initialized
    • isConnected

      public static boolean isConnected​(String molfile) throws org.helm.chemtoolkit.CTKException, ChemistryException
      returns if structure is connected
      Parameters:
      molfile -
      Returns:
      boolean if structure is connected
      Throws:
      org.helm.chemtoolkit.CTKException
      ChemistryException